From 5274128ef4c262db484ca0f746923daae4df4b63 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 29 Jun 2022 14:50:20 +0300 Subject: [PATCH 001/723] Change order of tables deletion in removal of Staking dapp functionality: staking_pools_delegators first, then staking_pools --- .../repo/migrations/20220622114402_remove_staking_tables.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs b/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs index acfa3895164b..7864cecf31f7 100644 --- a/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs +++ b/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs @@ -2,7 +2,7 @@ defmodule Explorer.Repo.Migrations.RemoveStakingTables do use Ecto.Migration def change do - drop_if_exists(table(:staking_pools)) drop_if_exists(table(:staking_pools_delegators)) + drop_if_exists(table(:staking_pools)) end end From 223b3fef68dd45076142c9676acef0683b616a4e Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 29 Jun 2022 15:28:37 +0300 Subject: [PATCH 002/723] Drop staking_polls & stakin_pools_delegators tables with CASCADE flag --- .../migrations/20220622114402_remove_staking_tables.exs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs b/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs index 7864cecf31f7..53f9e9516642 100644 --- a/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs +++ b/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs @@ -2,7 +2,12 @@ defmodule Explorer.Repo.Migrations.RemoveStakingTables do use Ecto.Migration def change do - drop_if_exists(table(:staking_pools_delegators)) - drop_if_exists(table(:staking_pools)) + execute(""" + DROP TABLE staking_pools_delegators CASCADE; + """) + + execute(""" + DROP TABLE staking_pools CASCADE; + """) end end From 53f973deb5650b139123b1a75a0beb4c7cd8207b Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 29 Jun 2022 16:31:27 +0300 Subject: [PATCH 003/723] Add clause for EthereumJSONRPC.Transaction.elixir_to_params/1 when gas_price is missing in the response --- CHANGELOG.md | 1 + .../lib/ethereum_jsonrpc/transaction.ex | 90 +++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7436c8418687..a820f32768f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#5699](https://github.com/blockscout/blockscout/pull/5699) - Switch to basic (non-pro) API endpoint for Coingecko requests, if API key is not provided ### Fixes +- [#5714](https://github.com/blockscout/blockscout/pull/5714) - Add clause for EthereumJSONRPC.Transaction.elixir_to_params/1 when gas_price is missing in the response - [#5697](https://github.com/blockscout/blockscout/pull/5697) - Gas price oracle: ignore gas price rounding for values less than 0.01 - [#5690](https://github.com/blockscout/blockscout/pull/5690) - Allow special characters for password in DB URL parser diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex index 3ba37558ecdd..7bfd7b76c037 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex @@ -110,6 +110,47 @@ defmodule EthereumJSONRPC.Transaction do transaction_index: 0 } + Erigon `elixir` from txpool_content method can be converted to `params`. + + iex> EthereumJSONRPC.Transaction.elixir_to_params( + ...> %{ + ...> "blockHash" => nil, + ...> "blockNumber" => nil, + ...> "from" => "0x870006d72c247bc1e90983c71b3234ee01d3c9d9", + ...> "gas" => 182154, + ...> "hash" => "0x8d2cd1fae48ea0d2a20bb74abbfca05c2d805793e1b42fa844bbdd90f2512f39", + ...> "input" => "0x08dc9f4200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000062ad7e5d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041ea9764027fc630affb1825e91d830d1e4e9b6e701ce6eb531f7262787739466d0fc8ac23d0496ec1386d6727f3958fc147719d12a4a23b3e592fb7f499006e041b00000000000000000000000000000000000000000000000000000000000000", + ...> "maxFeePerGas" => 169648965806, + ...> "maxPriorityFeePerGas" => 0, + ...> "nonce" => 12, + ...> "r" => 54145857155959999983086152958232689936309058616635618472746031287964711695698, + ...> "s" => 15362740689264852081830165187058601082381583930006578342376475668171980574077, + ...> "to" => "0x7a41e410bb784d9875fa14f2d7d2fa825466cdae", + ...> "transactionIndex" => nil, + ...> "type" => 2, + ...> "v" => 0, + ...> "value" => 275000000000000000 + ...> } + ...> ) + %{ + block_hash: nil, + block_number: nil, + from_address_hash: "0x870006d72c247bc1e90983c71b3234ee01d3c9d9", + gas: 182154, + hash: "0x8d2cd1fae48ea0d2a20bb74abbfca05c2d805793e1b42fa844bbdd90f2512f39", + index: nil, + input: "0x08dc9f4200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000062ad7e5d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041ea9764027fc630affb1825e91d830d1e4e9b6e701ce6eb531f7262787739466d0fc8ac23d0496ec1386d6727f3958fc147719d12a4a23b3e592fb7f499006e041b00000000000000000000000000000000000000000000000000000000000000", + max_fee_per_gas: 169648965806, + max_priority_fee_per_gas: 0, + nonce: 12, + r: 54145857155959999983086152958232689936309058616635618472746031287964711695698, + s: 15362740689264852081830165187058601082381583930006578342376475668171980574077, + to_address_hash: "0x7a41e410bb784d9875fa14f2d7d2fa825466cdae", + transaction_index: nil, + type: 2, + v: 0, + value: 275000000000000000 + } """ @spec elixir_to_params(elixir) :: params @@ -162,6 +203,55 @@ defmodule EthereumJSONRPC.Transaction do end end + # txpool_content method on Erigon node returns tx data + # without gas price + def elixir_to_params( + %{ + "blockHash" => block_hash, + "blockNumber" => block_number, + "from" => from_address_hash, + "gas" => gas, + "hash" => hash, + "input" => input, + "nonce" => nonce, + "r" => r, + "s" => s, + "to" => to_address_hash, + "transactionIndex" => index, + "v" => v, + "value" => value, + "type" => type, + "maxPriorityFeePerGas" => max_priority_fee_per_gas, + "maxFeePerGas" => max_fee_per_gas + } = transaction + ) do + result = %{ + block_hash: block_hash, + block_number: block_number, + from_address_hash: from_address_hash, + gas: gas, + hash: hash, + index: index, + input: input, + nonce: nonce, + r: r, + s: s, + to_address_hash: to_address_hash, + v: v, + value: value, + transaction_index: index, + type: type, + max_priority_fee_per_gas: max_priority_fee_per_gas, + max_fee_per_gas: max_fee_per_gas + } + + if transaction["creates"] do + Map.put(result, :created_contract_address_hash, transaction["creates"]) + else + result + end + end + def elixir_to_params( %{ "blockHash" => block_hash, From 9d0ec00124d77f596827068a248dbdb3875b06ff Mon Sep 17 00:00:00 2001 From: Salisbury Date: Thu, 30 Jun 2022 16:56:15 +0300 Subject: [PATCH 004/723] Update debug_traceTransaction/tracer.js TypeError: Assignment to constant variable. at putGas --- .../js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js b/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js index fd0080f0e97f..3bc4a778a831 100644 --- a/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js +++ b/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js @@ -442,7 +442,7 @@ }, putGas(call) { - const gasBigInt = call.gasBigInt; + let gasBigInt = call.gasBigInt; delete call.gasBigInt; if (gasBigInt === undefined) { @@ -453,7 +453,7 @@ }, putGasUsed(call) { - const gasUsedBigInt = call.gasUsedBigInt; + let gasUsedBigInt = call.gasUsedBigInt; delete call.gasUsedBigInt; if (gasUsedBigInt === undefined) { From 3ad696d3de850e53223dee36d48f56b9e5315a2d Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 1 Jul 2022 11:28:11 +0300 Subject: [PATCH 005/723] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a820f32768f3..2dcac4471caa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - [#5656](https://github.com/blockscout/blockscout/pull/5656) - Gas price oracle - [#5613](https://github.com/blockscout/blockscout/pull/5613) - Exchange rates CoinMarketCap source module - [#5588](https://github.com/blockscout/blockscout/pull/5588) - Add broadcasting of coin balance +- [#5560](https://github.com/blockscout/blockscout/pull/5560) - Manual fetch benefeciaries - [#5479](https://github.com/blockscout/blockscout/pull/5479) - Remake of solidity verifier module; Verification UX improvements - [#5540](https://github.com/blockscout/blockscout/pull/5540) - Tx page: scroll to selected tab's data From 3e992d3fe04c5c17afe8240983756ff97d2d6892 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 4 Jul 2022 22:46:18 +0300 Subject: [PATCH 006/723] Footer links management --- .../lib/block_scout_web/templates/layout/_footer.html.eex | 8 ++++---- .../lib/block_scout_web/views/layout_view.ex | 5 +++-- config/runtime.exs | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex index 746689a0311c..61adfcd71224 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_footer.html.eex @@ -21,7 +21,7 @@
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex index e73435296557..ac5580736ec2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex @@ -15,7 +15,7 @@ <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_include_nightly_builds_field.html", f: f %> - <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_compiler_field.html", f: f, compiler_versions: @compiler_versions, tooltip: "The compiler version is specified in pragma solidity X.X.X. Use the compiler version rather than the nightly build. If using the Solidity compiler, run solc —version to check." %> + <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_compiler_field.html", f: f, compiler_versions: @compiler_versions, tooltip: gettext "The compiler version is specified in pragma solidity X.X.X. Use the compiler version rather than the nightly build. If using the Solidity compiler, run solc —version to check." %>
@@ -23,7 +23,7 @@
<%= select f, :evm_version, @evm_versions, class: "form-control border-rounded", "aria-describedby": "evm-version-help-block" %>
-
The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version. EVM version details.
+
<%= gettext "The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version." %> <%= gettext "EVM version details" %>.
@@ -45,7 +45,7 @@
<%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger form-error" %> -
If you enabled optimization during compilation, select yes.
+
<%= gettext "If you enabled optimization during compilation, select yes." %>
@@ -69,11 +69,11 @@ -
Drop all Solidity contract source files into the drop zone.
+
<%= gettext "Drop all Solidity contract source files into the drop zone." %>
- Add Contract Libraries + <%= gettext "Add Contract Libraries" %>
@@ -83,13 +83,13 @@ <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_name.html", library: :library1, library_name: :library1_name, - tooltip_text: "A library name called in the .sol file. Multiple libraries (up to 5) may be added for each contract. Click the Add Library button to add an additional one." + tooltip_text: gettext "A library name called in the .sol file. Multiple libraries (up to 5) may be added for each contract. Click the Add Library button to add an additional one." %> <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_address.html", library: :library1, library_address: :library1_address, - tooltip_text: "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." + tooltip_text: gettext "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." %>
@@ -118,7 +118,7 @@
- Add Library + <%= gettext "Add Library" %>
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 62b8db0fbfdd..cfde8ac14d2e 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -2786,3 +2786,76 @@ msgstr "" #, elixir-autogen, elixir-format msgid "true" msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:92 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:86 +#, elixir-autogen, elixir-format +msgid "A library name called in the .sol file. Multiple libraries (up to 5) may be added for each contract. Click the Add Library button to add an additional one." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:82 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:76 +#, elixir-autogen, elixir-format +msgid "Add Contract Libraries" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:127 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:121 +#, elixir-autogen, elixir-format +msgid "Add Library" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Drop all Solidity contract source files into the drop zone." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:26 +#, elixir-autogen, elixir-format +msgid "EVM version details" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:52 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:48 +#, elixir-autogen, elixir-format +msgid "If you enabled optimization during compilation, select yes." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 +#, elixir-autogen, elixir-format +msgid "Must match the name specified in the code. For example, in contract MyContract {..} MyContract is the contract name." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "POA solidity flattener or the" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:98 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:92 +#, elixir-autogen, elixir-format +msgid "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:26 +#, elixir-autogen, elixir-format +msgid "The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:22 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:18 +#, elixir-autogen, elixir-format +msgid "The compiler version is specified in pragma solidity X.X.X. Use the compiler version rather than the nightly build. If using the Solidity compiler, run solc —version to check." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "truffle flattener" +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 62b8db0fbfdd..24b39c2851a6 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -2786,3 +2786,76 @@ msgstr "" #, elixir-autogen, elixir-format msgid "true" msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:92 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:86 +#, elixir-autogen, elixir-format +msgid "A library name called in the .sol file. Multiple libraries (up to 5) may be added for each contract. Click the Add Library button to add an additional one." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:82 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:76 +#, elixir-autogen, elixir-format, fuzzy +msgid "Add Contract Libraries" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:127 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:121 +#, elixir-autogen, elixir-format +msgid "Add Library" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Drop all Solidity contract source files into the drop zone." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:26 +#, elixir-autogen, elixir-format, fuzzy +msgid "EVM version details" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:52 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:48 +#, elixir-autogen, elixir-format +msgid "If you enabled optimization during compilation, select yes." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 +#, elixir-autogen, elixir-format +msgid "Must match the name specified in the code. For example, in contract MyContract {..} MyContract is the contract name." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "POA solidity flattener or the" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:98 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:92 +#, elixir-autogen, elixir-format +msgid "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:26 +#, elixir-autogen, elixir-format +msgid "The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:22 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:18 +#, elixir-autogen, elixir-format +msgid "The compiler version is specified in pragma solidity X.X.X. Use the compiler version rather than the nightly build. If using the Solidity compiler, run solc —version to check." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:73 +#, elixir-autogen, elixir-format +msgid "truffle flattener" +msgstr "" diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index da4f396cfcb7..cc58587a54ad 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -99,10 +99,6 @@ config :explorer, Explorer.Tracer, config :explorer, solc_bin_api_url: "https://solc-bin.ethereum.org" -config :explorer, Explorer.SmartContract.RustVerifierInterface, - service_url: System.get_env("RUST_VERIFICATION_SERVICE_URL"), - enabled: System.get_env("ENABLE_RUST_VERIFICATION_SERVICE") == "true" - config :logger, :explorer, # keep synced with `config/config.exs` format: "$dateT$time $metadata[$level] $message\n", diff --git a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex index 20f155c1e50b..87bc56b03c17 100644 --- a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex +++ b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex @@ -6,6 +6,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do require Logger @post_timeout :infinity + @request_error_msg "Error while sending request to verification microservice" def verify_multi_part( %{ @@ -50,7 +51,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do ] end) - {:error, "Error while sending request to verification microservice"} + {:error, @request_error_msg} end end @@ -70,7 +71,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do ] end) - {:error, "Error while sending request to verification microservice"} + {:error, @request_error_msg} end end @@ -100,11 +101,13 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def proccess_verifier_response(other), do: {:error, other} - def multiple_files_verification_url, do: "#{base_url()}" <> "/api/v1/solidity/verify/multiple-files" + def multiple_files_verification_url, do: "#{base_api_url()}" <> "/solidity/verify/multiple-files" - def standard_json_input_verification_url, do: "#{base_url()}" <> "/api/v1/solidity/verify/standard-json" + def standard_json_input_verification_url, do: "#{base_api_url()}" <> "/solidity/verify/standard-json" - def versions_list_url, do: "#{base_url()}" <> "/api/v1/solidity/versions" + def versions_list_url, do: "#{base_api_url()}" <> "/solidity/versions" + + def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do url = Application.get_env(:explorer, __MODULE__)[:service_url] diff --git a/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex b/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex index d91fbe6a042c..7c34aca8e391 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex @@ -365,7 +365,7 @@ defmodule Explorer.ThirdPartyIntegrations.Sourcify do end defp verify_url_rust_microservice do - "#{RustVerifierInterface.base_url()}" <> "/api/v1/sourcify/verify" + "#{RustVerifierInterface.base_api_url()}" <> "/sourcify/verify" end defp check_by_address_url do diff --git a/config/runtime.exs b/config/runtime.exs index 6bdd5fa7a8a2..c1eeb8ae040f 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -295,6 +295,10 @@ config :explorer, Explorer.ThirdPartyIntegrations.Sourcify, chain_id: System.get_env("CHAIN_ID"), repo_url: System.get_env("SOURCIFY_REPO_URL") || "https://repo.sourcify.dev/contracts" +config :explorer, Explorer.SmartContract.RustVerifierInterface, + service_url: System.get_env("RUST_VERIFICATION_SERVICE_URL"), + enabled: System.get_env("ENABLE_RUST_VERIFICATION_SERVICE") == "true" + ############### ### Indexer ### ############### diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 872fead91d68..73fb2b2329de 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -121,3 +121,5 @@ API_RATE_LIMIT_BY_IP=50 API_RATE_LIMIT_WHITELISTED_IPS= API_RATE_LIMIT_STATIC_API_KEY= FETCH_REWARDS_WAY=trace_block +# ENABLE_RUST_VERIFICATION_SERVICE=true +# RUST_VERIFICATION_SERVICE_URL=http://0.0.0.0:8043/ \ No newline at end of file diff --git a/docker/Makefile b/docker/Makefile index 43818284fbe0..403680c9d415 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -457,6 +457,13 @@ endif ifdef POOL_SIZE_API BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_API=$(POOL_SIZE_API)' endif +ifdef ENABLE_RUST_VERIFICATION_SERVICE + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ENABLE_RUST_VERIFICATION_SERVICE=$(ENABLE_RUST_VERIFICATION_SERVICE)' +endif +ifdef RUST_VERIFICATION_SERVICE_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'RUST_VERIFICATION_SERVICE_URL=$(RUST_VERIFICATION_SERVICE_URL)' +endif + HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From 17f63c457c5fb590162cd07d2b1b2e1d96750b72 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 11 Aug 2022 14:57:55 +0300 Subject: [PATCH 127/723] Fix focus on Next button in 1st verification form (chose verification) --- .../assets/css/theme/custom_contracts/_circles-theme.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/css/theme/custom_contracts/_circles-theme.scss b/apps/block_scout_web/assets/css/theme/custom_contracts/_circles-theme.scss index f948e5bdf9e5..3ae71f538010 100644 --- a/apps/block_scout_web/assets/css/theme/custom_contracts/_circles-theme.scss +++ b/apps/block_scout_web/assets/css/theme/custom_contracts/_circles-theme.scss @@ -711,6 +711,7 @@ $c-dark-text-color: #8a8dba; color: $c-primary; } -.circles-theme-applied.dark-theme-applied a:hover, a:focus { +.circles-theme-applied.dark-theme-applied a:hover, +.circles-theme-applied.dark-theme-applied a:focus { color: $c-primary; } \ No newline at end of file From 20c1bb76a15525e34748a6fd5a17eed33da31747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Thu, 11 Aug 2022 18:55:08 +0300 Subject: [PATCH 128/723] Avoid page updating for vyper verification --- .../templates/address_contract_verification_vyper/new.html.eex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex index 2c6fe4d5dee7..a664c71aa06a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex @@ -44,7 +44,7 @@ > <%= render BlockScoutWeb.CommonComponentsView, "_loading_spinner.html", loading_text: gettext("Loading...") %> - <%= submit gettext("Verify & publish"), class: "btn-full-primary mr-2", "data-button-loading": "animation" %> + <%= submit gettext("Verify & publish"), class: "btn-full-primary mr-2", "data-button-loading": "animation", "data-submit-button": "" %> <%= reset gettext("Reset"), class: "btn-line mr-2 js-smart-contract-form-reset" %> <%= link( From dddc3f3a9f3c9dc48848c1d68760230c9269db6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Thu, 11 Aug 2022 20:18:07 +0300 Subject: [PATCH 129/723] Fix vyper verification with twin contract data --- apps/explorer/lib/explorer/chain/smart_contract.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/smart_contract.ex b/apps/explorer/lib/explorer/chain/smart_contract.ex index 007f2bfe34a1..dbe79dbd52d6 100644 --- a/apps/explorer/lib/explorer/chain/smart_contract.ex +++ b/apps/explorer/lib/explorer/chain/smart_contract.ex @@ -449,8 +449,8 @@ defmodule Explorer.Chain.SmartContract do %__MODULE__{is_vyper_contract: true} = twin_contract, %Changeset{} = changeset ) do - twin_contract - |> changeset(%{}) + %__MODULE__{} + |> changeset(Map.from_struct(twin_contract)) |> Changeset.force_change(:address_hash, Changeset.get_field(changeset, :address_hash)) end From 951038a26d35e73ab034e63f5febda32c388c3dd Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 11 Aug 2022 22:45:38 +0300 Subject: [PATCH 130/723] Disable compile env validation --- mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 6ae5f74fcab4..816bead973d6 100644 --- a/mix.exs +++ b/mix.exs @@ -25,7 +25,8 @@ defmodule BlockScout.Mixfile do explorer: :permanent, indexer: :permanent ], - steps: [:assemble, ©_prod_runtime_config/1] + steps: [:assemble, ©_prod_runtime_config/1], + validate_compile_env: false ] ] ] From 4f9b143b4fc46fbba174fe1036f6d1a81fd78d5d Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 11 Aug 2022 22:50:30 +0300 Subject: [PATCH 131/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3661a65211d2..2a939b3d630b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build - [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params +- [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation ### Chore - [#5863](https://github.com/blockscout/blockscout/pull/5863) - Update Poison hex package From 532010cda1b21f54cdb8e37e5cb67eae69b5022f Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 12 Aug 2022 13:32:13 +0300 Subject: [PATCH 132/723] Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response --- CHANGELOG.md | 1 + .../controllers/api/v1/health_controller.ex | 11 ++++++++++- config/runtime.exs | 8 +++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3661a65211d2..680f31daf3aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response - [#5809](https://github.com/blockscout/blockscout/pull/5809) - Fix 404 on `/metadata` page - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/health_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/health_controller.ex index 578c21f77a94..52352d55d4cc 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/health_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v1/health_controller.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.API.V1.HealthController do alias BlockScoutWeb.API.APILogger alias Explorer.Chain + alias Timex.Duration def health(conn, _) do APILogger.log(conn) @@ -39,12 +40,20 @@ defmodule BlockScoutWeb.API.V1.HealthController do end def error({:error, number, timestamp}) do + healthy_blocks_period = Application.get_env(:explorer, :healthy_blocks_period) + + healthy_blocks_period_formatted = + healthy_blocks_period + |> Duration.from_milliseconds() + |> Duration.to_minutes() + |> trunc() + %{ "healthy" => false, "error_code" => 5001, "error_title" => "blocks fetching is stuck", "error_description" => - "There are no new blocks in the DB for the last 5 mins. Check the healthiness of Ethereum archive node or the Blockscout DB instance", + "There are no new blocks in the DB for the last #{healthy_blocks_period_formatted} mins. Check the healthiness of Ethereum archive node or the Blockscout DB instance", "data" => %{ "latest_block_number" => to_string(number), "latest_block_inserted_at" => to_string(timestamp) diff --git a/config/runtime.exs b/config/runtime.exs index 6bdd5fa7a8a2..b47099a5b2a9 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -158,6 +158,12 @@ config :ethereum_jsonrpc, EthereumJSONRPC.Geth, debug_trace_transaction_timeout: disable_indexer = System.get_env("DISABLE_INDEXER") disable_webapp = System.get_env("DISABLE_WEBAPP") +healthy_blocks_period = + System.get_env("HEALTHY_BLOCKS_PERIOD", "5") + |> Integer.parse() + |> elem(0) + |> :timer.minutes() + config :explorer, coin: System.get_env("COIN") || "POA", coin_name: System.get_env("COIN_NAME") || System.get_env("COIN") || "POA", @@ -166,7 +172,7 @@ config :explorer, "homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg,istanbul,berlin,london,default", include_uncles_in_average_block_time: if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "true", do: true, else: false), - healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5), + healthy_blocks_period: healthy_blocks_period, realtime_events_sender: if(disable_webapp != "true", do: Explorer.Chain.Events.SimpleSender, From 7caafddcb28c794bcfb9cef9bc851f6e1c5f7faf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 15:11:33 +0300 Subject: [PATCH 133/723] Bump jest from 27.4.7 to 28.1.3 in /apps/block_scout_web/assets (#5894) * Bump jest from 27.4.7 to 28.1.3 in /apps/block_scout_web/assets Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.4.7 to 28.1.3. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v28.1.3/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Add jest-environment-jsdom Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- apps/block_scout_web/assets/package-lock.json | 2868 +++++++++-------- apps/block_scout_web/assets/package.json | 3 +- 2 files changed, 1470 insertions(+), 1401 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f37faf273202..701401e06fae 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -78,7 +78,8 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "file-loader": "^6.2.0", - "jest": "^27.4.7", + "jest": "^28.1.3", + "jest-environment-jsdom": "^28.1.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", @@ -94,10 +95,11 @@ } }, "../../../deps/phoenix": { - "version": "0.0.1" + "version": "1.5.13", + "license": "MIT" }, "../../../deps/phoenix_html": { - "version": "0.0.1" + "version": "3.0.4" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -1024,12 +1026,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2400,20 +2402,20 @@ } }, "node_modules/@jest/console": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", - "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", + "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/console/node_modules/ansi-styles": { @@ -2487,42 +2489,43 @@ } }, "node_modules/@jest/core": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", - "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", + "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/reporters": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/reporters": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.7", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-resolve-dependencies": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", - "jest-watcher": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.1.3", + "jest-config": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-resolve-dependencies": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "jest-watcher": "^28.1.3", "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -2604,85 +2607,110 @@ } }, "node_modules/@jest/environment": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", - "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", + "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", - "jest-mock": "^27.4.6" + "jest-mock": "^28.1.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "dev": true, + "dependencies": { + "expect": "^28.1.3", + "jest-snapshot": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "dependencies": { + "jest-get-type": "^28.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", - "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", + "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^28.1.3", + "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/globals": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", - "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", + "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/types": "^27.4.2", - "expect": "^27.4.6" + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/types": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", - "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", + "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -2751,6 +2779,35 @@ "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2763,74 +2820,86 @@ "node": ">=8" } }, + "node_modules/@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, "node_modules/@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.13", "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/test-result": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", - "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", + "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/types": "^28.1.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", - "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", + "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-runtime": "^27.4.6" + "@jest/test-result": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/transform": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", - "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/transform/node_modules/ansi-styles": { @@ -2904,19 +2973,20 @@ } }, "node_modules/@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", "dev": true, "dependencies": { + "@jest/schemas": "^28.1.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/types/node_modules/ansi-styles": { @@ -3126,6 +3196,12 @@ "node": ">=10" } }, + "node_modules/@sinclair/typebox": { + "version": "0.24.27", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.27.tgz", + "integrity": "sha512-K7C7IlQ3zLePEZleUN21ceBA2aLcMnLHTLph8QWk1JK37L90obdpY+QGY8bXMKxf1ht1Z0MNewvXxWv0oGDYFg==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -3147,9 +3223,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.7.0" @@ -3190,6 +3266,8 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 6" } @@ -3204,9 +3282,9 @@ } }, "node_modules/@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -3236,9 +3314,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.0.tgz", + "integrity": "sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==", "dev": true, "dependencies": { "@babel/types": "^7.3.0" @@ -3327,6 +3405,17 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jsdom": { + "version": "16.2.15", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.15.tgz", + "integrity": "sha512-nwF87yjBKuX/roqGYerZZM0Nv1pZDMAT5YhOHYeM/72Fic+VEqJh4nyoqoapzJnW3pUlfxPY5FhgsJtM+dRnQQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/parse5": "^6.0.3", + "@types/tough-cookie": "*" + } + }, "node_modules/@types/json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", @@ -3379,6 +3468,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", + "dev": true + }, "node_modules/@types/pbkdf2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", @@ -3388,9 +3483,9 @@ } }, "node_modules/@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", + "integrity": "sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A==", "dev": true }, "node_modules/@types/responselike": { @@ -3415,19 +3510,25 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "node_modules/@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "node_modules/@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz", + "integrity": "sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "node_modules/@walletconnect/browser-utils": { @@ -3870,9 +3971,9 @@ "dev": true }, "node_modules/abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "node_modules/abbrev": { @@ -3909,9 +4010,9 @@ } }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3930,6 +4031,18 @@ "acorn-walk": "^7.1.1" } }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -4359,22 +4472,21 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/babel-jest": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", - "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", + "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", "dev": true, "dependencies": { - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^28.1.3", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.4.0", + "babel-preset-jest": "^28.1.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" @@ -4495,18 +4607,18 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", + "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -4589,16 +4701,16 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", + "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^27.4.0", + "babel-plugin-jest-hoist": "^28.1.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -5349,9 +5461,9 @@ } }, "node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "node_modules/cids": { @@ -5469,7 +5581,7 @@ "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, "engines": { "iojs": ">= 1.0.0", @@ -6216,9 +6328,9 @@ } }, "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", "dev": true }, "node_modules/cssstyle": { @@ -6260,17 +6372,30 @@ } }, "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dev": true, + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/debug": { @@ -6365,7 +6490,7 @@ "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, "node_modules/deep-eql": { @@ -6486,12 +6611,12 @@ } }, "node_modules/diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/diffie-hellman": { @@ -6570,24 +6695,15 @@ ] }, "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, "dependencies": { - "webidl-conversions": "^5.0.0" + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/domhandler": { @@ -6668,12 +6784,12 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -6959,7 +7075,7 @@ "node_modules/escodegen/node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2", @@ -6989,7 +7105,7 @@ "node_modules/escodegen/node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -6998,7 +7114,7 @@ "node_modules/escodegen/node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2" @@ -7677,18 +7793,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8310,25 +8414,26 @@ "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/expect": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", - "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6" + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/express": { @@ -9343,15 +9448,15 @@ "peer": true }, "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, "dependencies": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/html-escaper": { @@ -9398,6 +9503,8 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -10155,9 +10262,9 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", "dev": true, "dependencies": { "@babel/core": "^7.12.3", @@ -10220,9 +10327,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", - "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -10245,20 +10352,21 @@ } }, "node_modules/jest": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", - "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", + "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", "dev": true, "dependencies": { - "@jest/core": "^27.4.7", + "@jest/core": "^28.1.3", + "@jest/types": "^28.1.3", "import-local": "^3.0.2", - "jest-cli": "^27.4.7" + "jest-cli": "^28.1.3" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -10270,47 +10378,46 @@ } }, "node_modules/jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", + "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", "execa": "^5.0.0", - "throat": "^6.0.1" + "p-limit": "^3.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-circus": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", - "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", + "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "p-limit": "^3.1.0", + "pretty-format": "^28.1.3", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-circus/node_modules/ansi-styles": { @@ -10384,29 +10491,29 @@ } }, "node_modules/jest-cli": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", - "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", + "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", "dev": true, "dependencies": { - "@jest/core": "^27.4.7", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/core": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.4.7", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-config": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "prompts": "^2.0.1", - "yargs": "^16.2.0" + "yargs": "^17.3.1" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -10488,41 +10595,45 @@ } }, "node_modules/jest-config": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", - "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", + "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", "dev": true, "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.4.6", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.6", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.3", + "@jest/types": "^28.1.3", + "babel-jest": "^28.1.3", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.6", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.3", + "jest-environment-node": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", - "slash": "^3.0.0" + "parse-json": "^5.2.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { + "@types/node": "*", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "ts-node": { "optional": true } @@ -10599,18 +10710,18 @@ } }, "node_modules/jest-diff": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", - "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-diff/node_modules/ansi-styles": { @@ -10684,31 +10795,31 @@ } }, "node_modules/jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-each": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", - "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", + "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6" + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.3", + "pretty-format": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-each/node_modules/ansi-styles": { @@ -10782,199 +10893,139 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", - "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.3.tgz", + "integrity": "sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/jsdom": "^16.2.4", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2", - "jsdom": "^16.6.0" + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3", + "jsdom": "^19.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-environment-node": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", - "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", + "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-haste-map": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", - "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", "micromatch": "^4.0.4", - "walker": "^1.0.7" + "walker": "^1.0.8" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "optionalDependencies": { "fsevents": "^2.3.2" } }, - "node_modules/jest-jasmine2": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", - "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", + "node_modules/jest-haste-map/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.4.6", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", - "throat": "^6.0.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" } }, - "node_modules/jest-jasmine2/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-jasmine2/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-haste-map/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-jasmine2/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-jasmine2/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-jasmine2/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-jasmine2/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/jest-leak-detector": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", - "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", + "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", "dev": true, "dependencies": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", - "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-matcher-utils/node_modules/ansi-styles": { @@ -11048,23 +11099,23 @@ } }, "node_modules/jest-message-util": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", - "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", + "pretty-format": "^28.1.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-message-util/node_modules/ansi-styles": { @@ -11138,16 +11189,16 @@ } }, "node_modules/jest-mock": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", - "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-pnp-resolver": { @@ -11168,47 +11219,45 @@ } }, "node_modules/jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-resolve": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", - "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", + "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", - "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", + "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.6" + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-resolve/node_modules/ansi-styles": { @@ -11282,36 +11331,35 @@ } }, "node_modules/jest-runner": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", - "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", + "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/environment": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-haste-map": "^27.4.6", - "jest-leak-detector": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-leak-detector": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-resolve": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-util": "^28.1.3", + "jest-watcher": "^28.1.3", + "jest-worker": "^28.1.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-runner/node_modules/ansi-styles": { @@ -11372,6 +11420,45 @@ "node": ">=8" } }, + "node_modules/jest-runner/node_modules/jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/jest-runner/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11385,36 +11472,36 @@ } }, "node_modules/jest-runtime": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", - "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/globals": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", + "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/globals": "^28.1.3", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-runtime/node_modules/ansi-styles": { @@ -11487,50 +11574,38 @@ "node": ">=8" } }, - "node_modules/jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.4" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, "node_modules/jest-snapshot": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", - "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", + "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", "dev": true, "dependencies": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", - "@types/babel__traverse": "^7.0.4", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "expect": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.6", - "semver": "^7.3.2" + "pretty-format": "^28.1.3", + "semver": "^7.3.5" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-snapshot/node_modules/ansi-styles": { @@ -11592,9 +11667,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -11619,20 +11694,20 @@ } }, "node_modules/jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-util/node_modules/ansi-styles": { @@ -11706,20 +11781,20 @@ } }, "node_modules/jest-validate": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", - "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", + "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", + "jest-get-type": "^28.0.2", "leven": "^3.1.0", - "pretty-format": "^27.4.6" + "pretty-format": "^28.1.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-validate/node_modules/ansi-styles": { @@ -11805,21 +11880,22 @@ } }, "node_modules/jest-watcher": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", - "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", + "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.4.2", + "emittery": "^0.10.2", + "jest-util": "^28.1.3", "string-length": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-watcher/node_modules/ansi-styles": { @@ -11972,23 +12048,23 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", + "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "dependencies": { "abab": "^2.0.5", - "acorn": "^8.2.4", + "acorn": "^8.5.0", "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", + "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", @@ -11997,16 +12073,16 @@ "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "peerDependencies": { "canvas": "^2.5.0" @@ -12017,22 +12093,19 @@ } } }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "node_modules/jsdom/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" + "node": ">= 10" } }, "node_modules/jsdom/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -12043,6 +12116,20 @@ "node": ">= 6" } }, + "node_modules/jsdom/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -13442,7 +13529,7 @@ "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node_modules/node-releases": { @@ -13700,9 +13787,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.1.tgz", + "integrity": "sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==", "dev": true }, "node_modules/oauth-sign": { @@ -14132,9 +14219,9 @@ "integrity": "sha512-TNtsE+34BIax3WtkB/qqu5uepV1McKYEgvL3kWzU7aqPCpMEN6rBF3AOwu4WCwAealWlBGobXny/9kJb49C1ew==" }, "node_modules/pirates": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", - "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "dev": true, "engines": { "node": ">= 6" @@ -14736,17 +14823,18 @@ } }, "node_modules/pretty-format": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", - "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", "dev": true, "dependencies": { + "@jest/schemas": "^28.1.3", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -14762,9 +14850,9 @@ } }, "node_modules/pretty-format/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, "node_modules/process": { @@ -15760,48 +15848,6 @@ "node": ">=12" } }, - "node_modules/sass-graph/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/sass-graph/node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/sass-graph/node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - } - }, "node_modules/sass-loader": { "version": "13.0.2", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.0.2.tgz", @@ -16121,9 +16167,9 @@ } }, "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/simple-concat": { @@ -16304,7 +16350,7 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "node_modules/sshpk": { @@ -17029,18 +17075,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/terser/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -17067,12 +17101,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true - }, "node_modules/timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -17140,15 +17168,15 @@ } }, "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "dependencies": { "punycode": "^2.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/trim-newlines": { @@ -17516,28 +17544,19 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "convert-source-map": "^1.6.0" }, "engines": { "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -17586,15 +17605,15 @@ } }, "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dev": true, "dependencies": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/walker": { @@ -18091,12 +18110,12 @@ } }, "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, "engines": { - "node": ">=10.4" + "node": ">=12" } }, "node_modules/webpack": { @@ -18206,18 +18225,6 @@ "node": ">=10.0.0" } }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/webpack/node_modules/acorn-import-assertions": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", @@ -18284,12 +18291,27 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "dependencies": { - "iconv-lite": "0.4.24" + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/whatwg-fetch": { @@ -18298,23 +18320,25 @@ "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" }, "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", "dev": true, "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/which": { @@ -18453,24 +18477,25 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -18527,10 +18552,13 @@ } }, "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/xmlchars": { "version": "2.2.0", @@ -18595,21 +18623,21 @@ } }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { @@ -18617,6 +18645,8 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=10" } @@ -18630,6 +18660,15 @@ "node": ">=10" } }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -19288,12 +19327,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-arrow-functions": { @@ -20199,16 +20238,16 @@ "dev": true }, "@jest/console": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", - "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", + "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", "slash": "^3.0.0" }, "dependencies": { @@ -20264,36 +20303,37 @@ } }, "@jest/core": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", - "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", + "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/reporters": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/reporters": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.7", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-resolve-dependencies": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", - "jest-watcher": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.1.3", + "jest-config": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-resolve-dependencies": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", + "jest-watcher": "^28.1.3", "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" @@ -20351,73 +20391,92 @@ } }, "@jest/environment": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", - "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", + "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", "dev": true, "requires": { - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", - "jest-mock": "^27.4.6" + "jest-mock": "^28.1.3" + } + }, + "@jest/expect": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "dev": true, + "requires": { + "expect": "^28.1.3", + "jest-snapshot": "^28.1.3" + } + }, + "@jest/expect-utils": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", + "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2" } }, "@jest/fake-timers": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", - "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", + "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^28.1.3", + "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" } }, "@jest/globals": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", - "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", + "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/types": "^27.4.2", - "expect": "^27.4.6" + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/types": "^28.1.3" } }, "@jest/reporters": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", - "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", + "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "v8-to-istanbul": "^9.0.1" }, "dependencies": { "ansi-styles": { @@ -20460,6 +20519,28 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -20471,62 +20552,71 @@ } } }, + "@jest/schemas": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", + "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", + "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.13", "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", - "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", + "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/types": "^28.1.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", - "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", + "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", "dev": true, "requires": { - "@jest/test-result": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-runtime": "^27.4.6" + "@jest/test-result": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "slash": "^3.0.0" } }, "@jest/transform": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", - "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", + "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.3", + "@jridgewell/trace-mapping": "^0.3.13", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.1" }, "dependencies": { "ansi-styles": { @@ -20581,15 +20671,16 @@ } }, "@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", + "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", "dev": true, "requires": { + "@jest/schemas": "^28.1.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "dependencies": { @@ -20756,6 +20847,12 @@ "rimraf": "^3.0.2" } }, + "@sinclair/typebox": { + "version": "0.24.27", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.27.tgz", + "integrity": "sha512-K7C7IlQ3zLePEZleUN21ceBA2aLcMnLHTLph8QWk1JK37L90obdpY+QGY8bXMKxf1ht1Z0MNewvXxWv0oGDYFg==", + "dev": true + }, "@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -20771,9 +20868,9 @@ } }, "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" @@ -20796,7 +20893,9 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "@trysound/sax": { "version": "0.2.0", @@ -20805,9 +20904,9 @@ "dev": true }, "@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -20837,9 +20936,9 @@ } }, "@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.0.tgz", + "integrity": "sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -20925,7 +21024,18 @@ "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", "dev": true, "requires": { - "@types/istanbul-lib-report": "*" + "@types/istanbul-lib-report": "*" + } + }, + "@types/jsdom": { + "version": "16.2.15", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.15.tgz", + "integrity": "sha512-nwF87yjBKuX/roqGYerZZM0Nv1pZDMAT5YhOHYeM/72Fic+VEqJh4nyoqoapzJnW3pUlfxPY5FhgsJtM+dRnQQ==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/parse5": "^6.0.3", + "@types/tough-cookie": "*" } }, "@types/json-buffer": { @@ -20980,6 +21090,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", + "dev": true + }, "@types/pbkdf2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", @@ -20989,9 +21105,9 @@ } }, "@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", + "integrity": "sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A==", "dev": true }, "@types/responselike": { @@ -21016,19 +21132,25 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz", + "integrity": "sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "@walletconnect/browser-utils": { @@ -21442,9 +21564,9 @@ "dev": true }, "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "abbrev": { @@ -21478,9 +21600,9 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-globals": { @@ -21491,6 +21613,14 @@ "requires": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } } }, "acorn-jsx": { @@ -21823,18 +21953,17 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "babel-jest": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", - "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", + "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", "dev": true, "requires": { - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^28.1.3", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.4.0", + "babel-preset-jest": "^28.1.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "dependencies": { @@ -21924,14 +22053,14 @@ } }, "babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", + "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", "dev": true, "requires": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" } }, @@ -22000,12 +22129,12 @@ } }, "babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", + "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^27.4.0", + "babel-plugin-jest-hoist": "^28.1.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -22574,9 +22703,9 @@ "dev": true }, "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "cids": { @@ -22678,7 +22807,7 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, "collect-v8-coverage": { @@ -23233,9 +23362,9 @@ } }, "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", "dev": true }, "cssstyle": { @@ -23273,14 +23402,26 @@ } }, "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" + }, + "dependencies": { + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dev": true, + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + } } }, "debug": { @@ -23347,7 +23488,7 @@ "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, "deep-eql": { @@ -23443,9 +23584,9 @@ "dev": true }, "diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true }, "diffie-hellman": { @@ -23511,20 +23652,12 @@ "dev": true }, "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true - } + "webidl-conversions": "^7.0.0" } }, "domhandler": { @@ -23598,9 +23731,9 @@ } }, "emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", "dev": true }, "emoji-regex": { @@ -23824,7 +23957,7 @@ "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "requires": { "prelude-ls": "~1.1.2", @@ -23848,13 +23981,13 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "requires": { "prelude-ls": "~1.1.2" @@ -24333,14 +24466,6 @@ "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" - }, - "dependencies": { - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - } } }, "esprima": { @@ -24934,19 +25059,20 @@ "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, "expect": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", - "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", + "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6" + "@jest/expect-utils": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3" } }, "express": { @@ -25724,12 +25850,12 @@ "peer": true }, "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, "requires": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" } }, "html-escaper": { @@ -25772,6 +25898,8 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "optional": true, + "peer": true, "requires": { "@tootallnate/once": "1", "agent-base": "6", @@ -26301,9 +26429,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", "dev": true, "requires": { "@babel/core": "^7.12.3", @@ -26353,9 +26481,9 @@ } }, "istanbul-reports": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", - "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -26372,52 +26500,52 @@ } }, "jest": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", - "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", + "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", "dev": true, "requires": { - "@jest/core": "^27.4.7", + "@jest/core": "^28.1.3", + "@jest/types": "^28.1.3", "import-local": "^3.0.2", - "jest-cli": "^27.4.7" + "jest-cli": "^28.1.3" } }, "jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", + "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", "dev": true, "requires": { - "@jest/types": "^27.4.2", "execa": "^5.0.0", - "throat": "^6.0.1" + "p-limit": "^3.1.0" } }, "jest-circus": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", - "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", + "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/expect": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", + "p-limit": "^3.1.0", + "pretty-format": "^28.1.3", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "dependencies": { "ansi-styles": { @@ -26472,23 +26600,23 @@ } }, "jest-cli": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", - "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", + "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", "dev": true, "requires": { - "@jest/core": "^27.4.7", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/core": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.4.7", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-config": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "prompts": "^2.0.1", - "yargs": "^16.2.0" + "yargs": "^17.3.1" }, "dependencies": { "ansi-styles": { @@ -26543,33 +26671,33 @@ } }, "jest-config": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", - "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", + "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", "dev": true, "requires": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.4.6", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.6", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.3", + "@jest/types": "^28.1.3", + "babel-jest": "^28.1.3", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.6", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.3", + "jest-environment-node": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-runner": "^28.1.3", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", - "slash": "^3.0.0" + "parse-json": "^5.2.0", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "dependencies": { "ansi-styles": { @@ -26624,15 +26752,15 @@ } }, "jest-diff": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", - "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", + "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" }, "dependencies": { "ansi-styles": { @@ -26687,25 +26815,25 @@ } }, "jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", - "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", + "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6" + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.3", + "pretty-format": "^28.1.3" }, "dependencies": { "ansi-styles": { @@ -26760,130 +26888,82 @@ } }, "jest-environment-jsdom": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", - "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.3.tgz", + "integrity": "sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/jsdom": "^16.2.4", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2", - "jsdom": "^16.6.0" + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3", + "jsdom": "^19.0.0" } }, "jest-environment-node": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", - "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", + "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-mock": "^28.1.3", + "jest-util": "^28.1.3" } }, "jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true }, "jest-haste-map": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", - "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", + "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^28.1.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.3", + "jest-worker": "^28.1.3", "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-jasmine2": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", - "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.4.6", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", - "throat": "^6.0.1" + "walker": "^1.0.8" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -26892,25 +26972,25 @@ } }, "jest-leak-detector": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", - "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", + "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", "dev": true, "requires": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" } }, "jest-matcher-utils": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", - "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", + "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.3" }, "dependencies": { "ansi-styles": { @@ -26965,18 +27045,18 @@ } }, "jest-message-util": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", - "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", + "pretty-format": "^28.1.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -27033,12 +27113,12 @@ } }, "jest-mock": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", - "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*" } }, @@ -27050,24 +27130,23 @@ "requires": {} }, "jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", "dev": true }, "jest-resolve": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", - "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", + "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", "dev": true, "requires": { - "@jest/types": "^27.4.2", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-util": "^28.1.3", + "jest-validate": "^28.1.3", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -27125,44 +27204,42 @@ } }, "jest-resolve-dependencies": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", - "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", + "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.6" + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.3" } }, "jest-runner": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", - "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", + "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^28.1.3", + "@jest/environment": "^28.1.3", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-haste-map": "^27.4.6", - "jest-leak-detector": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.3", + "jest-haste-map": "^28.1.3", + "jest-leak-detector": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-resolve": "^28.1.3", + "jest-runtime": "^28.1.3", + "jest-util": "^28.1.3", + "jest-watcher": "^28.1.3", + "jest-worker": "^28.1.3", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "dependencies": { "ansi-styles": { @@ -27205,6 +27282,38 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-worker": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", + "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -27217,31 +27326,31 @@ } }, "jest-runtime": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", - "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/globals": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", + "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.3", + "@jest/fake-timers": "^28.1.3", + "@jest/globals": "^28.1.3", + "@jest/source-map": "^28.1.2", + "@jest/test-result": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-mock": "^28.1.3", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.3", + "jest-snapshot": "^28.1.3", + "jest-util": "^28.1.3", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -27297,44 +27406,35 @@ } } }, - "jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", - "dev": true, - "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.4" - } - }, "jest-snapshot": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", - "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", + "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", "dev": true, "requires": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", - "@types/babel__traverse": "^7.0.4", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.3", + "@jest/transform": "^28.1.3", + "@jest/types": "^28.1.3", + "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "expect": "^28.1.3", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.3", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.3", + "jest-matcher-utils": "^28.1.3", + "jest-message-util": "^28.1.3", + "jest-util": "^28.1.3", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.6", - "semver": "^7.3.2" + "pretty-format": "^28.1.3", + "semver": "^7.3.5" }, "dependencies": { "ansi-styles": { @@ -27378,9 +27478,9 @@ "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -27398,16 +27498,16 @@ } }, "jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", + "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, "dependencies": { @@ -27463,17 +27563,17 @@ } }, "jest-validate": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", - "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", + "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^28.1.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", + "jest-get-type": "^28.0.2", "leven": "^3.1.0", - "pretty-format": "^27.4.6" + "pretty-format": "^28.1.3" }, "dependencies": { "ansi-styles": { @@ -27534,17 +27634,18 @@ } }, "jest-watcher": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", - "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", + "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", "dev": true, "requires": { - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/test-result": "^28.1.3", + "@jest/types": "^28.1.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.4.2", + "emittery": "^0.10.2", + "jest-util": "^28.1.3", "string-length": "^4.0.1" }, "dependencies": { @@ -27666,23 +27767,23 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", + "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "requires": { "abab": "^2.0.5", - "acorn": "^8.2.4", + "acorn": "^8.5.0", "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", + "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", @@ -27691,31 +27792,42 @@ "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" }, "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } } } }, @@ -28882,7 +28994,7 @@ "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node-releases": { @@ -29084,9 +29196,9 @@ "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY=" }, "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.1.tgz", + "integrity": "sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==", "dev": true }, "oauth-sign": { @@ -29402,9 +29514,9 @@ "integrity": "sha512-TNtsE+34BIax3WtkB/qqu5uepV1McKYEgvL3kWzU7aqPCpMEN6rBF3AOwu4WCwAealWlBGobXny/9kJb49C1ew==" }, "pirates": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", - "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "dev": true }, "pngjs": { @@ -29774,14 +29886,15 @@ "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==" }, "pretty-format": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", - "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", + "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", "dev": true, "requires": { + "@jest/schemas": "^28.1.3", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "dependencies": { "ansi-styles": { @@ -29791,9 +29904,9 @@ "dev": true }, "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true } } @@ -30569,41 +30682,6 @@ "lodash": "^4.17.11", "scss-tokenizer": "^0.3.0", "yargs": "^17.2.1" - }, - "dependencies": { - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "optional": true, - "peer": true - }, - "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "dev": true, - "optional": true, - "peer": true - } } }, "sass-loader": { @@ -30850,9 +30928,9 @@ } }, "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "simple-concat": { @@ -30995,7 +31073,7 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "sshpk": { @@ -31494,12 +31572,6 @@ "source-map-support": "~0.5.20" }, "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -31552,12 +31624,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true - }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -31610,9 +31676,9 @@ } }, "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "requires": { "punycode": "^2.1.1" @@ -31906,22 +31972,14 @@ "dev": true }, "v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } + "convert-source-map": "^1.6.0" } }, "validate-npm-package-license": { @@ -31966,12 +32024,12 @@ } }, "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dev": true, "requires": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" } }, "walker": { @@ -32409,9 +32467,9 @@ } }, "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true }, "webpack": { @@ -32446,12 +32504,6 @@ "webpack-sources": "^3.2.3" }, "dependencies": { - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true - }, "acorn-import-assertions": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", @@ -32537,12 +32589,23 @@ } }, "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "requires": { - "iconv-lite": "0.4.24" + "iconv-lite": "0.6.3" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } } }, "whatwg-fetch": { @@ -32551,20 +32614,19 @@ "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" }, "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true }, "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", "dev": true, "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" } }, "which": { @@ -32672,21 +32734,19 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "dev": true, "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" } }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "requires": {} }, @@ -32732,9 +32792,9 @@ } }, "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true }, "xmlchars": { @@ -32787,18 +32847,18 @@ "dev": true }, "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", "dev": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.0.0" }, "dependencies": { "y18n": { @@ -32806,6 +32866,12 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true } } }, @@ -32813,7 +32879,9 @@ "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "yocto-queue": { "version": "0.1.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 9934272e3184..1cd3ea81b997 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -90,7 +90,8 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "file-loader": "^6.2.0", - "jest": "^27.4.7", + "jest": "^28.1.3", + "jest-environment-jsdom": "^28.1.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", From 3c92a1f79a5b87a62a6cbec9d7bb0fab3a3008ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 16:57:54 +0300 Subject: [PATCH 134/723] Bump timex from 3.7.1 to 3.7.9 (#5865) * Bump timex from 3.7.1 to 3.7.9 Bumps [timex](https://github.com/bitwalker/timex) from 3.7.1 to 3.7.9. - [Release notes](https://github.com/bitwalker/timex/releases) - [Changelog](https://github.com/bitwalker/timex/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitwalker/timex/compare/3.7.1...3.7.9) --- updated-dependencies: - dependency-name: timex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Replace Translator.default_locale() -> Translator.current_locale() * Fix format_unit/4 function in order to match Timex.Translator.translate_plural\'s n is integer Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- .../average_block_time_duration_format.ex | 22 +++++++++++-------- mix.lock | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/explorer/lib/explorer/counters/average_block_time_duration_format.ex b/apps/explorer/lib/explorer/counters/average_block_time_duration_format.ex index 84444cc5c371..46be83a39ffb 100644 --- a/apps/explorer/lib/explorer/counters/average_block_time_duration_format.ex +++ b/apps/explorer/lib/explorer/counters/average_block_time_duration_format.ex @@ -36,7 +36,7 @@ defmodule Explorer.Counters.AverageBlockTimeDurationFormat do "1.1 minutes" """ @spec format(Duration.t()) :: String.t() | {:error, term} - def format(%Duration{} = duration), do: lformat(duration, Translator.default_locale()) + def format(%Duration{} = duration), do: lformat(duration, Translator.current_locale()) def format(_), do: {:error, :invalid_duration} @doc """ @@ -88,13 +88,17 @@ defmodule Explorer.Counters.AverageBlockTimeDurationFormat do truncated = trunc(decimal_value) # remove any trailing `.0` - formatted_value = - if decimal_value == truncated do - truncated - else - Float.round(decimal_value, 1) - end - - Translator.translate_plural(locale, "units", "%{count} #{singular}", "%{count} #{singular}s", formatted_value) + if decimal_value == truncated do + Translator.translate_plural(locale, "units", "%{count} #{singular}", "%{count} #{singular}s", truncated) + else + value = + decimal_value + |> Float.round(1) + |> :erlang.float_to_binary(decimals: 1) + + locale + |> Translator.translate_plural("units", "%{count} #{singular}", "%{count} #{singular}s", 5) + |> String.replace("5", value) + end end end diff --git a/mix.lock b/mix.lock index 836efc1fb10a..c1f9ad77da38 100644 --- a/mix.lock +++ b/mix.lock @@ -123,7 +123,7 @@ "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, "tesla": {:hex, :tesla, "1.4.4", "bb89aa0c9745190930366f6a2ac612cdf2d0e4d7fff449861baa7875afd797b2", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.3", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "d5503a49f9dec1b287567ea8712d085947e247cb11b06bc54adb05bfde466457"}, - "timex": {:hex, :timex, "3.7.1", "1157bd18abf2dcfd61ed666b1f73c356b2e97197deccfecafad188629282fb61", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "cb5d815666e30625d517360523ddd023eb1b4bc27c564e7501c3d050115df523"}, + "timex": {:hex, :timex, "3.7.9", "790cdfc4acfce434e442f98c02ea6d84d0239073bfd668968f82ac63e9a6788d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "64691582e5bb87130f721fc709acfb70f24405833998fabf35be968984860ce1"}, "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, From eb7dc12f6c16597b575f76ff3523255345620b9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 23:24:41 +0300 Subject: [PATCH 135/723] Bump benchee from 0.13.2 to 0.99.0 (#5872) * Bump benchee from 0.13.2 to 0.99.0 Bumps [benchee](https://github.com/bencheeorg/benchee) from 0.13.2 to 0.99.0. - [Release notes](https://github.com/bencheeorg/benchee/releases) - [Changelog](https://github.com/bencheeorg/benchee/blob/main/CHANGELOG.md) - [Commits](https://github.com/bencheeorg/benchee/compare/0.13.2...0.99.0) --- updated-dependencies: - dependency-name: benchee dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update benchee_csv Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- .gitignore | 2 ++ apps/explorer/mix.exs | 4 ++-- mix.lock | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bdb24a89a4b8..a069fb5fd6e2 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ screenshots/ .idea/ *.iml + +.vscode diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 55ecadae9ecd..3396fb05bb16 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -58,9 +58,9 @@ defmodule Explorer.Mixfile do [ {:bcrypt_elixir, "~> 1.0"}, # benchmark optimizations - {:benchee, "~> 0.13.1", only: :test}, + {:benchee, "~> 0.99.0", only: :test}, # CSV output for benchee - {:benchee_csv, "~> 0.8.0", only: :test}, + {:benchee_csv, "~> 1.0.0", only: :test}, {:bypass, "~> 1.0", only: :test}, {:briefly, "~> 0.4", github: "CargoSense/briefly"}, {:comeonin, "~> 4.0"}, diff --git a/mix.lock b/mix.lock index c1f9ad77da38..80b24ecc1c78 100644 --- a/mix.lock +++ b/mix.lock @@ -5,8 +5,8 @@ "absinthe_relay": {:hex, :absinthe_relay, "1.5.1", "adf298e77cf83d52bae1d7dc1579146bf9b893fcaa7b556d62e81a8c6f997514", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "1fd2a3559f8472c5bac5778c8b87ae5a5d7f89b594eba26b684ce1d0345a910a"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "1.1.1", "6b5560e47a02196ce5f0ab3f1d8265db79a23868c137e973b27afef928ed8006", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "10f658be786bd2daaadcd45cc5b598da01d5bbc313da4d0e3efb2d6a511d896d"}, - "benchee": {:hex, :benchee, "0.13.2", "30cd4ff5f593fdd218a9b26f3c24d580274f297d88ad43383afe525b1543b165", [:mix], [{:deep_merge, "~> 0.1", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm", "d8b3f1720073413c36a21e56a1d1112a4d67a9ad0ec900437efed08b39e515b2"}, - "benchee_csv": {:hex, :benchee_csv, "0.8.0", "0ca094677d6e2b2f601b7ee7864b754789ef9d24d079432e5e3d6f4fb83a4d80", [:mix], [{:benchee, "~> 0.12", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "74f5f5b5fe50f05ee29023d35a4d7d543230d63fa15c67076a36ad46e2b040d8"}, + "benchee": {:hex, :benchee, "0.99.0", "0efbfc31045ad2f75a48673bd1befa8a6a5855e93b8c3117aed7d7da8de65b71", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm", "672d8e9436471b7d5b77ca5be3ad69d065553e7ed8c5db29bb3d662378104618"}, + "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, "briefly": {:git, "https://github.com/CargoSense/briefly.git", "25942fba9cad46aaa870ba248c101ffee321ec9b", []}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, @@ -29,7 +29,7 @@ "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, "decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"}, - "deep_merge": {:hex, :deep_merge, "0.2.0", "c1050fa2edf4848b9f556fba1b75afc66608a4219659e3311d9c9427b5b680b3", [:mix], [], "hexpm", "e3bf435a54ed27b0ba3a01eb117ae017988804e136edcbe8a6a14c310daa966e"}, + "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, "digital_token": {:hex, :digital_token, "0.4.0", "2ad6894d4a40be8b2890aad286ecd5745fa473fa5699d80361a8c94428edcd1f", [:mix], [{:cldr_utils, "~> 2.17", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "a178edf61d1fee5bb3c34e14b0f4ee21809ee87cade8738f87337e59e5e66e26"}, "earmark": {:hex, :earmark, "1.3.5", "0db71c8290b5bc81cb0101a2a507a76dca659513984d683119ee722828b424f6", [:mix], [], "hexpm", "762b999fd414fb41e297944228aa1de2cd4a3876a07f968c8b11d1e9a2190d07"}, From edc76f6b2a7165ab9b94f79c571ae66f174cac08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 23:40:14 +0300 Subject: [PATCH 136/723] Bump wallaby from 0.29.1 to 0.30.1 (#5895) * Bump wallaby from 0.29.1 to 0.30.1 Bumps [wallaby](https://github.com/elixir-wallaby/wallaby) from 0.29.1 to 0.30.1. - [Release notes](https://github.com/elixir-wallaby/wallaby/releases) - [Changelog](https://github.com/elixir-wallaby/wallaby/blob/main/CHANGELOG.md) - [Commits](https://github.com/elixir-wallaby/wallaby/compare/v0.29.1...v0.30.1) --- updated-dependencies: - dependency-name: wallaby dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Revert update ecto, ecto_sql, postgrex * Revert update ecto, ecto_sql, postgrex * Revert update ecto, ecto_sql, postgrex Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Victor Baranov --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 80b24ecc1c78..4cc70d856fc6 100644 --- a/mix.lock +++ b/mix.lock @@ -127,7 +127,7 @@ "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, - "wallaby": {:hex, :wallaby, "0.29.1", "7ad61c98a1425db291a392e45504e897b1271c746b40fe9f19f87a86729d2fac", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "21b1360c4b13adbb0a1ff5c1053204cc4489ac81e9579c6c5011a27915cb7415"}, + "wallaby": {:hex, :wallaby, "0.30.1", "81342a34080867ab359aca23de4d1d8c6bbdeb35d8ce2a8c42e42b758d539963", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "457251df6a94ff80816524136edbce6400cb1ee979586c90224ff634e9543d78"}, "web_driver_client": {:hex, :web_driver_client, "0.2.0", "63b76cd9eb3b0716ec5467a0f8bead73d3d9612e63f7560d21357f03ad86e31a", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:tesla, "~> 1.3", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "83cc6092bc3e74926d1c8455f0ce927d5d1d36707b74d9a65e38c084aab0350f"}, "websocket_client": {:hex, :websocket_client, "1.3.0", "2275d7daaa1cdacebf2068891c9844b15f4fdc3de3ec2602420c2fb486db59b6", [:rebar3], [], "hexpm", "b864fa076f059b615da4ab99240e515b26132ce4d2d0f9df5d7f22f01fa04b65"}, "wobserver": {:git, "https://github.com/poanetwork/wobserver.git", "13bcda30a87f4f0be1878920a79433ad831eefbe", [branch: "support-https"]}, From 82738a75bd6c57baed110499b564c89379ce4a67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 23:41:13 +0300 Subject: [PATCH 137/723] Bump absinthe from 1.6.5 to 1.6.8 (#5905) * Bump absinthe from 1.6.5 to 1.6.8 Bumps [absinthe](https://github.com/absinthe-graphql/absinthe) from 1.6.5 to 1.6.8. - [Release notes](https://github.com/absinthe-graphql/absinthe/releases) - [Changelog](https://github.com/absinthe-graphql/absinthe/blob/master/CHANGELOG.md) - [Commits](https://github.com/absinthe-graphql/absinthe/compare/v1.6.5...v1.6.8) --- updated-dependencies: - dependency-name: absinthe dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Revert update ecto, dataloader * Revert update ecto, dataloader Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 4cc70d856fc6..d4ee7c71651b 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,5 @@ %{ - "absinthe": {:hex, :absinthe, "1.6.5", "b7bdb507824412c447806e08d80c8f231d51a1b40b1400e5d01bd7faf77ffda1", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a4f4ed3808467f1795baadbba24f1355e287b64e6b41ec0cfeb0713575ecb7a9"}, + "absinthe": {:hex, :absinthe, "1.6.8", "c20e5cdddddcbfe92be3e85b8b01d771f13563374a8e515258a2c16bd8dd0c2f", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "188045f059d63980c83355c6506b5451c51db722c311628141e68fd85f7fe16e"}, "absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.2", "e607b438db900049b9b3760f8ecd0591017a46122fffed7057bf6989020992b5", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "d36918925c380dc7d2ed7d039c9a3b4182ec36723f7417a68745ade5aab22f8d"}, "absinthe_plug": {:git, "https://github.com/blockscout/absinthe_plug.git", "c435d43f316769e1beee1dbe500b623124c96785", [tag: "1.5.3"]}, "absinthe_relay": {:hex, :absinthe_relay, "1.5.1", "adf298e77cf83d52bae1d7dc1579146bf9b893fcaa7b556d62e81a8c6f997514", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "1fd2a3559f8472c5bac5778c8b87ae5a5d7f89b594eba26b684ce1d0345a910a"}, From 0eed23aeebfccf3311355731321068067cdf0c5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:41:51 +0000 Subject: [PATCH 138/723] Bump benchee from 0.99.0 to 1.1.0 Bumps [benchee](https://github.com/bencheeorg/benchee) from 0.99.0 to 1.1.0. - [Release notes](https://github.com/bencheeorg/benchee/releases) - [Changelog](https://github.com/bencheeorg/benchee/blob/main/CHANGELOG.md) - [Commits](https://github.com/bencheeorg/benchee/compare/0.99.0...1.1.0) --- updated-dependencies: - dependency-name: benchee dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/explorer/mix.exs | 2 +- mix.lock | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 3396fb05bb16..5f03a4e649a4 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -58,7 +58,7 @@ defmodule Explorer.Mixfile do [ {:bcrypt_elixir, "~> 1.0"}, # benchmark optimizations - {:benchee, "~> 0.99.0", only: :test}, + {:benchee, "~> 1.1.0", only: :test}, # CSV output for benchee {:benchee_csv, "~> 1.0.0", only: :test}, {:bypass, "~> 1.0", only: :test}, diff --git a/mix.lock b/mix.lock index 80b24ecc1c78..02df9c6f7469 100644 --- a/mix.lock +++ b/mix.lock @@ -5,7 +5,7 @@ "absinthe_relay": {:hex, :absinthe_relay, "1.5.1", "adf298e77cf83d52bae1d7dc1579146bf9b893fcaa7b556d62e81a8c6f997514", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "1fd2a3559f8472c5bac5778c8b87ae5a5d7f89b594eba26b684ce1d0345a910a"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "1.1.1", "6b5560e47a02196ce5f0ab3f1d8265db79a23868c137e973b27afef928ed8006", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "10f658be786bd2daaadcd45cc5b598da01d5bbc313da4d0e3efb2d6a511d896d"}, - "benchee": {:hex, :benchee, "0.99.0", "0efbfc31045ad2f75a48673bd1befa8a6a5855e93b8c3117aed7d7da8de65b71", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm", "672d8e9436471b7d5b77ca5be3ad69d065553e7ed8c5db29bb3d662378104618"}, + "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, "briefly": {:git, "https://github.com/CargoSense/briefly.git", "25942fba9cad46aaa870ba248c101ffee321ec9b", []}, @@ -121,13 +121,14 @@ "spandex_ecto": {:hex, :spandex_ecto, "0.7.0", "259ad2feb7c834e774ec623f99c0fbacca8d60a73be212f92b75e37f853c81be", [:mix], [{:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "c64784be79d95538013b7c60828830411c5c7aff1f4e8d66dfe564b3c83b500e"}, "spandex_phoenix": {:hex, :spandex_phoenix, "1.0.6", "b2caf99cd37cf5c501c89de6099b07a8efab31747dbd63ed2fff802bb02c6937", [:mix], [{:optimal, "~> 0.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.0", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.3", [hex: :plug, repo: "hexpm", optional: false]}, {:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "e286d4bfe6917ecddf56b47553322b55bdc328326b7d86a6c35b4835679e9784"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, + "statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"}, "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, "tesla": {:hex, :tesla, "1.4.4", "bb89aa0c9745190930366f6a2ac612cdf2d0e4d7fff449861baa7875afd797b2", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.3", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "d5503a49f9dec1b287567ea8712d085947e247cb11b06bc54adb05bfde466457"}, "timex": {:hex, :timex, "3.7.9", "790cdfc4acfce434e442f98c02ea6d84d0239073bfd668968f82ac63e9a6788d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "64691582e5bb87130f721fc709acfb70f24405833998fabf35be968984860ce1"}, "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, - "wallaby": {:hex, :wallaby, "0.29.1", "7ad61c98a1425db291a392e45504e897b1271c746b40fe9f19f87a86729d2fac", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "21b1360c4b13adbb0a1ff5c1053204cc4489ac81e9579c6c5011a27915cb7415"}, + "wallaby": {:hex, :wallaby, "0.30.1", "81342a34080867ab359aca23de4d1d8c6bbdeb35d8ce2a8c42e42b758d539963", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "457251df6a94ff80816524136edbce6400cb1ee979586c90224ff634e9543d78"}, "web_driver_client": {:hex, :web_driver_client, "0.2.0", "63b76cd9eb3b0716ec5467a0f8bead73d3d9612e63f7560d21357f03ad86e31a", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:tesla, "~> 1.3", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "83cc6092bc3e74926d1c8455f0ce927d5d1d36707b74d9a65e38c084aab0350f"}, "websocket_client": {:hex, :websocket_client, "1.3.0", "2275d7daaa1cdacebf2068891c9844b15f4fdc3de3ec2602420c2fb486db59b6", [:rebar3], [], "hexpm", "b864fa076f059b615da4ab99240e515b26132ce4d2d0f9df5d7f22f01fa04b65"}, "wobserver": {:git, "https://github.com/poanetwork/wobserver.git", "13bcda30a87f4f0be1878920a79433ad831eefbe", [branch: "support-https"]}, From e280f60971fe1548fcab90e94d41f3cb19a998f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 23:45:23 +0300 Subject: [PATCH 139/723] Bump dataloader from 1.0.9 to 1.0.10 (#5881) * Bump dataloader from 1.0.9 to 1.0.10 Bumps [dataloader](https://github.com/absinthe-graphql/dataloader) from 1.0.9 to 1.0.10. - [Release notes](https://github.com/absinthe-graphql/dataloader/releases) - [Changelog](https://github.com/absinthe-graphql/dataloader/blob/master/CHANGELOG.md) - [Commits](https://github.com/absinthe-graphql/dataloader/commits) --- updated-dependencies: - dependency-name: dataloader dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Revert update ecto Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index d4ee7c71651b..e98210b319a3 100644 --- a/mix.lock +++ b/mix.lock @@ -25,7 +25,7 @@ "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, "csv": {:hex, :csv, "2.4.1", "50e32749953b6bf9818dbfed81cf1190e38cdf24f95891303108087486c5925e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "54508938ac67e27966b10ef49606e3ad5995d665d7fc2688efb3eab1307c9079"}, - "dataloader": {:hex, :dataloader, "1.0.9", "8fb981e327fa692f741ab283ed93790203a6f6d412800f0f4f1531372e1dbf15", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6f8b7566c8dda46f53bdb336fd02f03f00bf58aeb6cc0f139ccdfd6f99d265a7"}, + "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, "decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"}, From d3557c3d54232a796eedeab6e5582ff62ef83f4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:47:16 +0000 Subject: [PATCH 140/723] Bump credo from 1.6.4 to 1.6.6 Bumps [credo](https://github.com/rrrene/credo) from 1.6.4 to 1.6.6. - [Release notes](https://github.com/rrrene/credo/releases) - [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md) - [Commits](https://github.com/rrrene/credo/compare/v1.6.4...v1.6.6) --- updated-dependencies: - dependency-name: credo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index e98210b319a3..6e6bee1b3567 100644 --- a/mix.lock +++ b/mix.lock @@ -23,7 +23,7 @@ "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, - "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, + "credo": {:hex, :credo, "1.6.6", "f51f8d45db1af3b2e2f7bee3e6d3c871737bda4a91bff00c5eec276517d1a19c", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "625520ce0984ee0f9f1f198165cd46fa73c1e59a17ebc520038b8fce056a5bdc"}, "csv": {:hex, :csv, "2.4.1", "50e32749953b6bf9818dbfed81cf1190e38cdf24f95891303108087486c5925e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "54508938ac67e27966b10ef49606e3ad5995d665d7fc2688efb3eab1307c9079"}, "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, From d0f49b10aa853520819f8d2504cfc914865090d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:25:50 +0000 Subject: [PATCH 141/723] Bump junit_formatter from 3.3.0 to 3.3.1 Bumps [junit_formatter](https://github.com/victorolinasc/junit-formatter) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/victorolinasc/junit-formatter/releases) - [Changelog](https://github.com/victorolinasc/junit-formatter/blob/master/CHANGELOG.md) - [Commits](https://github.com/victorolinasc/junit-formatter/commits/v3.3.1) --- updated-dependencies: - dependency-name: junit_formatter dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index e98210b319a3..9fbf52c66109 100644 --- a/mix.lock +++ b/mix.lock @@ -66,7 +66,7 @@ "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"}, "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"}, - "junit_formatter": {:hex, :junit_formatter, "3.3.0", "bd7914d92885f7cf949dbe1dc6bacf76badfb2c1f5f7b3f9433c20e5b6ec42c8", [:mix], [], "hexpm", "4d040410925324b155ae4c7d41e884a0cdebe53b917bee4f22adf152e987a666"}, + "junit_formatter": {:hex, :junit_formatter, "3.3.1", "c729befb848f1b9571f317d2fefa648e9d4869befc4b2980daca7c1edc468e40", [:mix], [], "hexpm", "761fc5be4b4c15d8ba91a6dafde0b2c2ae6db9da7b8832a55b5a1deb524da72b"}, "libsecp256k1": {:hex, :libsecp256k1, "0.1.10", "d27495e2b9851c7765129b76c53b60f5e275bd6ff68292c50536bf6b8d091a4d", [:make, :mix], [{:mix_erlang_tasks, "0.1.0", [hex: :mix_erlang_tasks, repo: "hexpm", optional: false]}], "hexpm", "09ea06239938571124f7f5a27bc9ac45dfb1cfc2df40d46ee9b59c3d51366652"}, "logger_file_backend": {:hex, :logger_file_backend, "0.0.12", "5afaa76a0cb6123cd19900c0f414044cfc46c24c6a1b80842a9b0e7f6c755e57", [:mix], [], "hexpm", "7335cc4e186a3804f9d3651f2fb42243a11748f1e384421bdd17623ed53fed79"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, From 4e4484748667e4f3acbd8c6ebd486a09795f860c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 09:11:11 +0300 Subject: [PATCH 142/723] Bump absinthe_relay from 1.5.1 to 1.5.2 (#5911) * Bump absinthe_relay from 1.5.1 to 1.5.2 Bumps [absinthe_relay](https://github.com/absinthe-graphql/absinthe_relay) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/absinthe-graphql/absinthe_relay/releases) - [Changelog](https://github.com/absinthe-graphql/absinthe_relay/blob/master/CHANGELOG.md) - [Commits](https://github.com/absinthe-graphql/absinthe_relay/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: absinthe_relay dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Revert ecto update * Revert ecto update Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viktor Baranov --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 45539bccdc39..843cd16c3a0c 100644 --- a/mix.lock +++ b/mix.lock @@ -1,8 +1,8 @@ %{ - "absinthe": {:hex, :absinthe, "1.6.8", "c20e5cdddddcbfe92be3e85b8b01d771f13563374a8e515258a2c16bd8dd0c2f", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "188045f059d63980c83355c6506b5451c51db722c311628141e68fd85f7fe16e"}, + "absinthe": {:hex, :absinthe, "1.7.0", "36819e7b1fd5046c9c734f27fe7e564aed3bda59f0354c37cd2df88fd32dd014", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "566a5b5519afc9b29c4d367f0c6768162de3ec03e9bf9916f9dc2bcbe7c09643"}, "absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.2", "e607b438db900049b9b3760f8ecd0591017a46122fffed7057bf6989020992b5", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "d36918925c380dc7d2ed7d039c9a3b4182ec36723f7417a68745ade5aab22f8d"}, "absinthe_plug": {:git, "https://github.com/blockscout/absinthe_plug.git", "c435d43f316769e1beee1dbe500b623124c96785", [tag: "1.5.3"]}, - "absinthe_relay": {:hex, :absinthe_relay, "1.5.1", "adf298e77cf83d52bae1d7dc1579146bf9b893fcaa7b556d62e81a8c6f997514", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "1fd2a3559f8472c5bac5778c8b87ae5a5d7f89b594eba26b684ce1d0345a910a"}, + "absinthe_relay": {:hex, :absinthe_relay, "1.5.2", "cfb8aed70f4e4c7718d3f1c212332d2ea728f17c7fc0f68f1e461f0f5f0c4b9a", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0 or ~> 1.7.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "0587ee913afa31512e1457a5064ee88427f8fe7bcfbeeecd41c71d9cff0b62b6"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "1.1.1", "6b5560e47a02196ce5f0ab3f1d8265db79a23868c137e973b27afef928ed8006", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "10f658be786bd2daaadcd45cc5b598da01d5bbc313da4d0e3efb2d6a511d896d"}, "benchee": {:hex, :benchee, "0.99.0", "0efbfc31045ad2f75a48673bd1befa8a6a5855e93b8c3117aed7d7da8de65b71", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm", "672d8e9436471b7d5b77ca5be3ad69d065553e7ed8c5db29bb3d662378104618"}, From da88034081ba1ca76367dcb357df4c96c6e96a1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:11:24 +0000 Subject: [PATCH 143/723] Bump flow from 0.15.0 to 1.2.0 Bumps [flow](https://github.com/dashbitco/flow) from 0.15.0 to 1.2.0. - [Release notes](https://github.com/dashbitco/flow/releases) - [Changelog](https://github.com/dashbitco/flow/blob/master/CHANGELOG.md) - [Commits](https://github.com/dashbitco/flow/compare/v0.15.0...v1.2.0) --- updated-dependencies: - dependency-name: flow dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/mix.exs | 2 +- mix.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 56e8f9318cf4..8f8a1e3bc7f3 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -81,7 +81,7 @@ defmodule BlockScoutWeb.Mixfile do {:file_info, "~> 0.0.4"}, # HTML CSS selectors for Phoenix controller tests {:floki, "~> 0.31"}, - {:flow, "~> 0.12"}, + {:flow, "~> 1.2"}, {:gettext, "~> 0.20.0"}, {:hammer, "~> 6.0"}, {:httpoison, "~> 1.6"}, diff --git a/mix.lock b/mix.lock index 9fbf52c66109..62dc07a081f4 100644 --- a/mix.lock +++ b/mix.lock @@ -23,7 +23,7 @@ "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, - "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, + "credo": {:hex, :credo, "1.6.6", "f51f8d45db1af3b2e2f7bee3e6d3c871737bda4a91bff00c5eec276517d1a19c", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "625520ce0984ee0f9f1f198165cd46fa73c1e59a17ebc520038b8fce056a5bdc"}, "csv": {:hex, :csv, "2.4.1", "50e32749953b6bf9818dbfed81cf1190e38cdf24f95891303108087486c5925e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "54508938ac67e27966b10ef49606e3ad5995d665d7fc2688efb3eab1307c9079"}, "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, @@ -56,8 +56,8 @@ "file_info": {:hex, :file_info, "0.0.4", "2e0e77f211e833f38ead22cb29ce53761d457d80b3ffe0ffe0eb93880b0963b2", [:mix], [{:mimetype_parser, "~> 0.1.2", [hex: :mimetype_parser, repo: "hexpm", optional: false]}], "hexpm", "50e7ad01c2c8b9339010675fe4dc4a113b8d6ca7eddce24d1d74fd0e762781a5"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "floki": {:hex, :floki, "0.32.1", "dfe3b8db3b793939c264e6f785bca01753d17318d144bd44b407fb3493acaa87", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "d4b91c713e4a784a3f7b1e3cc016eefc619f6b1c3898464222867cafd3c681a3"}, - "flow": {:hex, :flow, "0.15.0", "503717c0e367b5713336181d5305106840f64abbad32c75d7af5ef1bb0908e38", [:mix], [{:gen_stage, "~> 0.14.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "d7ecbd4dd38a188494bc996d5014ef8335f436a0b262140a1f6441ae94714581"}, - "gen_stage": {:hex, :gen_stage, "0.14.3", "d0c66f1c87faa301c1a85a809a3ee9097a4264b2edf7644bf5c123237ef732bf", [:mix], [], "hexpm", "8453e2289d94c3199396eb517d65d6715ef26bcae0ee83eb5ff7a84445458d76"}, + "flow": {:hex, :flow, "1.2.0", "515e03aa3d056cecc3e3f1e80f6ca4bbf5f45b13c88dee5db880b2f3f24f1caa", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "1b45bfc8a9202c5ec80b077c21df133561e56c56189ba4082dddccb6b5762525"}, + "gen_stage": {:hex, :gen_stage, "1.1.2", "b1656cd4ba431ed02c5656fe10cb5423820847113a07218da68eae5d6a260c23", [:mix], [], "hexpm", "9e39af23140f704e2b07a3e29d8f05fd21c2aaf4088ff43cb82be4b9e3148d02"}, "gettext": {:hex, :gettext, "0.20.0", "75ad71de05f2ef56991dbae224d35c68b098dd0e26918def5bb45591d5c8d429", [:mix], [], "hexpm", "1c03b177435e93a47441d7f681a7040bd2a816ece9e2666d1c9001035121eb3d"}, "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, "hammer": {:hex, :hammer, "6.1.0", "f263e3c3e9946bd410ea0336b2abe0cb6260af4afb3a221e1027540706e76c55", [:make, :mix], [{:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}], "hexpm", "b47e415a562a6d072392deabcd58090d8a41182cf9044cdd6b0d0faaaf68ba57"}, From 216c63be7db8173ba4da584e4b06e65b1b2e1ae4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:12:25 +0000 Subject: [PATCH 144/723] Bump dialyxir from 1.1.0 to 1.2.0 Bumps [dialyxir](https://github.com/jeremyjh/dialyxir) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/jeremyjh/dialyxir/releases) - [Changelog](https://github.com/jeremyjh/dialyxir/blob/master/CHANGELOG.md) - [Commits](https://github.com/jeremyjh/dialyxir/compare/1.1.0...1.2.0) --- updated-dependencies: - dependency-name: dialyxir dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 9fbf52c66109..5790a333b4b2 100644 --- a/mix.lock +++ b/mix.lock @@ -23,14 +23,14 @@ "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, - "credo": {:hex, :credo, "1.6.4", "ddd474afb6e8c240313f3a7b0d025cc3213f0d171879429bf8535d7021d9ad78", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "c28f910b61e1ff829bffa056ef7293a8db50e87f2c57a9b5c3f57eee124536b7"}, + "credo": {:hex, :credo, "1.6.6", "f51f8d45db1af3b2e2f7bee3e6d3c871737bda4a91bff00c5eec276517d1a19c", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "625520ce0984ee0f9f1f198165cd46fa73c1e59a17ebc520038b8fce056a5bdc"}, "csv": {:hex, :csv, "2.4.1", "50e32749953b6bf9818dbfed81cf1190e38cdf24f95891303108087486c5925e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "54508938ac67e27966b10ef49606e3ad5995d665d7fc2688efb3eab1307c9079"}, "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, "decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"}, "decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"}, "deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"}, - "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, + "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, "digital_token": {:hex, :digital_token, "0.4.0", "2ad6894d4a40be8b2890aad286ecd5745fa473fa5699d80361a8c94428edcd1f", [:mix], [{:cldr_utils, "~> 2.17", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "a178edf61d1fee5bb3c34e14b0f4ee21809ee87cade8738f87337e59e5e66e26"}, "earmark": {:hex, :earmark, "1.3.5", "0db71c8290b5bc81cb0101a2a507a76dca659513984d683119ee722828b424f6", [:mix], [], "hexpm", "762b999fd414fb41e297944228aa1de2cd4a3876a07f968c8b11d1e9a2190d07"}, "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, From e8f4a495e05d54cf0f4f9be8b0fb24a19febd200 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 13 Aug 2022 09:14:44 +0300 Subject: [PATCH 145/723] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a5f4ddf99bd0..b6a9ec46bde4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,7 +2,7 @@ version: 2 updates: - package-ecosystem: "mix" directory: "/" - open-pull-requests-limit: 10 + open-pull-requests-limit: 20 schedule: interval: "daily" From b396daf1235815b744942d1e1726292114b6cfc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:16:00 +0000 Subject: [PATCH 146/723] Bump bypass from 1.0.0 to 2.1.0 Bumps [bypass](https://github.com/PSPDFKit-labs/bypass) from 1.0.0 to 2.1.0. - [Release notes](https://github.com/PSPDFKit-labs/bypass/releases) - [Changelog](https://github.com/PSPDFKit-labs/bypass/blob/master/CHANGELOG.md) - [Commits](https://github.com/PSPDFKit-labs/bypass/compare/v1.0.0...v2.1.0) --- updated-dependencies: - dependency-name: bypass dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/mix.exs | 2 +- apps/explorer/mix.exs | 2 +- mix.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 56e8f9318cf4..3659ba7a4838 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -61,7 +61,7 @@ defmodule BlockScoutWeb.Mixfile do {:absinthe_plug, git: "https://github.com/blockscout/absinthe_plug.git", tag: "1.5.3", override: true}, # Absinthe support for the Relay framework {:absinthe_relay, "~> 1.5"}, - {:bypass, "~> 1.0", only: :test}, + {:bypass, "~> 2.1", only: :test}, # To add (CORS)(https://www.w3.org/TR/cors/) {:cors_plug, "~> 3.0"}, {:credo, "~> 1.5", only: :test, runtime: false}, diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 3396fb05bb16..6faf7d505948 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -61,7 +61,7 @@ defmodule Explorer.Mixfile do {:benchee, "~> 0.99.0", only: :test}, # CSV output for benchee {:benchee_csv, "~> 1.0.0", only: :test}, - {:bypass, "~> 1.0", only: :test}, + {:bypass, "~> 2.1", only: :test}, {:briefly, "~> 0.4", github: "CargoSense/briefly"}, {:comeonin, "~> 4.0"}, {:credo, "~> 1.5", only: :test, runtime: false}, diff --git a/mix.lock b/mix.lock index 843cd16c3a0c..69b0eaa560f3 100644 --- a/mix.lock +++ b/mix.lock @@ -10,7 +10,7 @@ "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, "briefly": {:git, "https://github.com/CargoSense/briefly.git", "25942fba9cad46aaa870ba248c101ffee321ec9b", []}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "bypass": {:hex, :bypass, "1.0.0", "b78b3dcb832a71aca5259c1a704b2e14b55fd4e1327ff942598b4e7d1a7ad83d", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}], "hexpm", "5a1dc855dfcc86160458c7a70d25f65d498bd8012bd4c06a8d3baa368dda3c45"}, + "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "cldr_utils": {:hex, :cldr_utils, "2.18.0", "674a2941abfd501a338b02244985feb7e526b1b41417b305c45a682e1f7b07b0", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "b435777ae33e8e86cfbeb96437881cf751d5062f366dacdae2e6548f83257a52"}, From f3fb5163e5616a3860b021565627215aae0cd881 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:16:27 +0000 Subject: [PATCH 147/723] Bump logger_file_backend from 0.0.12 to 0.0.13 Bumps [logger_file_backend](https://github.com/onkel-dirtus/logger_file_backend) from 0.0.12 to 0.0.13. - [Release notes](https://github.com/onkel-dirtus/logger_file_backend/releases) - [Changelog](https://github.com/onkel-dirtus/logger_file_backend/blob/master/CHANGELOG.md) - [Commits](https://github.com/onkel-dirtus/logger_file_backend/commits) --- updated-dependencies: - dependency-name: logger_file_backend dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 843cd16c3a0c..9c46f8237425 100644 --- a/mix.lock +++ b/mix.lock @@ -68,7 +68,7 @@ "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"}, "junit_formatter": {:hex, :junit_formatter, "3.3.1", "c729befb848f1b9571f317d2fefa648e9d4869befc4b2980daca7c1edc468e40", [:mix], [], "hexpm", "761fc5be4b4c15d8ba91a6dafde0b2c2ae6db9da7b8832a55b5a1deb524da72b"}, "libsecp256k1": {:hex, :libsecp256k1, "0.1.10", "d27495e2b9851c7765129b76c53b60f5e275bd6ff68292c50536bf6b8d091a4d", [:make, :mix], [{:mix_erlang_tasks, "0.1.0", [hex: :mix_erlang_tasks, repo: "hexpm", optional: false]}], "hexpm", "09ea06239938571124f7f5a27bc9ac45dfb1cfc2df40d46ee9b59c3d51366652"}, - "logger_file_backend": {:hex, :logger_file_backend, "0.0.12", "5afaa76a0cb6123cd19900c0f414044cfc46c24c6a1b80842a9b0e7f6c755e57", [:mix], [], "hexpm", "7335cc4e186a3804f9d3651f2fb42243a11748f1e384421bdd17623ed53fed79"}, + "logger_file_backend": {:hex, :logger_file_backend, "0.0.13", "df07b14970e9ac1f57362985d76e6f24e3e1ab05c248055b7d223976881977c2", [:mix], [], "hexpm", "71a453a7e6e899ae4549fb147b1c6621f4233f8f48f58ca10a64ec67b6c50018"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, From f88de8f3203679cb7e10a4de576a69c66ec99bd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:17:09 +0000 Subject: [PATCH 148/723] Bump spandex_datadog from 1.1.0 to 1.2.0 Bumps [spandex_datadog](https://github.com/spandex-project/spandex_datadog) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/spandex-project/spandex_datadog/releases) - [Changelog](https://github.com/spandex-project/spandex_datadog/blob/master/CHANGELOG.md) - [Commits](https://github.com/spandex-project/spandex_datadog/compare/1.1.0...1.2.0) --- updated-dependencies: - dependency-name: spandex_datadog dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 843cd16c3a0c..fc9c6d740295 100644 --- a/mix.lock +++ b/mix.lock @@ -83,7 +83,7 @@ "mochiweb": {:hex, :mochiweb, "2.18.0", "eb55f1db3e6e960fac4e6db4e2db9ec3602cc9f30b86cd1481d56545c3145d2e", [:rebar3], [], "hexpm", "b93e2b1e564bdbadfecc297277f9e6d0902da645b417d6c9210f6038ac63489a"}, "mock": {:hex, :mock, "0.3.7", "75b3bbf1466d7e486ea2052a73c6e062c6256fb429d6797999ab02fa32f29e03", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "4da49a4609e41fd99b7836945c26f373623ea968cfb6282742bcb94440cf7e5c"}, "mox": {:hex, :mox, "1.0.2", "dc2057289ac478b35760ba74165b4b3f402f68803dd5aecd3bfd19c183815d64", [:mix], [], "hexpm", "f9864921b3aaf763c8741b5b8e6f908f44566f1e427b2630e89e9a73b981fef2"}, - "msgpax": {:hex, :msgpax, "2.2.4", "7b3790ef684089076b63c0f08c2f4b079c6311daeb006b69e4ed2bf67518291e", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "b351b6d992d79624a8430a99d21a41b36b1b90edf84326a294e9f4a2de11f089"}, + "msgpax": {:hex, :msgpax, "2.3.0", "14f52ad249a3f77b5e2d59f6143e6c18a6e74f34666989e22bac0a465f9835cc", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "65c36846a62ed5615baf7d7d47babb6541313a6c0b6d2ff19354bd518f52df7e"}, "nimble_csv": {:hex, :nimble_csv, "1.1.0", "b1dba4a86be9e03065c9de829050468e591f569100332db949e7ce71be0afc25", [:mix], [], "hexpm", "e986755bc302832cac429be6deda0fc9d82d3c82b47abefb68b3c17c9d949a3f"}, "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "number": {:hex, :number, "1.0.3", "932c8a2d478a181c624138958ca88a78070332191b8061717270d939778c9857", [:mix], [{:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "dd397bbc096b2ca965a6a430126cc9cf7b9ef7421130def69bcf572232ca0f18"}, @@ -117,7 +117,7 @@ "rustler": {:hex, :rustler, "0.24.0", "b8362a2fee1c9d2c7373b0bfdc98f75bbc02864efcec50df173fe6c4f72d4cc4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "2773167fca68a6525822ad977b41368ea3c2af876c42ebaa7c9d6bb69b67f1ce"}, "sobelow": {:hex, :sobelow, "0.11.1", "23438964486f8112b41e743bbfd402da3e5b296fdc9eacab29914b79c48916dd", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9897363a7eff96f4809304a90aad819e2ad5e5d24db547af502885146746a53c"}, "spandex": {:hex, :spandex, "3.1.0", "e43df29af70f6f0c13ddd07a5e68650e13dd2a76c6215977c651e64412e8ebee", [:mix], [{:decorator, "~> 1.2", [hex: :decorator, repo: "hexpm", optional: true]}, {:optimal, "~> 0.3.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:plug, ">= 1.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "6b053ab307856e34237f06a5ea931eeadf78bdd6f00a49bbfb4103e004a3d3c7"}, - "spandex_datadog": {:hex, :spandex_datadog, "1.1.0", "8c84e2f6c4067edc2e920dd79242f7bb0d6403652a7e9bc42109007f76b9be25", [:mix], [{:msgpax, "~> 2.2.1", [hex: :msgpax, repo: "hexpm", optional: false]}, {:spandex, "~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f4c20d3e601cad869705d9789f17a9242f245ce0bf2579fc835e96a6834663e2"}, + "spandex_datadog": {:hex, :spandex_datadog, "1.2.0", "007600250cfa17535138d1e56a4948222285150dfeb0e7a92e55fcf11d5f82f3", [:mix], [{:msgpax, "~> 2.2.1 or ~> 2.3", [hex: :msgpax, repo: "hexpm", optional: false]}, {:spandex, "~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f11cd7c2d9ef6c2958b055c5ac00541435144e8ff9594860b40dbada7702a656"}, "spandex_ecto": {:hex, :spandex_ecto, "0.7.0", "259ad2feb7c834e774ec623f99c0fbacca8d60a73be212f92b75e37f853c81be", [:mix], [{:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "c64784be79d95538013b7c60828830411c5c7aff1f4e8d66dfe564b3c83b500e"}, "spandex_phoenix": {:hex, :spandex_phoenix, "1.0.6", "b2caf99cd37cf5c501c89de6099b07a8efab31747dbd63ed2fff802bb02c6937", [:mix], [{:optimal, "~> 0.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.0", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.3", [hex: :plug, repo: "hexpm", optional: false]}, {:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "e286d4bfe6917ecddf56b47553322b55bdc328326b7d86a6c35b4835679e9784"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, From 6932004f8fa196bcfef32a1c0d1c2077a072f53d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 13 Aug 2022 09:30:13 +0300 Subject: [PATCH 149/723] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000000..9b8a5cf42ab2 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '45 11 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From de1ba36f233d8bfd3db837b8e0402386470a3f57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:52:42 +0000 Subject: [PATCH 150/723] Bump floki from 0.32.1 to 0.33.1 Bumps [floki](https://github.com/philss/floki) from 0.32.1 to 0.33.1. - [Release notes](https://github.com/philss/floki/releases) - [Changelog](https://github.com/philss/floki/blob/master/CHANGELOG.md) - [Commits](https://github.com/philss/floki/compare/v0.32.1...v0.33.1) --- updated-dependencies: - dependency-name: floki dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 16caa1e27aeb..3d582c8d65ed 100644 --- a/mix.lock +++ b/mix.lock @@ -55,7 +55,7 @@ "exvcr": {:hex, :exvcr, "0.13.3", "fcd5f54ea0ebd41db7fe16701f3c67871d1b51c3c104ab88f11135a173d47134", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:finch, "~> 0.8", [hex: :finch, repo: "hexpm", optional: true]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "db61057447388b7adc4443a55047d11d09acc75eeb5548507c775a8402e02689"}, "file_info": {:hex, :file_info, "0.0.4", "2e0e77f211e833f38ead22cb29ce53761d457d80b3ffe0ffe0eb93880b0963b2", [:mix], [{:mimetype_parser, "~> 0.1.2", [hex: :mimetype_parser, repo: "hexpm", optional: false]}], "hexpm", "50e7ad01c2c8b9339010675fe4dc4a113b8d6ca7eddce24d1d74fd0e762781a5"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "floki": {:hex, :floki, "0.32.1", "dfe3b8db3b793939c264e6f785bca01753d17318d144bd44b407fb3493acaa87", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "d4b91c713e4a784a3f7b1e3cc016eefc619f6b1c3898464222867cafd3c681a3"}, + "floki": {:hex, :floki, "0.33.1", "f20f1eb471e726342b45ccb68edb9486729e7df94da403936ea94a794f072781", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "461035fd125f13fdf30f243c85a0b1e50afbec876cbf1ceefe6fddd2e6d712c6"}, "flow": {:hex, :flow, "1.2.0", "515e03aa3d056cecc3e3f1e80f6ca4bbf5f45b13c88dee5db880b2f3f24f1caa", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "1b45bfc8a9202c5ec80b077c21df133561e56c56189ba4082dddccb6b5762525"}, "gen_stage": {:hex, :gen_stage, "1.1.2", "b1656cd4ba431ed02c5656fe10cb5423820847113a07218da68eae5d6a260c23", [:mix], [], "hexpm", "9e39af23140f704e2b07a3e29d8f05fd21c2aaf4088ff43cb82be4b9e3148d02"}, "gettext": {:hex, :gettext, "0.20.0", "75ad71de05f2ef56991dbae224d35c68b098dd0e26918def5bb45591d5c8d429", [:mix], [], "hexpm", "1c03b177435e93a47441d7f681a7040bd2a816ece9e2666d1c9001035121eb3d"}, From 330be4e693499bad5243439703bc913ba8eb2298 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 13 Aug 2022 10:47:56 +0300 Subject: [PATCH 151/723] Update CHANGELOG.md --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 680f31daf3aa..7cb6b2f01566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,39 @@ - [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params ### Chore +- [#5845](https://github.com/blockscout/blockscout/pull/5845) - Bump autoprefixer from 10.4.2 to 10.4.8 in /apps/block_scout_web/assets +- [#5877](https://github.com/blockscout/blockscout/pull/5877) - Bump eslint from 8.17.0 to 8.21.0 in /apps/block_scout_web/assets +- [#5875](https://github.com/blockscout/blockscout/pull/5875) - Bump sass from 1.49.8 to 1.54.3 in /apps/block_scout_web/assets +- [#5873](https://github.com/blockscout/blockscout/pull/5873) - Bump highlight.js from 11.4.0 to 11.6.0 in /apps/block_scout_web/assets +- [#5870](https://github.com/blockscout/blockscout/pull/5870) - Bump spandex_ecto from 0.6.2 to 0.7.0 +- [#5867](https://github.com/blockscout/blockscout/pull/5867) - Bump @babel/preset-env from 7.16.11 to 7.18.10 in /apps/block_scout_web/assets +- [#5876](https://github.com/blockscout/blockscout/pull/5876) - Bump bignumber.js from 9.0.2 to 9.1.0 in /apps/block_scout_web/assets +- [#5871](https://github.com/blockscout/blockscout/pull/5871) - Bump redux from 4.1.2 to 4.2.0 in /apps/block_scout_web/assets +- [#5868](https://github.com/blockscout/blockscout/pull/5868) - Bump ex_rlp from 0.5.3 to 0.5.4 +- [#5874](https://github.com/blockscout/blockscout/pull/5874) - Bump core-js from 3.20.3 to 3.24.1 in /apps/block_scout_web/assets +- [#5882](https://github.com/blockscout/blockscout/pull/5882) - Bump math from 0.3.1 to 0.7.0 +- [#5878](https://github.com/blockscout/blockscout/pull/5878) - Bump css-minimizer-webpack-plugin from 3.4.1 to 4.0.0 in /apps/block_scout_web/assets +- [#5883](https://github.com/blockscout/blockscout/pull/5883) - Bump postgrex from 0.15.10 to 0.15.13 +- [#5885](https://github.com/blockscout/blockscout/pull/5885) - Bump hammer from 6.0.0 to 6.1.0 +- [#5893](https://github.com/blockscout/blockscout/pull/5893) - Bump prometheus from 4.8.1 to 4.9.0 +- [#5892](https://github.com/blockscout/blockscout/pull/5892) - Bump babel-loader from 8.2.3 to 8.2.5 in /apps/block_scout_web/assets +- [#5890](https://github.com/blockscout/blockscout/pull/5890) - Bump sweetalert2 from 11.3.10 to 11.4.26 in /apps/block_scout_web/assets +- [#5889](https://github.com/blockscout/blockscout/pull/5889) - Bump sass from 1.54.3 to 1.54.4 in /apps/block_scout_web/assets +- [#5894](https://github.com/blockscout/blockscout/pull/5894) - Bump jest from 27.4.7 to 28.1.3 in /apps/block_scout_web/assets +- [#5865](https://github.com/blockscout/blockscout/pull/5865) - Bump timex from 3.7.1 to 3.7.9 +- [#5872](https://github.com/blockscout/blockscout/pull/5872) - Bump benchee from 0.13.2 to 0.99.0 +- [#5895](https://github.com/blockscout/blockscout/pull/5895) - Bump wallaby from 0.29.1 to 0.30.1 +- [#5905](https://github.com/blockscout/blockscout/pull/5905) - Bump absinthe from 1.6.5 to 1.6.8 +- [#5881](https://github.com/blockscout/blockscout/pull/5881) - Bump dataloader from 1.0.9 to 1.0.10 +- [#5909](https://github.com/blockscout/blockscout/pull/5909) - Bump junit_formatter from 3.3.0 to 3.3.1 +- [#5912](https://github.com/blockscout/blockscout/pull/5912) - Bump credo from 1.6.4 to 1.6.6 +- [#5911](https://github.com/blockscout/blockscout/pull/5911) - Bump absinthe_relay from 1.5.1 to 1.5.2 +- [#5915](https://github.com/blockscout/blockscout/pull/5915) - Bump flow from 0.15.0 to 1.2.0 +- [#5916](https://github.com/blockscout/blockscout/pull/5916) - Bump dialyxir from 1.1.0 to 1.2.0 +- [#5910](https://github.com/blockscout/blockscout/pull/5910) - Bump benchee from 0.99.0 to 1.1.0 +- [#5917](https://github.com/blockscout/blockscout/pull/5917) - Bump bypass from 1.0.0 to 2.1.0 +- [#5920](https://github.com/blockscout/blockscout/pull/5920) - Bump spandex_datadog from 1.1.0 to 1.2.0 +- [#5918](https://github.com/blockscout/blockscout/pull/5918) - Bump logger_file_backend from 0.0.12 to 0.0.13 - [#5863](https://github.com/blockscout/blockscout/pull/5863) - Update Poison hex package - [#5861](https://github.com/blockscout/blockscout/pull/5861) - Add cache for docker build - [#5859](https://github.com/blockscout/blockscout/pull/5859) - Update ex_cldr hex packages From 0dba0985ec2619191d119862c6ffe1c36f9db155 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 07:56:45 +0000 Subject: [PATCH 152/723] Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets Bumps [reduce-reducers](https://github.com/redux-utilities/reduce-reducers) from 0.4.3 to 1.0.4. - [Release notes](https://github.com/redux-utilities/reduce-reducers/releases) - [Commits](https://github.com/redux-utilities/reduce-reducers/compare/v0.4.3...v1.0.4) --- updated-dependencies: - dependency-name: reduce-reducers dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 19 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 701401e06fae..98d819094b91 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -52,7 +52,7 @@ "phoenix_html": "file:../../../deps/phoenix_html", "pikaday": "^1.8.2", "popper.js": "^1.14.7", - "reduce-reducers": "^0.4.3", + "reduce-reducers": "^1.0.4", "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", @@ -95,11 +95,10 @@ } }, "../../../deps/phoenix": { - "version": "1.5.13", - "license": "MIT" + "version": "0.0.1" }, "../../../deps/phoenix_html": { - "version": "3.0.4" + "version": "0.0.1" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -15464,9 +15463,9 @@ } }, "node_modules/reduce-reducers": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.4.3.tgz", - "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-1.0.4.tgz", + "integrity": "sha512-Mb2WZ2bJF597exiqX7owBzrqJ74DHLK3yOQjCyPAaNifRncE8OD0wFIuoMhXxTnHK07+8zZ2SJEKy/qtiyR7vw==" }, "node_modules/redux": { "version": "4.2.0", @@ -30390,9 +30389,9 @@ } }, "reduce-reducers": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.4.3.tgz", - "integrity": "sha512-+CNMnI8QhgVMtAt54uQs3kUxC3Sybpa7Y63HR14uGLgI9/QR5ggHvpxwhGGe3wmx5V91YwqQIblN9k5lspAmGw==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-1.0.4.tgz", + "integrity": "sha512-Mb2WZ2bJF597exiqX7owBzrqJ74DHLK3yOQjCyPAaNifRncE8OD0wFIuoMhXxTnHK07+8zZ2SJEKy/qtiyR7vw==" }, "redux": { "version": "4.2.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 1cd3ea81b997..ab14ffc09873 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -64,7 +64,7 @@ "phoenix_html": "file:../../../deps/phoenix_html", "pikaday": "^1.8.2", "popper.js": "^1.14.7", - "reduce-reducers": "^0.4.3", + "reduce-reducers": "^1.0.4", "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", From 6dbcdd9db683b4a5cba5a0ba25476611786408f4 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Sat, 13 Aug 2022 11:23:00 +0300 Subject: [PATCH 153/723] Update reduce-reducers init function --- apps/block_scout_web/assets/js/lib/async_listing_load.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/js/lib/async_listing_load.js b/apps/block_scout_web/assets/js/lib/async_listing_load.js index 54aee37e0301..785b1f4e2fa6 100644 --- a/apps/block_scout_web/assets/js/lib/async_listing_load.js +++ b/apps/block_scout_web/assets/js/lib/async_listing_load.js @@ -305,7 +305,7 @@ export const elements = { */ export function createAsyncLoadStore (reducer, initialState, itemKey) { const state = merge(asyncInitialState, initialState) - const store = createStore(reduceReducers(asyncReducer, reducer, state)) + const store = createStore(reduceReducers(state, asyncReducer, reducer)) if (typeof itemKey !== 'undefined') { store.dispatch({ From d99bc9638ac654cf6995ff2a38c02da49e74023d Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Sat, 13 Aug 2022 11:30:02 +0300 Subject: [PATCH 154/723] Update reduce-reducers init function --- apps/block_scout_web/assets/js/lib/random_access_pagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/js/lib/random_access_pagination.js b/apps/block_scout_web/assets/js/lib/random_access_pagination.js index 6ef20ce6e87b..bc36d26461e6 100644 --- a/apps/block_scout_web/assets/js/lib/random_access_pagination.js +++ b/apps/block_scout_web/assets/js/lib/random_access_pagination.js @@ -227,7 +227,7 @@ export const elements = { */ export function createAsyncLoadStore (reducer, initialState, itemKey) { const state = merge(asyncInitialState, initialState) - const store = createStore(reduceReducers(asyncReducer, reducer, state)) + const store = createStore(reduceReducers(state, asyncReducer, reducer)) if (typeof itemKey !== 'undefined') { store.dispatch({ From d65140ea392e6358b791aa2eb536c77e8cf3f038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sat, 13 Aug 2022 15:49:02 +0300 Subject: [PATCH 155/723] Move import of verification_form.js and dropzone.js to general place --- .../assets/js/pages/verification_form.js | 269 ++++++++---------- .../new.html.eex | 1 - .../new.html.eex | 2 - .../new.html.eex | 1 - .../new.html.eex | 2 - .../new.html.eex | 1 - .../templates/layout/app.html.eex | 7 + 7 files changed, 129 insertions(+), 154 deletions(-) diff --git a/apps/block_scout_web/assets/js/pages/verification_form.js b/apps/block_scout_web/assets/js/pages/verification_form.js index 008209c1a323..ff4b749e7089 100644 --- a/apps/block_scout_web/assets/js/pages/verification_form.js +++ b/apps/block_scout_web/assets/js/pages/verification_form.js @@ -47,39 +47,9 @@ const elements = { render ($el, state) { if (state.newForm) { $el.replaceWith(state.newForm) + initializeDropzone() state.newForm = null - $('button[data-button-loading="animation"]').click(_event => { - $('#loading').removeClass('d-none') - }) - - $(function () { - $('.js-btn-add-contract-libraries').on('click', function () { - $('.js-smart-contract-libraries-wrapper').show() - $(this).hide() - }) - - $('.js-smart-contract-form-reset').on('click', function () { - $('.js-contract-library-form-group').removeClass('active') - $('.js-contract-library-form-group').first().addClass('active') - $('.js-smart-contract-libraries-wrapper').hide() - $('.js-btn-add-contract-libraries').show() - $('.js-add-contract-library-wrapper').show() - }) - - $('.js-btn-add-contract-library').on('click', function () { - const nextContractLibrary = $('.js-contract-library-form-group.active').next('.js-contract-library-form-group') - - if (nextContractLibrary) { - nextContractLibrary.addClass('active') - } - - if ($('.js-contract-library-form-group.active').length === $('.js-contract-library-form-group').length) { - $('.js-add-contract-library-wrapper').hide() - } - }) - }) - return $el } return $el @@ -109,6 +79,8 @@ function filterNightlyBuilds (filter) { } } +let dropzone + if ($contractVerificationPage.length) { window.onbeforeunload = () => { window.loading = true @@ -133,149 +105,47 @@ if ($contractVerificationPage.length) { msg: humps.camelizeKeys(msg) })) - $('button[data-button-loading="animation"]').click(_event => { + $('body').on('click', 'button[data-button-loading="animation"]', function () { $('#loading').removeClass('d-none') }) $(function () { - function standardJSONBehavior () { - $('#standard-json-dropzone-form').removeClass('dz-clickable') - this.on('addedfile', function (_file) { - $('#verify-via-standard-json-input-submit').prop('disabled', false) - $('#file-help-block').text('') - $('#dropzone-previews').addClass('dz-started') - }) - - this.on('removedfile', function (_file) { - if (this.files.length === 0) { - $('#verify-via-standard-json-input-submit').prop('disabled', true) - $('#dropzone-previews').removeClass('dz-started') - } - }) - } - - function metadataJSONBehavior () { - $('#metadata-json-dropzone-form').removeClass('dz-clickable') - this.on('addedfile', function (_file) { - changeVisibilityOfVerifyButton(this.files.length) - $('#file-help-block').text('') - $('#dropzone-previews').addClass('dz-started') - }) - - this.on('removedfile', function (_file) { - changeVisibilityOfVerifyButton(this.files.length) - if (this.files.length === 0) { - $('#dropzone-previews').removeClass('dz-started') - } - }) - } - - function multiPartFilesBehavior () { - $('#metadata-json-dropzone-form').removeClass('dz-clickable') - this.on('addedfile', function (_file) { - changeVisibilityOfVerifyButton(this.files.length) - $('#file-help-block').text('') - $('#dropzone-previews').addClass('dz-started') - }) - - this.on('removedfile', function (_file) { - changeVisibilityOfVerifyButton(this.files.length) - if (this.files.length === 0) { - $('#dropzone-previews').removeClass('dz-started') - } - }) - } - - const $jsonDropzoneMetadata = $('#metadata-json-dropzone-form') - const $jsonDropzoneStandardInput = $('#standard-json-dropzone-form') - let dropzone - - if ($jsonDropzoneMetadata.length || $jsonDropzoneStandardInput.length) { - const func = $jsonDropzoneMetadata.length ? metadataJSONBehavior : standardJSONBehavior - const maxFiles = $jsonDropzoneMetadata.length ? 100 : 1 - const acceptedFiles = $jsonDropzoneMetadata.length ? 'text/plain,application/json,.sol,.json' : 'text/plain,application/json,.json' - const tag = $jsonDropzoneMetadata.length ? '#metadata-json-dropzone-form' : '#standard-json-dropzone-form' - const jsonVerificationType = $jsonDropzoneMetadata.length ? 'json:metadata' : 'json:standard' - - dropzone = new Dropzone(tag, { - autoProcessQueue: false, - acceptedFiles, - parallelUploads: 100, - uploadMultiple: true, - addRemoveLinks: true, - maxFilesize: 10, - maxFiles, - previewsContainer: '#dropzone-previews', - params: { address_hash: $('#smart_contract_address_hash').val(), verification_type: jsonVerificationType }, - init: func - }) - } - - const $dropzoneMultiPartFiles = $('#multi-part-dropzone-form') - - if ($dropzoneMultiPartFiles.length) { - const func = multiPartFilesBehavior - const maxFiles = 100 - const acceptedFiles = 'text/plain,.sol' - const tag = '#multi-part-dropzone-form' - const jsonVerificationType = 'multi-part-files' - - dropzone = new Dropzone(tag, { - autoProcessQueue: false, - acceptedFiles, - parallelUploads: 100, - uploadMultiple: true, - addRemoveLinks: true, - maxFilesize: 10, - maxFiles, - previewsContainer: '#dropzone-previews', - params: { address_hash: $('#smart_contract_address_hash').val(), verification_type: jsonVerificationType }, - init: func - }) - } - - function changeVisibilityOfVerifyButton (filesLength) { - if (filesLength > 0) { - $('#verify-via-metadata-json-submit').prop('disabled', false) - } else { - $('#verify-via-metadata-json-submit').prop('disabled', true) - } - } + initializeDropzone() setTimeout(function () { $('.nightly-builds-false').trigger('click') }, 10) - $('.js-btn-add-contract-libraries').on('click', function () { + $('body').on('click', '.js-btn-add-contract-libraries', function () { $('.js-smart-contract-libraries-wrapper').show() $(this).hide() }) - $('.autodetectfalse').on('click', function () { + $('body').on('click', '.autodetectfalse', function () { if ($(this).prop('checked')) { $('.constructor-arguments').show() } }) - $('.autodetecttrue').on('click', function () { + $('body').on('click', '.autodetecttrue', function () { if ($(this).prop('checked')) { $('.constructor-arguments').hide() } }) - $('.nightly-builds-true').on('click', function () { + $('body').on('click', '.nightly-builds-true', function () { if ($(this).prop('checked')) { filterNightlyBuilds(false) } }) - $('.nightly-builds-false').on('click', function () { + $('body').on('click', '.nightly-builds-false', function () { if ($(this).prop('checked')) { filterNightlyBuilds(true) } }) - $('.optimization-false').on('click', function () { + $('body').on('click', '.optimization-false', function () { if ($(this).prop('checked')) { $('.optimization-runs').hide() } }) - $('.optimization-true').on('click', function () { + $('body').on('click', '.optimization-true', function () { if ($(this).prop('checked')) { $('.optimization-runs').show() } }) - $('.js-smart-contract-form-reset').on('click', function () { + $('body').on('click', '.js-smart-contract-form-reset', function () { $('.js-contract-library-form-group').removeClass('active') $('.js-contract-library-form-group').first().addClass('active') $('.js-smart-contract-libraries-wrapper').hide() @@ -283,7 +153,7 @@ if ($contractVerificationPage.length) { $('.js-add-contract-library-wrapper').show() }) - $('.js-btn-add-contract-library').on('click', function () { + $('body').on('click', '.js-btn-add-contract-library', (event) => { const nextContractLibrary = $('.js-contract-library-form-group.active').next('.js-contract-library-form-group') if (nextContractLibrary) { @@ -295,7 +165,7 @@ if ($contractVerificationPage.length) { } }) - $('#verify-via-standard-json-input-submit').on('click', (event) => { + $('body').on('click', '#verify-via-standard-json-input-submit', (event) => { event.preventDefault() if (dropzone.files.length > 0) { dropzone.processQueue() @@ -304,14 +174,14 @@ if ($contractVerificationPage.length) { } }) - $('[data-submit-button]').on('click', (event) => { + $('body').on('click', '[data-submit-button]', (event) => { // submit form without page updating in order to avoid websocket reconnecting event.preventDefault() const $form = $('form')[0] $.post($form.action, convertFormToJSON($form)) }) - $('#verify-via-metadata-json-submit').on('click', (event) => { + $('body').on('click', '#verify-via-metadata-json-submit', (event) => { event.preventDefault() if (dropzone.files.length > 0) { dropzone.processQueue() @@ -380,3 +250,108 @@ function convertFormToJSON (form) { }) return json } + +function changeVisibilityOfVerifyButton (filesLength) { + if (filesLength > 0) { + $('#verify-via-metadata-json-submit').prop('disabled', false) + } else { + $('#verify-via-metadata-json-submit').prop('disabled', true) + } +} + +function standardJSONBehavior () { + $('#standard-json-dropzone-form').removeClass('dz-clickable') + this.on('addedfile', function (_file) { + $('#verify-via-standard-json-input-submit').prop('disabled', false) + $('#file-help-block').text('') + $('#dropzone-previews').addClass('dz-started') + }) + + this.on('removedfile', function (_file) { + if (this.files.length === 0) { + $('#verify-via-standard-json-input-submit').prop('disabled', true) + $('#dropzone-previews').removeClass('dz-started') + } + }) +} + +function metadataJSONBehavior () { + $('#metadata-json-dropzone-form').removeClass('dz-clickable') + this.on('addedfile', function (_file) { + changeVisibilityOfVerifyButton(this.files.length) + $('#file-help-block').text('') + $('#dropzone-previews').addClass('dz-started') + }) + + this.on('removedfile', function (_file) { + changeVisibilityOfVerifyButton(this.files.length) + if (this.files.length === 0) { + $('#dropzone-previews').removeClass('dz-started') + } + }) +} + +function multiPartFilesBehavior () { + $('#metadata-json-dropzone-form').removeClass('dz-clickable') + this.on('addedfile', function (_file) { + changeVisibilityOfVerifyButton(this.files.length) + $('#file-help-block').text('') + $('#dropzone-previews').addClass('dz-started') + }) + + this.on('removedfile', function (_file) { + changeVisibilityOfVerifyButton(this.files.length) + if (this.files.length === 0) { + $('#dropzone-previews').removeClass('dz-started') + } + }) +} + +function initializeDropzone () { + const $jsonDropzoneMetadata = $('#metadata-json-dropzone-form') + const $jsonDropzoneStandardInput = $('#standard-json-dropzone-form') + + if ($jsonDropzoneMetadata.length || $jsonDropzoneStandardInput.length) { + const func = $jsonDropzoneMetadata.length ? metadataJSONBehavior : standardJSONBehavior + const maxFiles = $jsonDropzoneMetadata.length ? 100 : 1 + const acceptedFiles = $jsonDropzoneMetadata.length ? 'text/plain,application/json,.sol,.json' : 'text/plain,application/json,.json' + const tag = $jsonDropzoneMetadata.length ? '#metadata-json-dropzone-form' : '#standard-json-dropzone-form' + const jsonVerificationType = $jsonDropzoneMetadata.length ? 'json:metadata' : 'json:standard' + + dropzone = new Dropzone(tag, { + autoProcessQueue: false, + acceptedFiles, + parallelUploads: 100, + uploadMultiple: true, + addRemoveLinks: true, + maxFilesize: 10, + maxFiles, + previewsContainer: '#dropzone-previews', + params: { address_hash: $('#smart_contract_address_hash').val(), verification_type: jsonVerificationType }, + init: func + }) + } + + const $dropzoneMultiPartFiles = $('#multi-part-dropzone-form') + + if ($dropzoneMultiPartFiles.length) { + const func = multiPartFilesBehavior + const maxFiles = 100 + const acceptedFiles = 'text/plain,.sol' + const tag = '#multi-part-dropzone-form' + const jsonVerificationType = 'multi-part-files' + + dropzone = new Dropzone(tag, { + autoProcessQueue: false, + acceptedFiles, + parallelUploads: 100, + uploadMultiple: true, + addRemoveLinks: true, + maxFilesize: 10, + maxFiles, + previewsContainer: '#dropzone-previews', + params: { address_hash: $('#smart_contract_address_hash').val(), verification_type: jsonVerificationType }, + init: func + }) + } +} diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex index 03c63cd9ffc2..f7233652054d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex @@ -150,5 +150,4 @@ <% end %> - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex index a5aec2826735..f2bdbffd4344 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex @@ -46,6 +46,4 @@ <% end %> - - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex index ac5580736ec2..85e7d38055ed 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex @@ -146,5 +146,4 @@ <% end %> - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex index 31ac5ce76d94..e86c15880e60 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex @@ -60,6 +60,4 @@ <% end %> - - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex index a664c71aa06a..4b07896c63a6 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex @@ -56,5 +56,4 @@ <% end %> - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index 42fa7cd61490..ef1f7acc5db7 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -272,6 +272,7 @@ @view_module != Elixir.BlockScoutWeb.Admin.DashboardView && @view_module != Elixir.BlockScoutWeb.SearchView && @view_module != Elixir.BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView && + @view_module != Elixir.BlockScoutWeb.AddressContractVerificationViaMultiPartFilesView && @view_module != Elixir.BlockScoutWeb.StakesView ) do %> @@ -288,5 +289,11 @@ <% end %> + <%= if @view_module in [Elixir.BlockScoutWeb.AddressContractVerificationView, Elixir.BlockScoutWeb.AddressContractVerificationVyperView, Elixir.BlockScoutWeb.AddressContractVerificationViaFlattenedCodeView, Elixir.BlockScoutWeb.AddressContractVerificationViaMultiPartFilesView, Elixir.BlockScoutWeb.AddressContractVerificationViaJsonView, Elixir.BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView] do %> + + <% end %> + <%= if @view_module in [Elixir.BlockScoutWeb.AddressContractVerificationViaMultiPartFilesView, Elixir.BlockScoutWeb.AddressContractVerificationViaJsonView, Elixir.BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView] do %> + + <% end %> From a1d3bae05f314b624c96e7799209174f6b466788 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com> Date: Sun, 14 Aug 2022 22:00:49 +0300 Subject: [PATCH 156/723] Fix large postgres notifications (#5850) * Fix large postgres notifications * Update Changelog Co-authored-by: Victor Baranov --- CHANGELOG.md | 7 ++++--- .../lib/explorer/chain/events/db_sender.ex | 12 ++++++++++- .../lib/explorer/chain/events/listener.ex | 21 +++++++++++++++++++ .../explorer/utility/event_notification.ex | 20 ++++++++++++++++++ ...20804114005_create_event_notifications.exs | 9 ++++++++ 5 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 apps/explorer/lib/explorer/utility/event_notification.ex create mode 100644 apps/explorer/priv/repo/migrations/20220804114005_create_event_notifications.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index 8911bc80e2e1..68f0cd60b593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,12 @@ ### Fixes - [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response +- [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation +- [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params +- [#5850](https://github.com/blockscout/blockscout/pull/5850) - Fix too large postgres notifications - [#5809](https://github.com/blockscout/blockscout/pull/5809) - Fix 404 on `/metadata` page -- [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build -- [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params -- [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation +- [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers ### Chore - [#5845](https://github.com/blockscout/blockscout/pull/5845) - Bump autoprefixer from 10.4.2 to 10.4.8 in /apps/block_scout_web/assets diff --git a/apps/explorer/lib/explorer/chain/events/db_sender.ex b/apps/explorer/lib/explorer/chain/events/db_sender.ex index 2891e8bde281..186beebec13b 100644 --- a/apps/explorer/lib/explorer/chain/events/db_sender.ex +++ b/apps/explorer/lib/explorer/chain/events/db_sender.ex @@ -3,6 +3,7 @@ defmodule Explorer.Chain.Events.DBSender do Sends events to Postgres. """ alias Explorer.Repo + alias Explorer.Utility.EventNotification def send_data(event_type) do payload = encode_payload({:chain_event, event_type}) @@ -11,7 +12,10 @@ defmodule Explorer.Chain.Events.DBSender do def send_data(event_type, broadcast_type, event_data) do payload = encode_payload({:chain_event, event_type, broadcast_type, event_data}) - send_notify(payload) + + with {:ok, %{id: event_notification_id}} <- save_event_notification(payload) do + send_notify(to_string(event_notification_id)) + end end defp encode_payload(payload) do @@ -23,4 +27,10 @@ defmodule Explorer.Chain.Events.DBSender do defp send_notify(payload) do Repo.query!("select pg_notify('chain_event', $1::text);", [payload]) end + + defp save_event_notification(event_data) do + event_data + |> EventNotification.new_changeset() + |> Repo.insert() + end end diff --git a/apps/explorer/lib/explorer/chain/events/listener.ex b/apps/explorer/lib/explorer/chain/events/listener.ex index 2d93eeada0b4..c03e1746ef43 100644 --- a/apps/explorer/lib/explorer/chain/events/listener.ex +++ b/apps/explorer/lib/explorer/chain/events/listener.ex @@ -5,6 +5,8 @@ defmodule Explorer.Chain.Events.Listener do use GenServer + alias Explorer.Repo + alias Explorer.Utility.EventNotification alias Postgrex.Notifications def start_link(_) do @@ -24,12 +26,20 @@ defmodule Explorer.Chain.Events.Listener do def handle_info({:notification, _pid, _ref, _topic, payload}, state) do payload + |> expand_payload() |> decode_payload!() |> broadcast() {:noreply, state} end + defp expand_payload(payload) do + case Integer.parse(payload) do + {event_notification_id, ""} -> fetch_and_delete_event_notification(event_notification_id) + _ -> payload + end + end + # sobelow_skip ["Misc.BinToTerm"] defp decode_payload!(payload) do payload @@ -52,4 +62,15 @@ defmodule Explorer.Chain.Events.Listener do end end) end + + defp fetch_and_delete_event_notification(id) do + case Repo.get(EventNotification, id) do + nil -> + nil + + %{data: data} = notification -> + Repo.delete(notification) + data + end + end end diff --git a/apps/explorer/lib/explorer/utility/event_notification.ex b/apps/explorer/lib/explorer/utility/event_notification.ex new file mode 100644 index 000000000000..8ae9dd0a2f5f --- /dev/null +++ b/apps/explorer/lib/explorer/utility/event_notification.ex @@ -0,0 +1,20 @@ +defmodule Explorer.Utility.EventNotification do + @moduledoc """ + An auxiliary schema for sending postgres notifications. + """ + + use Explorer.Schema + + schema "event_notifications" do + field(:data, :string) + end + + @doc false + def changeset(event_notification, params \\ %{}) do + cast(event_notification, params, [:data]) + end + + def new_changeset(data) do + changeset(%__MODULE__{}, %{data: data}) + end +end diff --git a/apps/explorer/priv/repo/migrations/20220804114005_create_event_notifications.exs b/apps/explorer/priv/repo/migrations/20220804114005_create_event_notifications.exs new file mode 100644 index 000000000000..953cfd4472e0 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220804114005_create_event_notifications.exs @@ -0,0 +1,9 @@ +defmodule Explorer.Repo.Migrations.CreateEventNotifications do + use Ecto.Migration + + def change do + create table(:event_notifications) do + add(:data, :text, null: false) + end + end +end From 173b332d932abeb80d0be21ff9cfaa8e3bdc30f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Aug 2022 18:40:57 +0000 Subject: [PATCH 157/723] Bump eslint from 8.21.0 to 8.22.0 in /apps/block_scout_web/assets Bumps [eslint](https://github.com/eslint/eslint) from 8.21.0 to 8.22.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.21.0...v8.22.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 98d819094b91..d8771fbe371c 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -72,7 +72,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.21.0", + "eslint": "^8.22.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -7123,9 +7123,9 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -23995,9 +23995,9 @@ } }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index ab14ffc09873..b9c44384f6d5 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -84,7 +84,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.21.0", + "eslint": "^8.22.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", From fd6f67bee8123ef1917a2f47d2b4c3ff5aaa4225 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 16 Aug 2022 11:08:24 +0300 Subject: [PATCH 158/723] Remove aox branch from publishing image on release --- .github/workflows/publish-docker-image-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index 097094f4ab52..1506c38f79ca 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -75,7 +75,6 @@ jobs: runs-on: ubuntu-latest env: BRANCHES: | - production-aox-stg production-core-stg production-eth-stg production-harmony-mainnet-shard-0-stg From 6e5243d9e9553091aacf7bd917ea6c0d94310801 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 16 Aug 2022 13:22:42 +0300 Subject: [PATCH 159/723] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e254b20b05c8..0cdd993a2d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers ### Chore +- [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets +- [#5919](https://github.com/blockscout/blockscout/pull/5919) - Bump floki from 0.32.1 to 0.33.1 +- [#5930](https://github.com/blockscout/blockscout/pull/5930) - Bump eslint from 8.21.0 to 8.22.0 in /apps/block_scout_web/assets - [#5845](https://github.com/blockscout/blockscout/pull/5845) - Bump autoprefixer from 10.4.2 to 10.4.8 in /apps/block_scout_web/assets - [#5877](https://github.com/blockscout/blockscout/pull/5877) - Bump eslint from 8.17.0 to 8.21.0 in /apps/block_scout_web/assets - [#5875](https://github.com/blockscout/blockscout/pull/5875) - Bump sass from 1.49.8 to 1.54.3 in /apps/block_scout_web/assets From 906f1504507dfa6715059944e89d41f48425c984 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Aug 2022 18:56:51 +0000 Subject: [PATCH 160/723] Bump xss from 1.0.13 to 1.0.14 in /apps/block_scout_web/assets Bumps [xss](https://github.com/leizongmin/js-xss) from 1.0.13 to 1.0.14. - [Release notes](https://github.com/leizongmin/js-xss/releases) - [Changelog](https://github.com/leizongmin/js-xss/blob/master/CHANGELOG.md) - [Commits](https://github.com/leizongmin/js-xss/compare/v1.0.13...v1.0.14) --- updated-dependencies: - dependency-name: xss dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d8771fbe371c..0ab4f324e8dc 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -62,7 +62,7 @@ "util": "^0.12.3", "web3": "^1.7.0", "web3modal": "^1.9.8", - "xss": "^1.0.13" + "xss": "^1.0.14" }, "devDependencies": { "@babel/core": "^7.18.10", @@ -18566,9 +18566,9 @@ "dev": true }, "node_modules/xss": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.13.tgz", - "integrity": "sha512-clu7dxTm1e8Mo5fz3n/oW3UCXBfV89xZ72jM8yzo1vR/pIS0w3sgB3XV2H8Vm6zfGnHL0FzvLJPJEBhd86/z4Q==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz", + "integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==", "dependencies": { "commander": "^2.20.3", "cssfilter": "0.0.10" @@ -32803,9 +32803,9 @@ "dev": true }, "xss": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.13.tgz", - "integrity": "sha512-clu7dxTm1e8Mo5fz3n/oW3UCXBfV89xZ72jM8yzo1vR/pIS0w3sgB3XV2H8Vm6zfGnHL0FzvLJPJEBhd86/z4Q==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz", + "integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==", "requires": { "commander": "^2.20.3", "cssfilter": "0.0.10" diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index b9c44384f6d5..92649e8ea40f 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -74,7 +74,7 @@ "util": "^0.12.3", "web3": "^1.7.0", "web3modal": "^1.9.8", - "xss": "^1.0.13" + "xss": "^1.0.14" }, "devDependencies": { "@babel/core": "^7.18.10", From d2df22449db5d641a18b4688f2d145f54946da3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Aug 2022 18:57:25 +0000 Subject: [PATCH 161/723] Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.4.26 to 11.4.27. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.4.26...v11.4.27) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d8771fbe371c..6abafa9be076 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -56,7 +56,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.26", + "sweetalert2": "^11.4.27", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", @@ -16945,9 +16945,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.4.26", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.26.tgz", - "integrity": "sha512-YqH/C6IPudeWVK9R0x3pCOqP7m90Ae50tl98SQBpAwL3+UBl1WYD2+5OaKy0ybiVTKbYe76wwJ3PV+bITLjl+A==", + "version": "11.4.27", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.27.tgz", + "integrity": "sha512-UEahwAhaSUiL8+fyH7ziuXgC/yHrCgZZuVAXYzNj52tOkjUWFPlYyZN3JVpKtBqDxNDOk76gQ1FZbFst7wnU+A==", "funding": { "type": "individual", "url": "https://sweetalert2.github.io/#donations" @@ -31517,9 +31517,9 @@ } }, "sweetalert2": { - "version": "11.4.26", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.26.tgz", - "integrity": "sha512-YqH/C6IPudeWVK9R0x3pCOqP7m90Ae50tl98SQBpAwL3+UBl1WYD2+5OaKy0ybiVTKbYe76wwJ3PV+bITLjl+A==" + "version": "11.4.27", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.27.tgz", + "integrity": "sha512-UEahwAhaSUiL8+fyH7ziuXgC/yHrCgZZuVAXYzNj52tOkjUWFPlYyZN3JVpKtBqDxNDOk76gQ1FZbFst7wnU+A==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index b9c44384f6d5..09ce7dd1d10d 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -68,7 +68,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.26", + "sweetalert2": "^11.4.27", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", From a23bdf2da0ccf57e4798e9ee6ad0aac8fed9e463 Mon Sep 17 00:00:00 2001 From: fr0zn Date: Wed, 13 Jul 2022 09:15:47 +0200 Subject: [PATCH 162/723] Fixing tracer not found #5729 --- .../geth/debug_traceTransaction/tracer.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js b/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js index 3bc4a778a831..9002a7869e9b 100644 --- a/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js +++ b/apps/ethereum_jsonrpc/priv/js/ethereum_jsonrpc/geth/debug_traceTransaction/tracer.js @@ -442,24 +442,25 @@ }, putGas(call) { - let gasBigInt = call.gasBigInt; - delete call.gasBigInt; - if (gasBigInt === undefined) { - gasBigInt = bigInt.zero; + if (call.gasBigInt === undefined) { + call.gas = '0x0'; + } else { + call.gas = '0x' + call.gasBigInt.toString(16); } - call.gas = '0x' + gasBigInt.toString(16); + delete call.gasBigInt; + }, putGasUsed(call) { - let gasUsedBigInt = call.gasUsedBigInt; - delete call.gasUsedBigInt; - if (gasUsedBigInt === undefined) { - gasUsedBigInt = bigInt.zero; + if (call.gasUsedBigInt === undefined) { + call.gasUsed = '0x0'; + } else { + call.gasUsed = '0x' + call.gasUsedBigInt.toString(16); } - call.gasUsed = '0x' + gasUsedBigInt.toString(16); + delete call.gasUsedBigInt; } } From 7b8544cd738a87ef2112fb572007c042b5c795da Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 17 Aug 2022 15:41:19 +0300 Subject: [PATCH 163/723] Add production-optimism-mainnet-stg to release issuing pipeline --- .github/workflows/publish-docker-image-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index 1506c38f79ca..817760e55184 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -80,6 +80,7 @@ jobs: production-harmony-mainnet-shard-0-stg production-lukso-stg production-optimism-goerli-stg + production-optimism-mainnet-stg production-optimism-stg production-rsk-stg production-sokol-stg From e672b038903b3879d73cf3f631f04047d7718063 Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Wed, 17 Aug 2022 22:33:01 +0700 Subject: [PATCH 164/723] Fix nightly solidity versions filtering UX (#5942) --- CHANGELOG.md | 1 + .../assets/js/pages/verification_form.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cdd993a2d65..b11facd27c98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5942](https://github.com/blockscout/blockscout/pull/5942) - Fix nightly solidity versions filtering UX - [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response - [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation - [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params diff --git a/apps/block_scout_web/assets/js/pages/verification_form.js b/apps/block_scout_web/assets/js/pages/verification_form.js index ff4b749e7089..41af595a64e5 100644 --- a/apps/block_scout_web/assets/js/pages/verification_form.js +++ b/apps/block_scout_web/assets/js/pages/verification_form.js @@ -47,6 +47,10 @@ const elements = { render ($el, state) { if (state.newForm) { $el.replaceWith(state.newForm) + + if ($('.nightly-builds-true').prop('checked')) { filterNightlyBuilds(false, false) } + if ($('.nightly-builds-false').prop('checked')) { filterNightlyBuilds(true, false) } + initializeDropzone() state.newForm = null @@ -60,15 +64,22 @@ const elements = { const $contractVerificationPage = $('[data-page="contract-verification"]') const $contractVerificationChooseTypePage = $('[data-page="contract-verification-choose-type"]') -function filterNightlyBuilds (filter) { +function filterNightlyBuilds (filter, selectFirstNonNightly_) { const select = document.getElementById('smart_contract_compiler_version') const options = select.getElementsByTagName('option') + let selectFirstNonNightly = selectFirstNonNightly_ + for (const option of options) { + console.log(option) const txtValue = option.textContent || option.innerText if (filter) { if (txtValue.toLowerCase().indexOf('nightly') > -1) { option.style.display = 'none' } else { + if (selectFirstNonNightly) { + option.selected = 'selected' + selectFirstNonNightly = false + } option.style.display = '' } } else { @@ -130,11 +141,11 @@ if ($contractVerificationPage.length) { }) $('body').on('click', '.nightly-builds-true', function () { - if ($(this).prop('checked')) { filterNightlyBuilds(false) } + if ($(this).prop('checked')) { filterNightlyBuilds(false, true) } }) $('body').on('click', '.nightly-builds-false', function () { - if ($(this).prop('checked')) { filterNightlyBuilds(true) } + if ($(this).prop('checked')) { filterNightlyBuilds(true, true) } }) $('body').on('click', '.optimization-false', function () { From a53a0ced1885988cc4726e6226f74ae1702736d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 17 Aug 2022 20:07:16 +0300 Subject: [PATCH 165/723] Remove console.log --- CHANGELOG.md | 2 +- apps/block_scout_web/assets/js/pages/verification_form.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b11facd27c98..5bda647d6298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes -- [#5942](https://github.com/blockscout/blockscout/pull/5942) - Fix nightly solidity versions filtering UX +- [#5942](https://github.com/blockscout/blockscout/pull/5942), [#5945](https://github.com/blockscout/blockscout/pull/5945) - Fix nightly solidity versions filtering UX - [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response - [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation - [#5887](https://github.com/blockscout/blockscout/pull/5887) - Added missing environment variables to Makefile container params diff --git a/apps/block_scout_web/assets/js/pages/verification_form.js b/apps/block_scout_web/assets/js/pages/verification_form.js index 41af595a64e5..687eced49c8d 100644 --- a/apps/block_scout_web/assets/js/pages/verification_form.js +++ b/apps/block_scout_web/assets/js/pages/verification_form.js @@ -70,7 +70,6 @@ function filterNightlyBuilds (filter, selectFirstNonNightly_) { let selectFirstNonNightly = selectFirstNonNightly_ for (const option of options) { - console.log(option) const txtValue = option.textContent || option.innerText if (filter) { if (txtValue.toLowerCase().indexOf('nightly') > -1) { From 3d0ef1efc90af11c38a1c2d3b9cfcac17d7404cc Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 18 Aug 2022 13:00:39 +0300 Subject: [PATCH 166/723] Fix unexpected messages in CoinBalanceOnDemand --- .../lib/indexer/fetcher/coin_balance_on_demand.ex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex index ac02a8f2d288..68306347ed11 100644 --- a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex +++ b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex @@ -64,10 +64,12 @@ defmodule Indexer.Fetcher.CoinBalanceOnDemand do GenServer.start_link(__MODULE__, json_rpc_named_arguments, server_opts) end + @impl true def init(json_rpc_named_arguments) do {:ok, %{json_rpc_named_arguments: json_rpc_named_arguments}} end + @impl true def handle_cast({:fetch_and_update, block_number, address}, state) do result = fetch_and_update(block_number, address, state.json_rpc_named_arguments) @@ -78,18 +80,30 @@ defmodule Indexer.Fetcher.CoinBalanceOnDemand do {:noreply, state} end + @impl true def handle_cast({:fetch_and_import, block_number, address}, state) do fetch_and_import(block_number, address, state.json_rpc_named_arguments) {:noreply, state} end + @impl true def handle_cast({:fetch_and_import_daily_balances, block_number, address}, state) do fetch_and_import_daily_balances(block_number, address, state.json_rpc_named_arguments) {:noreply, state} end + @impl true + def handle_info({:DOWN, _, :process, _, _}, state) do + {:noreply, state} + end + + @impl true + def handle_info({_ref, _}, state) do + {:noreply, state} + end + ## Implementation defp do_trigger_fetch(%Address{fetched_coin_balance_block_number: nil} = address, latest_block_number, _) do From 98a7028aef1c6e99bfc35a5a95bd02b06ecde51f Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 18 Aug 2022 15:30:05 +0300 Subject: [PATCH 167/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bda647d6298..0c6608d5ec42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - [#5809](https://github.com/blockscout/blockscout/pull/5809) - Fix 404 on `/metadata` page - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers +- [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` ### Chore - [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets From e7e03ffa33638a98393459632fac92de76499812 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 19 Aug 2022 13:07:13 +0300 Subject: [PATCH 168/723] Fix ace editor appearance --- .github/workflows/config.yml | 2 +- CHANGELOG.md | 1 + .../address_contract/code_highlighting.js | 28 ++++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 5e1777e57d2e..e454a9047de6 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -153,7 +153,7 @@ jobs: id: dialyzer-cache with: path: priv/plts - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_13-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c6608d5ec42..0c78e0a03991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5954](https://github.com/blockscout/blockscout/pull/5954) - Fix ace editor appearance - [#5942](https://github.com/blockscout/blockscout/pull/5942), [#5945](https://github.com/blockscout/blockscout/pull/5945) - Fix nightly solidity versions filtering UX - [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response - [#5903](https://github.com/blockscout/blockscout/pull/5903) - Disable compile env validation diff --git a/apps/block_scout_web/assets/js/view_specific/address_contract/code_highlighting.js b/apps/block_scout_web/assets/js/view_specific/address_contract/code_highlighting.js index fde8bc2b135a..2a0068a23678 100644 --- a/apps/block_scout_web/assets/js/view_specific/address_contract/code_highlighting.js +++ b/apps/block_scout_web/assets/js/view_specific/address_contract/code_highlighting.js @@ -9,20 +9,22 @@ const Mode = ace.require('ace/mode/csharp').Mode const codeMain = $('#code_viewer_main') const code = codeMain.text() /* eslint-disable-next-line */ -const editor = ace.edit('code_viewer_main') -editor.session.setMode(new Mode()) -editor.setTheme('ace/theme/chrome') -editor.setValue(code, -1) -editor.setOptions({ maxLines: 40, readOnly: true, printMargin: false }) - -const len = codeMain.data('additional-sources-length') -for (let i = 0; i < len; i++) { - const tag = 'code_viewer_' + i - const code = $('#' + tag).text() - /* eslint-disable-next-line */ - const editor = ace.edit(tag) +const editor = (codeMain.length > 0) && ace.edit('code_viewer_main') +if (editor) { editor.session.setMode(new Mode()) editor.setTheme('ace/theme/chrome') editor.setValue(code, -1) - editor.setOptions({ maxLines: 40, readOnly: true }) + editor.setOptions({ maxLines: 40, readOnly: true, printMargin: false }) + + const len = codeMain.data('additional-sources-length') + for (let i = 0; i < len; i++) { + const tag = 'code_viewer_' + i + const code = $('#' + tag).text() + /* eslint-disable-next-line */ + const editor = ace.edit(tag) + editor.session.setMode(new Mode()) + editor.setTheme('ace/theme/chrome') + editor.setValue(code, -1) + editor.setOptions({ maxLines: 40, readOnly: true }) + } } From abe392c947a7ccd8bf86a2d1511d632bbf3fd613 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:50:57 +0000 Subject: [PATCH 169/723] Bump comeonin from 4.1.2 to 5.3.3 Bumps [comeonin](https://github.com/riverrun/comeonin) from 4.1.2 to 5.3.3. - [Release notes](https://github.com/riverrun/comeonin/releases) - [Changelog](https://github.com/riverrun/comeonin/blob/master/CHANGELOG.md) - [Commits](https://github.com/riverrun/comeonin/compare/v4.1.2...v5.3.3) --- updated-dependencies: - dependency-name: comeonin dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/explorer/mix.exs | 2 +- mix.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index f77acac0e85f..1ddc169def28 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -63,7 +63,7 @@ defmodule Explorer.Mixfile do {:benchee_csv, "~> 1.0.0", only: :test}, {:bypass, "~> 2.1", only: :test}, {:briefly, "~> 0.4", github: "CargoSense/briefly"}, - {:comeonin, "~> 4.0"}, + {:comeonin, "~> 5.3"}, {:credo, "~> 1.5", only: :test, runtime: false}, # For Absinthe to load data in batches {:dataloader, "~> 1.0.0"}, diff --git a/mix.lock b/mix.lock index c4b638c306c3..4278bba36077 100644 --- a/mix.lock +++ b/mix.lock @@ -16,7 +16,7 @@ "cldr_utils": {:hex, :cldr_utils, "2.18.0", "674a2941abfd501a338b02244985feb7e526b1b41417b305c45a682e1f7b07b0", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "b435777ae33e8e86cfbeb96437881cf751d5062f366dacdae2e6548f83257a52"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, - "comeonin": {:hex, :comeonin, "4.1.2", "3eb5620fd8e35508991664b4c2b04dd41e52f1620b36957be837c1d7784b7592", [:mix], [{:argon2_elixir, "~> 1.2", [hex: :argon2_elixir, repo: "hexpm", optional: true]}, {:bcrypt_elixir, "~> 0.12.1 or ~> 1.0", [hex: :bcrypt_elixir, repo: "hexpm", optional: true]}, {:pbkdf2_elixir, "~> 0.12", [hex: :pbkdf2_elixir, repo: "hexpm", optional: true]}], "hexpm", "d8700a0ca4dbb616c22c9b3f6dd539d88deaafec3efe66869d6370c9a559b3e9"}, + "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, "con_cache": {:hex, :con_cache, "1.0.0", "6405e2bd5d5005334af72939432783562a8c35a196c2e63108fe10bb97b366e6", [:mix], [], "hexpm", "4d1f5cb1a67f3c1a468243dc98d10ac83af7f3e33b7e7c15999dc2c9bc0a551e"}, "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, "cors_plug": {:hex, :cors_plug, "3.0.3", "7c3ac52b39624bc616db2e937c282f3f623f25f8d550068b6710e58d04a0e330", [:mix], [{:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3f2d759e8c272ed3835fab2ef11b46bddab8c1ab9528167bd463b6452edf830d"}, @@ -36,7 +36,7 @@ "earmark_parser": {:hex, :earmark_parser, "1.4.26", "f4291134583f373c7d8755566122908eb9662df4c4b63caa66a0eabe06569b0a", [:mix], [], "hexpm", "48d460899f8a0c52c5470676611c01f64f3337bad0b26ddab43648428d94aabc"}, "ecto": {:hex, :ecto, "3.7.1", "a20598862351b29f80f285b21ec5297da1181c0442687f9b8329f0445d228892", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d36e5b39fc479e654cffd4dbe1865d9716e4a9b6311faff799b6f90ab81b8638"}, "ecto_sql": {:hex, :ecto_sql, "3.7.1", "8de624ef50b2a8540252d8c60506379fbbc2707be1606853df371cf53df5d053", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.4.0 or ~> 0.5.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2b42a32e2ce92f64aba5c88617891ab3b0ba34f3f3a503fa20009eae1a401c81"}, - "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, + "elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_abi": {:hex, :ex_abi, "0.5.11", "a53307cf796231bf068a9941d57fbcb8654e72042c2a113a49f08dfb248875fb", [:mix], [{:ex_keccak, "~> 0.4.0", [hex: :ex_keccak, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e128577740bdc0f05ed6841cbb1c88bb80377613970ed870fa052b780870655a"}, "ex_cldr": {:hex, :ex_cldr, "2.33.0", "fd1f3752164ace38b2d7986fd948bf49d1037ee1ad7007a2349c5411e482f33f", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.18", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "a46ced45b47fc4ebafbb7ffdaf496a3b34fe6bd78ce4cadfbc6920eb3d190ae7"}, From 7c7ffafff30b5fd519d63a2feab50db3b483d248 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:42:55 +0000 Subject: [PATCH 170/723] Bump sweetalert2 from 11.4.27 to 11.4.28 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.4.27 to 11.4.28. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.4.27...v11.4.28) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 6bb0addf0740..a2eef2b083b8 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -56,7 +56,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.27", + "sweetalert2": "^11.4.28", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", @@ -16945,9 +16945,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.4.27", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.27.tgz", - "integrity": "sha512-UEahwAhaSUiL8+fyH7ziuXgC/yHrCgZZuVAXYzNj52tOkjUWFPlYyZN3JVpKtBqDxNDOk76gQ1FZbFst7wnU+A==", + "version": "11.4.28", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.28.tgz", + "integrity": "sha512-leCf8Kc/o+R0LNWmLjWXI7l0roMchEHg6X+XibmfTYaOMvOoHXmoxmegHl0it+8vvvZlPIjzyfM6bYBOKTFnRg==", "funding": { "type": "individual", "url": "https://sweetalert2.github.io/#donations" @@ -31517,9 +31517,9 @@ } }, "sweetalert2": { - "version": "11.4.27", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.27.tgz", - "integrity": "sha512-UEahwAhaSUiL8+fyH7ziuXgC/yHrCgZZuVAXYzNj52tOkjUWFPlYyZN3JVpKtBqDxNDOk76gQ1FZbFst7wnU+A==" + "version": "11.4.28", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.28.tgz", + "integrity": "sha512-leCf8Kc/o+R0LNWmLjWXI7l0roMchEHg6X+XibmfTYaOMvOoHXmoxmegHl0it+8vvvZlPIjzyfM6bYBOKTFnRg==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index a0fbe7d66dc2..0a4863cfad6e 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -68,7 +68,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.27", + "sweetalert2": "^11.4.28", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", From dc6c88b6b77a507ee6f92b9e2f74c88e5d80eeff Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 19 Aug 2022 13:34:03 +0300 Subject: [PATCH 171/723] Update bcrypt_elixir 1 -> 2 --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/accounts/accounts.ex | 6 +++--- apps/explorer/lib/explorer/accounts/user.ex | 4 ++-- apps/explorer/mix.exs | 2 +- apps/explorer/test/explorer/accounts/accounts_test.exs | 2 +- apps/explorer/test/support/factory.ex | 4 ++-- mix.lock | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c78e0a03991..4a07f9cd24ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` ### Chore +- [#5836](https://github.com/blockscout/blockscout/pull/5836) - Bump comeonin from 4.1.2 to 5.3.3 - [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets - [#5919](https://github.com/blockscout/blockscout/pull/5919) - Bump floki from 0.32.1 to 0.33.1 - [#5930](https://github.com/blockscout/blockscout/pull/5930) - Bump eslint from 8.21.0 to 8.22.0 in /apps/block_scout_web/assets diff --git a/apps/explorer/lib/explorer/accounts/accounts.ex b/apps/explorer/lib/explorer/accounts/accounts.ex index b399d3781659..079b8309cf35 100644 --- a/apps/explorer/lib/explorer/accounts/accounts.ex +++ b/apps/explorer/lib/explorer/accounts/accounts.ex @@ -3,7 +3,7 @@ defmodule Explorer.Accounts do Entrypoint for modifying user account information. """ - alias Comeonin.Bcrypt + alias Bcrypt alias Ecto.Changeset alias Explorer.Accounts.User alias Explorer.Accounts.User.{Authenticate, Registration} @@ -61,7 +61,7 @@ defmodule Explorer.Accounts do with {:ok, authentication} <- authentication, {:user, %User{} = user} <- {:user, Repo.get_by(User, username: authentication.username)}, - {:password, true} <- {:password, Bcrypt.checkpw(authentication.password, user.password_hash)} do + {:password, true} <- {:password, Bcrypt.verify_pass(authentication.password, user.password_hash)} do {:ok, user} else {:error, %Changeset{}} = error -> @@ -69,7 +69,7 @@ defmodule Explorer.Accounts do {:user, nil} -> # Run dummy check to mitigate timing attacks - Bcrypt.dummy_checkpw() + Bcrypt.no_user_verify() {:error, :invalid_credentials} {:password, false} -> diff --git a/apps/explorer/lib/explorer/accounts/user.ex b/apps/explorer/lib/explorer/accounts/user.ex index 1a3b46456b05..fd797d0b9532 100644 --- a/apps/explorer/lib/explorer/accounts/user.ex +++ b/apps/explorer/lib/explorer/accounts/user.ex @@ -7,7 +7,7 @@ defmodule Explorer.Accounts.User do import Ecto.Changeset - alias Comeonin.Bcrypt + alias Bcrypt alias Ecto.Changeset alias Explorer.Accounts.{User, UserContact} @@ -42,7 +42,7 @@ defmodule Explorer.Accounts.User do defp hash_password(%Changeset{} = changeset) do if password = get_change(changeset, :password) do - put_change(changeset, :password_hash, Bcrypt.hashpwsalt(password)) + put_change(changeset, :password_hash, Bcrypt.hash_pwd_salt(password)) else changeset end diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 1ddc169def28..fe2dd831c169 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -56,7 +56,7 @@ defmodule Explorer.Mixfile do # Type `mix help deps` for examples and options. defp deps do [ - {:bcrypt_elixir, "~> 1.0"}, + {:bcrypt_elixir, "~> 2.0"}, # benchmark optimizations {:benchee, "~> 1.1.0", only: :test}, # CSV output for benchee diff --git a/apps/explorer/test/explorer/accounts/accounts_test.exs b/apps/explorer/test/explorer/accounts/accounts_test.exs index e3ba1ed41669..37c61d414b47 100644 --- a/apps/explorer/test/explorer/accounts/accounts_test.exs +++ b/apps/explorer/test/explorer/accounts/accounts_test.exs @@ -19,7 +19,7 @@ defmodule Explorer.AccountsTest do assert user.username == params.username refute user.password_hash == params.password - assert Comeonin.Bcrypt.checkpw(params.password, user.password_hash) + assert Bcrypt.verify_pass(params.password, user.password_hash) assert contact.email == params.email assert contact.primary refute contact.verified diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index 27aee086406f..34f46922407c 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -6,7 +6,7 @@ defmodule Explorer.Factory do import Ecto.Query import Kernel, except: [+: 2] - alias Comeonin.Bcrypt + alias Bcrypt alias Explorer.Accounts.{User, UserContact} alias Explorer.Admin.Administrator alias Explorer.Chain.Block.{EmissionReward, Range, Reward} @@ -763,7 +763,7 @@ defmodule Explorer.Factory do %User{ username: username, - password_hash: Bcrypt.hashpwsalt("password"), + password_hash: Bcrypt.hash_pwd_salt("password"), contacts: [ %UserContact{ email: "#{username}@blockscout", diff --git a/mix.lock b/mix.lock index 4278bba36077..c82f64701eb7 100644 --- a/mix.lock +++ b/mix.lock @@ -4,7 +4,7 @@ "absinthe_plug": {:git, "https://github.com/blockscout/absinthe_plug.git", "c435d43f316769e1beee1dbe500b623124c96785", [tag: "1.5.3"]}, "absinthe_relay": {:hex, :absinthe_relay, "1.5.2", "cfb8aed70f4e4c7718d3f1c212332d2ea728f17c7fc0f68f1e461f0f5f0c4b9a", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0 or ~> 1.7.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "0587ee913afa31512e1457a5064ee88427f8fe7bcfbeeecd41c71d9cff0b62b6"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, - "bcrypt_elixir": {:hex, :bcrypt_elixir, "1.1.1", "6b5560e47a02196ce5f0ab3f1d8265db79a23868c137e973b27afef928ed8006", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "10f658be786bd2daaadcd45cc5b598da01d5bbc313da4d0e3efb2d6a511d896d"}, + "bcrypt_elixir": {:hex, :bcrypt_elixir, "2.3.1", "5114d780459a04f2b4aeef52307de23de961b69e13a5cd98a911e39fda13f420", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "42182d5f46764def15bf9af83739e3bf4ad22661b1c34fc3e88558efced07279"}, "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, From 018a6b1028a03d5266a68ec8b803b90436140007 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 12:52:53 +0000 Subject: [PATCH 172/723] Bump ex_doc from 0.28.4 to 0.28.5 Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.28.4 to 0.28.5. - [Release notes](https://github.com/elixir-lang/ex_doc/releases) - [Changelog](https://github.com/elixir-lang/ex_doc/blob/v0.28.5/CHANGELOG.md) - [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.28.4...v0.28.5) --- updated-dependencies: - dependency-name: ex_doc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index c82f64701eb7..844a2c29d699 100644 --- a/mix.lock +++ b/mix.lock @@ -44,7 +44,7 @@ "ex_cldr_lists": {:hex, :ex_cldr_lists, "2.10.0", "4d4c9877da2d0417fd832907d69974e8328969f75fafc79b05ccf85f549f6281", [:mix], [{:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "adc040cde7b97f7fd7c0b35dd69ddb6fcf607303ae6355bb1851deae1f8b0652"}, "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.27.2", "d1400a0502fb66ab3abcce3d10d5d11efcfc786eafe1c442ea2ddf834670d743", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:digital_token, "~> 0.3 or ~> 1.0", [hex: :digital_token, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.28", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.13", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "f682f46193e1793a3a98cc636314e9bea483da0925eb47935a39c4feef79e364"}, "ex_cldr_units": {:hex, :ex_cldr_units, "3.13.3", "886dbeb22c739ffbf574098cc889aa5fc0df9d27abb3412d700da051826fdb05", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr_lists, "~> 2.10", [hex: :ex_cldr_lists, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.26", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:ratio, "~> 2.4", [hex: :ratio, repo: "hexpm", optional: false]}], "hexpm", "2177d8070c5572b0e1e40271783c191c60f5075051ed95b488ec3b2bc157b23c"}, - "ex_doc": {:hex, :ex_doc, "0.28.4", "001a0ea6beac2f810f1abc3dbf4b123e9593eaa5f00dd13ded024eae7c523298", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bf85d003dd34911d89c8ddb8bda1a958af3471a274a4c2150a9c01c78ac3f8ed"}, + "ex_doc": {:hex, :ex_doc, "0.28.5", "3e52a6d2130ce74d096859e477b97080c156d0926701c13870a4e1f752363279", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d2c4b07133113e9aa3e9ba27efb9088ba900e9e51caa383919676afdf09ab181"}, "ex_json_schema": {:hex, :ex_json_schema, "0.9.1", "1de550a267198aa833f4ad043b97241f2b0a3671bb5869581efef0f165b58694", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "7041222de29d33308cef68ec81da9025d141951197bd9bb6e49dc945d195cd69"}, "ex_keccak": {:hex, :ex_keccak, "0.4.0", "4eb8620c8a20a546e2d297b5ce3de150a90db0fdc4ba1dd88c854ace9ee47603", [:mix], [{:rustler, "~> 0.24", [hex: :rustler, repo: "hexpm", optional: false]}], "hexpm", "209ec5591d3cf79f9bdcdedf39c3d7a1fb208321e2b6de2660801117ae386f10"}, "ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"}, From df1889aef9a97b713890c4ef19d5d07d4ac609a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 12:53:26 +0000 Subject: [PATCH 173/723] Bump bcrypt_elixir from 2.3.1 to 3.0.1 Bumps [bcrypt_elixir](https://github.com/riverrun/bcrypt_elixir) from 2.3.1 to 3.0.1. - [Release notes](https://github.com/riverrun/bcrypt_elixir/releases) - [Changelog](https://github.com/riverrun/bcrypt_elixir/blob/master/CHANGELOG.md) - [Commits](https://github.com/riverrun/bcrypt_elixir/commits) --- updated-dependencies: - dependency-name: bcrypt_elixir dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/explorer/mix.exs | 2 +- mix.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index fe2dd831c169..06b170e03e28 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -56,7 +56,7 @@ defmodule Explorer.Mixfile do # Type `mix help deps` for examples and options. defp deps do [ - {:bcrypt_elixir, "~> 2.0"}, + {:bcrypt_elixir, "~> 3.0"}, # benchmark optimizations {:benchee, "~> 1.1.0", only: :test}, # CSV output for benchee diff --git a/mix.lock b/mix.lock index c82f64701eb7..c2744ce6c3a1 100644 --- a/mix.lock +++ b/mix.lock @@ -4,7 +4,7 @@ "absinthe_plug": {:git, "https://github.com/blockscout/absinthe_plug.git", "c435d43f316769e1beee1dbe500b623124c96785", [tag: "1.5.3"]}, "absinthe_relay": {:hex, :absinthe_relay, "1.5.2", "cfb8aed70f4e4c7718d3f1c212332d2ea728f17c7fc0f68f1e461f0f5f0c4b9a", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0 or ~> 1.7.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "0587ee913afa31512e1457a5064ee88427f8fe7bcfbeeecd41c71d9cff0b62b6"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, - "bcrypt_elixir": {:hex, :bcrypt_elixir, "2.3.1", "5114d780459a04f2b4aeef52307de23de961b69e13a5cd98a911e39fda13f420", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "42182d5f46764def15bf9af83739e3bf4ad22661b1c34fc3e88558efced07279"}, + "bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"}, "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, From 95d6e1bcc0ff3288605a2059da9cf60a0a1466bc Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 19 Aug 2022 19:38:38 +0300 Subject: [PATCH 174/723] Server-side captcha check for CSV export --- CHANGELOG.md | 1 + apps/block_scout_web/assets/js/app.js | 3 + .../js/lib/{datepicker.js => csv_download.js} | 56 +++--- apps/block_scout_web/assets/package-lock.json | 19 +- apps/block_scout_web/assets/package.json | 1 + apps/block_scout_web/assets/webpack.config.js | 2 +- apps/block_scout_web/config/dev.exs | 2 + apps/block_scout_web/config/prod.exs | 2 + apps/block_scout_web/config/test.exs | 2 + .../lib/block_scout_web/captcha_helper.ex | 27 +++ .../address_transaction_controller.ex | 165 ++++++++++-------- .../controllers/captcha_cotroller.ex | 16 -- .../templates/csv_export/index.html.eex | 25 ++- .../lib/block_scout_web/views/captcha_view.ex | 3 - .../lib/block_scout_web/web_router.ex | 2 - apps/block_scout_web/priv/gettext/default.pot | 2 +- .../priv/gettext/en/LC_MESSAGES/default.po | 2 +- .../address_transaction_controller_test.exs | 81 ++++++++- apps/block_scout_web/test/test_helper.exs | 2 + ...ress_internal_transaction_csv_exporter.ex} | 0 .../chain/address_transaction_csv_exporter.ex | 1 - 21 files changed, 271 insertions(+), 143 deletions(-) rename apps/block_scout_web/assets/js/lib/{datepicker.js => csv_download.js} (62%) create mode 100644 apps/block_scout_web/lib/block_scout_web/captcha_helper.ex delete mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/captcha_cotroller.ex delete mode 100644 apps/block_scout_web/lib/block_scout_web/views/captcha_view.ex rename apps/explorer/lib/explorer/chain/{address_internal_transaction_csv_explorer.ex => address_internal_transaction_csv_exporter.ex} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c78e0a03991..d3518cce67cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5957](https://github.com/blockscout/blockscout/pull/5957) - Server-side reCAPTCHA check for CSV export - [#5954](https://github.com/blockscout/blockscout/pull/5954) - Fix ace editor appearance - [#5942](https://github.com/blockscout/blockscout/pull/5942), [#5945](https://github.com/blockscout/blockscout/pull/5945) - Fix nightly solidity versions filtering UX - [#5904](https://github.com/blockscout/blockscout/pull/5904) - Enhance health API endpoint: better parsing HEALTHY_BLOCKS_PERIOD and use it in the response diff --git a/apps/block_scout_web/assets/js/app.js b/apps/block_scout_web/assets/js/app.js index df99725add04..6366564cf8a1 100644 --- a/apps/block_scout_web/assets/js/app.js +++ b/apps/block_scout_web/assets/js/app.js @@ -35,3 +35,6 @@ import './lib/tooltip' import './lib/modals' import './lib/card_tabs' import './lib/ad' + +import swal from 'sweetalert2' +window.Swal = swal diff --git a/apps/block_scout_web/assets/js/lib/datepicker.js b/apps/block_scout_web/assets/js/lib/csv_download.js similarity index 62% rename from apps/block_scout_web/assets/js/lib/datepicker.js rename to apps/block_scout_web/assets/js/lib/csv_download.js index b9dabd50d501..2fe63c14380b 100644 --- a/apps/block_scout_web/assets/js/lib/datepicker.js +++ b/apps/block_scout_web/assets/js/lib/csv_download.js @@ -1,6 +1,7 @@ import * as Pikaday from 'pikaday' import moment from 'moment' import $ from 'jquery' +import Cookies from 'js-cookie' const DATE_FORMAT = 'YYYY-MM-DD' @@ -27,38 +28,33 @@ const _instance2 = new Pikaday({ }) $button.on('click', () => { - $button.addClass('spinner') // eslint-disable-next-line - const resp = grecaptcha.getResponse() - if (resp) { - $.ajax({ - url: './captcha?type=JSON', - type: 'POST', - headers: { - 'x-csrf-token': $('[name=_csrf_token]').val() - }, - data: { - type: 'JSON', - captchaResponse: resp + const recaptchaResponse = grecaptcha.getResponse() + if (recaptchaResponse) { + $button.addClass('spinner') + $button.prop('disabled', true) + const downloadUrl = `${$button.data('link')}&recaptcha_response=${recaptchaResponse}` + + $('body').append($('')) + $('#csv-iframe').attr('src', downloadUrl) + + const interval = setInterval(handleCSVDownloaded, 1000) + setTimeout(resetDownload, 60000) + + function handleCSVDownloaded () { + if (Cookies.get('csv-downloaded') === 'true') { + resetDownload() } - }) - .done(function (data) { - // eslint-disable-next-line - grecaptcha.reset() - const dataJson = JSON.parse(data) - if (dataJson.success) { - $button.removeClass('spinner') - location.href = $button.data('link') - } else { - $button.removeClass('spinner') - return false - } - }) - .fail(function (_jqXHR, textStatus) { - $button.removeClass('spinner') - }) - } else { - $button.removeClass('spinner') + } + + function resetDownload () { + $button.removeClass('spinner') + $button.prop('disabled', false) + clearInterval(interval) + Cookies.remove('csv-downloaded') + // eslint-disable-next-line + grecaptcha.reset() + } } }) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index a2eef2b083b8..f51684d0d3ea 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -24,6 +24,7 @@ "https-browserify": "^1.0.0", "humps": "^2.0.1", "jquery": "^3.4.0", + "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", "lodash.find": "^4.6.0", @@ -95,10 +96,11 @@ } }, "../../../deps/phoenix": { - "version": "0.0.1" + "version": "1.5.13", + "license": "MIT" }, "../../../deps/phoenix_html": { - "version": "0.0.1" + "version": "3.0.4" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -12018,6 +12020,14 @@ "optional": true, "peer": true }, + "node_modules/js-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", + "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==", + "engines": { + "node": ">=12" + } + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -27740,6 +27750,11 @@ "optional": true, "peer": true }, + "js-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", + "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==" + }, "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0a4863cfad6e..f00874696f0c 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -36,6 +36,7 @@ "https-browserify": "^1.0.0", "humps": "^2.0.1", "jquery": "^3.4.0", + "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", "lodash.find": "^4.6.0", diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 84eefdfe6ced..516c62150164 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -69,7 +69,7 @@ const appJs = 'search-results': './js/pages/search-results/search.js', 'token-overview': './js/pages/token/overview.js', 'export-csv': './css/export-csv.scss', - 'datepicker': './js/lib/datepicker.js', + 'csv-download': './js/lib/csv_download.js', 'dropzone': './js/lib/dropzone.js' }, output: { diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index 4d0e60cdbf35..d26e1b28d26c 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -62,3 +62,5 @@ config :logger, :api, # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. config :phoenix, :stacktrace_depth, 20 + +config :block_scout_web, :captcha_helper, BlockScoutWeb.CaptchaHelper diff --git a/apps/block_scout_web/config/prod.exs b/apps/block_scout_web/config/prod.exs index 9b2c4f108a94..4f4fb7b6382c 100644 --- a/apps/block_scout_web/config/prod.exs +++ b/apps/block_scout_web/config/prod.exs @@ -33,3 +33,5 @@ config :logger, :api, path: Path.absname("logs/prod/api.log"), metadata_filter: [fetcher: :api], rotate: %{max_bytes: 52_428_800, keep: 19} + +config :block_scout_web, :captcha_helper, BlockScoutWeb.CaptchaHelper diff --git a/apps/block_scout_web/config/test.exs b/apps/block_scout_web/config/test.exs index 2fde7dc2e542..69ff45e1da44 100644 --- a/apps/block_scout_web/config/test.exs +++ b/apps/block_scout_web/config/test.exs @@ -21,3 +21,5 @@ config :logger, :block_scout_web, config :wallaby, screenshot_on_failure: true, driver: Wallaby.Chrome, js_errors: false config :block_scout_web, BlockScoutWeb.Counters.BlocksIndexedCounter, enabled: false + +config :block_scout_web, :captcha_helper, BlockScoutWeb.TestCaptchaHelper diff --git a/apps/block_scout_web/lib/block_scout_web/captcha_helper.ex b/apps/block_scout_web/lib/block_scout_web/captcha_helper.ex new file mode 100644 index 000000000000..abeb3d16ebf6 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/captcha_helper.ex @@ -0,0 +1,27 @@ +defmodule BlockScoutWeb.CaptchaHelper do + @moduledoc """ + A helper for CAPTCHA + """ + + @callback recaptcha_passed?(String.t() | nil) :: bool + @spec recaptcha_passed?(String.t() | nil) :: bool + def recaptcha_passed?(nil), do: false + + def recaptcha_passed?(recaptcha_response) do + re_captcha_secret_key = Application.get_env(:block_scout_web, :re_captcha_secret_key) + body = "secret=#{re_captcha_secret_key}&response=#{recaptcha_response}" + + headers = [{"Content-type", "application/x-www-form-urlencoded"}] + + case HTTPoison.post("https://www.google.com/recaptcha/api/siteverify", body, headers, []) do + {:ok, %HTTPoison.Response{status_code: 200, body: body}} -> + case Jason.decode!(body) do + %{"success" => true} -> true + _ -> false + end + + _ -> + false + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index fed2fe2da8ab..3d0518456617 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -158,104 +158,119 @@ defmodule BlockScoutWeb.AddressTransactionController do end end - def token_transfers_csv(conn, %{ - "address_id" => address_hash_string, - "from_period" => from_period, - "to_period" => to_period - }) - when is_binary(address_hash_string) do + defp captcha_helper do + :block_scout_web + |> Application.get_env(:captcha_helper) + end + + defp put_resp_params(conn, file_name) do + conn + |> put_resp_content_type("application/csv") + |> put_resp_header("content-disposition", "attachment; filename=#{file_name}") + |> put_resp_cookie("csv-downloaded", "true", max_age: 86_400, http_only: false) + |> send_chunked(200) + end + + defp items_csv( + conn, + %{ + "address_id" => address_hash_string, + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => recaptcha_response + }, + csv_export_module, + file_name + ) + when is_binary(address_hash_string) do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.hash_to_address(address_hash) do + {:ok, address} <- Chain.hash_to_address(address_hash), + {:recaptcha, true} <- {:recaptcha, captcha_helper().recaptcha_passed?(recaptcha_response)} do address - |> AddressTokenTransferCsvExporter.export(from_period, to_period) - |> Enum.into( - conn - |> put_resp_content_type("application/csv") - |> put_resp_header("content-disposition", "attachment; filename=token_transfers.csv") - |> send_chunked(200) - ) + |> csv_export_module.export(from_period, to_period) + |> Enum.into(put_resp_params(conn, file_name)) else :error -> unprocessable_entity(conn) {:error, :not_found} -> not_found(conn) + + {:recaptcha, false} -> + not_found(conn) end end - def token_transfers_csv(conn, _), do: not_found(conn) + defp items_csv(conn, _, _, _), do: not_found(conn) + + def token_transfers_csv(conn, params) do + items_csv( + conn, + %{ + "address_id" => params["address_id"], + "from_period" => params["from_period"], + "to_period" => params["to_period"], + "recaptcha_response" => params["recaptcha_response"] + }, + AddressTokenTransferCsvExporter, + "token_transfers.csv" + ) + end def transactions_csv(conn, %{ "address_id" => address_hash_string, "from_period" => from_period, - "to_period" => to_period + "to_period" => to_period, + "recaptcha_response" => recaptcha_response }) do - with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.hash_to_address(address_hash) do - address - |> AddressTransactionCsvExporter.export(from_period, to_period) - |> Enum.into( - conn - |> put_resp_content_type("application/csv") - |> put_resp_header("content-disposition", "attachment; filename=transactions.csv") - |> send_chunked(200) - ) - else - :error -> - unprocessable_entity(conn) - - {:error, :not_found} -> - not_found(conn) - end + items_csv( + conn, + %{ + "address_id" => address_hash_string, + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => recaptcha_response + }, + AddressTransactionCsvExporter, + "transactions.csv" + ) end - def transactions_csv(conn, _), do: not_found(conn) - def internal_transactions_csv(conn, %{ "address_id" => address_hash_string, "from_period" => from_period, - "to_period" => to_period + "to_period" => to_period, + "recaptcha_response" => recaptcha_response }) do - with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.hash_to_address(address_hash) do - address - |> AddressInternalTransactionCsvExporter.export(from_period, to_period) - |> Enum.into( - conn - |> put_resp_content_type("application/csv") - |> put_resp_header("content-disposition", "attachment; filename=internal_transactions.csv") - |> send_chunked(200) - ) - else - :error -> - unprocessable_entity(conn) - - {:error, :not_found} -> - not_found(conn) - end + items_csv( + conn, + %{ + "address_id" => address_hash_string, + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => recaptcha_response + }, + AddressInternalTransactionCsvExporter, + "internal_transactions.csv" + ) end - def internal_transactions_csv(conn, _), do: not_found(conn) - - def logs_csv(conn, %{"address_id" => address_hash_string, "from_period" => from_period, "to_period" => to_period}) do - with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.hash_to_address(address_hash) do - address - |> AddressLogCsvExporter.export(from_period, to_period) - |> Enum.into( - conn - |> put_resp_content_type("application/csv") - |> put_resp_header("content-disposition", "attachment; filename=logs.csv") - |> send_chunked(200) - ) - else - :error -> - unprocessable_entity(conn) - - {:error, :not_found} -> - not_found(conn) - end + def logs_csv(conn, %{ + "address_id" => address_hash_string, + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => recaptcha_response + }) do + items_csv( + conn, + %{ + "address_id" => address_hash_string, + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => recaptcha_response + }, + AddressLogCsvExporter, + "logs.csv" + ) end - - def logs_csv(conn, _), do: not_found(conn) end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/captcha_cotroller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/captcha_cotroller.ex deleted file mode 100644 index ad170262a6e9..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/controllers/captcha_cotroller.ex +++ /dev/null @@ -1,16 +0,0 @@ -defmodule BlockScoutWeb.CaptchaController do - use BlockScoutWeb, :controller - - alias Plug.Conn - - def index(conn, %{"captchaResponse" => captcha_response, "type" => "JSON"}) do - body = "secret=#{Application.get_env(:block_scout_web, :re_captcha_secret_key)}&response=#{captcha_response}" - - headers = [{"Content-type", "application/x-www-form-urlencoded"}] - - case HTTPoison.post("https://www.google.com/recaptcha/api/siteverify", body, headers, []) do - {:ok, %HTTPoison.Response{status_code: status_code, body: body}} -> - Conn.resp(conn, status_code, body) - end - end -end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex index 0060e01d31c2..98293ccd2005 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex @@ -21,21 +21,32 @@
- - + - + \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/views/captcha_view.ex b/apps/block_scout_web/lib/block_scout_web/views/captcha_view.ex deleted file mode 100644 index 8da20e685f13..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/views/captcha_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule BlockScoutWeb.CaptchaView do - use BlockScoutWeb, :view -end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index b27cb88fb4eb..c3ad18e43d69 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -402,8 +402,6 @@ defmodule BlockScoutWeb.WebRouter do get("/csv-export", CsvExportController, :index) - post("/captcha", CaptchaController, :index) - get("/transactions-csv", AddressTransactionController, :transactions_csv) get("/token-autocomplete", ChainController, :token_autocomplete) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index cfde8ac14d2e..11decd35fefb 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -811,7 +811,7 @@ msgstr "" msgid "Displaying the init data provided of the creating transaction." msgstr "" -#: lib/block_scout_web/templates/csv_export/index.html.eex:25 +#: lib/block_scout_web/templates/csv_export/index.html.eex:24 #, elixir-autogen, elixir-format msgid "Download" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 24b39c2851a6..0c7d9aa8003b 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -811,7 +811,7 @@ msgstr "" msgid "Displaying the init data provided of the creating transaction." msgstr "" -#: lib/block_scout_web/templates/csv_export/index.html.eex:25 +#: lib/block_scout_web/templates/csv_export/index.html.eex:24 #, elixir-autogen, elixir-format msgid "Download" msgstr "" diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_transaction_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_transaction_controller_test.exs index e28e6ac4013b..159c1be26179 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_transaction_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_transaction_controller_test.exs @@ -8,6 +8,8 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do alias Explorer.Chain.{Address, Transaction} alias Explorer.ExchangeRates.Token + setup :verify_on_exit! + describe "GET index/2" do setup :set_mox_global @@ -159,7 +161,10 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do end describe "GET token-transfers-csv/2" do - test "exports token transfers to csv", %{conn: conn} do + test "do not export token transfers to csv without recaptcha recaptcha_response provided", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> false end) + address = insert(:address) transaction = @@ -180,12 +185,71 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do "to_period" => to_period }) + assert conn.status == 404 + end + + test "do not export token transfers to csv without recaptcha passed", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> false end) + + address = insert(:address) + + transaction = + :transaction + |> insert(from_address: address) + |> with_block() + + insert(:token_transfer, transaction: transaction, from_address: address, block_number: transaction.block_number) + insert(:token_transfer, transaction: transaction, to_address: address, block_number: transaction.block_number) + + from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) + to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) + + conn = + get(conn, "/token-transfers-csv", %{ + "address_id" => Address.checksum(address.hash), + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => "123" + }) + + assert conn.status == 404 + end + + test "exports token transfers to csv", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> true end) + + address = insert(:address) + + transaction = + :transaction + |> insert(from_address: address) + |> with_block() + + insert(:token_transfer, transaction: transaction, from_address: address, block_number: transaction.block_number) + insert(:token_transfer, transaction: transaction, to_address: address, block_number: transaction.block_number) + + from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) + to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) + + conn = + get(conn, "/token-transfers-csv", %{ + "address_id" => Address.checksum(address.hash), + "from_period" => from_period, + "to_period" => to_period, + "recaptcha_response" => "123" + }) + assert conn.resp_body |> String.split("\n") |> Enum.count() == 4 end end describe "GET transactions_csv/2" do test "download csv file with transactions", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> true end) + address = insert(:address) :transaction @@ -203,7 +267,8 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do get(conn, "/transactions-csv", %{ "address_id" => Address.checksum(address.hash), "from_period" => from_period, - "to_period" => to_period + "to_period" => to_period, + "recaptcha_response" => "123" }) assert conn.resp_body |> String.split("\n") |> Enum.count() == 4 @@ -212,6 +277,9 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do describe "GET internal_transactions_csv/2" do test "download csv file with internal transactions", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> true end) + address = insert(:address) transaction_1 = @@ -266,7 +334,8 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do get(conn, "/internal-transactions-csv", %{ "address_id" => Address.checksum(address.hash), "from_period" => from_period, - "to_period" => to_period + "to_period" => to_period, + "recaptcha_response" => "123" }) assert conn.resp_body |> String.split("\n") |> Enum.count() == 5 @@ -275,6 +344,9 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do describe "GET logs_csv/2" do test "download csv file with logs", %{conn: conn} do + BlockScoutWeb.TestCaptchaHelper + |> expect(:recaptcha_passed?, fn _captcha_response -> true end) + address = insert(:address) transaction_1 = @@ -323,7 +395,8 @@ defmodule BlockScoutWeb.AddressTransactionControllerTest do get(conn, "/logs-csv", %{ "address_id" => Address.checksum(address.hash), "from_period" => from_period, - "to_period" => to_period + "to_period" => to_period, + "recaptcha_response" => "123" }) assert conn.resp_body |> String.split("\n") |> Enum.count() == 5 diff --git a/apps/block_scout_web/test/test_helper.exs b/apps/block_scout_web/test/test_helper.exs index cf64b94ffd29..99441816888b 100644 --- a/apps/block_scout_web/test/test_helper.exs +++ b/apps/block_scout_web/test/test_helper.exs @@ -21,3 +21,5 @@ Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, :manual) Absinthe.Test.prime(BlockScoutWeb.Schema) Mox.defmock(EthereumJSONRPC.Mox, for: EthereumJSONRPC.Transport) + +Mox.defmock(BlockScoutWeb.TestCaptchaHelper, for: BlockScoutWeb.CaptchaHelper) diff --git a/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_explorer.ex b/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex similarity index 100% rename from apps/explorer/lib/explorer/chain/address_internal_transaction_csv_explorer.ex rename to apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex diff --git a/apps/explorer/lib/explorer/chain/address_transaction_csv_exporter.ex b/apps/explorer/lib/explorer/chain/address_transaction_csv_exporter.ex index 008c9a0a8e4a..a68c4aabe08d 100644 --- a/apps/explorer/lib/explorer/chain/address_transaction_csv_exporter.ex +++ b/apps/explorer/lib/explorer/chain/address_transaction_csv_exporter.ex @@ -51,7 +51,6 @@ defmodule Explorer.Chain.AddressTransactionCsvExporter do |> Keyword.put(:to_block, to_block) transactions = Chain.address_to_transactions_without_rewards(address_hash, options) - new_acc = transactions ++ acc case Enum.split(transactions, @page_size) do From a48a17bf81ebd03a4e2c2d82a26f1d553485c141 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 18:52:06 +0000 Subject: [PATCH 175/723] Bump ex_cldr from 2.33.0 to 2.33.1 Bumps [ex_cldr](https://github.com/elixir-cldr/cldr) from 2.33.0 to 2.33.1. - [Release notes](https://github.com/elixir-cldr/cldr/releases) - [Changelog](https://github.com/elixir-cldr/cldr/blob/master/CHANGELOG.md) - [Commits](https://github.com/elixir-cldr/cldr/compare/v2.33.0...v2.33.1) --- updated-dependencies: - dependency-name: ex_cldr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index f6557ed0fab4..e073cc0bdd8e 100644 --- a/mix.lock +++ b/mix.lock @@ -13,7 +13,7 @@ "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, - "cldr_utils": {:hex, :cldr_utils, "2.18.0", "674a2941abfd501a338b02244985feb7e526b1b41417b305c45a682e1f7b07b0", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "b435777ae33e8e86cfbeb96437881cf751d5062f366dacdae2e6548f83257a52"}, + "cldr_utils": {:hex, :cldr_utils, "2.19.0", "63a8bca7fe5e9b1a5bcd7814410c01c76afe9797a02b434a0e7de19c2e67af1c", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "d316fbe1cb1ab7bff85424020bca596036cf9437e45081f2a9ecfb3b5a1c08e9"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, @@ -39,7 +39,7 @@ "elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_abi": {:hex, :ex_abi, "0.5.11", "a53307cf796231bf068a9941d57fbcb8654e72042c2a113a49f08dfb248875fb", [:mix], [{:ex_keccak, "~> 0.4.0", [hex: :ex_keccak, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e128577740bdc0f05ed6841cbb1c88bb80377613970ed870fa052b780870655a"}, - "ex_cldr": {:hex, :ex_cldr, "2.33.0", "fd1f3752164ace38b2d7986fd948bf49d1037ee1ad7007a2349c5411e482f33f", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.18", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "a46ced45b47fc4ebafbb7ffdaf496a3b34fe6bd78ce4cadfbc6920eb3d190ae7"}, + "ex_cldr": {:hex, :ex_cldr, "2.33.1", "fc8e09aa1b9eb81ed90d7bfe2b670f86c71221b370172a3aef35da613fcd4e14", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.18", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "90502e903d772fc36cc3cd74c194d2870b41e85e14af206dab5430f2cdf0f395"}, "ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.14.1", "87102f426439264229854ded5b723a617bc194ca01dd53fa85afc28399faee1d", [:mix], [{:ex_cldr, "~> 2.27", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "da0a864ed43ade93c44d62170ea9c157c5abb20a01cc0270ac47cd51e045de00"}, "ex_cldr_lists": {:hex, :ex_cldr_lists, "2.10.0", "4d4c9877da2d0417fd832907d69974e8328969f75fafc79b05ccf85f549f6281", [:mix], [{:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "adc040cde7b97f7fd7c0b35dd69ddb6fcf607303ae6355bb1851deae1f8b0652"}, "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.27.2", "d1400a0502fb66ab3abcce3d10d5d11efcfc786eafe1c442ea2ddf834670d743", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:digital_token, "~> 0.3 or ~> 1.0", [hex: :digital_token, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.28", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.13", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "f682f46193e1793a3a98cc636314e9bea483da0925eb47935a39c4feef79e364"}, From b230cea43e74153b24ea98054d6f1d3d9e78d8e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 18:52:15 +0000 Subject: [PATCH 176/723] Bump sweetalert2 from 11.4.28 to 11.4.29 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.4.28 to 11.4.29. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.4.28...v11.4.29) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 19 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f51684d0d3ea..9ce4cf603786 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -57,7 +57,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.28", + "sweetalert2": "^11.4.29", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", @@ -96,11 +96,10 @@ } }, "../../../deps/phoenix": { - "version": "1.5.13", - "license": "MIT" + "version": "0.0.1" }, "../../../deps/phoenix_html": { - "version": "3.0.4" + "version": "0.0.1" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -16955,9 +16954,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.4.28", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.28.tgz", - "integrity": "sha512-leCf8Kc/o+R0LNWmLjWXI7l0roMchEHg6X+XibmfTYaOMvOoHXmoxmegHl0it+8vvvZlPIjzyfM6bYBOKTFnRg==", + "version": "11.4.29", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.29.tgz", + "integrity": "sha512-UMCZgyEk0m+KizxspB8Bsm5ZQRdguba2t2+Rf0r8XBmq5YqhXq7ItV2C15A3VLfRlxHnEJBTYg6hkSk/x+5Ofw==", "funding": { "type": "individual", "url": "https://sweetalert2.github.io/#donations" @@ -31532,9 +31531,9 @@ } }, "sweetalert2": { - "version": "11.4.28", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.28.tgz", - "integrity": "sha512-leCf8Kc/o+R0LNWmLjWXI7l0roMchEHg6X+XibmfTYaOMvOoHXmoxmegHl0it+8vvvZlPIjzyfM6bYBOKTFnRg==" + "version": "11.4.29", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.29.tgz", + "integrity": "sha512-UMCZgyEk0m+KizxspB8Bsm5ZQRdguba2t2+Rf0r8XBmq5YqhXq7ItV2C15A3VLfRlxHnEJBTYg6hkSk/x+5Ofw==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index f00874696f0c..ba169c3bba68 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -69,7 +69,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.28", + "sweetalert2": "^11.4.29", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", From 02f999a18d68dabcfb7a150aa40cb92e58c37e6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 18:52:40 +0000 Subject: [PATCH 177/723] Bump sass from 1.54.4 to 1.54.5 in /apps/block_scout_web/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.54.4 to 1.54.5. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.4...1.54.5) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 19 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f51684d0d3ea..99f50e06e864 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -84,7 +84,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.4", + "sass": "^1.54.5", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", @@ -96,11 +96,10 @@ } }, "../../../deps/phoenix": { - "version": "1.5.13", - "license": "MIT" + "version": "0.0.1" }, "../../../deps/phoenix_html": { - "version": "3.0.4" + "version": "0.0.1" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -15821,9 +15820,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.54.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.4.tgz", - "integrity": "sha512-3tmF16yvnBwtlPrNBHw/H907j8MlOX8aTBnlNX1yrKx24RKcJGPyLhFUwkoKBKesR3unP93/2z14Ll8NicwQUA==", + "version": "1.54.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.5.tgz", + "integrity": "sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -30674,9 +30673,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.54.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.4.tgz", - "integrity": "sha512-3tmF16yvnBwtlPrNBHw/H907j8MlOX8aTBnlNX1yrKx24RKcJGPyLhFUwkoKBKesR3unP93/2z14Ll8NicwQUA==", + "version": "1.54.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.5.tgz", + "integrity": "sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index f00874696f0c..1ce66f5ed2fe 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -96,7 +96,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.4", + "sass": "^1.54.5", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", From e0ebf3cd11d8d469e1d0a3ba069aa6563fe5305c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 19:48:20 +0000 Subject: [PATCH 178/723] Bump @babel/core from 7.18.10 to 7.18.13 in /apps/block_scout_web/assets Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.10 to 7.18.13. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.18.13/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 94 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 8d4f84630c24..932b33b6e489 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -66,7 +66,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.18.10", + "@babel/core": "^7.18.13", "@babel/preset-env": "^7.18.10", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", @@ -145,20 +145,20 @@ } }, "node_modules/@babel/core": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", - "integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", + "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", + "@babel/generator": "^7.18.13", "@babel/helper-compilation-targets": "^7.18.9", "@babel/helper-module-transforms": "^7.18.9", "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.10", + "@babel/parser": "^7.18.13", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.10", - "@babel/types": "^7.18.10", + "@babel/traverse": "^7.18.13", + "@babel/types": "^7.18.13", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -174,11 +174,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.12", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz", - "integrity": "sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", + "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", "dependencies": { - "@babel/types": "^7.18.10", + "@babel/types": "^7.18.13", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -518,9 +518,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz", - "integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", + "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1721,18 +1721,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz", - "integrity": "sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", + "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", + "@babel/generator": "^7.18.13", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.18.9", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.11", - "@babel/types": "^7.18.10", + "@babel/parser": "^7.18.13", + "@babel/types": "^7.18.13", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1741,9 +1741,9 @@ } }, "node_modules/@babel/types": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", - "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", + "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", "dependencies": { "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", @@ -18725,20 +18725,20 @@ "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==" }, "@babel/core": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", - "integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", + "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", + "@babel/generator": "^7.18.13", "@babel/helper-compilation-targets": "^7.18.9", "@babel/helper-module-transforms": "^7.18.9", "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.10", + "@babel/parser": "^7.18.13", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.10", - "@babel/types": "^7.18.10", + "@babel/traverse": "^7.18.13", + "@babel/types": "^7.18.13", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -18747,11 +18747,11 @@ } }, "@babel/generator": { - "version": "7.18.12", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz", - "integrity": "sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", + "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", "requires": { - "@babel/types": "^7.18.10", + "@babel/types": "^7.18.13", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" } @@ -18998,9 +18998,9 @@ } }, "@babel/parser": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz", - "integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==" + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", + "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -19809,26 +19809,26 @@ } }, "@babel/traverse": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz", - "integrity": "sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", + "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", + "@babel/generator": "^7.18.13", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.18.9", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.11", - "@babel/types": "^7.18.10", + "@babel/parser": "^7.18.13", + "@babel/types": "^7.18.13", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", - "integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", + "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", "requires": { "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index c5eda3014507..e53e12580c67 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -78,7 +78,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.18.10", + "@babel/core": "^7.18.13", "@babel/preset-env": "^7.18.10", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", From a52bc4644f730ba850b37446815ac6e66d63e1e2 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 22 Aug 2022 23:18:21 +0300 Subject: [PATCH 179/723] Add call type in the response of txlistinternal API method --- CHANGELOG.md | 1 + apps/block_scout_web/lib/block_scout_web/etherscan.ex | 8 +++++++- .../lib/block_scout_web/views/api/rpc/address_view.ex | 1 + .../controllers/api/rpc/address_controller_test.exs | 2 ++ apps/explorer/lib/explorer/etherscan.ex | 1 + apps/explorer/test/explorer/etherscan_test.exs | 1 + 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f638ac7510a..9dca3fe8d8dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#5968](https://github.com/blockscout/blockscout/pull/5968) - Add call type in the response of txlistinternal API method - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes diff --git a/apps/block_scout_web/lib/block_scout_web/etherscan.ex b/apps/block_scout_web/lib/block_scout_web/etherscan.ex index 176627492972..13e3261bfbdf 100644 --- a/apps/block_scout_web/lib/block_scout_web/etherscan.ex +++ b/apps/block_scout_web/lib/block_scout_web/etherscan.ex @@ -106,7 +106,8 @@ defmodule BlockScoutWeb.Etherscan do "transactionHash" => "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb", "index" => "0", "input" => "", - "type" => "create", + "type" => "call", + "callType" => "delegatecall", "gas" => "814937", "gasUsed" => "536262", "isError" => "0", @@ -806,6 +807,11 @@ defmodule BlockScoutWeb.Etherscan do definition: ~s(Possible values: "create", "call", "reward", or "selfdestruct"), example: ~s("create") }, + callType: %{ + type: "type", + definition: ~s(Possible values: "call", "callcode", "delegatecall", or "staticcall"), + example: ~s("delegatecall") + }, gas: @gas_type, gasUsed: @gas_type, isError: %{ diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex index f7d2f7b02995..1d407c45fb84 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex @@ -136,6 +136,7 @@ defmodule BlockScoutWeb.API.RPC.AddressView do "index" => to_string(internal_transaction.index), "input" => "#{internal_transaction.input}", "type" => "#{internal_transaction.type}", + "callType" => "#{internal_transaction.call_type}", "gas" => "#{internal_transaction.gas}", "gasUsed" => "#{internal_transaction.gas_used}", "isError" => if(internal_transaction.error, do: "1", else: "0"), diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs index 38d614bdd469..b35146bc4c8c 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs @@ -1842,6 +1842,7 @@ defmodule BlockScoutWeb.API.RPC.AddressControllerTest do "contractAddress" => "#{contract_address.hash}", "input" => "", "type" => "#{internal_transaction.type}", + "callType" => "#{internal_transaction.call_type}", "gas" => "#{internal_transaction.gas}", "gasUsed" => "#{internal_transaction.gas_used}", "index" => "#{internal_transaction.index}", @@ -2009,6 +2010,7 @@ defmodule BlockScoutWeb.API.RPC.AddressControllerTest do "contractAddress" => "#{contract_address.hash}", "input" => "", "type" => "#{internal_transaction.type}", + "callType" => "#{internal_transaction.call_type}", "gas" => "#{internal_transaction.gas}", "gasUsed" => "#{internal_transaction.gas_used}", "isError" => "0", diff --git a/apps/explorer/lib/explorer/etherscan.ex b/apps/explorer/lib/explorer/etherscan.ex index df07914f33ac..44591617fd97 100644 --- a/apps/explorer/lib/explorer/etherscan.ex +++ b/apps/explorer/lib/explorer/etherscan.ex @@ -80,6 +80,7 @@ defmodule Explorer.Etherscan do created_contract_address_hash input type + call_type gas gas_used error diff --git a/apps/explorer/test/explorer/etherscan_test.exs b/apps/explorer/test/explorer/etherscan_test.exs index 2e6490c78b9e..02cc0ced53cb 100644 --- a/apps/explorer/test/explorer/etherscan_test.exs +++ b/apps/explorer/test/explorer/etherscan_test.exs @@ -803,6 +803,7 @@ defmodule Explorer.EtherscanTest do index: internal_transaction.index, transaction_hash: internal_transaction.transaction_hash, type: internal_transaction.type, + call_type: internal_transaction.call_type, gas: internal_transaction.gas, gas_used: internal_transaction.gas_used, error: internal_transaction.error From 66f6fe3c46a2591cb2e42797763a8524cfd9f644 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:54:11 +0000 Subject: [PATCH 180/723] Bump prometheus from 4.9.0 to 4.9.1 Bumps [prometheus](https://github.com/deadtrickster/prometheus.erl) from 4.9.0 to 4.9.1. - [Release notes](https://github.com/deadtrickster/prometheus.erl/releases) - [Commits](https://github.com/deadtrickster/prometheus.erl/compare/v4.9.0...v4.9.1) --- updated-dependencies: - dependency-name: prometheus dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index e073cc0bdd8e..1b303fccc7aa 100644 --- a/mix.lock +++ b/mix.lock @@ -102,7 +102,7 @@ "poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "postgrex": {:hex, :postgrex, "0.15.13", "7794e697481799aee8982688c261901de493eb64451feee6ea58207d7266d54a", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "3ffb76e1a97cfefe5c6a95632a27ffb67f28871c9741fb585f9d1c3cd2af70f1"}, - "prometheus": {:hex, :prometheus, "4.9.0", "45d8e742061d551c8f4fab92b4647642e2f412f38ab3bdeaa6aacc054d01f438", [:mix, :rebar3], [{:quantile_estimator, "~> 0.2.1", [hex: :quantile_estimator, repo: "hexpm", optional: false]}], "hexpm", "026bd40f952c3ffc45aa6a0673602f800ff219a81c63b1c4683d2b7d8a780c2b"}, + "prometheus": {:hex, :prometheus, "4.9.1", "ecf9ccf0fdd0fefb13b19f5216aff8b4bdc852171f5c79133bd998ce8210cf65", [:mix, :rebar3], [{:quantile_estimator, "~> 0.2.1", [hex: :quantile_estimator, repo: "hexpm", optional: false]}], "hexpm", "d75e80d7b2c1be6bf296e211e806e939ae3d9e0428f45b4caad1817f028213d3"}, "prometheus_ecto": {:hex, :prometheus_ecto, "1.4.3", "3dd4da1812b8e0dbee81ea58bb3b62ed7588f2eae0c9e97e434c46807ff82311", [:mix], [{:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "8d66289f77f913b37eda81fd287340c17e61a447549deb28efc254532b2bed82"}, "prometheus_ex": {:hex, :prometheus_ex, "3.0.5", "fa58cfd983487fc5ead331e9a3e0aa622c67232b3ec71710ced122c4c453a02f", [:mix], [{:prometheus, "~> 4.0", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm", "9fd13404a48437e044b288b41f76e64acd9735fb8b0e3809f494811dfa66d0fb"}, "prometheus_phoenix": {:hex, :prometheus_phoenix, "1.3.0", "c4b527e0b3a9ef1af26bdcfbfad3998f37795b9185d475ca610fe4388fdd3bb5", [:mix], [{:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.3 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "c4d1404ac4e9d3d963da601db2a7d8ea31194f0017057fabf0cfb9bf5a6c8c75"}, From 2d5b781cad3df310b29d0eb721756118c1eb8d81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 19:54:37 +0000 Subject: [PATCH 181/723] Bump cldr_utils from 2.19.0 to 2.19.1 Bumps [cldr_utils](https://github.com/elixir-cldr/cldr_utils) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/elixir-cldr/cldr_utils/releases) - [Changelog](https://github.com/elixir-cldr/cldr_utils/blob/master/CHANGELOG.md) - [Commits](https://github.com/elixir-cldr/cldr_utils/compare/v2.19.0...v2.19.1) --- updated-dependencies: - dependency-name: cldr_utils dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index e073cc0bdd8e..7b2640730aa3 100644 --- a/mix.lock +++ b/mix.lock @@ -13,7 +13,7 @@ "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, - "cldr_utils": {:hex, :cldr_utils, "2.19.0", "63a8bca7fe5e9b1a5bcd7814410c01c76afe9797a02b434a0e7de19c2e67af1c", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "d316fbe1cb1ab7bff85424020bca596036cf9437e45081f2a9ecfb3b5a1c08e9"}, + "cldr_utils": {:hex, :cldr_utils, "2.19.1", "5a7bcd2f2fd432c548e494e850bba8a9e838f1b10202f682ea1d9809d74eff31", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "fbd10f79363e70f3d893ab21e195f444ca87c2c80120b5911761491da4489620"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, From 81c97adf5eff273cc937ec83a3b0717dce242438 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 24 Aug 2022 00:23:54 +0300 Subject: [PATCH 182/723] Fix CSV export of internal transactions --- CHANGELOG.md | 1 + .../address_transaction_controller.ex | 12 ++++- apps/explorer/lib/explorer/chain.ex | 27 +---------- ...dress_internal_transaction_csv_exporter.ex | 1 + ...internal_transaction_csv_exporter_test.exs | 40 ++++++++++++++++- ...dress_token_transfer_csv_exporter_test.exs | 45 +++++++++++++++++++ .../address_transaction_csv_exporter_test.exs | 18 +++++++- 7 files changed, 116 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dca3fe8d8dc..3bbc3e15c367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5975](https://github.com/blockscout/blockscout/pull/5975) - Fix CSV export of internal transactions - [#5957](https://github.com/blockscout/blockscout/pull/5957) - Server-side reCAPTCHA check for CSV export - [#5954](https://github.com/blockscout/blockscout/pull/5954) - Fix ace editor appearance - [#5942](https://github.com/blockscout/blockscout/pull/5942), [#5945](https://github.com/blockscout/blockscout/pull/5945) - Fix nightly solidity versions filtering UX diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index 3d0518456617..649bd8f4b468 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -22,6 +22,8 @@ defmodule BlockScoutWeb.AddressTransactionController do alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View + alias Plug.Conn + @transaction_necessity_by_association [ necessity_by_association: %{ [created_contract_address: :names] => :optional, @@ -188,7 +190,15 @@ defmodule BlockScoutWeb.AddressTransactionController do {:recaptcha, true} <- {:recaptcha, captcha_helper().recaptcha_passed?(recaptcha_response)} do address |> csv_export_module.export(from_period, to_period) - |> Enum.into(put_resp_params(conn, file_name)) + |> Enum.reduce_while(put_resp_params(conn, file_name), fn chunk, conn -> + case Conn.chunk(conn, chunk) do + {:ok, conn} -> + {:cont, conn} + + {:error, :closed} -> + {:halt, conn} + end + end) else :error -> unprocessable_entity(conn) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 3339fa4e2e3b..9e34e7a28fac 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -227,37 +227,14 @@ defmodule Explorer.Chain do paging_options = Keyword.get(options, :paging_options, @default_paging_options) if direction == nil do - query_to_address_hash_wrapped = - InternalTransaction - |> InternalTransaction.where_nonpending_block() - |> InternalTransaction.where_address_fields_match(hash, :to_address_hash) - |> InternalTransaction.where_block_number_in_period(from_block, to_block) - |> common_where_limit_order(paging_options) - |> wrapped_union_subquery() - - query_from_address_hash_wrapped = - InternalTransaction - |> InternalTransaction.where_nonpending_block() - |> InternalTransaction.where_address_fields_match(hash, :from_address_hash) - |> InternalTransaction.where_block_number_in_period(from_block, to_block) - |> common_where_limit_order(paging_options) - |> wrapped_union_subquery() - - query_created_contract_address_hash_wrapped = + full_query = InternalTransaction |> InternalTransaction.where_nonpending_block() - |> InternalTransaction.where_address_fields_match(hash, :created_contract_address_hash) + |> InternalTransaction.where_address_fields_match(hash, nil) |> InternalTransaction.where_block_number_in_period(from_block, to_block) |> common_where_limit_order(paging_options) - |> wrapped_union_subquery() - - full_query = - query_to_address_hash_wrapped - |> union(^query_from_address_hash_wrapped) - |> union(^query_created_contract_address_hash_wrapped) full_query - |> wrapped_union_subquery() |> order_by( [q], desc: q.block_number, diff --git a/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex b/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex index a2aca6a635a1..da207e551ba0 100644 --- a/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex +++ b/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex @@ -18,6 +18,7 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporter do address.hash |> fetch_all_internal_transactions(from_block, to_block, @paging_options) + |> Enum.sort_by(&{&1.block_number, &1.index, &1.transaction_index}, :desc) |> to_csv_format() |> dump_to_stream() end diff --git a/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs index 6ae71ddeabe0..144586f825b7 100644 --- a/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs @@ -133,6 +133,44 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporterTest do end) |> Enum.count() + 1..200 + |> Enum.map(fn index -> + transaction = + :transaction + |> insert() + |> with_block() + + insert(:internal_transaction, + index: index, + transaction: transaction, + to_address: address, + block_number: transaction.block_number, + block_hash: transaction.block_hash, + block_index: index, + transaction_index: transaction.index + ) + end) + |> Enum.count() + + 1..200 + |> Enum.map(fn index -> + transaction = + :transaction + |> insert() + |> with_block() + + insert(:internal_transaction, + index: index, + transaction: transaction, + created_contract_address: address, + block_number: transaction.block_number, + block_hash: transaction.block_hash, + block_index: index, + transaction_index: transaction.index + ) + end) + |> Enum.count() + from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) @@ -142,7 +180,7 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporterTest do |> Enum.to_list() |> Enum.drop(1) - assert Enum.count(result) == 200 + assert Enum.count(result) == 600 end end end diff --git a/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs index 99655c832ff8..2934e86d4004 100644 --- a/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs @@ -72,5 +72,50 @@ defmodule Explorer.Chain.AddressTokenTransferCsvExporterTest do assert result.timestamp == to_string(transaction.block.timestamp) assert result.type == "OUT" end + + test "fetches all token transfers" do + address = insert(:address) + + 1..200 + |> Enum.map(fn _ -> + transaction = + :transaction + |> insert(from_address: address) + |> with_block() + + insert(:token_transfer, + transaction: transaction, + from_address: address, + block_number: transaction.block_number + ) + end) + |> Enum.count() + + 1..200 + |> Enum.map(fn _ -> + transaction = + :transaction + |> insert(to_address: address) + |> with_block() + + insert(:token_transfer, + transaction: transaction, + to_address: address, + block_number: transaction.block_number + ) + end) + |> Enum.count() + + from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) + to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) + + result = + address + |> AddressTokenTransferCsvExporter.export(from_period, to_period) + |> Enum.to_list() + |> Enum.drop(1) + + assert Enum.count(result) == 400 + end end end diff --git a/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs index 684be20f9cfc..20883786ce23 100644 --- a/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs @@ -96,6 +96,22 @@ defmodule Explorer.Chain.AddressTransactionCsvExporterTest do end) |> Enum.count() + 1..200 + |> Enum.map(fn _ -> + :transaction + |> insert(to_address: address) + |> with_block() + end) + |> Enum.count() + + 1..200 + |> Enum.map(fn _ -> + :transaction + |> insert(created_contract_address: address) + |> with_block() + end) + |> Enum.count() + from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) @@ -105,7 +121,7 @@ defmodule Explorer.Chain.AddressTransactionCsvExporterTest do |> Enum.to_list() |> Enum.drop(1) - assert Enum.count(result) == 200 + assert Enum.count(result) == 600 end end end From f44e4e2cc44bc99d4d129b72267d6fbee58c53af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 07:14:24 +0000 Subject: [PATCH 183/723] Bump nimble_csv from 1.1.0 to 1.2.0 Bumps [nimble_csv](https://github.com/dashbitco/nimble_csv) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/dashbitco/nimble_csv/releases) - [Changelog](https://github.com/dashbitco/nimble_csv/blob/master/CHANGELOG.md) - [Commits](https://github.com/dashbitco/nimble_csv/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: nimble_csv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Update --- ...dress_internal_transaction_csv_exporter.ex | 20 +++++---- ...xplorer.ex => address_log_csv_exporter.ex} | 0 ...internal_transaction_csv_exporter_test.exs | 41 ++++++++++--------- ....exs => address_log_csv_exporter_test.exs} | 20 ++++----- ...dress_token_transfer_csv_exporter_test.exs | 24 +++++------ .../address_transaction_csv_exporter_test.exs | 28 ++++++------- mix.lock | 2 +- 7 files changed, 72 insertions(+), 63 deletions(-) rename apps/explorer/lib/explorer/chain/{address_log_csv_explorer.ex => address_log_csv_exporter.ex} (100%) rename apps/explorer/test/explorer/chain/{address_log_csv_explorer_test.exs => address_log_csv_exporter_test.exs} (87%) diff --git a/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex b/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex index da207e551ba0..96350b398b4d 100644 --- a/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex +++ b/apps/explorer/lib/explorer/chain/address_internal_transaction_csv_exporter.ex @@ -16,11 +16,14 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporter do from_block = Chain.convert_date_to_min_block(from_period) to_block = Chain.convert_date_to_max_block(to_period) - address.hash - |> fetch_all_internal_transactions(from_block, to_block, @paging_options) - |> Enum.sort_by(&{&1.block_number, &1.index, &1.transaction_index}, :desc) - |> to_csv_format() - |> dump_to_stream() + res = + address.hash + |> fetch_all_internal_transactions(from_block, to_block, @paging_options) + |> Enum.sort_by(&{&1.block_number, &1.index, &1.transaction_index}, :desc) + |> to_csv_format() + |> dump_to_stream() + + res end defp fetch_all_internal_transactions(address_hash, from_block, to_block, paging_options, acc \\ []) do @@ -46,8 +49,11 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporter do end defp dump_to_stream(internal_transactions) do - internal_transactions - |> RFC4180.dump_to_stream() + res = + internal_transactions + |> RFC4180.dump_to_stream() + + res end defp to_csv_format(internal_transactions) do diff --git a/apps/explorer/lib/explorer/chain/address_log_csv_explorer.ex b/apps/explorer/lib/explorer/chain/address_log_csv_exporter.ex similarity index 100% rename from apps/explorer/lib/explorer/chain/address_log_csv_explorer.ex rename to apps/explorer/lib/explorer/chain/address_log_csv_exporter.ex diff --git a/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs index 144586f825b7..34494dc932fb 100644 --- a/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_internal_transaction_csv_exporter_test.exs @@ -26,47 +26,50 @@ defmodule Explorer.Chain.AddressInternalTransactionCsvExporterTest do from_period = Timex.format!(Timex.shift(Timex.now(), minutes: -1), "%Y-%m-%d", :strftime) to_period = Timex.format!(Timex.now(), "%Y-%m-%d", :strftime) - [result] = + res = address |> AddressInternalTransactionCsvExporter.export(from_period, to_period) |> Enum.to_list() |> Enum.drop(1) + + [result] = + res |> Enum.map(fn [ - transaction_hash, + [[], transaction_hash], _, - index, + [[], index], _, - block_number, + [[], block_number], _, - block_hash, + [[], block_hash], _, - block_index, + [[], block_index], _, - transaction_index, + [[], transaction_index], _, - timestamp, + [[], timestamp], _, - from_address_hash, + [[], from_address_hash], _, - to_address_hash, + [[], to_address_hash], _, - created_contract_address_hash, + [[], created_contract_address_hash], _, - type, + [[], type], _, - call_type, + [[], call_type], _, - gas, + [[], gas], _, - gas_used, + [[], gas_used], _, - value, + [[], value], _, - input, + [[], input], _, - output, + [[], output], _, - error, + [[], error], _ ] -> %{ diff --git a/apps/explorer/test/explorer/chain/address_log_csv_explorer_test.exs b/apps/explorer/test/explorer/chain/address_log_csv_exporter_test.exs similarity index 87% rename from apps/explorer/test/explorer/chain/address_log_csv_explorer_test.exs rename to apps/explorer/test/explorer/chain/address_log_csv_exporter_test.exs index 32bc5b4bd796..fe1d0601a88e 100644 --- a/apps/explorer/test/explorer/chain/address_log_csv_explorer_test.exs +++ b/apps/explorer/test/explorer/chain/address_log_csv_exporter_test.exs @@ -35,25 +35,25 @@ defmodule Explorer.Chain.AddressLogCsvExporterTest do |> Enum.to_list() |> Enum.drop(1) |> Enum.map(fn [ - transaction_hash, + [[], transaction_hash], _, - index, + [[], index], _, - block_number, + [[], block_number], _, - block_hash, + [[], block_hash], _, - address, + [[], address], _, - data, + [[], data], _, - first_topic, + [[], first_topic], _, - second_topic, + [[], second_topic], _, - third_topic, + [[], third_topic], _, - fourth_topic, + [[], fourth_topic], _ ] -> %{ diff --git a/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs index 2934e86d4004..c64ecafa99b8 100644 --- a/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_token_transfer_csv_exporter_test.exs @@ -24,29 +24,29 @@ defmodule Explorer.Chain.AddressTokenTransferCsvExporterTest do |> Enum.to_list() |> Enum.drop(1) |> Enum.map(fn [ - tx_hash, + [[], tx_hash], _, - block_number, + [[], block_number], _, - timestamp, + [[], timestamp], _, - from_address, + [[], from_address], _, - to_address, + [[], to_address], _, - token_contract_address, + [[], token_contract_address], _, - type, + [[], type], _, - token_symbol, + [[], token_symbol], _, - tokens_transferred, + [[], tokens_transferred], _, - transaction_fee, + [[], transaction_fee], _, - status, + [[], status], _, - err_code, + [[], err_code], _ ] -> %{ diff --git a/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs b/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs index 20883786ce23..7145e9c507f4 100644 --- a/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs +++ b/apps/explorer/test/explorer/chain/address_transaction_csv_exporter_test.exs @@ -22,33 +22,33 @@ defmodule Explorer.Chain.AddressTransactionCsvExporterTest do |> Enum.to_list() |> Enum.drop(1) |> Enum.map(fn [ - hash, + [[], hash], _, - block_number, + [[], block_number], _, - timestamp, + [[], timestamp], _, - from_address, + [[], from_address], _, - to_address, + [[], to_address], _, - created_address, + [[], created_address], _, - type, + [[], type], _, - value, + [[], value], _, - fee, + [[], fee], _, - status, + [[], status], _, - error, + [[], error], _, - cur_price, + [[], cur_price], _, - op_price, + [[], op_price], _, - cl_price, + [[], cl_price], _ ] -> %{ diff --git a/mix.lock b/mix.lock index 3b420ad8bc5b..c49c0f36899a 100644 --- a/mix.lock +++ b/mix.lock @@ -84,7 +84,7 @@ "mock": {:hex, :mock, "0.3.7", "75b3bbf1466d7e486ea2052a73c6e062c6256fb429d6797999ab02fa32f29e03", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "4da49a4609e41fd99b7836945c26f373623ea968cfb6282742bcb94440cf7e5c"}, "mox": {:hex, :mox, "1.0.2", "dc2057289ac478b35760ba74165b4b3f402f68803dd5aecd3bfd19c183815d64", [:mix], [], "hexpm", "f9864921b3aaf763c8741b5b8e6f908f44566f1e427b2630e89e9a73b981fef2"}, "msgpax": {:hex, :msgpax, "2.3.0", "14f52ad249a3f77b5e2d59f6143e6c18a6e74f34666989e22bac0a465f9835cc", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "65c36846a62ed5615baf7d7d47babb6541313a6c0b6d2ff19354bd518f52df7e"}, - "nimble_csv": {:hex, :nimble_csv, "1.1.0", "b1dba4a86be9e03065c9de829050468e591f569100332db949e7ce71be0afc25", [:mix], [], "hexpm", "e986755bc302832cac429be6deda0fc9d82d3c82b47abefb68b3c17c9d949a3f"}, + "nimble_csv": {:hex, :nimble_csv, "1.2.0", "4e26385d260c61eba9d4412c71cea34421f296d5353f914afe3f2e71cce97722", [:mix], [], "hexpm", "d0628117fcc2148178b034044c55359b26966c6eaa8e2ce15777be3bbc91b12a"}, "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "number": {:hex, :number, "1.0.3", "932c8a2d478a181c624138958ca88a78070332191b8061717270d939778c9857", [:mix], [{:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "dd397bbc096b2ca965a6a430126cc9cf7b9ef7421130def69bcf572232ca0f18"}, "numbers": {:hex, :numbers, "5.2.4", "f123d5bb7f6acc366f8f445e10a32bd403c8469bdbce8ce049e1f0972b607080", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "eeccf5c61d5f4922198395bf87a465b6f980b8b862dd22d28198c5e6fab38582"}, From 28eb53b5d5648f89413a52b4c448a12b17e165ae Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 24 Aug 2022 17:30:03 +0300 Subject: [PATCH 184/723] Fix address overview.html.eex in case of nil implementation address hash --- CHANGELOG.md | 1 + .../templates/address/overview.html.eex | 32 +++++------ apps/block_scout_web/priv/gettext/default.pot | 54 +++++++++---------- .../priv/gettext/en/LC_MESSAGES/default.po | 54 +++++++++---------- 4 files changed, 72 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bbc3e15c367..8c513c663de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5977](https://github.com/blockscout/blockscout/pull/5977) - Fix address overview.html.eex in case of nil implementation address hash - [#5975](https://github.com/blockscout/blockscout/pull/5975) - Fix CSV export of internal transactions - [#5957](https://github.com/blockscout/blockscout/pull/5957) - Server-side reCAPTCHA check for CSV export - [#5954](https://github.com/blockscout/blockscout/pull/5954) - Fix ace editor appearance diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex index ffbd85ad9807..7fee0bfbb37e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex @@ -142,21 +142,23 @@ <%= if @is_proxy do %> <% {implementation_address, name} = Chain.get_implementation_address_hash(@address.hash, @address.smart_contract.abi) || "0x0000000000000000000000000000000000000000" %> -
-
- <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", - text: gettext("Implementation address of the proxy contract.") %> - <%= gettext("Implementation") %> -
-
- <%= link( - (if name, do: name <> " | " <> implementation_address, else: implementation_address), - to: address_path(@conn, :show, implementation_address), - class: "contract-address" - ) - %> -
-
+ <%= if implementation_address do %> +
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", + text: gettext("Implementation address of the proxy contract.") %> + <%= gettext("Implementation") %> +
+
+ <%= link( + (if name, do: name <> " | " <> implementation_address, else: implementation_address), + to: address_path(@conn, :show, implementation_address), + class: "contract-address" + ) + %> +
+
+ <% end %> <% end %>
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 11decd35fefb..594225139c7e 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -158,7 +158,7 @@ msgstr "" msgid "Address (external or contract) sending the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:165 +#: lib/block_scout_web/templates/address/overview.html.eex:167 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" @@ -194,7 +194,7 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:190 +#: lib/block_scout_web/templates/address/overview.html.eex:192 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" @@ -234,7 +234,7 @@ msgstr "" msgid "Back Home" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:166 +#: lib/block_scout_web/templates/address/overview.html.eex:168 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #, elixir-autogen, elixir-format msgid "Balance" @@ -315,7 +315,7 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:273 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -338,7 +338,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:291 +#: lib/block_scout_web/templates/address/overview.html.eex:293 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:371 #, elixir-autogen, elixir-format @@ -944,7 +944,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 -#: lib/block_scout_web/templates/address/overview.html.eex:179 +#: lib/block_scout_web/templates/address/overview.html.eex:181 #: lib/block_scout_web/templates/block/overview.html.eex:215 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:79 @@ -1000,7 +1000,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:263 +#: lib/block_scout_web/templates/address/overview.html.eex:265 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1015,14 +1015,14 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:210 -#: lib/block_scout_web/templates/address/overview.html.eex:218 +#: lib/block_scout_web/templates/address/overview.html.eex:212 +#: lib/block_scout_web/templates/address/overview.html.eex:220 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:237 -#: lib/block_scout_web/templates/address/overview.html.eex:245 +#: lib/block_scout_web/templates/address/overview.html.eex:239 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:122 #, elixir-autogen, elixir-format msgid "Fetching transfers..." @@ -1071,7 +1071,7 @@ msgstr "" msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:256 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format @@ -1089,7 +1089,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:255 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1167,12 +1167,12 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:149 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #, elixir-autogen, elixir-format msgid "Implementation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:148 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Implementation address of the proxy contract." msgstr "" @@ -1239,7 +1239,7 @@ msgstr "" msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:274 +#: lib/block_scout_web/templates/address/overview.html.eex:276 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1500,7 +1500,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:290 +#: lib/block_scout_web/templates/address/overview.html.eex:292 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1510,7 +1510,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:201 +#: lib/block_scout_web/templates/address/overview.html.eex:203 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1520,7 +1520,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:228 +#: lib/block_scout_web/templates/address/overview.html.eex:230 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -2222,7 +2222,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:191 +#: lib/block_scout_web/templates/address/overview.html.eex:193 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:70 @@ -2366,9 +2366,9 @@ msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:202 -#: lib/block_scout_web/templates/address/overview.html.eex:208 -#: lib/block_scout_web/templates/address/overview.html.eex:216 +#: lib/block_scout_web/templates/address/overview.html.eex:204 +#: lib/block_scout_web/templates/address/overview.html.eex:210 +#: lib/block_scout_web/templates/address/overview.html.eex:218 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 @@ -2389,9 +2389,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:229 -#: lib/block_scout_web/templates/address/overview.html.eex:235 -#: lib/block_scout_web/templates/address/overview.html.eex:243 +#: lib/block_scout_web/templates/address/overview.html.eex:231 +#: lib/block_scout_web/templates/address/overview.html.eex:237 +#: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #, elixir-autogen, elixir-format @@ -2711,7 +2711,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:165 +#: lib/block_scout_web/templates/address/overview.html.eex:167 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 0c7d9aa8003b..0c48ba8eff4b 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -158,7 +158,7 @@ msgstr "" msgid "Address (external or contract) sending the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:165 +#: lib/block_scout_web/templates/address/overview.html.eex:167 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" @@ -194,7 +194,7 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:190 +#: lib/block_scout_web/templates/address/overview.html.eex:192 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" @@ -234,7 +234,7 @@ msgstr "" msgid "Back Home" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:166 +#: lib/block_scout_web/templates/address/overview.html.eex:168 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #, elixir-autogen, elixir-format msgid "Balance" @@ -315,7 +315,7 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:273 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -338,7 +338,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:291 +#: lib/block_scout_web/templates/address/overview.html.eex:293 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:371 #, elixir-autogen, elixir-format @@ -944,7 +944,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 -#: lib/block_scout_web/templates/address/overview.html.eex:179 +#: lib/block_scout_web/templates/address/overview.html.eex:181 #: lib/block_scout_web/templates/block/overview.html.eex:215 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:79 @@ -1000,7 +1000,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:263 +#: lib/block_scout_web/templates/address/overview.html.eex:265 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1015,14 +1015,14 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:210 -#: lib/block_scout_web/templates/address/overview.html.eex:218 +#: lib/block_scout_web/templates/address/overview.html.eex:212 +#: lib/block_scout_web/templates/address/overview.html.eex:220 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:237 -#: lib/block_scout_web/templates/address/overview.html.eex:245 +#: lib/block_scout_web/templates/address/overview.html.eex:239 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:122 #, elixir-autogen, elixir-format msgid "Fetching transfers..." @@ -1071,7 +1071,7 @@ msgstr "" msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:256 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format @@ -1089,7 +1089,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:255 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1167,12 +1167,12 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:149 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #, elixir-autogen, elixir-format msgid "Implementation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:148 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Implementation address of the proxy contract." msgstr "" @@ -1239,7 +1239,7 @@ msgstr "" msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:274 +#: lib/block_scout_web/templates/address/overview.html.eex:276 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1500,7 +1500,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:290 +#: lib/block_scout_web/templates/address/overview.html.eex:292 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1510,7 +1510,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:201 +#: lib/block_scout_web/templates/address/overview.html.eex:203 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1520,7 +1520,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:228 +#: lib/block_scout_web/templates/address/overview.html.eex:230 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -2222,7 +2222,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:191 +#: lib/block_scout_web/templates/address/overview.html.eex:193 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:70 @@ -2366,9 +2366,9 @@ msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:202 -#: lib/block_scout_web/templates/address/overview.html.eex:208 -#: lib/block_scout_web/templates/address/overview.html.eex:216 +#: lib/block_scout_web/templates/address/overview.html.eex:204 +#: lib/block_scout_web/templates/address/overview.html.eex:210 +#: lib/block_scout_web/templates/address/overview.html.eex:218 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 @@ -2389,9 +2389,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:229 -#: lib/block_scout_web/templates/address/overview.html.eex:235 -#: lib/block_scout_web/templates/address/overview.html.eex:243 +#: lib/block_scout_web/templates/address/overview.html.eex:231 +#: lib/block_scout_web/templates/address/overview.html.eex:237 +#: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #, elixir-autogen, elixir-format @@ -2711,7 +2711,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:165 +#: lib/block_scout_web/templates/address/overview.html.eex:167 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" From eae7b1e3e8b7d841248d47c48ff534944e7b250f Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 24 Aug 2022 18:39:46 +0300 Subject: [PATCH 185/723] Allow timestamp param in the log of eth_getTransactionReceipt method --- CHANGELOG.md | 1 + apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/log.ex | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c513c663de7..47fa6833a210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method - [#5977](https://github.com/blockscout/blockscout/pull/5977) - Fix address overview.html.eex in case of nil implementation address hash - [#5975](https://github.com/blockscout/blockscout/pull/5975) - Fix CSV export of internal transactions - [#5957](https://github.com/blockscout/blockscout/pull/5957) - Server-side reCAPTCHA check for CSV export diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/log.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/log.ex index 52cdae96bd90..e89ce75b9797 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/log.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/log.ex @@ -171,8 +171,9 @@ defmodule EthereumJSONRPC.Log do Enum.into(log, %{}, &entry_to_elixir/1) end - defp entry_to_elixir({key, _} = entry) when key in ~w(address blockHash data removed topics transactionHash type), - do: entry + defp entry_to_elixir({key, _} = entry) + when key in ~w(address blockHash data removed topics transactionHash type timestamp), + do: entry defp entry_to_elixir({key, quantity}) when key in ~w(blockNumber logIndex transactionIndex transactionLogIndex) do if is_nil(quantity) do From 78a5e068e433977e9de883e7a526db68eebb1ca8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:43:46 +0000 Subject: [PATCH 186/723] Bump core-js from 3.24.1 to 3.25.0 in /apps/block_scout_web/assets Bumps [core-js](https://github.com/zloirock/core-js) from 3.24.1 to 3.25.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/compare/v3.24.1...v3.25.0) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 932b33b6e489..bdbb118f5b8a 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -16,7 +16,7 @@ "chart.js": "^3.9.1", "chartjs-adapter-luxon": "^1.2.0", "clipboard": "^2.0.11", - "core-js": "^3.24.1", + "core-js": "^3.25.0", "crypto-browserify": "^3.12.0", "dropzone": "^5.9.3", "eth-net-props": "^1.0.41", @@ -5842,9 +5842,9 @@ } }, "node_modules/core-js": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.24.1.tgz", - "integrity": "sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg==", + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.0.tgz", + "integrity": "sha512-CVU1xvJEfJGhyCpBrzzzU1kjCfgsGUxhEvwUV2e/cOedYWHdmluamx+knDnmhqALddMG16fZvIqvs9aijsHHaA==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -23017,9 +23017,9 @@ } }, "core-js": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.24.1.tgz", - "integrity": "sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg==" + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.0.tgz", + "integrity": "sha512-CVU1xvJEfJGhyCpBrzzzU1kjCfgsGUxhEvwUV2e/cOedYWHdmluamx+knDnmhqALddMG16fZvIqvs9aijsHHaA==" }, "core-js-compat": { "version": "3.24.1", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index e53e12580c67..4a5e9992f56c 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -28,7 +28,7 @@ "chart.js": "^3.9.1", "chartjs-adapter-luxon": "^1.2.0", "clipboard": "^2.0.11", - "core-js": "^3.24.1", + "core-js": "^3.25.0", "crypto-browserify": "^3.12.0", "dropzone": "^5.9.3", "eth-net-props": "^1.0.41", From be92a9ef054497e4367f832865183aca108b29a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:44:21 +0000 Subject: [PATCH 187/723] Bump jest from 28.1.3 to 29.0.0 in /apps/block_scout_web/assets Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.3 to 29.0.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.0/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 5806 ++++++++++++++--- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 4931 insertions(+), 877 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 932b33b6e489..708930d1c069 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -79,7 +79,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "file-loader": "^6.2.0", - "jest": "^28.1.3", + "jest": "^29.0.0", "jest-environment-jsdom": "^28.1.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", @@ -923,6 +923,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -2402,20 +2417,49 @@ } }, "node_modules/@jest/console": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", - "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.0.tgz", + "integrity": "sha512-rHsKEqT2Kx73PqO9qIOdwg0Grd6Y3COyqNpi5SKRI0qXgmlqXkOczQMfIb8I0Gdnc9/kaMj6cTnBGLyBA03Xrg==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", "slash": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/console/node_modules/ansi-styles": { @@ -2476,6 +2520,75 @@ "node": ">=8" } }, + "node_modules/@jest/console/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/console/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/@jest/console/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2489,43 +2602,42 @@ } }, "node_modules/@jest/core": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", - "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.0.tgz", + "integrity": "sha512-9qljprspjQwbmnq3Wv9d/M6/ejMdWs1uAAljQAX9QsjJ1SlSByXw1mRA9UpR2BP9TxLLwEembbm0ykrT//2STg==", "dev": true, "dependencies": { - "@jest/console": "^28.1.3", - "@jest/reporters": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/console": "^29.0.0", + "@jest/reporters": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.1.3", - "jest-config": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-resolve-dependencies": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "jest-watcher": "^28.1.3", + "jest-changed-files": "^29.0.0", + "jest-config": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-resolve-dependencies": "^29.0.0", + "jest-runner": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", + "jest-watcher": "^29.0.0", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "rimraf": "^3.0.0", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -2536,6 +2648,35 @@ } } }, + "node_modules/@jest/core/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2594,6 +2735,75 @@ "node": ">=8" } }, + "node_modules/@jest/core/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2622,28 +2832,28 @@ } }, "node_modules/@jest/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", + "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", "dev": true, "dependencies": { - "expect": "^28.1.3", - "jest-snapshot": "^28.1.3" + "expect": "^29.0.0", + "jest-snapshot": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", - "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", + "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", "dev": true, "dependencies": { - "jest-get-type": "^28.0.2" + "jest-get-type": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { @@ -2664,31 +2874,245 @@ } }, "node_modules/@jest/globals": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", - "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", + "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/types": "^28.1.3" + "@jest/environment": "^29.0.0", + "@jest/expect": "^29.0.0", + "@jest/types": "^29.0.0", + "jest-mock": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/globals/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/globals/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/globals/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@jest/globals/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/globals/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/globals/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/@jest/globals/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/@jest/reporters": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", - "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", + "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", + "@jest/console": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -2700,9 +3124,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", + "jest-worker": "^29.0.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -2710,7 +3134,7 @@ "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -2721,6 +3145,35 @@ } } }, + "node_modules/@jest/reporters/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/reporters/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2779,10 +3232,47 @@ "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -2790,7 +3280,7 @@ "supports-color": "^8.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { @@ -2808,6 +3298,38 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/@jest/reporters/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/reporters/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2833,73 +3355,201 @@ } }, "node_modules/@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", + "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.13", + "@jridgewell/trace-mapping": "^0.3.15", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-result": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", - "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", + "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", "dev": true, "dependencies": { - "@jest/console": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/console": "^29.0.0", + "@jest/types": "^29.0.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/test-result/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/test-result/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/test-result/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@jest/test-result/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/test-result/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/@jest/test-sequencer": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", - "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", + "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.3", + "@jest/test-result": "^29.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", + "jest-haste-map": "^29.0.0", "slash": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", - "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", + "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", + "@jest/types": "^29.0.0", + "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", + "jest-haste-map": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-util": "^29.0.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform/node_modules/ansi-styles": { @@ -2960,6 +3610,23 @@ "node": ">=8" } }, + "node_modules/@jest/transform/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/transform/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3104,9 +3771,9 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -4472,21 +5139,21 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/babel-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", - "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.0.tgz", + "integrity": "sha512-EJM2dqxz9+uWJLLucZLPYAmRsHHt1IMkitAHGqjDlIP2IQXzkIMO3ATbBWk0lU6VwX4rNeVN04t/DDB8U5C2rg==", "dev": true, "dependencies": { - "@jest/transform": "^28.1.3", + "@jest/transform": "^29.0.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.3", + "babel-preset-jest": "^29.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" @@ -4607,9 +5274,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", - "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.0.tgz", + "integrity": "sha512-B9oaXrlxXHFWeWqhDPg03iqQd2UN/mg/VdZOsLaqAVBkztru3ctTryAI4zisxLEEgmcUnLTKewqx0gGifoXD3A==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -4618,7 +5285,7 @@ "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -4701,16 +5368,16 @@ } }, "node_modules/babel-preset-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", - "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.0.tgz", + "integrity": "sha512-B5Ke47Xcs8rDF3p1korT3LoilpADCwbG93ALqtvqu6Xpf4d8alKkrCBTExbNzdHJcIuEPpfYvEaFFRGee2kUgQ==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^28.1.3", + "babel-plugin-jest-hoist": "^29.0.0", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -6611,12 +7278,12 @@ } }, "node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", + "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/diffie-hellman": { @@ -8421,19 +9088,187 @@ } }, "node_modules/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.0.tgz", + "integrity": "sha512-OKAHGwaBqZ6I7bas0cnrrvomEL2d0yp2XXYQhhnVHfaqDaKStUBxjWtlGu/uI2tBqwb9sBMvaS41DSJFsRRJHQ==", "dev": true, "dependencies": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" + "@jest/expect-utils": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/expect/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/expect/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/expect/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/expect/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/expect/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/expect/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/expect/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/expect/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/express": { @@ -10352,21 +11187,21 @@ } }, "node_modules/jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.0.tgz", + "integrity": "sha512-9uz4Tclskb8WrfRXqu66FsFCFoyYctwWXpruKwnD95FZqkyoEAA1oGH53HUn7nQx7uEgZTKdNl/Yo6DqqU+XMg==", "dev": true, "dependencies": { - "@jest/core": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/core": "^29.0.0", + "@jest/types": "^29.0.0", "import-local": "^3.0.2", - "jest-cli": "^28.1.3" + "jest-cli": "^29.0.0" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -10378,46 +11213,107 @@ } }, "node_modules/jest-changed-files": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", - "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", + "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", "dev": true, "dependencies": { "execa": "^5.0.0", "p-limit": "^3.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-circus": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", - "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.0.tgz", + "integrity": "sha512-6EX70/+ZdzPLShBeokMVIpUaq5cQpOsO4OCDiV1drKUHht0hmUOWvY6LE4pBSFdepB0Sukw4Y0ajRqtvLBO9/A==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/environment": "^29.0.0", + "@jest/expect": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", + "jest-each": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", "p-limit": "^3.1.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-circus/node_modules/ansi-styles": { @@ -10478,6 +11374,88 @@ "node": ">=8" } }, + "node_modules/jest-circus/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-circus/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-circus/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10491,21 +11469,21 @@ } }, "node_modules/jest-cli": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", - "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.0.tgz", + "integrity": "sha512-VZUPQjWJKL8QABFiBk1tHeJ3czBodjU9r22ceQmeL7X8/M73FYxTte0RkYPHI2SiLPWy99GZNWA+oOu9x0xKOA==", "dev": true, "dependencies": { - "@jest/core": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/core": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", + "jest-config": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -10513,7 +11491,7 @@ "jest": "bin/jest.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -10524,6 +11502,35 @@ } } }, + "node_modules/jest-cli/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10582,6 +11589,23 @@ "node": ">=8" } }, + "node_modules/jest-cli/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-cli/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10595,36 +11619,36 @@ } }, "node_modules/jest-config": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", - "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.0.tgz", + "integrity": "sha512-RbcUgQBJDS0O8OThWUwm5UCfzo0zOymUX/cJzUNlYB1ZWqe3M8MFEcgwqgZSifYuYTi46xWu5cmkMiyRQAdnMw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.3", - "@jest/types": "^28.1.3", - "babel-jest": "^28.1.3", + "@jest/test-sequencer": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.3", - "jest-environment-node": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", + "jest-circus": "^29.0.0", + "jest-environment-node": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-runner": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@types/node": "*", @@ -10639,6 +11663,35 @@ } } }, + "node_modules/jest-config/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-config/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10697,6 +11750,55 @@ "node": ">=8" } }, + "node_modules/jest-config/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-config/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-config/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-config/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10710,18 +11812,30 @@ } }, "node_modules/jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.0.tgz", + "integrity": "sha512-erkuYf1dQBHow3XJmS+bH6t9TZ0GwrSdQGauN8sTqyZlFByOjRadmHgTTcAHINeeSwxzGHN2ob3PXVvZphD7XQ==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "diff-sequences": "^29.0.0", + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-diff/node_modules/ansi-styles": { @@ -10782,6 +11896,38 @@ "node": ">=8" } }, + "node_modules/jest-diff/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-diff/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-diff/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-diff/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10795,31 +11941,60 @@ } }, "node_modules/jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", + "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-each": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", - "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.0.tgz", + "integrity": "sha512-ACKRvqdo7Bc0YrjQbrQtokpQ2NZxdXA63OklJht7a9UarCJXlZeWh51wEUe0ORqbnu15nAnX1YFQHmVpS1+ZXA==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.3", - "pretty-format": "^28.1.3" + "jest-get-type": "^29.0.0", + "jest-util": "^29.0.0", + "pretty-format": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-each/node_modules/ansi-styles": { @@ -10880,6 +12055,55 @@ "node": ">=8" } }, + "node_modules/jest-each/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-each/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-each/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10912,123 +12136,84 @@ } }, "node_modules/jest-environment-node": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", - "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", + "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/environment": "^29.0.0", + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", - "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "node_modules/jest-environment-node/node_modules/@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", - "@types/graceful-fs": "^4.1.3", + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "jest-mock": "^29.0.0" }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-haste-map/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map/node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "node_modules/jest-environment-node/node_modules/@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", "dev": true, "dependencies": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-leak-detector": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", - "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", + "node_modules/jest-environment-node/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", "dev": true, "dependencies": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "@sinclair/typebox": "^0.24.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "node_modules/jest-environment-node/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "node_modules/jest-environment-node/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -11043,7 +12228,7 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-matcher-utils/node_modules/chalk": { + "node_modules/jest-environment-node/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", @@ -11059,7 +12244,7 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-matcher-utils/node_modules/color-convert": { + "node_modules/jest-environment-node/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", @@ -11071,13 +12256,13 @@ "node": ">=7.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/color-name": { + "node_modules/jest-environment-node/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/jest-matcher-utils/node_modules/has-flag": { + "node_modules/jest-environment-node/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", @@ -11086,97 +12271,89 @@ "node": ">=8" } }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "node_modules/jest-environment-node/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-environment-node/node_modules/jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@jest/types": "^29.0.0", + "@types/node": "*" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-environment-node/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/jest-environment-node/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=7.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-message-util/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/jest-environment-node/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-message-util/node_modules/supports-color": { + "node_modules/jest-environment-node/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-environment-node/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", @@ -11188,79 +12365,70 @@ "node": ">=8" } }, - "node_modules/jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "node_modules/jest-get-type": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", + "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.3", - "@types/node": "*" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "node_modules/jest-haste-map": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.0.tgz", + "integrity": "sha512-mLyDt2WyNU0DZ64s7kRFkFJzrHEuXIxG+OKOs9/P5s1W7NzXE+P7SvLbxjz2Cg63cJjuglYRrD6fZcYf19T8Lw==", "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" + "dependencies": { + "@jest/types": "^29.0.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.0.0", + "jest-util": "^29.0.0", + "jest-worker": "^29.0.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-resolve": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", - "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", + "node_modules/jest-haste-map/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" + "@sinclair/typebox": "^0.24.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", - "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", + "node_modules/jest-haste-map/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", "dev": true, "dependencies": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.3" + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/ansi-styles": { + "node_modules/jest-haste-map/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -11275,7 +12443,7 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-resolve/node_modules/chalk": { + "node_modules/jest-haste-map/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", @@ -11291,7 +12459,7 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-resolve/node_modules/color-convert": { + "node_modules/jest-haste-map/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", @@ -11303,13 +12471,13 @@ "node": ">=7.0.0" } }, - "node_modules/jest-resolve/node_modules/color-name": { + "node_modules/jest-haste-map/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/jest-resolve/node_modules/has-flag": { + "node_modules/jest-haste-map/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", @@ -11318,48 +12486,619 @@ "node": ">=8" } }, - "node_modules/jest-resolve/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/jest-haste-map/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", - "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "dependencies": { - "@jest/console": "^28.1.3", - "@jest/environment": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jest-haste-map/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.0.tgz", + "integrity": "sha512-kBjNS0/z2+ZV/3N7R+ot5fKD2W1fHkoxC3kH/fkb2z24YSPfR9RGwiNX+YLRG9r0gWsxQx16boxzHT23G6rFBw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-leak-detector/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-leak-detector/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-leak-detector/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-leak-detector/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-matcher-utils": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.0.tgz", + "integrity": "sha512-HtCxFHI8lQSbN1RppFjtl6DIrS+x4d3lOhpJljVxFEXob4lxlKon3FunW0XoGxNSvIoD00AfTFspnufpOqszrg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jest-matcher-utils/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-matcher-utils/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-matcher-utils/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-matcher-utils/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-message-util": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", + "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", "@jest/types": "^28.1.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.3", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-message-util/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-message-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-message-util/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-message-util/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jest-message-util/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-message-util/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-mock": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.3", + "@types/node": "*" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", + "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.0.tgz", + "integrity": "sha512-MN19maPUXzibBshYg/cSrDWqiJwEBur6gbQb2lwOL4+6k14wdNW8Xh0uNPPxUntb7cpTi07uql/bUO5TVwiJbA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.0.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.0.tgz", + "integrity": "sha512-1TYUMcLZcUqa2fdUQ3leYtiXWXfNmimPvnJ34YDLLf0nyJ/aEeqlHJM9Ji2jw9Qxdh7nUypanjUlUV87yRHBFQ==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.0.0", + "jest-snapshot": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-resolve/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest-resolve/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest-resolve/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jest-resolve/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-resolve/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-runner": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.0.tgz", + "integrity": "sha512-OpTpRIBOIn9RXuMMrpS+h9ZoK+nZHaOuNOceUiDbDoOJ6pmeGu0zst7VR22xXT3fOCwWqg5qe0fZ23G+ve5P0Q==", + "dev": true, + "dependencies": { + "@jest/console": "^29.0.0", + "@jest/environment": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-leak-detector": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-resolve": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-util": "^28.1.3", - "jest-watcher": "^28.1.3", - "jest-worker": "^28.1.3", + "jest-docblock": "^29.0.0", + "jest-environment-node": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-leak-detector": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-util": "^29.0.0", + "jest-watcher": "^29.0.0", + "jest-worker": "^29.0.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner/node_modules/ansi-styles": { @@ -11420,10 +13159,60 @@ "node": ">=8" } }, + "node_modules/jest-runner/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-runner/node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -11431,7 +13220,7 @@ "supports-color": "^8.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner/node_modules/jest-worker/node_modules/supports-color": { @@ -11449,6 +13238,38 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jest-runner/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-runner/node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -11472,36 +13293,97 @@ } }, "node_modules/jest-runtime": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", - "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/globals": "^28.1.3", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.0.tgz", + "integrity": "sha512-dU0qFpTRWZY7Rur7yBgpz4g67mITSozBZ1jlhoG4ER/P/NiTFyZ/W8nMd5floeAMafmbrOc/5A9SlCu7SQCoBA==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.0.0", + "@jest/fake-timers": "^29.0.0", + "@jest/globals": "^29.0.0", + "@jest/source-map": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", + "jest-haste-map": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runtime/node_modules/ansi-styles": { @@ -11562,6 +13444,88 @@ "node": ">=8" } }, + "node_modules/jest-runtime/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-runtime/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-runtime/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11575,37 +13539,67 @@ } }, "node_modules/jest-snapshot": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", - "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.0.tgz", + "integrity": "sha512-rR3B8GInk/IibF0M/sQCukSM8xX8bPI3Q0kjoAw4HT9Mx0Q3bS0MmF74rsreBOnVJgzN0Iwrc7YY56Yp8KQ7kA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/expect-utils": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^28.1.3", + "expect": "^29.0.0", "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/ansi-styles": { @@ -11666,6 +13660,75 @@ "node": ">=8" } }, + "node_modules/jest-snapshot/node_modules/jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-snapshot/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -11781,20 +13844,49 @@ } }, "node_modules/jest-validate": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", - "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.0.tgz", + "integrity": "sha512-UhgDKmahJnv5s5MK6a8kQ397YNS9euvL7gWTvUf7y0OO7vZeafUItlq3tguvfFVazQJ+kBGUm/XCJes7V61l8g==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", + "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^28.1.3" + "pretty-format": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/ansi-styles": { @@ -11867,6 +13959,38 @@ "node": ">=8" } }, + "node_modules/jest-validate/node_modules/pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-validate/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/jest-validate/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11880,22 +14004,51 @@ } }, "node_modules/jest-watcher": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", - "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.0.tgz", + "integrity": "sha512-GoRq5QJt5/dv3keK7rIzg9R0e/HpTnjyMNYtCTTDZgGIj6QUDMpiJqt7Mwfyyaxwg5PS8gVyQvRQn6Lril4cuQ==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^28.1.3", + "jest-util": "^29.0.0", "string-length": "^4.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-watcher/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-watcher/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-watcher/node_modules/ansi-styles": { @@ -11956,6 +14109,23 @@ "node": ">=8" } }, + "node_modules/jest-watcher/node_modules/jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-watcher/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -12006,6 +14176,105 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jest/node_modules/@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.24.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest/node_modules/@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -18485,16 +20754,16 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/ws": { @@ -19262,6 +21531,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -20246,19 +22524,42 @@ "dev": true }, "@jest/console": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.3.tgz", - "integrity": "sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.0.tgz", + "integrity": "sha512-rHsKEqT2Kx73PqO9qIOdwg0Grd6Y3COyqNpi5SKRI0qXgmlqXkOczQMfIb8I0Gdnc9/kaMj6cTnBGLyBA03Xrg==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", "slash": "^3.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20299,6 +22600,62 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -20311,42 +22668,64 @@ } }, "@jest/core": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.3.tgz", - "integrity": "sha512-CIKBrlaKOzA7YG19BEqCw3SLIsEwjZkeJzf5bdooVnW4bH5cktqe3JX+G2YV1aK5vP8N9na1IGWFzYaTp6k6NA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.0.tgz", + "integrity": "sha512-9qljprspjQwbmnq3Wv9d/M6/ejMdWs1uAAljQAX9QsjJ1SlSByXw1mRA9UpR2BP9TxLLwEembbm0ykrT//2STg==", "dev": true, "requires": { - "@jest/console": "^28.1.3", - "@jest/reporters": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/console": "^29.0.0", + "@jest/reporters": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.1.3", - "jest-config": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-resolve-dependencies": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "jest-watcher": "^28.1.3", + "jest-changed-files": "^29.0.0", + "jest-config": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-resolve-dependencies": "^29.0.0", + "jest-runner": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", + "jest-watcher": "^29.0.0", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", - "rimraf": "^3.0.0", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20387,6 +22766,62 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -20411,22 +22846,22 @@ } }, "@jest/expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", + "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", "dev": true, "requires": { - "expect": "^28.1.3", - "jest-snapshot": "^28.1.3" + "expect": "^29.0.0", + "jest-snapshot": "^29.0.0" } }, "@jest/expect-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz", - "integrity": "sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", + "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", "dev": true, "requires": { - "jest-get-type": "^28.0.2" + "jest-get-type": "^29.0.0" } }, "@jest/fake-timers": { @@ -20444,28 +22879,195 @@ } }, "@jest/globals": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.3.tgz", - "integrity": "sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", + "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", "dev": true, "requires": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/types": "^28.1.3" + "@jest/environment": "^29.0.0", + "@jest/expect": "^29.0.0", + "@jest/types": "^29.0.0", + "jest-mock": "^29.0.0" + }, + "dependencies": { + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + } + }, + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + } + }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "@jest/reporters": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.3.tgz", - "integrity": "sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", + "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", + "@jest/console": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -20477,9 +23079,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", + "jest-worker": "^29.0.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -20487,6 +23089,29 @@ "v8-to-istanbul": "^9.0.1" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20527,10 +23152,41 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "requires": { "@types/node": "*", @@ -20549,6 +23205,31 @@ } } }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -20570,63 +23251,160 @@ } }, "@jest/source-map": { - "version": "28.1.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.1.2.tgz", - "integrity": "sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", + "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.13", + "@jridgewell/trace-mapping": "^0.3.15", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.3.tgz", - "integrity": "sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", + "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", "dev": true, "requires": { - "@jest/console": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/console": "^29.0.0", + "@jest/types": "^29.0.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "@jest/test-sequencer": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz", - "integrity": "sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", + "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", "dev": true, "requires": { - "@jest/test-result": "^28.1.3", + "@jest/test-result": "^29.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", + "jest-haste-map": "^29.0.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.3.tgz", - "integrity": "sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", + "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^28.1.3", - "@jridgewell/trace-mapping": "^0.3.13", + "@jest/types": "^29.0.0", + "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", + "jest-haste-map": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-util": "^29.0.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.1" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20667,6 +23445,20 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -20779,9 +23571,9 @@ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -21961,15 +24753,15 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "babel-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", - "integrity": "sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.0.tgz", + "integrity": "sha512-EJM2dqxz9+uWJLLucZLPYAmRsHHt1IMkitAHGqjDlIP2IQXzkIMO3ATbBWk0lU6VwX4rNeVN04t/DDB8U5C2rg==", "dev": true, "requires": { - "@jest/transform": "^28.1.3", + "@jest/transform": "^29.0.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.1.3", + "babel-preset-jest": "^29.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -22061,9 +24853,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz", - "integrity": "sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.0.tgz", + "integrity": "sha512-B9oaXrlxXHFWeWqhDPg03iqQd2UN/mg/VdZOsLaqAVBkztru3ctTryAI4zisxLEEgmcUnLTKewqx0gGifoXD3A==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -22137,12 +24929,12 @@ } }, "babel-preset-jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz", - "integrity": "sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.0.tgz", + "integrity": "sha512-B5Ke47Xcs8rDF3p1korT3LoilpADCwbG93ALqtvqu6Xpf4d8alKkrCBTExbNzdHJcIuEPpfYvEaFFRGee2kUgQ==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^28.1.3", + "babel-plugin-jest-hoist": "^29.0.0", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -23592,9 +26384,9 @@ "dev": true }, "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", + "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", "dev": true }, "diffie-hellman": { @@ -25071,16 +27863,146 @@ "dev": true }, "expect": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz", - "integrity": "sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.0.tgz", + "integrity": "sha512-OKAHGwaBqZ6I7bas0cnrrvomEL2d0yp2XXYQhhnVHfaqDaKStUBxjWtlGu/uI2tBqwb9sBMvaS41DSJFsRRJHQ==", "dev": true, "requires": { - "@jest/expect-utils": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3" + "@jest/expect-utils": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "express": { @@ -26477,52 +29399,126 @@ } } }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jest": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.3.tgz", - "integrity": "sha512-N4GT5on8UkZgH0O5LUavMRV1EDEhNTL0KEfRmDIeZHSV7p2XgLoY9t9VDUgL6o+yfdgYHVxuz81G8oB9VG5uyA==", - "dev": true, - "requires": { - "@jest/core": "^28.1.3", - "@jest/types": "^28.1.3", - "import-local": "^3.0.2", - "jest-cli": "^28.1.3" - } - }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jest": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.0.tgz", + "integrity": "sha512-9uz4Tclskb8WrfRXqu66FsFCFoyYctwWXpruKwnD95FZqkyoEAA1oGH53HUn7nQx7uEgZTKdNl/Yo6DqqU+XMg==", + "dev": true, + "requires": { + "@jest/core": "^29.0.0", + "@jest/types": "^29.0.0", + "import-local": "^3.0.2", + "jest-cli": "^29.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jest-changed-files": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.1.3.tgz", - "integrity": "sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", + "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", "dev": true, "requires": { "execa": "^5.0.0", @@ -26530,32 +29526,81 @@ } }, "jest-circus": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.3.tgz", - "integrity": "sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.0.tgz", + "integrity": "sha512-6EX70/+ZdzPLShBeokMVIpUaq5cQpOsO4OCDiV1drKUHht0hmUOWvY6LE4pBSFdepB0Sukw4Y0ajRqtvLBO9/A==", "dev": true, "requires": { - "@jest/environment": "^28.1.3", - "@jest/expect": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/environment": "^29.0.0", + "@jest/expect": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", + "jest-each": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", "p-limit": "^3.1.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "dependencies": { + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + } + }, + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + } + }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -26596,6 +29641,72 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26608,25 +29719,48 @@ } }, "jest-cli": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.3.tgz", - "integrity": "sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.0.tgz", + "integrity": "sha512-VZUPQjWJKL8QABFiBk1tHeJ3czBodjU9r22ceQmeL7X8/M73FYxTte0RkYPHI2SiLPWy99GZNWA+oOu9x0xKOA==", "dev": true, "requires": { - "@jest/core": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/core": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", + "jest-config": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", "prompts": "^2.0.1", "yargs": "^17.3.1" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -26667,6 +29801,20 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26679,35 +29827,58 @@ } }, "jest-config": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.3.tgz", - "integrity": "sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.0.tgz", + "integrity": "sha512-RbcUgQBJDS0O8OThWUwm5UCfzo0zOymUX/cJzUNlYB1ZWqe3M8MFEcgwqgZSifYuYTi46xWu5cmkMiyRQAdnMw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.3", - "@jest/types": "^28.1.3", - "babel-jest": "^28.1.3", + "@jest/test-sequencer": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.3", - "jest-environment-node": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-runner": "^28.1.3", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", + "jest-circus": "^29.0.0", + "jest-environment-node": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-runner": "^29.0.0", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -26748,6 +29919,45 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26760,17 +29970,26 @@ } }, "jest-diff": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz", - "integrity": "sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.0.tgz", + "integrity": "sha512-erkuYf1dQBHow3XJmS+bH6t9TZ0GwrSdQGauN8sTqyZlFByOjRadmHgTTcAHINeeSwxzGHN2ob3PXVvZphD7XQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "diff-sequences": "^29.0.0", + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -26811,6 +30030,31 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26823,27 +30067,50 @@ } }, "jest-docblock": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", - "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", + "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.3.tgz", - "integrity": "sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.0.tgz", + "integrity": "sha512-ACKRvqdo7Bc0YrjQbrQtokpQ2NZxdXA63OklJht7a9UarCJXlZeWh51wEUe0ORqbnu15nAnX1YFQHmVpS1+ZXA==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.3", - "pretty-format": "^28.1.3" + "jest-get-type": "^29.0.0", + "jest-util": "^29.0.0", + "pretty-format": "^29.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -26884,6 +30151,45 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -26912,66 +30218,314 @@ } }, "jest-environment-node": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.3.tgz", - "integrity": "sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", + "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", "dev": true, "requires": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/environment": "^29.0.0", + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + }, + "dependencies": { + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + } + }, + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + } + }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", + "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", "dev": true }, "jest-haste-map": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.3.tgz", - "integrity": "sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.0.tgz", + "integrity": "sha512-mLyDt2WyNU0DZ64s7kRFkFJzrHEuXIxG+OKOs9/P5s1W7NzXE+P7SvLbxjz2Cg63cJjuglYRrD6fZcYf19T8Lw==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.3", - "jest-worker": "^28.1.3", + "jest-regex-util": "^29.0.0", + "jest-util": "^29.0.0", + "jest-worker": "^29.0.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -26980,27 +30534,70 @@ } }, "jest-leak-detector": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz", - "integrity": "sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.0.tgz", + "integrity": "sha512-kBjNS0/z2+ZV/3N7R+ot5fKD2W1fHkoxC3kH/fkb2z24YSPfR9RGwiNX+YLRG9r0gWsxQx16boxzHT23G6rFBw==", "dev": true, "requires": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + } } }, "jest-matcher-utils": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz", - "integrity": "sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.0.tgz", + "integrity": "sha512-HtCxFHI8lQSbN1RppFjtl6DIrS+x4d3lOhpJljVxFEXob4lxlKon3FunW0XoGxNSvIoD00AfTFspnufpOqszrg==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.3" + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0", + "pretty-format": "^29.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27041,6 +30638,31 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -27120,136 +30742,222 @@ } } }, - "jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "jest-mock": { + "version": "28.1.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", + "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.3", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", + "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "dev": true + }, + "jest-resolve": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.0.tgz", + "integrity": "sha512-MN19maPUXzibBshYg/cSrDWqiJwEBur6gbQb2lwOL4+6k14wdNW8Xh0uNPPxUntb7cpTi07uql/bUO5TVwiJbA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.0.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.0.0", + "jest-validate": "^29.0.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.0.tgz", + "integrity": "sha512-1TYUMcLZcUqa2fdUQ3leYtiXWXfNmimPvnJ34YDLLf0nyJ/aEeqlHJM9Ji2jw9Qxdh7nUypanjUlUV87yRHBFQ==", "dev": true, "requires": { - "@jest/types": "^28.1.3", - "@types/node": "*" + "jest-regex-util": "^29.0.0", + "jest-snapshot": "^29.0.0" } }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true - }, - "jest-resolve": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.3.tgz", - "integrity": "sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ==", + "jest-runner": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.0.tgz", + "integrity": "sha512-OpTpRIBOIn9RXuMMrpS+h9ZoK+nZHaOuNOceUiDbDoOJ6pmeGu0zst7VR22xXT3fOCwWqg5qe0fZ23G+ve5P0Q==", "dev": true, "requires": { + "@jest/console": "^29.0.0", + "@jest/environment": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", "chalk": "^4.0.0", + "emittery": "^0.10.2", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.3", - "jest-validate": "^28.1.3", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" + "jest-docblock": "^29.0.0", + "jest-environment-node": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-leak-detector": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-runtime": "^29.0.0", + "jest-util": "^29.0.0", + "jest-watcher": "^29.0.0", + "jest-worker": "^29.0.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", "dev": true, "requires": { - "color-convert": "^2.0.1" + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" } }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", "dev": true, "requires": { - "color-name": "~1.1.4" + "@sinclair/typebox": "^0.24.1" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" } - } - } - }, - "jest-resolve-dependencies": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.3.tgz", - "integrity": "sha512-qa0QO2Q0XzQoNPouMbCc7Bvtsem8eQgVPNkwn9LnS+R2n8DaVDPL/U1gngC0LTl1RYXJU0uJa2BMC2DbTfFrHA==", - "dev": true, - "requires": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.3" - } - }, - "jest-runner": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.3.tgz", - "integrity": "sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA==", - "dev": true, - "requires": { - "@jest/console": "^28.1.3", - "@jest/environment": "^28.1.3", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.1.1", - "jest-environment-node": "^28.1.3", - "jest-haste-map": "^28.1.3", - "jest-leak-detector": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-resolve": "^28.1.3", - "jest-runtime": "^28.1.3", - "jest-util": "^28.1.3", - "jest-watcher": "^28.1.3", - "jest-worker": "^28.1.3", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "dependencies": { + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27290,10 +30998,51 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "requires": { "@types/node": "*", @@ -27312,6 +31061,31 @@ } } }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -27334,35 +31108,84 @@ } }, "jest-runtime": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.3.tgz", - "integrity": "sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/globals": "^28.1.3", - "@jest/source-map": "^28.1.2", - "@jest/test-result": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.0.tgz", + "integrity": "sha512-dU0qFpTRWZY7Rur7yBgpz4g67mITSozBZ1jlhoG4ER/P/NiTFyZ/W8nMd5floeAMafmbrOc/5A9SlCu7SQCoBA==", + "dev": true, + "requires": { + "@jest/environment": "^29.0.0", + "@jest/fake-timers": "^29.0.0", + "@jest/globals": "^29.0.0", + "@jest/source-map": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.3", - "jest-snapshot": "^28.1.3", - "jest-util": "^28.1.3", + "jest-haste-map": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-resolve": "^29.0.0", + "jest-snapshot": "^29.0.0", + "jest-util": "^29.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "dependencies": { + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + } + }, + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + } + }, + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27403,6 +31226,72 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -27415,36 +31304,60 @@ } }, "jest-snapshot": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.3.tgz", - "integrity": "sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.0.tgz", + "integrity": "sha512-rR3B8GInk/IibF0M/sQCukSM8xX8bPI3Q0kjoAw4HT9Mx0Q3bS0MmF74rsreBOnVJgzN0Iwrc7YY56Yp8KQ7kA==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.3", - "@jest/transform": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/expect-utils": "^29.0.0", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^28.1.3", + "expect": "^29.0.0", "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.3", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.3", - "jest-matcher-utils": "^28.1.3", - "jest-message-util": "^28.1.3", - "jest-util": "^28.1.3", + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0", + "jest-haste-map": "^29.0.0", + "jest-matcher-utils": "^29.0.0", + "jest-message-util": "^29.0.0", + "jest-util": "^29.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "semver": "^7.3.5" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27485,6 +31398,62 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-message-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -27571,19 +31540,42 @@ } }, "jest-validate": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.3.tgz", - "integrity": "sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.0.tgz", + "integrity": "sha512-UhgDKmahJnv5s5MK6a8kQ397YNS9euvL7gWTvUf7y0OO7vZeafUItlq3tguvfFVazQJ+kBGUm/XCJes7V61l8g==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", + "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^28.1.3" + "pretty-format": "^29.0.0" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27630,6 +31622,31 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "pretty-format": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -27642,21 +31659,44 @@ } }, "jest-watcher": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.3.tgz", - "integrity": "sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.0.tgz", + "integrity": "sha512-GoRq5QJt5/dv3keK7rIzg9R0e/HpTnjyMNYtCTTDZgGIj6QUDMpiJqt7Mwfyyaxwg5PS8gVyQvRQn6Lril4cuQ==", "dev": true, "requires": { - "@jest/test-result": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/test-result": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^28.1.3", + "jest-util": "^29.0.0", "string-length": "^4.0.1" }, "dependencies": { + "@jest/schemas": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.24.1" + } + }, + "@jest/types": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "dev": true, + "requires": { + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27697,6 +31737,20 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "jest-util": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -32747,9 +36801,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "requires": { "imurmurhash": "^0.1.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index e53e12580c67..00e214bcce0b 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "file-loader": "^6.2.0", - "jest": "^28.1.3", + "jest": "^29.0.0", "jest-environment-jsdom": "^28.1.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", From 4781cb0392ba76b4a9f83ffa85e2890085293bf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 19:21:23 +0000 Subject: [PATCH 188/723] Bump eslint-plugin-promise in /apps/block_scout_web/assets Bumps [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/xjamundx/eslint-plugin-promise/releases) - [Changelog](https://github.com/xjamundx/eslint-plugin-promise/blob/development/CHANGELOG.md) - [Commits](https://github.com/xjamundx/eslint-plugin-promise/commits) --- updated-dependencies: - dependency-name: eslint-plugin-promise dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index c4fe453658e6..73f797a707d0 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -77,7 +77,7 @@ "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.0", "jest-environment-jsdom": "^28.1.3", @@ -8123,9 +8123,9 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", + "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -27218,9 +27218,9 @@ } }, "eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", + "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", "dev": true, "requires": {} }, diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index c07f5be01a0c..494b98873b50 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -89,7 +89,7 @@ "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.0", "jest-environment-jsdom": "^28.1.3", From 4b21dae7bc3ad3de7be3bdc4ff58b9f0bed01b7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 20:50:09 +0000 Subject: [PATCH 189/723] Bump jest-environment-jsdom in /apps/block_scout_web/assets Bumps [jest-environment-jsdom](https://github.com/facebook/jest/tree/HEAD/packages/jest-environment-jsdom) from 28.1.3 to 29.0.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.0/packages/jest-environment-jsdom) --- updated-dependencies: - dependency-name: jest-environment-jsdom dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 4847 ++--------------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 438 insertions(+), 4411 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 73f797a707d0..f8b81f32d9a3 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -80,7 +80,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.0", - "jest-environment-jsdom": "^28.1.3", + "jest-environment-jsdom": "^29.0.0", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", @@ -2433,35 +2433,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/console/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2520,75 +2491,6 @@ "node": ">=8" } }, - "node_modules/@jest/console/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/console/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/@jest/console/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2648,35 +2550,6 @@ } } }, - "node_modules/@jest/core/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2735,75 +2608,6 @@ "node": ">=8" } }, - "node_modules/@jest/core/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2817,18 +2621,18 @@ } }, "node_modules/@jest/environment": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", - "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", "dev": true, "dependencies": { - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", "@types/node": "*", - "jest-mock": "^28.1.3" + "jest-mock": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { @@ -2857,20 +2661,20 @@ } }, "node_modules/@jest/fake-timers": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", - "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { @@ -2888,68 +2692,51 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/globals/node_modules/@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals/node_modules/@jest/fake-timers": { + "node_modules/@jest/reporters": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", + "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", "dev": true, "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.0.0", + "@jest/test-result": "^29.0.0", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", + "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-util": "^29.0.0", + "jest-worker": "^29.0.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@jest/globals/node_modules/ansi-styles": { + "node_modules/@jest/reporters/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -2964,7 +2751,7 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jest/globals/node_modules/chalk": { + "node_modules/@jest/reporters/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", @@ -2980,7 +2767,7 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/globals/node_modules/color-convert": { + "node_modules/@jest/reporters/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", @@ -2992,13 +2779,13 @@ "node": ">=7.0.0" } }, - "node_modules/@jest/globals/node_modules/color-name": { + "node_modules/@jest/reporters/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@jest/globals/node_modules/has-flag": { + "node_modules/@jest/reporters/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", @@ -3007,174 +2794,130 @@ "node": ">=8" } }, - "node_modules/@jest/globals/node_modules/jest-message-util": { + "node_modules/@jest/reporters/node_modules/jest-worker": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", + "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/globals/node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*" + "has-flag": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/@jest/globals/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "node_modules/@jest/reporters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "has-flag": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/globals/node_modules/pretty-format": { + "node_modules/@jest/schemas": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@sinclair/typebox": "^0.24.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/globals/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/globals/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/globals/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@jest/source-map": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", + "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@jridgewell/trace-mapping": "^0.3.15", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters": { + "node_modules/@jest/test-result": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", - "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", + "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", "dev": true, "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", - "jest-worker": "^29.0.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.1" + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } } }, - "node_modules/@jest/reporters/node_modules/@jest/schemas": { + "node_modules/@jest/test-sequencer": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", + "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@jest/test-result": "^29.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.0.0", + "slash": "^3.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/@jest/types": { + "node_modules/@jest/transform": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", + "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@babel/core": "^7.11.6", + "@jest/types": "^29.0.0", + "@jridgewell/trace-mapping": "^0.3.15", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.0.0", + "jest-regex-util": "^29.0.0", + "jest-util": "^29.0.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { + "node_modules/@jest/transform/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", @@ -3189,7 +2932,7 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/chalk": { + "node_modules/@jest/transform/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", @@ -3205,7 +2948,7 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/color-convert": { + "node_modules/@jest/transform/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", @@ -3217,13 +2960,13 @@ "node": ">=7.0.0" } }, - "node_modules/@jest/reporters/node_modules/color-name": { + "node_modules/@jest/transform/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@jest/reporters/node_modules/has-flag": { + "node_modules/@jest/transform/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", @@ -3232,459 +2975,64 @@ "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "node_modules/@jest/transform/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "has-flag": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/reporters/node_modules/jest-util": { + "node_modules/@jest/types": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/schemas": "^29.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "node_modules/@jest/types/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/@jest/types/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/schemas": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", - "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", - "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", - "dev": true, - "dependencies": { - "@jest/console": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/test-result/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/test-result/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@jest/test-result/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/test-result/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", - "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", - "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.0.0", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/transform/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/transform/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@jest/transform/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/transform/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.1.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/@jest/types/node_modules/color-convert": { @@ -4073,14 +3421,14 @@ } }, "node_modules/@types/jsdom": { - "version": "16.2.15", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.15.tgz", - "integrity": "sha512-nwF87yjBKuX/roqGYerZZM0Nv1pZDMAT5YhOHYeM/72Fic+VEqJh4nyoqoapzJnW3pUlfxPY5FhgsJtM+dRnQQ==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==", "dev": true, "dependencies": { "@types/node": "*", - "@types/parse5": "^6.0.3", - "@types/tough-cookie": "*" + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, "node_modules/@types/json-buffer": { @@ -4135,12 +3483,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "node_modules/@types/parse5": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", - "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", - "dev": true - }, "node_modules/@types/pbkdf2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", @@ -7052,19 +6394,6 @@ "node": ">=12" } }, - "node_modules/data-urls/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -7116,9 +6445,9 @@ } }, "node_modules/decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.0.tgz", + "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==", "dev": true }, "node_modules/decode-uri-component": { @@ -9103,174 +8432,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/expect/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/expect/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/expect/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/expect/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/expect/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/expect/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expect/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/expect/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/expect/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/express": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", @@ -10392,9 +9553,9 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { "agent-base": "6", @@ -11255,67 +10416,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-circus/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11374,88 +10474,6 @@ "node": ">=8" } }, - "node_modules/jest-circus/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-circus/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11502,35 +10520,6 @@ } } }, - "node_modules/jest-cli/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11589,23 +10578,6 @@ "node": ">=8" } }, - "node_modules/jest-cli/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11663,35 +10635,6 @@ } } }, - "node_modules/jest-config/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-config/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11750,55 +10693,6 @@ "node": ">=8" } }, - "node_modules/jest-config/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-config/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11826,18 +10720,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-diff/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -11896,38 +10778,6 @@ "node": ">=8" } }, - "node_modules/jest-diff/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-diff/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11968,35 +10818,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-each/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -12055,55 +10876,6 @@ "node": ">=8" } }, - "node_modules/jest-each/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-each/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -12117,66 +10889,34 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.3.tgz", - "integrity": "sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==", - "dev": true, - "dependencies": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/jsdom": "^16.2.4", - "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3", - "jsdom": "^19.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-environment-node": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", - "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.0.tgz", + "integrity": "sha512-NVBXMAEbNrgln2of0OtDhfT18Ohl9DZKkjsNgGKWOWmo3TZwHSG6MRw7XE3RQh/SH69a8vVlf4g2cQHgXdQFBg==", "dev": true, "dependencies": { "@jest/environment": "^29.0.0", "@jest/fake-timers": "^29.0.0", "@jest/types": "^29.0.0", + "@types/jsdom": "^20.0.0", "@types/node": "*", "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-util": "^29.0.0", + "jsdom": "^20.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-node/node_modules/@jest/environment": { + "node_modules/jest-environment-node": { "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", + "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", "dev": true, "dependencies": { + "@jest/environment": "^29.0.0", "@jest/fake-timers": "^29.0.0", "@jest/types": "^29.0.0", "@types/node": "*", - "jest-mock": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", "jest-mock": "^29.0.0", "jest-util": "^29.0.0" }, @@ -12184,187 +10924,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-node/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-environment-node/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-environment-node/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-environment-node/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-node/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-environment-node/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/jest-environment-node/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-get-type": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", @@ -12399,84 +10958,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/jest-haste-map/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-haste-map/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-haste-map/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/jest-haste-map/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12486,23 +10967,6 @@ "node": ">=8" } }, - "node_modules/jest-haste-map/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-haste-map/node_modules/jest-worker": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", @@ -12532,18 +10996,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-haste-map/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-leak-detector": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.0.tgz", @@ -12557,50 +11009,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-leak-detector/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-matcher-utils": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.0.tgz", @@ -12616,18 +11024,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-matcher-utils/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -12686,38 +11082,6 @@ "node": ">=8" } }, - "node_modules/jest-matcher-utils/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-matcher-utils/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -12731,23 +11095,23 @@ } }, "node_modules/jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util/node_modules/ansi-styles": { @@ -12821,16 +11185,16 @@ } }, "node_modules/jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { @@ -12892,35 +11256,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -12979,23 +11314,6 @@ "node": ">=8" } }, - "node_modules/jest-resolve/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13040,67 +11358,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-runner/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -13159,56 +11416,6 @@ "node": ">=8" } }, - "node_modules/jest-runner/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-runner/node_modules/jest-worker": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", @@ -13238,38 +11445,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-runner/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runner/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-runner/node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -13325,67 +11500,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-runtime/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -13444,88 +11558,6 @@ "node": ">=8" } }, - "node_modules/jest-runtime/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-runtime/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13573,35 +11605,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-snapshot/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -13660,75 +11663,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-snapshot/node_modules/semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -13757,12 +11691,12 @@ } }, "node_modules/jest-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", - "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", "dev": true, "dependencies": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -13770,7 +11704,7 @@ "picomatch": "^2.2.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-util/node_modules/ansi-styles": { @@ -13860,35 +11794,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-validate/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -13959,38 +11864,6 @@ "node": ">=8" } }, - "node_modules/jest-validate/node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-validate/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -14022,35 +11895,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-watcher/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -14109,23 +11953,6 @@ "node": ">=8" } }, - "node_modules/jest-watcher/node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-watcher/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -14176,105 +12003,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest/node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.24.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest/node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -14325,28 +12053,28 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "dev": true, "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -14354,12 +12082,12 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -16362,10 +14090,28 @@ } }, "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "dependencies": { + "entities": "^4.3.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/parseurl": { "version": "1.3.3", @@ -17100,18 +14846,17 @@ } }, "node_modules/pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.0.0", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -17457,6 +15202,12 @@ "node": ">=0.4.x" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -17906,6 +15657,12 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -18164,15 +15921,15 @@ } }, "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/scheduler": { @@ -19431,19 +17188,29 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" } }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/tr46": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", @@ -19733,6 +17500,16 @@ "querystring": "0.2.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -20606,9 +18383,9 @@ } }, "node_modules/whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "dependencies": { "tr46": "^3.0.0", @@ -22537,29 +20314,6 @@ "slash": "^3.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -22600,62 +20354,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -22703,242 +20401,6 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "@jest/environment": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", - "integrity": "sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA==", - "dev": true, - "requires": { - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/node": "*", - "jest-mock": "^28.1.3" - } - }, - "@jest/expect": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", - "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", - "dev": true, - "requires": { - "expect": "^29.0.0", - "jest-snapshot": "^29.0.0" - } - }, - "@jest/expect-utils": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", - "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", - "dev": true, - "requires": { - "jest-get-type": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.3.tgz", - "integrity": "sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.3", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^28.1.3", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3" - } - }, - "@jest/globals": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", - "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", - "dev": true, - "requires": { - "@jest/environment": "^29.0.0", - "@jest/expect": "^29.0.0", - "@jest/types": "^29.0.0", - "jest-mock": "^29.0.0" - }, - "dependencies": { - "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -22979,72 +20441,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -23056,6 +20452,63 @@ } } }, + "@jest/environment": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", + "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/node": "*", + "jest-mock": "^29.0.0" + } + }, + "@jest/expect": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", + "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", + "dev": true, + "requires": { + "expect": "^29.0.0", + "jest-snapshot": "^29.0.0" + } + }, + "@jest/expect-utils": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", + "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", + "dev": true, + "requires": { + "jest-get-type": "^29.0.0" + } + }, + "@jest/fake-timers": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", + "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "dev": true, + "requires": { + "@jest/types": "^29.0.0", + "@sinonjs/fake-timers": "^9.1.2", + "@types/node": "*", + "jest-message-util": "^29.0.0", + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0" + } + }, + "@jest/globals": { + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", + "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", + "dev": true, + "requires": { + "@jest/environment": "^29.0.0", + "@jest/expect": "^29.0.0", + "@jest/types": "^29.0.0", + "jest-mock": "^29.0.0" + } + }, "@jest/reporters": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", @@ -23089,29 +20542,6 @@ "v8-to-istanbul": "^9.0.1" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -23152,37 +20582,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "jest-worker": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", @@ -23205,31 +20604,6 @@ } } }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -23242,9 +20616,9 @@ } }, "@jest/schemas": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz", - "integrity": "sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", + "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", "dev": true, "requires": { "@sinclair/typebox": "^0.24.1" @@ -23271,80 +20645,6 @@ "@jest/types": "^29.0.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" - }, - "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "@jest/test-sequencer": { @@ -23382,29 +20682,6 @@ "write-file-atomic": "^4.0.1" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -23445,20 +20722,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -23471,12 +20734,12 @@ } }, "@jest/types": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz", - "integrity": "sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", + "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", "dev": true, "requires": { - "@jest/schemas": "^28.1.3", + "@jest/schemas": "^29.0.0", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -23828,14 +21091,14 @@ } }, "@types/jsdom": { - "version": "16.2.15", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.15.tgz", - "integrity": "sha512-nwF87yjBKuX/roqGYerZZM0Nv1pZDMAT5YhOHYeM/72Fic+VEqJh4nyoqoapzJnW3pUlfxPY5FhgsJtM+dRnQQ==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==", "dev": true, "requires": { "@types/node": "*", - "@types/parse5": "^6.0.3", - "@types/tough-cookie": "*" + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, "@types/json-buffer": { @@ -23890,12 +21153,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/parse5": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", - "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", - "dev": true - }, "@types/pbkdf2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", @@ -26210,18 +23467,6 @@ "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "requires": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - } - } } }, "debug": { @@ -26260,9 +23505,9 @@ } }, "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.0.tgz", + "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==", "dev": true }, "decode-uri-component": { @@ -27873,136 +25118,6 @@ "jest-matcher-utils": "^29.0.0", "jest-message-util": "^29.0.0", "jest-util": "^29.0.0" - }, - "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "express": { @@ -28868,9 +25983,9 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "requires": { "agent-base": "6", @@ -29439,80 +26554,6 @@ "@jest/types": "^29.0.0", "import-local": "^3.0.2", "jest-cli": "^29.0.0" - }, - "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-changed-files": { @@ -29552,55 +26593,6 @@ "stack-utils": "^2.0.3" }, "dependencies": { - "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -29641,72 +26633,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -29738,29 +26664,6 @@ "yargs": "^17.3.1" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -29801,20 +26704,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -29856,29 +26745,6 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -29919,45 +26785,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -29981,15 +26808,6 @@ "pretty-format": "^29.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30030,31 +26848,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30088,29 +26881,6 @@ "pretty-format": "^29.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30151,45 +26921,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30202,19 +26933,19 @@ } }, "jest-environment-jsdom": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.3.tgz", - "integrity": "sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.0.tgz", + "integrity": "sha512-NVBXMAEbNrgln2of0OtDhfT18Ohl9DZKkjsNgGKWOWmo3TZwHSG6MRw7XE3RQh/SH69a8vVlf4g2cQHgXdQFBg==", "dev": true, "requires": { - "@jest/environment": "^28.1.3", - "@jest/fake-timers": "^28.1.3", - "@jest/types": "^28.1.3", - "@types/jsdom": "^16.2.4", + "@jest/environment": "^29.0.0", + "@jest/fake-timers": "^29.0.0", + "@jest/types": "^29.0.0", + "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^28.1.3", - "jest-util": "^28.1.3", - "jsdom": "^19.0.0" + "jest-mock": "^29.0.0", + "jest-util": "^29.0.0", + "jsdom": "^20.0.0" } }, "jest-environment-node": { @@ -30229,172 +26960,6 @@ "@types/node": "*", "jest-mock": "^29.0.0", "jest-util": "^29.0.0" - }, - "dependencies": { - "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "jest-get-type": { @@ -30423,83 +26988,12 @@ "walker": "^1.0.8" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "jest-worker": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", @@ -30521,15 +27015,6 @@ } } } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, @@ -30541,40 +27026,6 @@ "requires": { "jest-get-type": "^29.0.0", "pretty-format": "^29.0.0" - }, - "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - } } }, "jest-matcher-utils": { @@ -30589,15 +27040,6 @@ "pretty-format": "^29.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30638,31 +27080,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30675,18 +27092,18 @@ } }, "jest-message-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz", - "integrity": "sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", + "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.3", + "pretty-format": "^29.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -30743,12 +27160,12 @@ } }, "jest-mock": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.3.tgz", - "integrity": "sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", + "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*" } }, @@ -30782,29 +27199,6 @@ "slash": "^3.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30845,20 +27239,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30909,55 +27289,6 @@ "source-map-support": "0.5.13" }, "dependencies": { - "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30998,47 +27329,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "jest-worker": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", @@ -31061,31 +27351,6 @@ } } }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -31137,55 +27402,6 @@ "strip-bom": "^4.0.0" }, "dependencies": { - "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", - "@types/node": "*", - "jest-mock": "^29.0.0" - } - }, - "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" - } - }, - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -31226,72 +27442,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -31335,29 +27485,6 @@ "semver": "^7.3.5" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -31398,62 +27525,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -31475,12 +27546,12 @@ } }, "jest-util": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz", - "integrity": "sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", + "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", "dev": true, "requires": { - "@jest/types": "^28.1.3", + "@jest/types": "^29.0.0", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -31553,29 +27624,6 @@ "pretty-format": "^29.0.0" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -31622,31 +27670,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -31674,29 +27697,6 @@ "string-length": "^4.0.1" }, "dependencies": { - "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.24.1" - } - }, - "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -31737,20 +27737,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", - "dev": true, - "requires": { - "@jest/types": "^29.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -31834,28 +27820,28 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "dev": true, "requires": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -31863,8 +27849,8 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" }, "dependencies": { @@ -33479,10 +29465,21 @@ } }, "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "requires": { + "entities": "^4.3.0" + }, + "dependencies": { + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true + } + } }, "parseurl": { "version": "1.3.3", @@ -33953,13 +29950,12 @@ "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==" }, "pretty-format": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz", - "integrity": "sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", + "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", "dev": true, "requires": { - "@jest/schemas": "^28.1.3", - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.0.0", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -34243,6 +30239,12 @@ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -34595,6 +30597,12 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -34762,9 +30770,9 @@ } }, "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "requires": { "xmlchars": "^2.2.0" @@ -35732,14 +31740,23 @@ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } } }, "tr46": { @@ -35973,6 +31990,16 @@ } } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -36687,9 +32714,9 @@ "dev": true }, "whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "requires": { "tr46": "^3.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 494b98873b50..a8cb43b3f79e 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -92,7 +92,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.0", - "jest-environment-jsdom": "^28.1.3", + "jest-environment-jsdom": "^29.0.0", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", From af764ef846402163ea70dc8036e5d5dc670871d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 19:47:10 +0000 Subject: [PATCH 190/723] Bump jest from 29.0.0 to 29.0.1 in /apps/block_scout_web/assets Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.0.0 to 29.0.1. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.1/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Update --- .github/workflows/config.yml | 2 +- apps/block_scout_web/assets/package-lock.json | 1064 ++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 3 files changed, 533 insertions(+), 535 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index e454a9047de6..239d3416ac75 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -153,7 +153,7 @@ jobs: id: dialyzer-cache with: path: priv/plts - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_13-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f8b81f32d9a3..a18c11252616 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -79,7 +79,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.0", + "jest": "^29.0.1", "jest-environment-jsdom": "^29.0.0", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", @@ -2417,16 +2417,16 @@ } }, "node_modules/@jest/console": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.0.tgz", - "integrity": "sha512-rHsKEqT2Kx73PqO9qIOdwg0Grd6Y3COyqNpi5SKRI0qXgmlqXkOczQMfIb8I0Gdnc9/kaMj6cTnBGLyBA03Xrg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.1.tgz", + "integrity": "sha512-SxLvSKf9gk4Rvt3p2KRQWVQ3sVj7S37rjlCHwp2+xNcRO/X+Uw0idbkfOtciUpjghHIxyggqcrrKhThQ+vClLQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", "slash": "^3.0.0" }, "engines": { @@ -2504,16 +2504,16 @@ } }, "node_modules/@jest/core": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.0.tgz", - "integrity": "sha512-9qljprspjQwbmnq3Wv9d/M6/ejMdWs1uAAljQAX9QsjJ1SlSByXw1mRA9UpR2BP9TxLLwEembbm0ykrT//2STg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.1.tgz", + "integrity": "sha512-EcFrXkYh8I1GYHRH9V4TU7jr4P6ckaPqGo/z4AIJjHDZxicjYgWB6fx1xFb5bhEM87eUjCF4FAY5t+RamLWQmA==", "dev": true, "dependencies": { - "@jest/console": "^29.0.0", - "@jest/reporters": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/reporters": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -2521,20 +2521,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-message-util": "^29.0.0", + "jest-config": "^29.0.1", + "jest-haste-map": "^29.0.1", + "jest-message-util": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-resolve-dependencies": "^29.0.0", - "jest-runner": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", - "jest-watcher": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-resolve-dependencies": "^29.0.1", + "jest-runner": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", + "jest-watcher": "^29.0.1", "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -2621,37 +2621,37 @@ } }, "node_modules/@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.1.tgz", + "integrity": "sha512-iLcFfoq2K6DAB+Mc+2VNLzZVmHdwQFeSqvoM/X8SMON6s/+yEi1iuRX3snx/JfwSnvmiMXjSr0lktxNxOcqXYA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", - "jest-mock": "^29.0.0" + "jest-mock": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", - "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.1.tgz", + "integrity": "sha512-qKB3q52XDV8VUEiqKKLgLrJx7puQ8sYVqIDlul6n7SIXWS97DOK3KqbR2rDDaMtmenRHqEUl2fI+aFzx0oSemA==", "dev": true, "dependencies": { - "expect": "^29.0.0", - "jest-snapshot": "^29.0.0" + "expect": "^29.0.1", + "jest-snapshot": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", - "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.1.tgz", + "integrity": "sha512-Tw5kUUOKmXGQDmQ9TSgTraFFS7HMC1HG/B7y0AN2G2UzjdAXz9BzK2rmNpCSDl7g7y0Gf/VLBm//blonvhtOTQ==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0" @@ -2661,48 +2661,48 @@ } }, "node_modules/@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.1.tgz", + "integrity": "sha512-XZ+kAhLChVQ+KJNa5034p7O1Mz3vtWrelxDcMoxhZkgqmWDaEQAW9qJeutaeCfPvwaEwKYVyKDYfWpcyT8RiMw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-message-util": "^29.0.1", + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", - "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.1.tgz", + "integrity": "sha512-BtZWrVrKRKNUt7T1H2S8Mz31PN7ItROCmH+V5pn10hJDUfjOCTIUwb0WtLZzm0f1tJ3Uvx+5lVZrF/VTKqNaFg==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.0", - "@jest/expect": "^29.0.0", - "@jest/types": "^29.0.0", - "jest-mock": "^29.0.0" + "@jest/environment": "^29.0.1", + "@jest/expect": "^29.0.1", + "@jest/types": "^29.0.1", + "jest-mock": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", - "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.1.tgz", + "integrity": "sha512-dM3L8JmYYOsdeXUUVZClQy67Tz/v1sMo9h4AQv2U+716VLHV0zdA6Hh4FQNAHMhYw/95dbZbPX8Q+TRR7Rw+wA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -2715,9 +2715,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", + "jest-worker": "^29.0.1", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -2795,9 +2795,9 @@ } }, "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -2862,13 +2862,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", - "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.1.tgz", + "integrity": "sha512-XCA4whh/igxjBaR/Hg8qwFd/uTsauoD7QAdAYUjV2CSGx0+iunhjoCRRWTwqjQrETRqOJABx6kNfw0+C0vMSgQ==", "dev": true, "dependencies": { - "@jest/console": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/types": "^29.0.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -2877,14 +2877,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", - "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.1.tgz", + "integrity": "sha512-3GhSBMCRcWXGluP2Dw7CLP6mNke/t+EcftF5YjzhX1BJmqcatMbtZVwjuCfZy0TCME1GevXy3qTyV5PLpwIFKQ==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.0", + "@jest/test-result": "^29.0.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "slash": "^3.0.0" }, "engines": { @@ -2892,22 +2892,22 @@ } }, "node_modules/@jest/transform": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", - "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.1.tgz", + "integrity": "sha512-6UxXtqrPScFdDhoip8ys60dQAIYppQinyR87n9nlasR/ZnFfJohKToqzM29KK4gb9gHRv5oDFChdqZKE0SIhsg==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-util": "^29.0.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -2988,9 +2988,9 @@ } }, "node_modules/@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.1.tgz", + "integrity": "sha512-ft01rxzVsbh9qZPJ6EFgAIj3PT9FCRfBF9Xljo2/33VDOUjLZr0ZJ2oKANqh9S/K0/GERCsHDAQlBwj7RxA+9g==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -4481,12 +4481,12 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/babel-jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.0.tgz", - "integrity": "sha512-EJM2dqxz9+uWJLLucZLPYAmRsHHt1IMkitAHGqjDlIP2IQXzkIMO3ATbBWk0lU6VwX4rNeVN04t/DDB8U5C2rg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.1.tgz", + "integrity": "sha512-wyI9r8tqwsZEMWiIaYjdUJ6ztZIO4DMWpGq7laW34wR71WtRS+D/iBEtXOP5W2aSYCVUQMsypRl/xiJYZznnTg==", "dev": true, "dependencies": { - "@jest/transform": "^29.0.0", + "@jest/transform": "^29.0.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.0.0", @@ -8417,16 +8417,16 @@ } }, "node_modules/expect": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.0.tgz", - "integrity": "sha512-OKAHGwaBqZ6I7bas0cnrrvomEL2d0yp2XXYQhhnVHfaqDaKStUBxjWtlGu/uI2tBqwb9sBMvaS41DSJFsRRJHQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.1.tgz", + "integrity": "sha512-yQgemsjLU+1S8t2A7pXT3Sn/v5/37LY8J+tocWtKEA0iEYYc6gfKbbJJX2fxHZmd7K9WpdbQqXUpmYkq1aewYg==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.0.0", + "@jest/expect-utils": "^29.0.1", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0" + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10348,15 +10348,15 @@ } }, "node_modules/jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.0.tgz", - "integrity": "sha512-9uz4Tclskb8WrfRXqu66FsFCFoyYctwWXpruKwnD95FZqkyoEAA1oGH53HUn7nQx7uEgZTKdNl/Yo6DqqU+XMg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.1.tgz", + "integrity": "sha512-liHkwzaW6iwQyhRBFj0A4ZYKcsQ7ers1s62CCT95fPeNzoxT/vQRWwjTT4e7jpSCwrvPP2t1VESuy7GrXcr2ug==", "dev": true, "dependencies": { - "@jest/core": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/core": "^29.0.1", + "@jest/types": "^29.0.1", "import-local": "^3.0.2", - "jest-cli": "^29.0.0" + "jest-cli": "^29.0.1" }, "bin": { "jest": "bin/jest.js" @@ -10387,28 +10387,28 @@ } }, "node_modules/jest-circus": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.0.tgz", - "integrity": "sha512-6EX70/+ZdzPLShBeokMVIpUaq5cQpOsO4OCDiV1drKUHht0hmUOWvY6LE4pBSFdepB0Sukw4Y0ajRqtvLBO9/A==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.1.tgz", + "integrity": "sha512-I5J4LyK3qPo8EnqPmxsMAVR+2SFx7JOaZsbqW9xQmk4UDmTCD92EQgS162Ey3Jq6CfpKJKFDhzhG3QqiE0fRbw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.0", - "@jest/expect": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/expect": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", + "jest-each": "^29.0.1", + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", "p-limit": "^3.1.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -10487,21 +10487,21 @@ } }, "node_modules/jest-cli": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.0.tgz", - "integrity": "sha512-VZUPQjWJKL8QABFiBk1tHeJ3czBodjU9r22ceQmeL7X8/M73FYxTte0RkYPHI2SiLPWy99GZNWA+oOu9x0xKOA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.1.tgz", + "integrity": "sha512-XozBHtoJCS6mnjCxNESyGm47Y4xSWzNlBJj4tix9nGrG6m068B83lrTWKtjYAenYSfOqyYVpQCkyqUp35IT+qA==", "dev": true, "dependencies": { - "@jest/core": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/core": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-config": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -10591,31 +10591,31 @@ } }, "node_modules/jest-config": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.0.tgz", - "integrity": "sha512-RbcUgQBJDS0O8OThWUwm5UCfzo0zOymUX/cJzUNlYB1ZWqe3M8MFEcgwqgZSifYuYTi46xWu5cmkMiyRQAdnMw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.1.tgz", + "integrity": "sha512-3duIx5ucEPIsUOESDTuasMfqHonD0oZRjqHycIMHSC4JwbvHDjAWNKN/NiM0ZxHXjAYrMTLt2QxSQ+IqlbYE5A==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", + "@jest/test-sequencer": "^29.0.1", + "@jest/types": "^29.0.1", + "babel-jest": "^29.0.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.0", - "jest-environment-node": "^29.0.0", + "jest-circus": "^29.0.1", + "jest-environment-node": "^29.0.1", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-runner": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-runner": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -10706,15 +10706,15 @@ } }, "node_modules/jest-diff": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.0.tgz", - "integrity": "sha512-erkuYf1dQBHow3XJmS+bH6t9TZ0GwrSdQGauN8sTqyZlFByOjRadmHgTTcAHINeeSwxzGHN2ob3PXVvZphD7XQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.1.tgz", + "integrity": "sha512-l8PYeq2VhcdxG9tl5cU78ClAlg/N7RtVSp0v3MlXURR0Y99i6eFnegmasOandyTmO6uEdo20+FByAjBFEO9nuw==", "dev": true, "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10803,16 +10803,16 @@ } }, "node_modules/jest-each": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.0.tgz", - "integrity": "sha512-ACKRvqdo7Bc0YrjQbrQtokpQ2NZxdXA63OklJht7a9UarCJXlZeWh51wEUe0ORqbnu15nAnX1YFQHmVpS1+ZXA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.1.tgz", + "integrity": "sha512-UmCZYU9LPvRfSDoCrKJqrCNmgTYGGb3Ga6IVsnnVjedBTRRR9GJMca7UmDKRrJ1s+U632xrVtiRD27BxaG1aaQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.0", - "pretty-format": "^29.0.0" + "jest-util": "^29.0.1", + "pretty-format": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10908,17 +10908,17 @@ } }, "node_modules/jest-environment-node": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", - "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.1.tgz", + "integrity": "sha512-PcIRBrEBFAPBqkbL53ZpEvTptcAnOW6/lDfqBfACMm3vkVT0N7DcfkH/hqNSbDmSxzGr0FtJI6Ej3TPhveWCMA==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10934,20 +10934,20 @@ } }, "node_modules/jest-haste-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.0.tgz", - "integrity": "sha512-mLyDt2WyNU0DZ64s7kRFkFJzrHEuXIxG+OKOs9/P5s1W7NzXE+P7SvLbxjz2Cg63cJjuglYRrD6fZcYf19T8Lw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.1.tgz", + "integrity": "sha512-gcKOAydafpGoSBvcj/mGCfhOKO8fRLkAeee1KXGdcJ1Pb9O2nnOl4I8bQSIID2MaZeMHtLLgNboukh/pUGkBtg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-util": "^29.0.1", + "jest-worker": "^29.0.1", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -10968,9 +10968,9 @@ } }, "node_modules/jest-haste-map/node_modules/jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -10981,7 +10981,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map/node_modules/jest-worker/node_modules/supports-color": { + "node_modules/jest-haste-map/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", @@ -10997,28 +10997,28 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.0.tgz", - "integrity": "sha512-kBjNS0/z2+ZV/3N7R+ot5fKD2W1fHkoxC3kH/fkb2z24YSPfR9RGwiNX+YLRG9r0gWsxQx16boxzHT23G6rFBw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.1.tgz", + "integrity": "sha512-5tISHJphB+sCmKXtVHJGQGltj7ksrLLb9vkuNWwFR86Of1tfzjskvrrrZU1gSzEfWC+qXIn4tuh8noKHYGMIPA==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.0.tgz", - "integrity": "sha512-HtCxFHI8lQSbN1RppFjtl6DIrS+x4d3lOhpJljVxFEXob4lxlKon3FunW0XoGxNSvIoD00AfTFspnufpOqszrg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.1.tgz", + "integrity": "sha512-/e6UbCDmprRQFnl7+uBKqn4G22c/OmwriE5KCMVqxhElKCQUDcFnq5XM9iJeKtzy4DUjxT27y9VHmKPD8BQPaw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.0.0", + "jest-diff": "^29.0.1", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11095,18 +11095,18 @@ } }, "node_modules/jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.1.tgz", + "integrity": "sha512-wRMAQt3HrLpxSubdnzOo68QoTfQ+NLXFzU0Heb18ZUzO2S9GgaXNEdQ4rpd0fI9dq2NXkpCk1IUWSqzYKji64A==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -11185,12 +11185,12 @@ } }, "node_modules/jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.1.tgz", + "integrity": "sha512-i1yTceg2GKJwUNZFjIzrH7Y74fN1SKJWxQX/Vu3LT4TiJerFARH5l+4URNyapZ+DNpchHYrGOP2deVbn3ma8JA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*" }, "engines": { @@ -11224,17 +11224,17 @@ } }, "node_modules/jest-resolve": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.0.tgz", - "integrity": "sha512-MN19maPUXzibBshYg/cSrDWqiJwEBur6gbQb2lwOL4+6k14wdNW8Xh0uNPPxUntb7cpTi07uql/bUO5TVwiJbA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.1.tgz", + "integrity": "sha512-dwb5Z0lLZbptlBtPExqsHfdDamXeiRLv4vdkfPrN84vBwLSWHWcXjlM2JXD/KLSQfljBcXbzI/PDvUJuTQ84Nw==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -11244,13 +11244,13 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.0.tgz", - "integrity": "sha512-1TYUMcLZcUqa2fdUQ3leYtiXWXfNmimPvnJ34YDLLf0nyJ/aEeqlHJM9Ji2jw9Qxdh7nUypanjUlUV87yRHBFQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.1.tgz", + "integrity": "sha512-fUGcYlSc1NzNz+tsHDjjG0rclw6blJcFZsLEsezxm/n54bAm9HFvJxgBuCV1CJQoPtIx6AfR+tXkR9lpWJs2LQ==", "dev": true, "dependencies": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.0" + "jest-snapshot": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11327,30 +11327,30 @@ } }, "node_modules/jest-runner": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.0.tgz", - "integrity": "sha512-OpTpRIBOIn9RXuMMrpS+h9ZoK+nZHaOuNOceUiDbDoOJ6pmeGu0zst7VR22xXT3fOCwWqg5qe0fZ23G+ve5P0Q==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.1.tgz", + "integrity": "sha512-XeFfPmHtO7HyZyD1uJeO4Oqa8PyTbDHzS1YdGrvsFXk/A5eXinbqA5a42VUEqvsKQgNnKTl5NJD0UtDWg7cQ2A==", "dev": true, "dependencies": { - "@jest/console": "^29.0.0", - "@jest/environment": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/environment": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-leak-detector": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-util": "^29.0.0", - "jest-watcher": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-environment-node": "^29.0.1", + "jest-haste-map": "^29.0.1", + "jest-leak-detector": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-resolve": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-util": "^29.0.1", + "jest-watcher": "^29.0.1", + "jest-worker": "^29.0.1", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -11417,9 +11417,9 @@ } }, "node_modules/jest-runner/node_modules/jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -11468,31 +11468,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.0.tgz", - "integrity": "sha512-dU0qFpTRWZY7Rur7yBgpz4g67mITSozBZ1jlhoG4ER/P/NiTFyZ/W8nMd5floeAMafmbrOc/5A9SlCu7SQCoBA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.1.tgz", + "integrity": "sha512-yDgz5OE0Rm44PUAfTqwA6cDFnTYnVcYbRpPECsokSASQ0I5RXpnKPVr2g0CYZWKzbsXqqtmM7TIk7CAutZJ7gQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/globals": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/globals": "^29.0.1", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", + "jest-haste-map": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-mock": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -11571,9 +11571,9 @@ } }, "node_modules/jest-snapshot": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.0.tgz", - "integrity": "sha512-rR3B8GInk/IibF0M/sQCukSM8xX8bPI3Q0kjoAw4HT9Mx0Q3bS0MmF74rsreBOnVJgzN0Iwrc7YY56Yp8KQ7kA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.1.tgz", + "integrity": "sha512-OuYGp+lsh7RhB3DDX36z/pzrGm2F740e5ERG9PQpJyDknCRtWdhaehBQyMqDnsQdKkvC2zOcetcxskiHjO7e8Q==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -11582,23 +11582,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/expect-utils": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.0", + "expect": "^29.0.1", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.0", + "jest-diff": "^29.0.1", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-haste-map": "^29.0.1", + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "semver": "^7.3.5" }, "engines": { @@ -11691,12 +11691,12 @@ } }, "node_modules/jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.1.tgz", + "integrity": "sha512-GIWkgNfkeA9d84rORDHPGGTFBrRD13A38QVSKE0bVrGSnoR1KDn8Kqz+0yI5kezMgbT/7zrWaruWP1Kbghlb2A==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -11778,17 +11778,17 @@ } }, "node_modules/jest-validate": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.0.tgz", - "integrity": "sha512-UhgDKmahJnv5s5MK6a8kQ397YNS9euvL7gWTvUf7y0OO7vZeafUItlq3tguvfFVazQJ+kBGUm/XCJes7V61l8g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.1.tgz", + "integrity": "sha512-mS4q7F738YXZFWBPqE+NjHU/gEOs7IBIFQ8i9zq5EO691cLrUbLhFq4larf8/lNcmauRO71tn/+DTW2y+MrLow==", "dev": true, "dependencies": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11877,18 +11877,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.0.tgz", - "integrity": "sha512-GoRq5QJt5/dv3keK7rIzg9R0e/HpTnjyMNYtCTTDZgGIj6QUDMpiJqt7Mwfyyaxwg5PS8gVyQvRQn6Lril4cuQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.1.tgz", + "integrity": "sha512-0LBWDL3sZ+vyHRYxjqm2irhfwhUXHonjLSbd0oDeGq44U1e1uUh3icWNXYF8HO/UEnOoa6+OJDncLUXP2Hdg9A==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.0", + "jest-util": "^29.0.1", "string-length": "^4.0.1" }, "engines": { @@ -14846,9 +14846,9 @@ } }, "node_modules/pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.1.tgz", + "integrity": "sha512-iTHy3QZMzuL484mSTYbQIM1AHhEQsH8mXWS2/vd2yFBYnG3EBqGiMONo28PlPgrW7P/8s/1ISv+y7WH306l8cw==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -20301,16 +20301,16 @@ "dev": true }, "@jest/console": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.0.tgz", - "integrity": "sha512-rHsKEqT2Kx73PqO9qIOdwg0Grd6Y3COyqNpi5SKRI0qXgmlqXkOczQMfIb8I0Gdnc9/kaMj6cTnBGLyBA03Xrg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.1.tgz", + "integrity": "sha512-SxLvSKf9gk4Rvt3p2KRQWVQ3sVj7S37rjlCHwp2+xNcRO/X+Uw0idbkfOtciUpjghHIxyggqcrrKhThQ+vClLQ==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", "slash": "^3.0.0" }, "dependencies": { @@ -20366,16 +20366,16 @@ } }, "@jest/core": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.0.tgz", - "integrity": "sha512-9qljprspjQwbmnq3Wv9d/M6/ejMdWs1uAAljQAX9QsjJ1SlSByXw1mRA9UpR2BP9TxLLwEembbm0ykrT//2STg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.1.tgz", + "integrity": "sha512-EcFrXkYh8I1GYHRH9V4TU7jr4P6ckaPqGo/z4AIJjHDZxicjYgWB6fx1xFb5bhEM87eUjCF4FAY5t+RamLWQmA==", "dev": true, "requires": { - "@jest/console": "^29.0.0", - "@jest/reporters": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/reporters": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -20383,20 +20383,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-message-util": "^29.0.0", + "jest-config": "^29.0.1", + "jest-haste-map": "^29.0.1", + "jest-message-util": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-resolve-dependencies": "^29.0.0", - "jest-runner": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", - "jest-watcher": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-resolve-dependencies": "^29.0.1", + "jest-runner": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", + "jest-watcher": "^29.0.1", "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -20453,73 +20453,73 @@ } }, "@jest/environment": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.0.tgz", - "integrity": "sha512-ZHLvUENMAnwXowtyhmPRS0QLCXM4TS0ZfuiSR4QfRsJVN5lG4KdBDvI9kHJe/21vrgzPVOkvI7IBnkyPFCbV7g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.1.tgz", + "integrity": "sha512-iLcFfoq2K6DAB+Mc+2VNLzZVmHdwQFeSqvoM/X8SMON6s/+yEi1iuRX3snx/JfwSnvmiMXjSr0lktxNxOcqXYA==", "dev": true, "requires": { - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", - "jest-mock": "^29.0.0" + "jest-mock": "^29.0.1" } }, "@jest/expect": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.0.tgz", - "integrity": "sha512-X2S5NpZOeXXDGBLvU/4K1nAD5iIz6/9Gs041wToI0FiX3glh/aEGGsVv3+SxKddYIb6Ei+ZbqzJmfRzQ7nwPlQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.1.tgz", + "integrity": "sha512-qKB3q52XDV8VUEiqKKLgLrJx7puQ8sYVqIDlul6n7SIXWS97DOK3KqbR2rDDaMtmenRHqEUl2fI+aFzx0oSemA==", "dev": true, "requires": { - "expect": "^29.0.0", - "jest-snapshot": "^29.0.0" + "expect": "^29.0.1", + "jest-snapshot": "^29.0.1" } }, "@jest/expect-utils": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.0.tgz", - "integrity": "sha512-odQ+cjUpui6++a9Ua/oWn7CG0Af+EZe9weWZbfUQHTg7C3K9PCb0AnD4X7nyAe4WjfeZmVVyG5SJELMQaUbCtg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.1.tgz", + "integrity": "sha512-Tw5kUUOKmXGQDmQ9TSgTraFFS7HMC1HG/B7y0AN2G2UzjdAXz9BzK2rmNpCSDl7g7y0Gf/VLBm//blonvhtOTQ==", "dev": true, "requires": { "jest-get-type": "^29.0.0" } }, "@jest/fake-timers": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.0.tgz", - "integrity": "sha512-4tqH5fT9H0+Ms3Z1HLZ/JfpzJluep2Zo3uuj0KPyu6IIyYSHCDfkXuiBQNWUGvumZDLQ2Si03cC7Gq0r73VgVg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.1.tgz", + "integrity": "sha512-XZ+kAhLChVQ+KJNa5034p7O1Mz3vtWrelxDcMoxhZkgqmWDaEQAW9qJeutaeCfPvwaEwKYVyKDYfWpcyT8RiMw==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-message-util": "^29.0.1", + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1" } }, "@jest/globals": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.0.tgz", - "integrity": "sha512-ZHQMh6BZtabbikh9wkuPpVQmPHEpc4EgOaY/UJNM6hHHA5HRmiP5rH54M8267nkGscuqM5KpWP+zAZ4XEOXZag==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.1.tgz", + "integrity": "sha512-BtZWrVrKRKNUt7T1H2S8Mz31PN7ItROCmH+V5pn10hJDUfjOCTIUwb0WtLZzm0f1tJ3Uvx+5lVZrF/VTKqNaFg==", "dev": true, "requires": { - "@jest/environment": "^29.0.0", - "@jest/expect": "^29.0.0", - "@jest/types": "^29.0.0", - "jest-mock": "^29.0.0" + "@jest/environment": "^29.0.1", + "@jest/expect": "^29.0.1", + "@jest/types": "^29.0.1", + "jest-mock": "^29.0.1" } }, "@jest/reporters": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.0.tgz", - "integrity": "sha512-6ZFLlHQwncULTucAKWeGJLGPvzjgC/0gFmxJi/LgU9G1v498r/RcWQiZBPqhJcSvpWGTCaqjvUGmPCLtrUpubw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.1.tgz", + "integrity": "sha512-dM3L8JmYYOsdeXUUVZClQy67Tz/v1sMo9h4AQv2U+716VLHV0zdA6Hh4FQNAHMhYw/95dbZbPX8Q+TRR7Rw+wA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -20532,9 +20532,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", + "jest-worker": "^29.0.1", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -20583,9 +20583,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "requires": { "@types/node": "*", @@ -20636,46 +20636,46 @@ } }, "@jest/test-result": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.0.tgz", - "integrity": "sha512-mv76j8ILaqOuZAWBGR1/ZSRinN5Q/eEji7kMcvADjd+gQGfn/Py+91nUrVakJT69idC66bvQ7yF24frQpzFKUg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.1.tgz", + "integrity": "sha512-XCA4whh/igxjBaR/Hg8qwFd/uTsauoD7QAdAYUjV2CSGx0+iunhjoCRRWTwqjQrETRqOJABx6kNfw0+C0vMSgQ==", "dev": true, "requires": { - "@jest/console": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/types": "^29.0.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.0.tgz", - "integrity": "sha512-uL6yX//SUME1c/ucbY365obdsrPjvSoNBwB80WTe+drYL4jf7A87vA2+w4hYwXJEIGQspv5skg3iB/sJSys7ew==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.1.tgz", + "integrity": "sha512-3GhSBMCRcWXGluP2Dw7CLP6mNke/t+EcftF5YjzhX1BJmqcatMbtZVwjuCfZy0TCME1GevXy3qTyV5PLpwIFKQ==", "dev": true, "requires": { - "@jest/test-result": "^29.0.0", + "@jest/test-result": "^29.0.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.0.tgz", - "integrity": "sha512-hwyBt8UR5o8GGaphmRqNQwVCctiOR8ncugCp/RlInEZvQ+ysKkS5TFfe5RgeQ0KtKdWByQqn5yA574LLOp3OWw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.1.tgz", + "integrity": "sha512-6UxXtqrPScFdDhoip8ys60dQAIYppQinyR87n9nlasR/ZnFfJohKToqzM29KK4gb9gHRv5oDFChdqZKE0SIhsg==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-util": "^29.0.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -20734,9 +20734,9 @@ } }, "@jest/types": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.0.tgz", - "integrity": "sha512-ErShruvByUF7vphEtPugMAphCtDIDdfWh3DxpBLxPEtHhL/H5MaidHsOutnOUhKpPL7QA6/7GitjFgLOLeGa1A==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.1.tgz", + "integrity": "sha512-ft01rxzVsbh9qZPJ6EFgAIj3PT9FCRfBF9Xljo2/33VDOUjLZr0ZJ2oKANqh9S/K0/GERCsHDAQlBwj7RxA+9g==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", @@ -22010,12 +22010,12 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "babel-jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.0.tgz", - "integrity": "sha512-EJM2dqxz9+uWJLLucZLPYAmRsHHt1IMkitAHGqjDlIP2IQXzkIMO3ATbBWk0lU6VwX4rNeVN04t/DDB8U5C2rg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.1.tgz", + "integrity": "sha512-wyI9r8tqwsZEMWiIaYjdUJ6ztZIO4DMWpGq7laW34wR71WtRS+D/iBEtXOP5W2aSYCVUQMsypRl/xiJYZznnTg==", "dev": true, "requires": { - "@jest/transform": "^29.0.0", + "@jest/transform": "^29.0.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.0.0", @@ -25108,16 +25108,16 @@ "dev": true }, "expect": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.0.tgz", - "integrity": "sha512-OKAHGwaBqZ6I7bas0cnrrvomEL2d0yp2XXYQhhnVHfaqDaKStUBxjWtlGu/uI2tBqwb9sBMvaS41DSJFsRRJHQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.1.tgz", + "integrity": "sha512-yQgemsjLU+1S8t2A7pXT3Sn/v5/37LY8J+tocWtKEA0iEYYc6gfKbbJJX2fxHZmd7K9WpdbQqXUpmYkq1aewYg==", "dev": true, "requires": { - "@jest/expect-utils": "^29.0.0", + "@jest/expect-utils": "^29.0.1", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0" + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1" } }, "express": { @@ -26545,15 +26545,15 @@ } }, "jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.0.tgz", - "integrity": "sha512-9uz4Tclskb8WrfRXqu66FsFCFoyYctwWXpruKwnD95FZqkyoEAA1oGH53HUn7nQx7uEgZTKdNl/Yo6DqqU+XMg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.1.tgz", + "integrity": "sha512-liHkwzaW6iwQyhRBFj0A4ZYKcsQ7ers1s62CCT95fPeNzoxT/vQRWwjTT4e7jpSCwrvPP2t1VESuy7GrXcr2ug==", "dev": true, "requires": { - "@jest/core": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/core": "^29.0.1", + "@jest/types": "^29.0.1", "import-local": "^3.0.2", - "jest-cli": "^29.0.0" + "jest-cli": "^29.0.1" } }, "jest-changed-files": { @@ -26567,28 +26567,28 @@ } }, "jest-circus": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.0.tgz", - "integrity": "sha512-6EX70/+ZdzPLShBeokMVIpUaq5cQpOsO4OCDiV1drKUHht0hmUOWvY6LE4pBSFdepB0Sukw4Y0ajRqtvLBO9/A==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.1.tgz", + "integrity": "sha512-I5J4LyK3qPo8EnqPmxsMAVR+2SFx7JOaZsbqW9xQmk4UDmTCD92EQgS162Ey3Jq6CfpKJKFDhzhG3QqiE0fRbw==", "dev": true, "requires": { - "@jest/environment": "^29.0.0", - "@jest/expect": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/expect": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", + "jest-each": "^29.0.1", + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", "p-limit": "^3.1.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -26645,21 +26645,21 @@ } }, "jest-cli": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.0.tgz", - "integrity": "sha512-VZUPQjWJKL8QABFiBk1tHeJ3czBodjU9r22ceQmeL7X8/M73FYxTte0RkYPHI2SiLPWy99GZNWA+oOu9x0xKOA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.1.tgz", + "integrity": "sha512-XozBHtoJCS6mnjCxNESyGm47Y4xSWzNlBJj4tix9nGrG6m068B83lrTWKtjYAenYSfOqyYVpQCkyqUp35IT+qA==", "dev": true, "requires": { - "@jest/core": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/core": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-config": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -26716,31 +26716,31 @@ } }, "jest-config": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.0.tgz", - "integrity": "sha512-RbcUgQBJDS0O8OThWUwm5UCfzo0zOymUX/cJzUNlYB1ZWqe3M8MFEcgwqgZSifYuYTi46xWu5cmkMiyRQAdnMw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.1.tgz", + "integrity": "sha512-3duIx5ucEPIsUOESDTuasMfqHonD0oZRjqHycIMHSC4JwbvHDjAWNKN/NiM0ZxHXjAYrMTLt2QxSQ+IqlbYE5A==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", + "@jest/test-sequencer": "^29.0.1", + "@jest/types": "^29.0.1", + "babel-jest": "^29.0.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.0", - "jest-environment-node": "^29.0.0", + "jest-circus": "^29.0.1", + "jest-environment-node": "^29.0.1", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-runner": "^29.0.0", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-runner": "^29.0.1", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -26797,15 +26797,15 @@ } }, "jest-diff": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.0.tgz", - "integrity": "sha512-erkuYf1dQBHow3XJmS+bH6t9TZ0GwrSdQGauN8sTqyZlFByOjRadmHgTTcAHINeeSwxzGHN2ob3PXVvZphD7XQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.1.tgz", + "integrity": "sha512-l8PYeq2VhcdxG9tl5cU78ClAlg/N7RtVSp0v3MlXURR0Y99i6eFnegmasOandyTmO6uEdo20+FByAjBFEO9nuw==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "dependencies": { "ansi-styles": { @@ -26869,16 +26869,16 @@ } }, "jest-each": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.0.tgz", - "integrity": "sha512-ACKRvqdo7Bc0YrjQbrQtokpQ2NZxdXA63OklJht7a9UarCJXlZeWh51wEUe0ORqbnu15nAnX1YFQHmVpS1+ZXA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.1.tgz", + "integrity": "sha512-UmCZYU9LPvRfSDoCrKJqrCNmgTYGGb3Ga6IVsnnVjedBTRRR9GJMca7UmDKRrJ1s+U632xrVtiRD27BxaG1aaQ==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.0", - "pretty-format": "^29.0.0" + "jest-util": "^29.0.1", + "pretty-format": "^29.0.1" }, "dependencies": { "ansi-styles": { @@ -26949,17 +26949,17 @@ } }, "jest-environment-node": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.0.tgz", - "integrity": "sha512-Cns21Vgu0z7LjtssL0SWkxmjclHdwXeECFAP3ONit5NPnGCbv+0Rqby8w9vK7NpFlUaFgMmLYYBsUjSmIhwpvg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.1.tgz", + "integrity": "sha512-PcIRBrEBFAPBqkbL53ZpEvTptcAnOW6/lDfqBfACMm3vkVT0N7DcfkH/hqNSbDmSxzGr0FtJI6Ej3TPhveWCMA==", "dev": true, "requires": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0" + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1" } }, "jest-get-type": { @@ -26969,12 +26969,12 @@ "dev": true }, "jest-haste-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.0.tgz", - "integrity": "sha512-mLyDt2WyNU0DZ64s7kRFkFJzrHEuXIxG+OKOs9/P5s1W7NzXE+P7SvLbxjz2Cg63cJjuglYRrD6fZcYf19T8Lw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.1.tgz", + "integrity": "sha512-gcKOAydafpGoSBvcj/mGCfhOKO8fRLkAeee1KXGdcJ1Pb9O2nnOl4I8bQSIID2MaZeMHtLLgNboukh/pUGkBtg==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", @@ -26982,8 +26982,8 @@ "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-util": "^29.0.1", + "jest-worker": "^29.0.1", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -26995,49 +26995,47 @@ "dev": true }, "jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } }, "jest-leak-detector": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.0.tgz", - "integrity": "sha512-kBjNS0/z2+ZV/3N7R+ot5fKD2W1fHkoxC3kH/fkb2z24YSPfR9RGwiNX+YLRG9r0gWsxQx16boxzHT23G6rFBw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.1.tgz", + "integrity": "sha512-5tISHJphB+sCmKXtVHJGQGltj7ksrLLb9vkuNWwFR86Of1tfzjskvrrrZU1gSzEfWC+qXIn4tuh8noKHYGMIPA==", "dev": true, "requires": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" } }, "jest-matcher-utils": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.0.tgz", - "integrity": "sha512-HtCxFHI8lQSbN1RppFjtl6DIrS+x4d3lOhpJljVxFEXob4lxlKon3FunW0XoGxNSvIoD00AfTFspnufpOqszrg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.1.tgz", + "integrity": "sha512-/e6UbCDmprRQFnl7+uBKqn4G22c/OmwriE5KCMVqxhElKCQUDcFnq5XM9iJeKtzy4DUjxT27y9VHmKPD8BQPaw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.0.0", + "jest-diff": "^29.0.1", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "dependencies": { "ansi-styles": { @@ -27092,18 +27090,18 @@ } }, "jest-message-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.0.tgz", - "integrity": "sha512-4U0RdNV0TBTgVGzEchjryEpq4sqLO3gUQT7TEIbO5+q0K5MuiofOPcXk4GLpWviWByMRJjliQNMuzJ4YGT+oGQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.1.tgz", + "integrity": "sha512-wRMAQt3HrLpxSubdnzOo68QoTfQ+NLXFzU0Heb18ZUzO2S9GgaXNEdQ4rpd0fI9dq2NXkpCk1IUWSqzYKji64A==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -27160,12 +27158,12 @@ } }, "jest-mock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.0.tgz", - "integrity": "sha512-0AWznVt415KMCxcJPaE2+tWaruw0w8aRrKH1Y/NZUx3+Pd9f20jQjUR82iHqGSuYS4EOHL9uI8SjAhJk+ET91g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.1.tgz", + "integrity": "sha512-i1yTceg2GKJwUNZFjIzrH7Y74fN1SKJWxQX/Vu3LT4TiJerFARH5l+4URNyapZ+DNpchHYrGOP2deVbn3ma8JA==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*" } }, @@ -27183,17 +27181,17 @@ "dev": true }, "jest-resolve": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.0.tgz", - "integrity": "sha512-MN19maPUXzibBshYg/cSrDWqiJwEBur6gbQb2lwOL4+6k14wdNW8Xh0uNPPxUntb7cpTi07uql/bUO5TVwiJbA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.1.tgz", + "integrity": "sha512-dwb5Z0lLZbptlBtPExqsHfdDamXeiRLv4vdkfPrN84vBwLSWHWcXjlM2JXD/KLSQfljBcXbzI/PDvUJuTQ84Nw==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", + "jest-haste-map": "^29.0.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.0", - "jest-validate": "^29.0.0", + "jest-util": "^29.0.1", + "jest-validate": "^29.0.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -27251,40 +27249,40 @@ } }, "jest-resolve-dependencies": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.0.tgz", - "integrity": "sha512-1TYUMcLZcUqa2fdUQ3leYtiXWXfNmimPvnJ34YDLLf0nyJ/aEeqlHJM9Ji2jw9Qxdh7nUypanjUlUV87yRHBFQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.1.tgz", + "integrity": "sha512-fUGcYlSc1NzNz+tsHDjjG0rclw6blJcFZsLEsezxm/n54bAm9HFvJxgBuCV1CJQoPtIx6AfR+tXkR9lpWJs2LQ==", "dev": true, "requires": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.0" + "jest-snapshot": "^29.0.1" } }, "jest-runner": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.0.tgz", - "integrity": "sha512-OpTpRIBOIn9RXuMMrpS+h9ZoK+nZHaOuNOceUiDbDoOJ6pmeGu0zst7VR22xXT3fOCwWqg5qe0fZ23G+ve5P0Q==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.1.tgz", + "integrity": "sha512-XeFfPmHtO7HyZyD1uJeO4Oqa8PyTbDHzS1YdGrvsFXk/A5eXinbqA5a42VUEqvsKQgNnKTl5NJD0UtDWg7cQ2A==", "dev": true, "requires": { - "@jest/console": "^29.0.0", - "@jest/environment": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/console": "^29.0.1", + "@jest/environment": "^29.0.1", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-leak-detector": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-runtime": "^29.0.0", - "jest-util": "^29.0.0", - "jest-watcher": "^29.0.0", - "jest-worker": "^29.0.0", + "jest-environment-node": "^29.0.1", + "jest-haste-map": "^29.0.1", + "jest-leak-detector": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-resolve": "^29.0.1", + "jest-runtime": "^29.0.1", + "jest-util": "^29.0.1", + "jest-watcher": "^29.0.1", + "jest-worker": "^29.0.1", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -27330,9 +27328,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.0.tgz", - "integrity": "sha512-2t9Panx3F9N1wAvRuZT7xLEptRFc1C5G90DOHniIGz1JIgF9uhd5u8jNBsc7wN63lhnaiLeVLnNx21wT7OVFEQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", + "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", "dev": true, "requires": { "@types/node": "*", @@ -27373,31 +27371,31 @@ } }, "jest-runtime": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.0.tgz", - "integrity": "sha512-dU0qFpTRWZY7Rur7yBgpz4g67mITSozBZ1jlhoG4ER/P/NiTFyZ/W8nMd5floeAMafmbrOc/5A9SlCu7SQCoBA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.1.tgz", + "integrity": "sha512-yDgz5OE0Rm44PUAfTqwA6cDFnTYnVcYbRpPECsokSASQ0I5RXpnKPVr2g0CYZWKzbsXqqtmM7TIk7CAutZJ7gQ==", "dev": true, "requires": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/globals": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/globals": "^29.0.1", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/test-result": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-mock": "^29.0.0", + "jest-haste-map": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-mock": "^29.0.1", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.0", - "jest-snapshot": "^29.0.0", - "jest-util": "^29.0.0", + "jest-resolve": "^29.0.1", + "jest-snapshot": "^29.0.1", + "jest-util": "^29.0.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -27454,9 +27452,9 @@ } }, "jest-snapshot": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.0.tgz", - "integrity": "sha512-rR3B8GInk/IibF0M/sQCukSM8xX8bPI3Q0kjoAw4HT9Mx0Q3bS0MmF74rsreBOnVJgzN0Iwrc7YY56Yp8KQ7kA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.1.tgz", + "integrity": "sha512-OuYGp+lsh7RhB3DDX36z/pzrGm2F740e5ERG9PQpJyDknCRtWdhaehBQyMqDnsQdKkvC2zOcetcxskiHjO7e8Q==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -27465,23 +27463,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.0", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/expect-utils": "^29.0.1", + "@jest/transform": "^29.0.1", + "@jest/types": "^29.0.1", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.0", + "expect": "^29.0.1", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.0", + "jest-diff": "^29.0.1", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.0", - "jest-matcher-utils": "^29.0.0", - "jest-message-util": "^29.0.0", - "jest-util": "^29.0.0", + "jest-haste-map": "^29.0.1", + "jest-matcher-utils": "^29.0.1", + "jest-message-util": "^29.0.1", + "jest-util": "^29.0.1", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.0", + "pretty-format": "^29.0.1", "semver": "^7.3.5" }, "dependencies": { @@ -27546,12 +27544,12 @@ } }, "jest-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.0.tgz", - "integrity": "sha512-HMjW/pkFgi34LGKumjNDK03DYonV+nPMNUZ63rZX8PFdBkdIWUtOCEiaa7sAJkWrw5MyMVzSpa22NcOJjoQ3JQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.1.tgz", + "integrity": "sha512-GIWkgNfkeA9d84rORDHPGGTFBrRD13A38QVSKE0bVrGSnoR1KDn8Kqz+0yI5kezMgbT/7zrWaruWP1Kbghlb2A==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -27611,17 +27609,17 @@ } }, "jest-validate": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.0.tgz", - "integrity": "sha512-UhgDKmahJnv5s5MK6a8kQ397YNS9euvL7gWTvUf7y0OO7vZeafUItlq3tguvfFVazQJ+kBGUm/XCJes7V61l8g==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.1.tgz", + "integrity": "sha512-mS4q7F738YXZFWBPqE+NjHU/gEOs7IBIFQ8i9zq5EO691cLrUbLhFq4larf8/lNcmauRO71tn/+DTW2y+MrLow==", "dev": true, "requires": { - "@jest/types": "^29.0.0", + "@jest/types": "^29.0.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.0" + "pretty-format": "^29.0.1" }, "dependencies": { "ansi-styles": { @@ -27682,18 +27680,18 @@ } }, "jest-watcher": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.0.tgz", - "integrity": "sha512-GoRq5QJt5/dv3keK7rIzg9R0e/HpTnjyMNYtCTTDZgGIj6QUDMpiJqt7Mwfyyaxwg5PS8gVyQvRQn6Lril4cuQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.1.tgz", + "integrity": "sha512-0LBWDL3sZ+vyHRYxjqm2irhfwhUXHonjLSbd0oDeGq44U1e1uUh3icWNXYF8HO/UEnOoa6+OJDncLUXP2Hdg9A==", "dev": true, "requires": { - "@jest/test-result": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/test-result": "^29.0.1", + "@jest/types": "^29.0.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.0", + "jest-util": "^29.0.1", "string-length": "^4.0.1" }, "dependencies": { @@ -29950,9 +29948,9 @@ "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==" }, "pretty-format": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.0.tgz", - "integrity": "sha512-tMkFRn1vxRwZdiDETcveuNeonRKDg4doOvI+iyb1sOAtxYioGzRicqnsr+d3C/lLv9hBiM/2lDBi5ilR81h2bQ==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.1.tgz", + "integrity": "sha512-iTHy3QZMzuL484mSTYbQIM1AHhEQsH8mXWS2/vd2yFBYnG3EBqGiMONo28PlPgrW7P/8s/1ISv+y7WH306l8cw==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index a8cb43b3f79e..7066b5069626 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.0", + "jest": "^29.0.1", "jest-environment-jsdom": "^29.0.0", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", From 375fa50f42e79f5e704a6a0b4550ab9070ff0a0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 11:20:30 +0000 Subject: [PATCH 191/723] Bump jest-environment-jsdom in /apps/block_scout_web/assets Bumps [jest-environment-jsdom](https://github.com/facebook/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.0.0 to 29.0.1. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.1/packages/jest-environment-jsdom) --- updated-dependencies: - dependency-name: jest-environment-jsdom dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 34 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index a18c11252616..3fb9d8561fcd 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -80,7 +80,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.1", - "jest-environment-jsdom": "^29.0.0", + "jest-environment-jsdom": "^29.0.1", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", @@ -10889,18 +10889,18 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.0.tgz", - "integrity": "sha512-NVBXMAEbNrgln2of0OtDhfT18Ohl9DZKkjsNgGKWOWmo3TZwHSG6MRw7XE3RQh/SH69a8vVlf4g2cQHgXdQFBg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.1.tgz", + "integrity": "sha512-rMF501kfui+bw4AmwowLA2bNaYb633A3ejFMN5pVU0AeOqLv2NbMAY5XzzlMr/+lM1itEf+3ZdCr9dGGrUfoxg==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0", + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1", "jsdom": "^20.0.0" }, "engines": { @@ -26933,18 +26933,18 @@ } }, "jest-environment-jsdom": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.0.tgz", - "integrity": "sha512-NVBXMAEbNrgln2of0OtDhfT18Ohl9DZKkjsNgGKWOWmo3TZwHSG6MRw7XE3RQh/SH69a8vVlf4g2cQHgXdQFBg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.1.tgz", + "integrity": "sha512-rMF501kfui+bw4AmwowLA2bNaYb633A3ejFMN5pVU0AeOqLv2NbMAY5XzzlMr/+lM1itEf+3ZdCr9dGGrUfoxg==", "dev": true, "requires": { - "@jest/environment": "^29.0.0", - "@jest/fake-timers": "^29.0.0", - "@jest/types": "^29.0.0", + "@jest/environment": "^29.0.1", + "@jest/fake-timers": "^29.0.1", + "@jest/types": "^29.0.1", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.0", - "jest-util": "^29.0.0", + "jest-mock": "^29.0.1", + "jest-util": "^29.0.1", "jsdom": "^20.0.0" } }, diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 7066b5069626..87c53adda406 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -92,7 +92,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.1", - "jest-environment-jsdom": "^29.0.0", + "jest-environment-jsdom": "^29.0.1", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", From 84e4fd058be9cf68d9b88a54ebc6a145ef68c54a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 10:59:37 +0000 Subject: [PATCH 192/723] Bump jquery from 3.6.0 to 3.6.1 in /apps/block_scout_web/assets Bumps [jquery](https://github.com/jquery/jquery) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](https://github.com/jquery/jquery/compare/3.6.0...3.6.1) --- updated-dependencies: - dependency-name: jquery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 3fb9d8561fcd..d1a479b74dad 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -23,7 +23,7 @@ "highlight.js": "^11.6.0", "https-browserify": "^1.0.0", "humps": "^2.0.1", - "jquery": "^3.4.0", + "jquery": "^3.6.1", "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", @@ -12004,9 +12004,9 @@ } }, "node_modules/jquery": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", + "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==" }, "node_modules/js-base64": { "version": "2.6.4", @@ -27775,9 +27775,9 @@ } }, "jquery": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", + "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==" }, "js-base64": { "version": "2.6.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 87c53adda406..2e3d36660574 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -35,7 +35,7 @@ "highlight.js": "^11.6.0", "https-browserify": "^1.0.0", "humps": "^2.0.1", - "jquery": "^3.4.0", + "jquery": "^3.6.1", "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", From 6baa3f5c3fa0ddd7930925cd3d056ad4f1353281 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 11:33:16 +0000 Subject: [PATCH 193/723] Bump web3modal from 1.9.8 to 1.9.9 in /apps/block_scout_web/assets Bumps [web3modal](https://github.com/web3modal/web3modal) from 1.9.8 to 1.9.9. - [Release notes](https://github.com/web3modal/web3modal/releases) - [Commits](https://github.com/web3modal/web3modal/commits) --- updated-dependencies: - dependency-name: web3modal dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d1a479b74dad..eaab6c3bac04 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -62,7 +62,7 @@ "url": "^0.11.0", "util": "^0.12.3", "web3": "^1.7.0", - "web3modal": "^1.9.8", + "web3modal": "^1.9.9", "xss": "^1.0.14" }, "devDependencies": { @@ -18151,9 +18151,9 @@ } }, "node_modules/web3modal": { - "version": "1.9.8", - "resolved": "https://registry.npmjs.org/web3modal/-/web3modal-1.9.8.tgz", - "integrity": "sha512-ruYsh4TV1SUAljBW/Pd4itW2idKlo9xr/g2dKhBDdaafWNCVdpaK92cQ7EM53rg2KQHWJhqj1IThbv7cPV7ayA==", + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/web3modal/-/web3modal-1.9.9.tgz", + "integrity": "sha512-ML1C4xH+JTSHHkKbjxuF+f5B3cDUOCnrdQZ8Mlzippq7zRKHf3NBeuIvDdNjtVclJ2S4zYYVmVqRWrgB11ej8A==", "dependencies": { "detect-browser": "^5.1.0", "prop-types": "^15.7.2", @@ -32546,9 +32546,9 @@ } }, "web3modal": { - "version": "1.9.8", - "resolved": "https://registry.npmjs.org/web3modal/-/web3modal-1.9.8.tgz", - "integrity": "sha512-ruYsh4TV1SUAljBW/Pd4itW2idKlo9xr/g2dKhBDdaafWNCVdpaK92cQ7EM53rg2KQHWJhqj1IThbv7cPV7ayA==", + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/web3modal/-/web3modal-1.9.9.tgz", + "integrity": "sha512-ML1C4xH+JTSHHkKbjxuF+f5B3cDUOCnrdQZ8Mlzippq7zRKHf3NBeuIvDdNjtVclJ2S4zYYVmVqRWrgB11ej8A==", "requires": { "detect-browser": "^5.1.0", "prop-types": "^15.7.2", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 2e3d36660574..df2123b3b037 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -74,7 +74,7 @@ "url": "^0.11.0", "util": "^0.12.3", "web3": "^1.7.0", - "web3modal": "^1.9.8", + "web3modal": "^1.9.9", "xss": "^1.0.14" }, "devDependencies": { From 3f7fba38481d6fdc1be352c0c470c5f3ca0de740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:54:29 +0000 Subject: [PATCH 194/723] Bump luxon from 3.0.1 to 3.0.3 in /apps/block_scout_web/assets Bumps [luxon](https://github.com/moment/luxon) from 3.0.1 to 3.0.3. - [Release notes](https://github.com/moment/luxon/releases) - [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md) - [Commits](https://github.com/moment/luxon/compare/3.0.1...3.0.3) --- updated-dependencies: - dependency-name: luxon dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index eaab6c3bac04..6483f808598f 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -43,7 +43,7 @@ "lodash.omit": "^4.5.0", "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", - "luxon": "^3.0.1", + "luxon": "^3.0.3", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", @@ -12640,9 +12640,9 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "node_modules/luxon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.1.tgz", - "integrity": "sha512-hF3kv0e5gwHQZKz4wtm4c+inDtyc7elkanAsBq+fundaCdUBNJB1dHEGUZIM6SfSBUlbVFduPwEtNjFK8wLtcw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.3.tgz", + "integrity": "sha512-+EfHWnF+UT7GgTnq5zXg3ldnTKL2zdv7QJgsU5bjjpbH17E3qi/puMhQyJVYuCq+FRkogvB5WB6iVvUr+E4a7w==", "engines": { "node": ">=12" } @@ -28325,9 +28325,9 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "luxon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.1.tgz", - "integrity": "sha512-hF3kv0e5gwHQZKz4wtm4c+inDtyc7elkanAsBq+fundaCdUBNJB1dHEGUZIM6SfSBUlbVFduPwEtNjFK8wLtcw==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.0.3.tgz", + "integrity": "sha512-+EfHWnF+UT7GgTnq5zXg3ldnTKL2zdv7QJgsU5bjjpbH17E3qi/puMhQyJVYuCq+FRkogvB5WB6iVvUr+E4a7w==" }, "make-dir": { "version": "3.1.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index df2123b3b037..aedfd1252fc3 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -55,7 +55,7 @@ "lodash.omit": "^4.5.0", "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", - "luxon": "^3.0.1", + "luxon": "^3.0.3", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", From f8a996100f9e2319110f730c0654972c6c69313b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:54:36 +0000 Subject: [PATCH 195/723] Bump ex_cldr from 2.33.1 to 2.33.2 Bumps [ex_cldr](https://github.com/elixir-cldr/cldr) from 2.33.1 to 2.33.2. - [Release notes](https://github.com/elixir-cldr/cldr/releases) - [Changelog](https://github.com/elixir-cldr/cldr/blob/master/CHANGELOG.md) - [Commits](https://github.com/elixir-cldr/cldr/compare/v2.33.1...v2.33.2) --- updated-dependencies: - dependency-name: ex_cldr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index c49c0f36899a..9ac5608ee2a6 100644 --- a/mix.lock +++ b/mix.lock @@ -39,7 +39,7 @@ "elixir_make": {:hex, :elixir_make, "0.6.3", "bc07d53221216838d79e03a8019d0839786703129599e9619f4ab74c8c096eac", [:mix], [], "hexpm", "f5cbd651c5678bcaabdbb7857658ee106b12509cd976c2c2fca99688e1daf716"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_abi": {:hex, :ex_abi, "0.5.11", "a53307cf796231bf068a9941d57fbcb8654e72042c2a113a49f08dfb248875fb", [:mix], [{:ex_keccak, "~> 0.4.0", [hex: :ex_keccak, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e128577740bdc0f05ed6841cbb1c88bb80377613970ed870fa052b780870655a"}, - "ex_cldr": {:hex, :ex_cldr, "2.33.1", "fc8e09aa1b9eb81ed90d7bfe2b670f86c71221b370172a3aef35da613fcd4e14", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.18", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "90502e903d772fc36cc3cd74c194d2870b41e85e14af206dab5430f2cdf0f395"}, + "ex_cldr": {:hex, :ex_cldr, "2.33.2", "8adc4df3985e7f5d1d55cbbf72f993569de20eff5012ff3ea9412753961d4c00", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.18", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.19", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: true]}], "hexpm", "fd81a7147b4ed86c0c44c0251444cb8d1defccc7b33b89067ca1635f23e9fbf8"}, "ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.14.1", "87102f426439264229854ded5b723a617bc194ca01dd53fa85afc28399faee1d", [:mix], [{:ex_cldr, "~> 2.27", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "da0a864ed43ade93c44d62170ea9c157c5abb20a01cc0270ac47cd51e045de00"}, "ex_cldr_lists": {:hex, :ex_cldr_lists, "2.10.0", "4d4c9877da2d0417fd832907d69974e8328969f75fafc79b05ccf85f549f6281", [:mix], [{:ex_cldr_numbers, "~> 2.25", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "adc040cde7b97f7fd7c0b35dd69ddb6fcf607303ae6355bb1851deae1f8b0652"}, "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.27.2", "d1400a0502fb66ab3abcce3d10d5d11efcfc786eafe1c442ea2ddf834670d743", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:digital_token, "~> 0.3 or ~> 1.0", [hex: :digital_token, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.28", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.13", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "f682f46193e1793a3a98cc636314e9bea483da0925eb47935a39c4feef79e364"}, From 48235ea7ff3cc7a765cd4f7bc69bc644e569b8d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:55:11 +0000 Subject: [PATCH 196/723] Bump eslint from 8.22.0 to 8.23.0 in /apps/block_scout_web/assets Bumps [eslint](https://github.com/eslint/eslint) from 8.22.0 to 8.23.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.22.0...v8.23.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 104 ++++++++++-------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 58 insertions(+), 48 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index eaab6c3bac04..31c128f3ec6e 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -73,7 +73,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.22.0", + "eslint": "^8.23.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -1807,14 +1807,14 @@ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -1824,6 +1824,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/argparse": { @@ -1833,9 +1836,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2315,6 +2318,19 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -7120,14 +7136,15 @@ } }, "node_modules/eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", - "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", + "@eslint/eslintrc": "^1.3.1", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -7137,7 +7154,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -7162,8 +7179,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -7773,9 +7789,9 @@ } }, "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -17591,12 +17607,6 @@ "uuid": "bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -19926,14 +19936,14 @@ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -19949,9 +19959,9 @@ "dev": true }, "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -20224,6 +20234,12 @@ "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", "dev": true }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -24041,14 +24057,15 @@ } }, "eslint": { - "version": "8.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", - "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", + "@eslint/eslintrc": "^1.3.1", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -24058,7 +24075,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -24083,8 +24100,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -24503,9 +24519,9 @@ "dev": true }, "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -32057,12 +32073,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index df2123b3b037..268657ca8308 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -85,7 +85,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.22.0", + "eslint": "^8.23.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", From 510e7f52eb0e1b69f82744dbb2936608c376b817 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Mon, 29 Aug 2022 15:14:56 +0500 Subject: [PATCH 197/723] Disable archive balances by env Add disable archive balances env Add filtering requests by tag Update CHANGELOG.md Add tests --- CHANGELOG.md | 1 + apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex | 13 +++- .../test/ethereum_jsonrpc_test.exs | 62 +++++++++++++++++++ config/runtime.exs | 3 +- docker-compose/envs/common-blockscout.env | 1 + docker/Makefile | 3 + 6 files changed, 81 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fa6833a210..050899668d72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - [#5968](https://github.com/blockscout/blockscout/pull/5968) - Add call type in the response of txlistinternal API method - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) +- [#6001](https://github.com/blockscout/blockscout/pull/6001) - Add ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES env var that filters requests and query node only if the block quantity is "latest" ### Fixes - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex index ab6399f93061..3f64a2b99104 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex @@ -184,7 +184,18 @@ defmodule EthereumJSONRPC do ) :: {:ok, FetchedBalances.t()} | {:error, reason :: term} def fetch_balances(params_list, json_rpc_named_arguments) when is_list(params_list) and is_list(json_rpc_named_arguments) do - id_to_params = id_to_params(params_list) + filtered_params = + if Application.get_env(:ethereum_jsonrpc, :disable_archive_balances?) do + params_list + |> Enum.filter(fn + %{block_quantity: "latest"} -> true + _ -> false + end) + else + params_list + end + + id_to_params = id_to_params(filtered_params) with {:ok, responses} <- id_to_params diff --git a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc_test.exs b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc_test.exs index 75827da43878..ea513d560d00 100644 --- a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc_test.exs +++ b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc_test.exs @@ -913,3 +913,65 @@ defmodule EthereumJSONRPCTest do end end end + +defmodule EthereumJSONRPCSyncTest do + use EthereumJSONRPC.Case, async: false + + import EthereumJSONRPC.Case + import Mox + + alias EthereumJSONRPC.FetchedBalances + setup :verify_on_exit! + + @moduletag :capture_log + + describe "fetch_balances/1" do + setup do + initial_env = Application.get_all_env(:indexer) + on_exit(fn -> Application.put_all_env([{:indexer, initial_env}]) end) + end + + test "ignores all request with block_quantity != latest when env ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES is true", + %{ + json_rpc_named_arguments: json_rpc_named_arguments + } do + hash = "0x8bf38d4764929064f2d4d3a56520a76ab3df415b" + expected_fetched_balance = 1 + + expect(EthereumJSONRPC.Mox, :json_rpc, 1, fn [ + %{ + id: 0, + jsonrpc: "2.0", + method: "eth_getBalance", + params: [^hash, "latest"] + } + ], + _options -> + {:ok, [%{id: 0, result: EthereumJSONRPC.integer_to_quantity(expected_fetched_balance)}]} + end) + + Application.put_env(:ethereum_jsonrpc, :disable_archive_balances?, "true") + + assert EthereumJSONRPC.fetch_balances( + [ + %{block_quantity: "0x1", hash_data: hash}, + %{block_quantity: "0x2", hash_data: hash}, + %{block_quantity: "0x3", hash_data: hash}, + %{block_quantity: "0x4", hash_data: hash}, + %{block_quantity: "latest", hash_data: hash} + ], + json_rpc_named_arguments + ) == + {:ok, + %FetchedBalances{ + params_list: [ + %{ + address_hash: hash, + block_number: :error, + value: expected_fetched_balance + } + ] + }} + end + end +end diff --git a/config/runtime.exs b/config/runtime.exs index 9405efe3cce7..59fecb56317e 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -146,7 +146,8 @@ config :block_scout_web, BlockScoutWeb.Chain.Address.CoinBalance, config :ethereum_jsonrpc, rpc_transport: if(System.get_env("ETHEREUM_JSONRPC_TRANSPORT", "http") == "http", do: :http, else: :ipc), - ipc_path: System.get_env("IPC_PATH") + ipc_path: System.get_env("IPC_PATH"), + disable_archive_balances?: System.get_env("ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES", "false") == "true" debug_trace_transaction_timeout = System.get_env("ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT", "5s") config :ethereum_jsonrpc, EthereumJSONRPC.Geth, debug_trace_transaction_timeout: debug_trace_transaction_timeout diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 73fb2b2329de..037dd823fd5d 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -9,6 +9,7 @@ LOGO=/images/blockscout_logo.svg LOGO_FOOTER=/images/blockscout_logo.svg # ETHEREUM_JSONRPC_WS_URL= ETHEREUM_JSONRPC_TRANSPORT=http +ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=false IPC_PATH= NETWORK_PATH=/ API_PATH=/ diff --git a/docker/Makefile b/docker/Makefile index 403680c9d415..f16843d91e3b 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -52,6 +52,9 @@ endif ifdef ETHEREUM_JSONRPC_TRANSPORT BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRANSPORT=$(ETHEREUM_JSONRPC_TRANSPORT)' endif +ifdef ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=$(ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES)' +endif ifdef IPC_PATH BLOCKSCOUT_CONTAINER_PARAMS += -e 'IPC_PATH=$(IPC_PATH)' endif From e6a607009504ca3641558383c40470dc777a7ce9 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 30 Aug 2022 12:29:01 +0300 Subject: [PATCH 198/723] Fix display of estimated addresses counter --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/chain.ex | 7 ++----- apps/explorer/lib/explorer/chain/address.ex | 10 ---------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fa6833a210..893cf1aa1d26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) ### Fixes +- [#6012](https://github.com/blockscout/blockscout/pull/6012) - Fix display of estimated addresses counter on the main page - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method - [#5977](https://github.com/blockscout/blockscout/pull/5977) - Fix address overview.html.eex in case of nil implementation address hash - [#5975](https://github.com/blockscout/blockscout/pull/5975) - Fix CSV export of internal transactions diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 9e34e7a28fac..ac9ff7acb626 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -159,7 +159,7 @@ defmodule Explorer.Chain do def address_estimated_count do cached_value = AddressesCounter.fetch() - if is_nil(cached_value) do + if is_nil(cached_value) || cached_value == 0 do %Postgrex.Result{rows: [[count]]} = Repo.query!("SELECT reltuples FROM pg_class WHERE relname = 'addresses';") count @@ -188,10 +188,7 @@ defmodule Explorer.Chain do while to have the return back. """ def count_addresses do - Repo.one( - Address.count(), - timeout: :infinity - ) + Repo.aggregate(Address, :count, timeout: :infinity) end @doc """ diff --git a/apps/explorer/lib/explorer/chain/address.ex b/apps/explorer/lib/explorer/chain/address.ex index 704b1c9f48c9..1a71d3e224ce 100644 --- a/apps/explorer/lib/explorer/chain/address.ex +++ b/apps/explorer/lib/explorer/chain/address.ex @@ -259,16 +259,6 @@ defmodule Explorer.Chain.Address do ) end - @doc """ - Counts all the addresses. - """ - def count do - from( - a in Address, - select: fragment("COUNT(*)") - ) - end - defimpl String.Chars do @doc """ Uses `hash` as string representation, formatting it according to the eip-55 specification From 2066c0753f2764a62ed42f40673ba70af285e46e Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 31 Aug 2022 00:03:42 +0300 Subject: [PATCH 199/723] Update chromedriver version --- .github/workflows/config.yml | 24 ++++++++++++------------ CHANGELOG.md | 1 + apps/block_scout_web/mix.exs | 2 +- bin/install_chrome_headless.sh | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 239d3416ac75..a10966c273b8 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -16,7 +16,7 @@ env: jobs: build-and-cache: name: Build and Cache deps - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: erlef/setup-beam@v1 @@ -81,7 +81,7 @@ jobs: credo: name: Credo - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -105,7 +105,7 @@ jobs: check_formatted: name: Code formatting checks - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -128,7 +128,7 @@ jobs: - run: mix format --check-formatted dialyzer: name: Dialyzer static analysis - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -168,7 +168,7 @@ jobs: gettext: name: Missing translation keys check - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -194,7 +194,7 @@ jobs: working-directory: "apps/block_scout_web" sobelow: name: Sobelow security analysis - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -222,7 +222,7 @@ jobs: working-directory: "apps/block_scout_web" eslint: name: ESLint - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -268,7 +268,7 @@ jobs: working-directory: apps/block_scout_web/assets jest: name: JS Tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache steps: - uses: actions/checkout@v2 @@ -306,7 +306,7 @@ jobs: test_parity_mox_ethereum_jsonrpc: name: EthereumJSONRPC Tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache services: postgres: @@ -362,7 +362,7 @@ jobs: ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" test_parity_mox_explorer: name: Explorer Tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache services: postgres: @@ -429,7 +429,7 @@ jobs: ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" test_parity_mox_indexer: name: Indexer Tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache services: postgres: @@ -490,7 +490,7 @@ jobs: test_parity_mox_block_scout_web: name: Blockscout Web Tests - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: build-and-cache services: postgres: diff --git a/CHANGELOG.md b/CHANGELOG.md index 844ac563d5e5..12885bc97b1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` ### Chore +- [#6018](https://github.com/blockscout/blockscout/pull/6018) - Update chromedriver version - [#5836](https://github.com/blockscout/blockscout/pull/5836) - Bump comeonin from 4.1.2 to 5.3.3 - [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets - [#5919](https://github.com/blockscout/blockscout/pull/5919) - Bump floki from 0.32.1 to 0.33.1 diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index ab1bde8fb7ff..55ab14dc4755 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -123,7 +123,7 @@ defmodule BlockScoutWeb.Mixfile do # `:spandex` tracing of `:phoenix` {:spandex_phoenix, "~> 1.0"}, {:timex, "~> 3.7.1"}, - {:wallaby, "~> 0.28", only: :test, runtime: false}, + {:wallaby, "~> 0.30", only: :test, runtime: false}, # `:cowboy` `~> 2.0` and Phoenix 1.4 compatibility {:websocket_client, "~> 1.3"}, {:wobserver, "~> 0.2.0", github: "poanetwork/wobserver", branch: "support-https"}, diff --git a/bin/install_chrome_headless.sh b/bin/install_chrome_headless.sh index c27512c776d6..1b365ed7a861 100755 --- a/bin/install_chrome_headless.sh +++ b/bin/install_chrome_headless.sh @@ -1,7 +1,7 @@ export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start # export CHROMEDRIVER_VERSION=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE` -export CHROMEDRIVER_VERSION=`92.0.4515.43` +export CHROMEDRIVER_VERSION=`104.0.5112.79` curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" unzip chromedriver_linux64.zip sudo chmod +x chromedriver From f6bb532b24852b8e479b0f37cd5497c979cbaba9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 06:27:33 +0000 Subject: [PATCH 200/723] Bump sass from 1.54.5 to 1.54.7 in /apps/block_scout_web/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.54.5 to 1.54.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.5...1.54.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index fc0e6009f1e4..50104a02468e 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -84,7 +84,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.5", + "sass": "^1.54.7", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", @@ -15862,9 +15862,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.54.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.5.tgz", - "integrity": "sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==", + "version": "1.54.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.7.tgz", + "integrity": "sha512-3q7MQz7sCpVG6TLhUfZwGOcd2/sm2ghYN2JEdRjNiW04ILdvahdo9GuAs+bxsxZ3hDCKv+wUT5w0iFWGU0CxlA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -30749,9 +30749,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.54.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.5.tgz", - "integrity": "sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==", + "version": "1.54.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.7.tgz", + "integrity": "sha512-3q7MQz7sCpVG6TLhUfZwGOcd2/sm2ghYN2JEdRjNiW04ILdvahdo9GuAs+bxsxZ3hDCKv+wUT5w0iFWGU0CxlA==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 43665647845e..ee761a00b04f 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -96,7 +96,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.5", + "sass": "^1.54.7", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", From ff914e43a3d7b9f49e8156922a0da7808109c01a Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 30 Aug 2022 23:46:49 +0300 Subject: [PATCH 201/723] Move "contract interaction" and "Add chain to MM" env vars to runtime --- .../publish-docker-image-every-push.yml | 4 --- .../publish-docker-image-release.yml | 4 --- CHANGELOG.md | 1 + .../assets/js/lib/add_chain_to_mm.js | 30 ++++++++++++------- .../assets/js/lib/smart_contract/connect.js | 6 ++-- apps/block_scout_web/assets/webpack.config.js | 6 +--- .../templates/address_token/_tokens.html.eex | 2 +- .../address_token_balance/_tokens.html.eex | 2 +- .../layout/_add_chain_to_mm.html.eex | 13 ++++++++ .../templates/layout/_footer.html.eex | 4 +-- .../templates/layout/_search.html.eex | 2 +- .../templates/search/_tile.html.eex | 2 +- .../templates/search/results.html.eex | 2 +- .../templates/tokens/_tile.html.eex | 2 +- .../templates/tokens/index.html.eex | 2 +- .../tokens/overview/_details.html.eex | 2 +- apps/block_scout_web/priv/gettext/default.pot | 10 +++---- .../priv/gettext/en/LC_MESSAGES/default.po | 10 +++---- config/runtime.exs | 4 ++- .../docker-compose-no-build-ganache.yml | 1 + docker-compose/docker-compose.yml | 3 +- docker-compose/envs/common-blockscout.env | 6 ++-- docker/Dockerfile | 4 --- 23 files changed, 67 insertions(+), 55 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex diff --git a/.github/workflows/publish-docker-image-every-push.yml b/.github/workflows/publish-docker-image-every-push.yml index 2f90390b24d8..592ddb085dc9 100644 --- a/.github/workflows/publish-docker-image-every-push.yml +++ b/.github/workflows/publish-docker-image-every-push.yml @@ -70,10 +70,6 @@ jobs: DISABLE_BRIDGE_MARKET_CAP_UPDATER=false CACHE_BRIDGE_MARKET_CAP_UPDATE_INTERVAL= SOCKET_ROOT= - CHAIN_ID= - JSON_RPC= - COIN_NAME= - SUBNETWORK= tests: needs: push_to_registry uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_k8s.yaml@master diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index 817760e55184..f9c7a2a18fae 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -65,10 +65,6 @@ jobs: ADMIN_PANEL_ENABLED="" CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL="" SOCKET_ROOT="" - CHAIN_ID="" - JSON_RPC="" - SUBNETWORK="" - COIN_NAME="" merge-master-after-release: name: Merge 'master' to specific branch after release diff --git a/CHANGELOG.md b/CHANGELOG.md index 12885bc97b1c..562509062709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#6001](https://github.com/blockscout/blockscout/pull/6001) - Add ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES env var that filters requests and query node only if the block quantity is "latest" ### Fixes +- [#6017](https://github.com/blockscout/blockscout/pull/6017) - Move "contract interaction" and "Add chain to MM" env vars to runtime - [#6012](https://github.com/blockscout/blockscout/pull/6012) - Fix display of estimated addresses counter on the main page - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method - [#5977](https://github.com/blockscout/blockscout/pull/5977) - Fix address overview.html.eex in case of nil implementation address hash diff --git a/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js b/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js index f5970763488c..d10820f1da63 100644 --- a/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js +++ b/apps/block_scout_web/assets/js/lib/add_chain_to_mm.js @@ -2,29 +2,33 @@ import 'bootstrap' export async function addChainToMM ({ btn }) { try { - const chainID = await window.ethereum.request({ method: 'eth_chainId' }) - const chainIDFromEnvVar = parseInt(process.env.CHAIN_ID) - const chainIDHex = chainIDFromEnvVar && `0x${chainIDFromEnvVar.toString(16)}` + const chainIDFromWallet = await window.ethereum.request({ method: 'eth_chainId' }) + const chainIDFromInstance = getChainIdHex() + + const coinName = document.getElementById('js-coin-name').value + const subNetwork = document.getElementById('js-subnetwork').value + const jsonRPC = document.getElementById('js-json-rpc').value + const blockscoutURL = location.protocol + '//' + location.host + process.env.NETWORK_PATH - if (chainID !== chainIDHex) { + if (chainIDFromWallet !== chainIDFromInstance) { await window.ethereum.request({ method: 'wallet_addEthereumChain', params: [{ - chainId: chainIDHex, - chainName: process.env.SUBNETWORK, + chainId: chainIDFromInstance, + chainName: subNetwork, nativeCurrency: { - name: process.env.COIN_NAME, - symbol: process.env.COIN_NAME, + name: coinName, + symbol: coinName, decimals: 18 }, - rpcUrls: [process.env.JSON_RPC], + rpcUrls: [jsonRPC], blockExplorerUrls: [blockscoutURL] }] }) } else { btn.tooltip('dispose') btn.tooltip({ - title: `You're already connected to ${process.env.SUBNETWORK}`, + title: `You're already connected to ${subNetwork}`, trigger: 'click', placement: 'bottom' }).tooltip('show') @@ -37,3 +41,9 @@ export async function addChainToMM ({ btn }) { console.error(error) } } + +function getChainIdHex () { + const chainIDFromDOM = document.getElementById('js-chain-id').value + const chainIDFromInstance = parseInt(chainIDFromDOM) + return chainIDFromInstance && `0x${chainIDFromInstance.toString(16)}` +} diff --git a/apps/block_scout_web/assets/js/lib/smart_contract/connect.js b/apps/block_scout_web/assets/js/lib/smart_contract/connect.js index 8d662e863b45..ca896ef1957d 100644 --- a/apps/block_scout_web/assets/js/lib/smart_contract/connect.js +++ b/apps/block_scout_web/assets/js/lib/smart_contract/connect.js @@ -4,9 +4,11 @@ import WalletConnectProvider from '@walletconnect/web3-provider' import { compareChainIDs, formatError, showConnectElements, showConnectedToElements } from './common_helpers' import { openWarningModal } from '../modals' -const instanceChainId = process.env.CHAIN_ID ? parseInt(`${process.env.CHAIN_ID}`, 10) : 100 +const instanceChainIdStr = document.getElementById('js-chain-id').value +const instanceChainId = parseInt(instanceChainIdStr, 10) const walletConnectOptions = { rpc: {}, chainId: instanceChainId } -walletConnectOptions.rpc[instanceChainId] = process.env.JSON_RPC ? process.env.JSON_RPC : 'https://dai.poa.network' +const jsonRPC = document.getElementById('js-json-rpc').value +walletConnectOptions.rpc[instanceChainId] = jsonRPC // Chosen wallet provider given by the dialog window let provider diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 516c62150164..3b95893c7634 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -156,11 +156,7 @@ const appJs = new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/), new webpack.DefinePlugin({ 'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT), - 'process.env.NETWORK_PATH': JSON.stringify(process.env.NETWORK_PATH), - 'process.env.CHAIN_ID': JSON.stringify(process.env.CHAIN_ID), - 'process.env.JSON_RPC': JSON.stringify(process.env.JSON_RPC), - 'process.env.SUBNETWORK': JSON.stringify(process.env.SUBNETWORK), - 'process.env.COIN_NAME': JSON.stringify(process.env.COIN_NAME) + 'process.env.NETWORK_PATH': JSON.stringify(process.env.NETWORK_PATH) }), new webpack.ProvidePlugin({ process: 'process/browser', diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex index f42fd4c16726..aad847fb1c16 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/_tokens.html.eex @@ -3,7 +3,7 @@ <%= if System.get_env("DISPLAY_TOKEN_ICONS") === "true" do %> - <% chain_id_for_token_icon = System.get_env("CHAIN_ID") %> + <% chain_id_for_token_icon = Application.get_env(:block_scout_web, :chain_id) %> <% address_hash = @token.contract_address_hash %> <%= render BlockScoutWeb.TokensView, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex index d598a9b7e372..753460e78fa5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex @@ -22,7 +22,7 @@ ) do %> <% main_nets = main_nets(other_networks()) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_search.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_search.html.eex index 012f71825177..18dbd0331bbf 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_search.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_search.html.eex @@ -6,7 +6,7 @@ id="<%= @id %>" class="main-search-autocomplete" data-test="search_input" - data-chain-id="<%= System.get_env("CHAIN_ID") %>" + data-chain-id="<%= Application.get_env(:block_scout_web, :chain_id) %>" data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>" type="text" tabindex="1" diff --git a/apps/block_scout_web/lib/block_scout_web/templates/search/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/search/_tile.html.eex index f27a12dcfc1a..1df5a4d0550f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/search/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/search/_tile.html.eex @@ -9,7 +9,7 @@ data-address-hash="<%= @result.address_hash %>" > <%= if System.get_env("DISPLAY_TOKEN_ICONS") === "true" do %> - <% chain_id_for_token_icon = System.get_env("CHAIN_ID") %> + <% chain_id_for_token_icon = Application.get_env(:block_scout_web, :chain_id) %> <% address_hash = @result.address_hash %> <%= render BlockScoutWeb.TokensView, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/search/results.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/search/results.html.eex index bb6891c81840..c973f6cccb99 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/search/results.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/search/results.html.eex @@ -1,7 +1,7 @@
" + data-chain-id="<%= Application.get_env(:block_scout_web, :chain_id) %>" data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>" > <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/_tile.html.eex index 0e16239094eb..14a749e48a18 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/_tile.html.eex @@ -7,7 +7,7 @@ <%= if System.get_env("DISPLAY_TOKEN_ICONS") === "true" do %> - <% chain_id_for_token_icon = System.get_env("CHAIN_ID") %> + <% chain_id_for_token_icon = Application.get_env(:block_scout_web, :chain_id) %> <% foreign_token_contract_address_hash = nil %> <% token_hash_for_token_icon = if foreign_token_contract_address_hash, do: foreign_token_contract_address_hash, else: Address.checksum(@token.contract_address_hash) %> <%= diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/index.html.eex index 85ee9978aff4..49fc7ae82d77 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/index.html.eex @@ -1,7 +1,7 @@
" + data-chain-id="<%= Application.get_env(:block_scout_web, :chain_id) %>" data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>" > <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex index ae7ec50d2df3..60ffda7eba6a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex @@ -25,7 +25,7 @@ <%= if token_name?(@token) do %> " + data-chain-id="<%= Application.get_env(:block_scout_web, :chain_id) %>" data-address-hash="<%= Address.checksum(@token.contract_address_hash) %>" data-display-token-icons="<%= System.get_env("DISPLAY_TOKEN_ICONS") %>"> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 594225139c7e..52e428a45284 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -136,7 +136,7 @@ msgstr "" msgid "Actual gas amount used by the transaction." msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:44 +#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11 #, elixir-autogen, elixir-format msgid "Add" msgstr "" @@ -1329,7 +1329,7 @@ msgstr "" msgid "Logs" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:52 +#: lib/block_scout_web/templates/layout/_footer.html.eex:50 #, elixir-autogen, elixir-format msgid "Main Networks" msgstr "" @@ -1548,7 +1548,7 @@ msgstr "" msgid "Optimization runs" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:76 +#: lib/block_scout_web/templates/layout/_footer.html.eex:74 #, elixir-autogen, elixir-format msgid "Other Explorers" msgstr "" @@ -1911,7 +1911,7 @@ msgstr "" msgid "Telegram" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:65 +#: lib/block_scout_web/templates/layout/_footer.html.eex:63 #, elixir-autogen, elixir-format msgid "Test Networks" msgstr "" @@ -2543,7 +2543,7 @@ msgstr "" msgid "Verify the contract " msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:91 +#: lib/block_scout_web/templates/layout/_footer.html.eex:89 #, elixir-autogen, elixir-format msgid "Version" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 0c48ba8eff4b..4083cdd3a844 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -136,7 +136,7 @@ msgstr "" msgid "Actual gas amount used by the transaction." msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:44 +#: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11 #, elixir-autogen, elixir-format msgid "Add" msgstr "" @@ -1329,7 +1329,7 @@ msgstr "" msgid "Logs" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:52 +#: lib/block_scout_web/templates/layout/_footer.html.eex:50 #, elixir-autogen, elixir-format msgid "Main Networks" msgstr "" @@ -1548,7 +1548,7 @@ msgstr "" msgid "Optimization runs" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:76 +#: lib/block_scout_web/templates/layout/_footer.html.eex:74 #, elixir-autogen, elixir-format msgid "Other Explorers" msgstr "" @@ -1911,7 +1911,7 @@ msgstr "" msgid "Telegram" msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:65 +#: lib/block_scout_web/templates/layout/_footer.html.eex:63 #, elixir-autogen, elixir-format msgid "Test Networks" msgstr "" @@ -2543,7 +2543,7 @@ msgstr "" msgid "Verify the contract " msgstr "" -#: lib/block_scout_web/templates/layout/_footer.html.eex:91 +#: lib/block_scout_web/templates/layout/_footer.html.eex:89 #, elixir-autogen, elixir-format msgid "Version" msgstr "" diff --git a/config/runtime.exs b/config/runtime.exs index 59fecb56317e..8c41e45c45be 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -72,7 +72,9 @@ config :block_scout_web, max_size_to_show_array_as_is: Integer.parse(System.get_env("MAX_SIZE_UNLESS_HIDE_ARRAY", "50")), max_length_to_show_string_without_trimming: System.get_env("MAX_STRING_LENGTH_WITHOUT_TRIMMING", "2040"), re_captcha_secret_key: System.get_env("RE_CAPTCHA_SECRET_KEY", nil), - re_captcha_client_key: System.get_env("RE_CAPTCHA_CLIENT_KEY", nil) + re_captcha_client_key: System.get_env("RE_CAPTCHA_CLIENT_KEY", nil), + chain_id: System.get_env("CHAIN_ID"), + json_rpc: System.get_env("JSON_RPC") default_api_rate_limit = 50 default_api_rate_limit_str = Integer.to_string(default_api_rate_limit) diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index eadaa75d841d..66ff9ecb104e 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -33,6 +33,7 @@ services: DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false ECTO_USE_SSL: 'false' SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN' + CHAIN_ID: '1337' ports: - 4000:4000 diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index f14350ff658e..081b7ee83911 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,7 +15,6 @@ services: blockscout: depends_on: - db - image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. dockerfile: ./docker/Dockerfile @@ -28,6 +27,8 @@ services: DISABLE_WEBAPP: "false" DISABLE_WRITE_API: "false" CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER: "" + CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: "" + SOCKET_ROOT: "/" WOBSERVER_ENABLED: "false" ADMIN_PANEL_ENABLED: "" restart: always diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 037dd823fd5d..caf206502c80 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -20,7 +20,7 @@ BLOCKSCOUT_PROTOCOL= # CHECK_ORIGIN= PORT=4000 # COIN= -# COIN_NAME= +COIN_NAME= # METADATA_CONTRACT= # VALIDATORS_CONTRACT= # KEYS_MANAGER_CONTRACT= @@ -106,7 +106,7 @@ CUSTOM_CONTRACT_ADDRESSES_TEST_TOKEN= ENABLE_SOURCIFY_INTEGRATION=false SOURCIFY_SERVER_URL= SOURCIFY_REPO_URL= -# CHAIN_ID= +CHAIN_ID= MAX_SIZE_UNLESS_HIDE_ARRAY=50 HIDE_BLOCK_MINER=false DISPLAY_TOKEN_ICONS=false @@ -115,7 +115,7 @@ TENDERLY_CHAIN_PATH= MAX_STRING_LENGTH_WITHOUT_TRIMMING=2040 RE_CAPTCHA_SECRET_KEY= RE_CAPTCHA_CLIENT_KEY= -# JSON_RPC= +JSON_RPC= API_RATE_LIMIT=50 API_RATE_LIMIT_BY_KEY=50 API_RATE_LIMIT_BY_IP=50 diff --git a/docker/Dockerfile b/docker/Dockerfile index fb97244d8c4b..b0a6f0591b82 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,10 +34,6 @@ ARG WOBSERVER_ENABLED ARG ADMIN_PANEL_ENABLED ARG CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL ARG SOCKET_ROOT -ARG CHAIN_ID -ARG JSON_RPC -ARG SUBNETWORK -ARG COIN_NAME ARG COIN # Cache elixir deps From 9f15ff788edc0bc1eb7537ae50f80dc6f10ea563 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 06:27:42 +0000 Subject: [PATCH 202/723] Bump @fortawesome/fontawesome-free in /apps/block_scout_web/assets Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 6.1.2 to 6.2.0. - [Release notes](https://github.com/FortAwesome/Font-Awesome/releases) - [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/FortAwesome/Font-Awesome/commits) --- updated-dependencies: - dependency-name: "@fortawesome/fontawesome-free" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index fc0e6009f1e4..2850037c2e18 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -7,7 +7,7 @@ "name": "blockscout", "license": "GPL-3.0", "dependencies": { - "@fortawesome/fontawesome-free": "^6.1.2", + "@fortawesome/fontawesome-free": "^6.2.0", "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", "assert": "^2.0.0", @@ -2278,9 +2278,9 @@ } }, "node_modules/@fortawesome/fontawesome-free": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.1.2.tgz", - "integrity": "sha512-XwWADtfdSN73/udaFm+1mnGIj/ShDZNFMe/PRoqv3FhQ4GNI2PUN70yFTPsjq65Lw2C9i4TG5/hTbxXIXVCiqQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.2.0.tgz", + "integrity": "sha512-CNR7qRIfCwWHNN7FnKUniva94edPdyQzil/zCwk3v6k4R6rR2Fr8i4s3PM7n/lyfPA6Zfko9z5WDzFxG9SW1uQ==", "hasInstallScript": true, "engines": { "node": ">=6" @@ -20205,9 +20205,9 @@ } }, "@fortawesome/fontawesome-free": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.1.2.tgz", - "integrity": "sha512-XwWADtfdSN73/udaFm+1mnGIj/ShDZNFMe/PRoqv3FhQ4GNI2PUN70yFTPsjq65Lw2C9i4TG5/hTbxXIXVCiqQ==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.2.0.tgz", + "integrity": "sha512-CNR7qRIfCwWHNN7FnKUniva94edPdyQzil/zCwk3v6k4R6rR2Fr8i4s3PM7n/lyfPA6Zfko9z5WDzFxG9SW1uQ==" }, "@gar/promisify": { "version": "1.1.2", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 43665647845e..d4fc15044a0f 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -19,7 +19,7 @@ "eslint": "eslint js/**" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.1.2", + "@fortawesome/fontawesome-free": "^6.2.0", "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", "assert": "^2.0.0", From 1c8e59071937f04d1796a0dd7f12f569867dbddf Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Tue, 30 Aug 2022 20:32:48 +0400 Subject: [PATCH 203/723] Fix ERC-1155 tokens fetching --- .../tokens/instance/transfer_controller.ex | 2 +- .../controllers/tokens/instance_controller.ex | 2 +- .../instance/transfer_controller_test.exs | 44 ++++++++ .../tokens/instance_controller_test.exs | 23 ++++ apps/explorer/lib/explorer/chain.ex | 106 +++++++++++++++++- .../lib/explorer/chain/token_transfer.ex | 6 +- 6 files changed, 177 insertions(+), 6 deletions(-) create mode 100644 apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex index 7350c318818f..3aa9c61878d1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex @@ -59,7 +59,7 @@ defmodule BlockScoutWeb.Tokens.Instance.TransferController do with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash), {:ok, token} <- Chain.token_from_address_hash(hash, options), {:ok, token_transfer} <- - Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do + Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do render( conn, "index.html", diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance_controller.ex index 1696ac13394b..d7d0a4d8c460 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance_controller.ex @@ -7,7 +7,7 @@ defmodule BlockScoutWeb.Tokens.InstanceController do def show(conn, %{"token_id" => token_address_hash, "id" => token_id}) do with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash), :ok <- Chain.check_token_exists(hash), - :ok <- Chain.check_erc721_token_instance_exists(token_id, hash) do + :ok <- Chain.check_erc721_or_erc1155_token_instance_exists(token_id, hash) do token_instance_transfer_path = conn |> token_instance_transfer_path(:index, token_address_hash, token_id) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs new file mode 100644 index 000000000000..ee04094cc92d --- /dev/null +++ b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs @@ -0,0 +1,44 @@ +defmodule BlockScoutWeb.Tokens.Instance.TransferControllerTest do + use BlockScoutWeb.ConnCase, async: false + + describe "GET token-transfers/2" do + test "works for ERC-721 tokens", %{conn: conn} do + contract_address = insert(:address) + + insert(:token, contract_address: contract_address) + + token_id = 10 + + %{log_index: log_index} = + insert(:token_transfer, + from_address: contract_address, + token_contract_address: contract_address, + token_id: token_id + ) + + conn = get(conn, "/token/#{contract_address.hash}/instance/#{token_id}/token-transfers") + + assert %{assigns: %{token_instance: %{log_index: ^log_index}}} = conn + end + + test "works for ERC-1155 tokens", %{conn: conn} do + contract_address = insert(:address) + + insert(:token, contract_address: contract_address) + + token_id = 10 + + %{log_index: log_index} = + insert(:token_transfer, + from_address: contract_address, + token_contract_address: contract_address, + token_id: nil, + token_ids: [token_id] + ) + + conn = get(conn, "/token/#{contract_address.hash}/instance/#{token_id}/token-transfers") + + assert %{assigns: %{token_instance: %{log_index: ^log_index}}} = conn + end + end +end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance_controller_test.exs index 10d8831331f7..7ced36daf46d 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance_controller_test.exs @@ -19,5 +19,28 @@ defmodule BlockScoutWeb.Tokens.InstanceControllerTest do assert conn.status == 302 end + + test "works for ERC-1155 tokens", %{conn: conn} do + contract_address = insert(:address) + + insert(:token, contract_address: contract_address) + + token_id = 10 + + insert(:token_transfer, + from_address: contract_address, + token_contract_address: contract_address, + token_id: nil, + token_ids: [token_id] + ) + + conn = get(conn, token_instance_path(BlockScoutWeb.Endpoint, :show, to_string(contract_address.hash), token_id)) + + assert conn.status == 302 + + assert get_resp_header(conn, "location") == [ + "/token/#{contract_address.hash}/instance/#{token_id}/token-transfers" + ] + end end end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index ac9ff7acb626..59df00fd21fb 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4881,6 +4881,28 @@ defmodule Explorer.Chain do end end + @spec erc721_or_erc1155_token_instance_from_token_id_and_token_address(binary(), Hash.Address.t()) :: + {:ok, TokenTransfer.t()} | {:error, :not_found} + def erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, token_contract_address) do + query = + from(tt in TokenTransfer, + left_join: instance in Instance, + on: + tt.token_contract_address_hash == instance.token_contract_address_hash and + (tt.token_id == instance.token_id or instance.token_id in tt.token_ids), + where: + tt.token_contract_address_hash == ^token_contract_address and + (tt.token_id == ^token_id or ^token_id in tt.token_ids), + limit: 1, + select: %{tt | instance: instance} + ) + + case Repo.one(query) do + nil -> {:error, :not_found} + token_instance -> {:ok, token_instance} + end + end + defp fetch_coin_balances(address_hash, paging_options) do address = Repo.get_by(Address, hash: address_hash) @@ -5505,7 +5527,7 @@ defmodule Explorer.Chain do end @doc """ - Checks if a `t:Explorer.Chain.TokenTransfer.t/0` with the given `hash` and `token_id` exists. + Checks if a `t:Explorer.Chain.TokenTransfer.t/0` of type ERC-721 with the given `hash` and `token_id` exists. Returns `:ok` if found @@ -5533,7 +5555,46 @@ defmodule Explorer.Chain do end @doc """ - Checks if a `t:Explorer.Chain.TokenTransfer.t/0` with the given `hash` and `token_id` exists. + Checks if a `t:Explorer.Chain.TokenTransfer.t/0` of type ERC-721 or ERC-1155 with the given `hash` and `token_id` exists. + + Returns `:ok` if found + + iex> contract_address = insert(:address) + iex> token_id = 10 + iex> insert(:token_transfer, + ...> from_address: contract_address, + ...> token_contract_address: contract_address, + ...> token_id: token_id + ...> ) + iex> Explorer.Chain.check_erc721_or_erc1155_token_instance_exists(token_id, contract_address.hash) + :ok + + iex> contract_address = insert(:address) + iex> token_id = 10 + iex> insert(:token_transfer, + ...> from_address: contract_address, + ...> token_contract_address: contract_address, + ...> token_ids: [token_id] + ...> ) + iex> Explorer.Chain.check_erc721_or_erc1155_token_instance_exists(token_id, contract_address.hash) + :ok + + Returns `:not_found` if not found + + iex> {:ok, hash} = Explorer.Chain.string_to_address_hash("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed") + iex> Explorer.Chain.check_erc721_or_erc1155_token_instance_exists(10, hash) + :not_found + """ + @spec check_erc721_or_erc1155_token_instance_exists(binary() | non_neg_integer(), Hash.Address.t()) :: + :ok | :not_found + def check_erc721_or_erc1155_token_instance_exists(token_id, hash) do + token_id + |> erc721_or_erc1155_token_instance_exist?(hash) + |> boolean_to_check_result() + end + + @doc """ + Checks if a `t:Explorer.Chain.TokenTransfer.t/0` of type ERC-721 with the given `hash` and `token_id` exists. Returns `true` if found @@ -5563,6 +5624,47 @@ defmodule Explorer.Chain do Repo.exists?(query) end + @doc """ + Checks if a `t:Explorer.Chain.TokenTransfer.t/0` of type ERC-721 or ERC-1155 with the given `hash` and `token_id` exists. + + Returns `true` if found + + iex> contract_address = insert(:address) + iex> token_id = 10 + iex> insert(:token_transfer, + ...> from_address: contract_address, + ...> token_contract_address: contract_address, + ...> token_id: token_id + ...> ) + iex> Explorer.Chain.erc721_or_erc1155_token_instance_exist?(token_id, contract_address.hash) + true + + iex> contract_address = insert(:address) + iex> token_id = 10 + iex> insert(:token_transfer, + ...> from_address: contract_address, + ...> token_contract_address: contract_address, + ...> token_ids: [token_id] + ...> ) + iex> Explorer.Chain.erc721_or_erc1155_token_instance_exist?(token_id, contract_address.hash) + true + + Returns `false` if not found + + iex> {:ok, hash} = Explorer.Chain.string_to_address_hash("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed") + iex> Explorer.Chain.erc721_or_erc1155_token_instance_exist?(10, hash) + false + """ + @spec erc721_or_erc1155_token_instance_exist?(binary() | non_neg_integer(), Hash.Address.t()) :: boolean() + def erc721_or_erc1155_token_instance_exist?(token_id, hash) do + query = + from(tt in TokenTransfer, + where: tt.token_contract_address_hash == ^hash and (tt.token_id == ^token_id or ^token_id in tt.token_ids) + ) + + Repo.exists?(query) + end + defp boolean_to_check_result(true), do: :ok defp boolean_to_check_result(false), do: :not_found diff --git a/apps/explorer/lib/explorer/chain/token_transfer.ex b/apps/explorer/lib/explorer/chain/token_transfer.ex index fe17971fb53e..eb8c7265e204 100644 --- a/apps/explorer/lib/explorer/chain/token_transfer.ex +++ b/apps/explorer/lib/explorer/chain/token_transfer.ex @@ -177,7 +177,7 @@ defmodule Explorer.Chain.TokenTransfer do from( tt in TokenTransfer, where: tt.token_contract_address_hash == ^token_address_hash, - where: tt.token_id == ^token_id, + where: tt.token_id == ^token_id or ^token_id in tt.token_ids, where: not is_nil(tt.block_number), preload: [{:transaction, :block}, :token, :from_address, :to_address], order_by: [desc: tt.block_number] @@ -206,7 +206,9 @@ defmodule Explorer.Chain.TokenTransfer do query = from( tt in TokenTransfer, - where: tt.token_contract_address_hash == ^token_address_hash and tt.token_id == ^token_id, + where: + tt.token_contract_address_hash == ^token_address_hash and + (tt.token_id == ^token_id or ^token_id in tt.token_ids), select: fragment("COUNT(*)") ) From df4477aa901c1a0acbc03c91d57b20a10ed312a4 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Wed, 31 Aug 2022 20:52:50 +0400 Subject: [PATCH 204/723] Fix test envs --- .../test/block_scout_web/views/api_docs_view_test.exs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs index 764c98206323..cc1c9f129712 100644 --- a/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs @@ -40,11 +40,11 @@ defmodule BlockScoutWeb.ApiDocsViewTest do describe "blockscout_url/2" do setup do - on_exit(fn -> - Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, - url: [scheme: "http", host: "localhost", api_path: nil, path: nil] - ) - end) + original = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint) + + on_exit(fn -> Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, original) end) + + :ok end test "set_path = true returns url with path" do From 191bfb1d3c8a37a5f841d155f3eb0dbd9cac835a Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 31 Aug 2022 22:14:08 +0300 Subject: [PATCH 205/723] Format .md files --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ ISSUE_TEMPLATE.md | 4 +++- README.md | 7 +++---- apps/block_scout_web/README.md | 23 ++++++++++------------- apps/ethereum_jsonrpc/README.md | 1 - apps/explorer/README.md | 17 +++++++---------- apps/indexer/README.md | 7 ++++++- docker-compose/README.md | 5 +++++ docker-compose/docker-compose.yml | 1 + 9 files changed, 66 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 562509062709..696030f66954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ ## Current ### Features + - [#5968](https://github.com/blockscout/blockscout/pull/5968) - Add call type in the response of txlistinternal API method - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) - [#6001](https://github.com/blockscout/blockscout/pull/6001) - Add ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES env var that filters requests and query node only if the block quantity is "latest" ### Fixes + - [#6017](https://github.com/blockscout/blockscout/pull/6017) - Move "contract interaction" and "Add chain to MM" env vars to runtime - [#6012](https://github.com/blockscout/blockscout/pull/6012) - Fix display of estimated addresses counter on the main page - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method @@ -24,6 +26,32 @@ - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` ### Chore + +- [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets +- [#5938](https://github.com/blockscout/blockscout/pull/5938) - Bump xss from 1.0.13 to 1.0.14 in /apps/block_scout_web/assets +- [#5743](https://github.com/blockscout/blockscout/pull/5743) - Fixing tracer not found #5729 +- [#5952](https://github.com/blockscout/blockscout/pull/5952) - Bump sweetalert2 from 11.4.27 to 11.4.28 in /apps/block_scout_web/assets +- [#5955](https://github.com/blockscout/blockscout/pull/5955) - Bump ex_doc from 0.28.4 to 0.28.5 +- [#5956](https://github.com/blockscout/blockscout/pull/5956) - Bump bcrypt_elixir from 2.3.1 to 3.0.1 +- [#5964](https://github.com/blockscout/blockscout/pull/5964) - Bump sweetalert2 from 11.4.28 to 11.4.29 in /apps/block_scout_web/assets +- [#5966](https://github.com/blockscout/blockscout/pull/5966) - Bump sass from 1.54.4 to 1.54.5 in /apps/block_scout_web/assets +- [#5967](https://github.com/blockscout/blockscout/pull/5967) - Bump @babel/core from 7.18.10 to 7.18.13 in /apps/block_scout_web/assets +- [#5973](https://github.com/blockscout/blockscout/pull/5973) - Bump prometheus from 4.9.0 to 4.9.1 +- [#5974](https://github.com/blockscout/blockscout/pull/5974) - Bump cldr_utils from 2.19.0 to 2.19.1 +- [#5884](https://github.com/blockscout/blockscout/pull/5884) - Bump nimble_csv from 1.1.0 to 1.2.0 +- [#5984](https://github.com/blockscout/blockscout/pull/5984) - Bump jest from 28.1.3 to 29.0.0 in /apps/block_scout_web/assets +- [#5983](https://github.com/blockscout/blockscout/pull/5983) - Bump core-js from 3.24.1 to 3.25.0 in /apps/block_scout_web/assets +- [#5981](https://github.com/blockscout/blockscout/pull/5981) - Bump eslint-plugin-promise from 6.0.0 to 6.0.1 in /apps/block_scout_web/assets +- [#5982](https://github.com/blockscout/blockscout/pull/5982) - Bump jest-environment-jsdom from 28.1.3 to 29.0.0 in /apps/block_scout_web/assets +- [#5987](https://github.com/blockscout/blockscout/pull/5987) - Bump jest from 29.0.0 to 29.0.1 in /apps/block_scout_web/assets +- [#5988](https://github.com/blockscout/blockscout/pull/5988) - Bump jest-environment-jsdom from 29.0.0 to 29.0.1 in /apps/block_scout_web/assets +- [#5989](https://github.com/blockscout/blockscout/pull/5989) - Bump jquery from 3.6.0 to 3.6.1 in /apps/block_scout_web/assets +- [#5990](https://github.com/blockscout/blockscout/pull/5990) - Bump web3modal from 1.9.8 to 1.9.9 in /apps/block_scout_web/assets +- [#6004](https://github.com/blockscout/blockscout/pull/6004) - Bump luxon from 3.0.1 to 3.0.3 in /apps/block_scout_web/assets +- [#6005](https://github.com/blockscout/blockscout/pull/6005) - Bump ex_cldr from 2.33.1 to 2.33.2 +- [#6006](https://github.com/blockscout/blockscout/pull/6006) - Bump eslint from 8.22.0 to 8.23.0 in /apps/block_scout_web/assets +- [#6015](https://github.com/blockscout/blockscout/pull/6015) - Bump @fortawesome/fontawesome-free from 6.1.2 to 6.2.0 in /apps/block_scout_web/assets +- [#6021](https://github.com/blockscout/blockscout/pull/6021) - Bump sass from 1.54.5 to 1.54.7 in /apps/block_scout_web/assets - [#6018](https://github.com/blockscout/blockscout/pull/6018) - Update chromedriver version - [#5836](https://github.com/blockscout/blockscout/pull/5836) - Bump comeonin from 4.1.2 to 5.3.3 - [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets @@ -96,14 +124,17 @@ ## 4.1.7-beta ### Features + - [#5783](https://github.com/blockscout/blockscout/pull/5783) - Allow to setup multiple ranges of blocks to index ### Fixes + - [#5799](https://github.com/blockscout/blockscout/pull/5799) - Fix address_tokens_usd_sum function - [#5798](https://github.com/blockscout/blockscout/pull/5798) - Copy explorer node_modules to result image - [#5797](https://github.com/blockscout/blockscout/pull/5797) - Fix flickering token tooltip ### Chore + - [#5796](https://github.com/blockscout/blockscout/pull/5796) - Add job for e2e tests on every push to master + fix job "Merge 'master' to specific branch after release" ## 4.1.6-beta diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 3075397e8ddb..1ed9541dc840 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -2,9 +2,11 @@ ### Environment +* Deployment type (Manual/Docker/Docker-compose): * Elixir & Erlang/OTP versions (`elixir -version`): +* Node JS version (`node -v`): * Operating System: -* Blockscout Version/branch: +* Blockscout Version/branch/commit: ### Steps to reproduce diff --git a/README.md b/README.md index cb6173ce67b5..7654e6e103ae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Blockchain Explorer for inspecting and analyzing EVM Chains.

-[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions) +[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions)
@@ -20,22 +20,21 @@ Currently available full-featured block explorers (Etherscan, Etherchain, Blockc ## Supported Projects -BlockScout supports a number of projects. Hosted instances include POA Network, Gnosis Chain, Ethereum Classic, Sokol & Kovan testnets, and other EVM chains. +BlockScout supports a number of projects. Hosted instances include POA Network, Gnosis Chain, Ethereum Classic, Sokol & Kovan testnets, and other EVM chains. - [List of hosted mainnets, testnets, and additional chains using BlockScout](https://docs.blockscout.com/for-projects/supported-projects) - [Hosted instance versions](https://docs.blockscout.com/about/use-cases/hosted-blockscout) - ## Getting Started See the [project documentation](https://docs.blockscout.com/) for instructions: + - [Requirements](https://docs.blockscout.com/for-developers/information-and-settings/requirements) - [Ansible deployment](https://docs.blockscout.com/for-developers/ansible-deployment) - [Manual deployment](https://docs.blockscout.com/for-developers/manual-deployment) - [ENV variables](https://docs.blockscout.com/for-developers/information-and-settings/env-variables) - [Configuration options](https://docs.blockscout.com/for-developers/configuration-options) - ## Acknowledgements We would like to thank the [EthPrize foundation](http://ethprize.io/) for their funding support. diff --git a/apps/block_scout_web/README.md b/apps/block_scout_web/README.md index 5f6d2d67014e..8c1a6223937a 100644 --- a/apps/block_scout_web/README.md +++ b/apps/block_scout_web/README.md @@ -8,21 +8,19 @@ This is a tool for inspecting and analyzing the POA Network blockchain from a we * Elixir 1.9+ * Postgres 10.3 - ## Required Accounts * Github for code storage - ## Setup Instructions ### Development To get BlockScout Web interface up and running locally: - * Setup `../explorer` - * Install Node.js dependencies with `$ cd assets && npm install && cd ..` - * Start Phoenix with `$ mix phx.server` (This can be run from this directory or the project root: the project root is recommended.) +* Setup `../explorer` +* Install Node.js dependencies with `$ cd assets && npm install && cd ..` +* Start Phoenix with `$ mix phx.server` (This can be run from this directory or the project root: the project root is recommended.) Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. @@ -30,14 +28,13 @@ You can also run IEx (Interactive Elixir): `$ iex -S mix phx.server` (This can b ### Testing - * Build the assets: `cd assets && npm run build` - * Format the Elixir code: `mix format` - * Lint the Elixir code: `mix credo --strict` - * Run the dialyzer: `mix dialyzer --halt-exit-status` - * Check the Elixir code for vulnerabilities: `mix sobelow --config` - * Update translations templates and translations and check there are no uncommitted changes: `mix gettext.extract --merge` - * Lint the JavaScript code: `cd assets && npm run eslint` - +* Build the assets: `cd assets && npm run build` +* Format the Elixir code: `mix format` +* Lint the Elixir code: `mix credo --strict` +* Run the dialyzer: `mix dialyzer --halt-exit-status` +* Check the Elixir code for vulnerabilities: `mix sobelow --config` +* Update translations templates and translations and check there are no uncommitted changes: `mix gettext.extract --merge` +* Lint the JavaScript code: `cd assets && npm run eslint` ## Internationalization diff --git a/apps/ethereum_jsonrpc/README.md b/apps/ethereum_jsonrpc/README.md index 5d9d469ea435..8f9ab1e94b24 100644 --- a/apps/ethereum_jsonrpc/README.md +++ b/apps/ethereum_jsonrpc/README.md @@ -83,4 +83,3 @@ def deps do ] end ``` - diff --git a/apps/explorer/README.md b/apps/explorer/README.md index 2230feff3ee8..4064224aba7d 100644 --- a/apps/explorer/README.md +++ b/apps/explorer/README.md @@ -2,35 +2,32 @@ This is a tool for inspecting and analyzing the POA Network blockchain. - ## Machine Requirements * Erlang/OTP 21+ * Elixir 1.9+ * Postgres 10.3 - ## Required Accounts * Github for code storage - ## Setup Instructions ### Development To get BlockScout up and running locally: - * Install dependencies with `$ mix do deps.get, local.rebar, deps.compile, compile` - * Create and migrate your database with `$ mix ecto.create && mix ecto.migrate` - * Run IEx (Interactive Elixir) to access the index and explore: `$ iex -S mix` +* Install dependencies with `$ mix do deps.get, local.rebar, deps.compile, compile` +* Create and migrate your database with `$ mix ecto.create && mix ecto.migrate` +* Run IEx (Interactive Elixir) to access the index and explore: `$ iex -S mix` ### Testing - * Format the Elixir code: `$ mix format` - * Lint the Elixir code: `$ mix credo --strict` - * Run the dialyzer: `mix dialyzer --halt-exit-status` - * Check the Elixir code for vulnerabilities: `$ mix sobelow --config` +* Format the Elixir code: `$ mix format` +* Lint the Elixir code: `$ mix credo --strict` +* Run the dialyzer: `mix dialyzer --halt-exit-status` +* Check the Elixir code for vulnerabilities: `$ mix sobelow --config` ### Benchmarking diff --git a/apps/indexer/README.md b/apps/indexer/README.md index 916146622911..62daba227a9c 100644 --- a/apps/indexer/README.md +++ b/apps/indexer/README.md @@ -24,7 +24,6 @@ Some data has to be extracted from already fetched data, and there're several tr - `address_token_balances`: creates token balance entities for futher fetching, based on detected token transfers - `blocks`: extracts block signer hash from additional data for Clique chains - ### Root fetchers - `pending_transaction`: fetches pending transactions (i.e. not yet collated into a block) every second (`pending_transaction_interval`) @@ -32,6 +31,7 @@ Some data has to be extracted from already fetched data, and there're several tr - `block/catchup`: gets unfetched ranges of blocks, imports them in batches Both block fetchers retrieve/extract the blocks themselves and the following additional data: + - `block_second_degree_relations` - `transactions` - `logs` @@ -39,16 +39,19 @@ Both block fetchers retrieve/extract the blocks themselves and the following add - `addresses` The following stubs for further async fetching are inserted as well: + - `block_rewards` - `address_coin_balances` - `address_token_balances` - `tokens` Realtime fetcher also immediately fetches from the node: + - current balances for `addresses` - `address_coin_balances` The following async fetchers are launched for importing missing data: + - `replaced_transaction` - `block_reward` - `uncle_block` @@ -62,6 +65,7 @@ The following async fetchers are launched for importing missing data: These are responsible for fetching additional block data not retrieved in root fetchers. Most of them are based off `BufferedTask`, and the basic algorithm goes like this: + 1. Make an initial streaming request to database to fetch identifiers of all existing unfetched items. 2. Accept new identifiers for fetching via `async_fetch()` method. 3. Split identifier in batches and run tasks on `TaskSupervisor` according to `max_batch_size` and `max_concurrency` settings. @@ -80,6 +84,7 @@ Most of them are based off `BufferedTask`, and the basic algorithm goes like thi - `contract_code`: for `transactions` with non-null `created_contract_address_hash` and null `created_contract_code_indexed_at` Additionally: + - `token_updater` is run every 2 days to update token metadata - `coin_balance_on_demand` is triggered from web UI to ensure address balance is as up-to-date as possible diff --git a/docker-compose/README.md b/docker-compose/README.md index effe655f201b..cfc504826f1e 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -3,21 +3,26 @@ Runs BlockScout locally in Docker container with usage [docker-compose](https://github.com/docker/compose). ## Prerequisites + - Docker v20.10+ - Docker-compose 2.x.x+ - Running Ethereum JSON RPC client ## Building Docker containers from source + ``` docker-compose up --build ``` This command uses by-default `docker-compose.yml`, which build the explorer into Docker image and runs 2 Docker containers: + - one for the database. Postgres 13.x, which will be available at port 7432 on localhost - and the BlockScout explorer at http://localhost:4000 ## Configs for different Ethereum clients + Also, the repo contains built-in configs for different clients without need to build the image + - Ganache: `docker-compose -f docker-compose-no-build-ganache.yml up -d` - HardHat network: `docker-compose -f docker-compose-no-build-hardhat-network.yml up -d` - Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d` diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 081b7ee83911..3ebb5d1edfbf 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,6 +15,7 @@ services: blockscout: depends_on: - db + image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. dockerfile: ./docker/Dockerfile From 05d7c88b63d28738504bcf2f88359e30bb345117 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 31 Aug 2022 22:22:02 +0300 Subject: [PATCH 206/723] Fix ad appearance at domain blockscout.com or subdomains --- apps/block_scout_web/assets/js/lib/ad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/js/lib/ad.js b/apps/block_scout_web/assets/js/lib/ad.js index 91ee45e80789..69f0ce3577e5 100644 --- a/apps/block_scout_web/assets/js/lib/ad.js +++ b/apps/block_scout_web/assets/js/lib/ad.js @@ -9,7 +9,7 @@ function countImpressions (impressionUrl) { function showAd () { const domainName = window.location.hostname - if (domainName.endsWith('blockscout.com')) { + if (domainName === 'blockscout.com' || domainName.endsWith('.blockscout.com')) { $('.js-ad-dependant-mb-2').addClass('mb-2') $('.js-ad-dependant-mb-3').addClass('mb-3') $('.js-ad-dependant-mb-5-reverse').removeClass('mb-5') From 1e134286dcf2627a0dfc098661438eeb695895fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Aug 2022 06:51:55 +0000 Subject: [PATCH 207/723] Bump briefly from `25942fb` to `1dd66ee` Bumps [briefly](https://github.com/CargoSense/briefly) from `25942fb` to `1dd66ee`. - [Release notes](https://github.com/CargoSense/briefly/releases) - [Commits](https://github.com/CargoSense/briefly/compare/25942fba9cad46aaa870ba248c101ffee321ec9b...1dd66ee19ca84ed60f4eca47fee59227ba960fb7) --- updated-dependencies: - dependency-name: briefly dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 9ac5608ee2a6..0ea12393de48 100644 --- a/mix.lock +++ b/mix.lock @@ -8,7 +8,7 @@ "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, - "briefly": {:git, "https://github.com/CargoSense/briefly.git", "25942fba9cad46aaa870ba248c101ffee321ec9b", []}, + "briefly": {:git, "https://github.com/CargoSense/briefly.git", "1dd66ee19ca84ed60f4eca47fee59227ba960fb7", []}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, From 06c464af2c4d586e9a670e23ffebf20cb0db6f55 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 1 Sep 2022 13:43:49 +0300 Subject: [PATCH 208/723] Contracts interaction: networkID to chainID --- CHANGELOG.md | 2 +- .../templates/smart_contract/_functions.html.eex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 696030f66954..165274f3cef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Fixes -- [#6017](https://github.com/blockscout/blockscout/pull/6017) - Move "contract interaction" and "Add chain to MM" env vars to runtime +- [#6017](https://github.com/blockscout/blockscout/pull/6017), [#6028](https://github.com/blockscout/blockscout/pull/6028) - Move "contract interaction" and "Add chain to MM" env vars to runtime - [#6012](https://github.com/blockscout/blockscout/pull/6012) - Fix display of estimated addresses counter on the main page - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method - [#5977](https://github.com/blockscout/blockscout/pull/5977) - Fix address overview.html.eex in case of nil implementation address hash diff --git a/apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex index baf0c0ebc0a8..0541d12f690d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex @@ -66,7 +66,7 @@ @contract_abi end end %> -
" data-type="<%= @contract_type %>" data-url="<%= smart_contract_path(@conn, :show, Address.checksum(@address.hash)) %>" data-contract-address="<%= @address.hash %>" data-contract-abi="<%= function_abi %>" data-implementation-abi="<%= function_abi %>" data-chain-id="<%= Explorer.Chain.Cache.NetVersion.get_version() %>"> + " data-type="<%= @contract_type %>" data-url="<%= smart_contract_path(@conn, :show, Address.checksum(@address.hash)) %>" data-contract-address="<%= @address.hash %>" data-contract-abi="<%= function_abi %>" data-implementation-abi="<%= function_abi %>" data-chain-id="<%= Application.get_env(:block_scout_web, :chain_id) %>"> From 7ea0e39f704dc6b1f792218f64b6497cb8c3b0ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 18:43:17 +0000 Subject: [PATCH 209/723] Bump sass from 1.54.7 to 1.54.8 in /apps/block_scout_web/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.54.7 to 1.54.8. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.7...1.54.8) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 8006aef0f257..acae87ba3198 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -84,7 +84,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.7", + "sass": "^1.54.8", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", @@ -15862,9 +15862,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.54.7", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.7.tgz", - "integrity": "sha512-3q7MQz7sCpVG6TLhUfZwGOcd2/sm2ghYN2JEdRjNiW04ILdvahdo9GuAs+bxsxZ3hDCKv+wUT5w0iFWGU0CxlA==", + "version": "1.54.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz", + "integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -30749,9 +30749,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.54.7", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.7.tgz", - "integrity": "sha512-3q7MQz7sCpVG6TLhUfZwGOcd2/sm2ghYN2JEdRjNiW04ILdvahdo9GuAs+bxsxZ3hDCKv+wUT5w0iFWGU0CxlA==", + "version": "1.54.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz", + "integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index b81835d7f33a..e3e78083bd97 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -96,7 +96,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.7", + "sass": "^1.54.8", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", From 13afb12b2ac956ec12d216e0634998157dfcc890 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 1 Sep 2022 21:36:26 +0300 Subject: [PATCH 210/723] Sort by address.hash column in accountlist endpoint --- CHANGELOG.md | 1 + .../api/rpc/address_controller_test.exs | 43 +++++++++++++++++++ .../lib/explorer/etherscan/addresses.ex | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 165274f3cef2..da58427c1d62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- [#6032](https://github.com/blockscout/blockscout/pull/6032) - Sort by address.hash column in accountlist API endpoint - [#6017](https://github.com/blockscout/blockscout/pull/6017), [#6028](https://github.com/blockscout/blockscout/pull/6028) - Move "contract interaction" and "Add chain to MM" env vars to runtime - [#6012](https://github.com/blockscout/blockscout/pull/6012) - Fix display of estimated addresses counter on the main page - [#5978](https://github.com/blockscout/blockscout/pull/5978) - Allow timestamp param in the log of eth_getTransactionReceipt method diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs index b35146bc4c8c..7b3878494260 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs @@ -82,6 +82,49 @@ defmodule BlockScoutWeb.API.RPC.AddressControllerTest do ] = response["result"] end + test "sort by hash", %{params: params, conn: conn} do + inserted_at = Timex.shift(Timex.now(), minutes: -10) + + first_address = + insert(:address, + hash: "0x0000000000000000000000000000000000000001", + fetched_coin_balance: 10, + inserted_at: inserted_at + ) + + second_address = + insert(:address, + hash: "0x0000000000000000000000000000000000000002", + fetched_coin_balance: 100, + inserted_at: inserted_at + ) + + first_address_hash = to_string(first_address.hash) + second_address_hash = to_string(second_address.hash) + + first_address_inserted_at = to_string(first_address.inserted_at) + second_address_inserted_at = to_string(second_address.inserted_at) + + response = + conn + |> get("/api", params) + |> json_response(200) + + schema = listaccounts_schema() + assert :ok = ExJsonSchema.Validator.validate(schema, response) + assert response["message"] == "OK" + assert response["status"] == "1" + + assert [ + %{ + "address" => ^first_address_hash + }, + %{ + "address" => ^second_address_hash + } + ] = response["result"] + end + test "with a stale balance", %{conn: conn, params: params} do now = Timex.now() diff --git a/apps/explorer/lib/explorer/etherscan/addresses.ex b/apps/explorer/lib/explorer/etherscan/addresses.ex index beb69d051d38..999d34ca6a69 100644 --- a/apps/explorer/lib/explorer/etherscan/addresses.ex +++ b/apps/explorer/lib/explorer/etherscan/addresses.ex @@ -18,7 +18,7 @@ defmodule Explorer.Etherscan.Addresses do query = from( address in Address, - order_by: [asc: address.inserted_at], + order_by: [asc: address.inserted_at, asc: address.hash], offset: ^offset, limit: ^limit ) From 384aa88178decf7773070d24140c2694061225d8 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 1 Sep 2022 23:17:59 +0400 Subject: [PATCH 211/723] Check token_ids via @> --- apps/explorer/lib/explorer/chain.ex | 8 +++++--- apps/explorer/lib/explorer/chain/token_transfer.ex | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 59df00fd21fb..54b762364689 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4889,10 +4889,10 @@ defmodule Explorer.Chain do left_join: instance in Instance, on: tt.token_contract_address_hash == instance.token_contract_address_hash and - (tt.token_id == instance.token_id or instance.token_id in tt.token_ids), + (tt.token_id == instance.token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, instance.token_id)), where: tt.token_contract_address_hash == ^token_contract_address and - (tt.token_id == ^token_id or ^token_id in tt.token_ids), + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)), limit: 1, select: %{tt | instance: instance} ) @@ -5659,7 +5659,9 @@ defmodule Explorer.Chain do def erc721_or_erc1155_token_instance_exist?(token_id, hash) do query = from(tt in TokenTransfer, - where: tt.token_contract_address_hash == ^hash and (tt.token_id == ^token_id or ^token_id in tt.token_ids) + where: + tt.token_contract_address_hash == ^hash and + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)) ) Repo.exists?(query) diff --git a/apps/explorer/lib/explorer/chain/token_transfer.ex b/apps/explorer/lib/explorer/chain/token_transfer.ex index eb8c7265e204..0449a6df6092 100644 --- a/apps/explorer/lib/explorer/chain/token_transfer.ex +++ b/apps/explorer/lib/explorer/chain/token_transfer.ex @@ -177,7 +177,7 @@ defmodule Explorer.Chain.TokenTransfer do from( tt in TokenTransfer, where: tt.token_contract_address_hash == ^token_address_hash, - where: tt.token_id == ^token_id or ^token_id in tt.token_ids, + where: tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id), where: not is_nil(tt.block_number), preload: [{:transaction, :block}, :token, :from_address, :to_address], order_by: [desc: tt.block_number] @@ -208,7 +208,7 @@ defmodule Explorer.Chain.TokenTransfer do tt in TokenTransfer, where: tt.token_contract_address_hash == ^token_address_hash and - (tt.token_id == ^token_id or ^token_id in tt.token_ids), + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)), select: fragment("COUNT(*)") ) From a76f02040a77ccfedf57f508ce0a6ff384c10b4c Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 1 Sep 2022 22:20:35 +0300 Subject: [PATCH 212/723] Suppress empty sections in supported chain dropdown --- CHANGELOG.md | 1 + .../templates/layout/_topnav.html.eex | 35 ++++++++++++------- apps/block_scout_web/priv/gettext/default.pot | 34 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 34 +++++++++--------- 4 files changed, 57 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 165274f3cef2..d33d87a0ab63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ ### Chore +- [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown - [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets - [#5938](https://github.com/blockscout/blockscout/pull/5938) - Bump xss from 1.0.13 to 1.0.14 in /apps/block_scout_web/assets - [#5743](https://github.com/blockscout/blockscout/pull/5743) - Fixing tracer not found #5729 diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 6c1db5ce8e6c..8f2689610004 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -1,4 +1,7 @@ <% apps_menu = Application.get_env(:block_scout_web, :apps_menu) %> +<% other_nets = dropdown_other_nets() %> +<% test_nets = test_nets(dropdown_nets()) %> +<% main_nets = dropdown_head_main_nets() %>
\ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex index 0c0f26540587..d067dbbd93a2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex @@ -5,26 +5,28 @@ <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %>

<%= gettext "Raw Trace" %> - - - - - + <%= if Enum.count(@internal_transactions) > 0 do %> + + + + + + <% end %>

<%= if Enum.count(@internal_transactions) > 0 do %>
<%= for {line, number} <- raw_traces_with_lines(@internal_transactions) do %>
<%= line %>
<% end %>
<% else %>
- No trace entries found. + <%= gettext "No trace entries found." %>
<% end %>
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 2e307f19fe61..9e80b6885f0c 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -229,6 +229,7 @@ msgstr "" msgid "Average block time" msgstr "" +#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 #: lib/block_scout_web/templates/transaction/not_found.html.eex:30 #, elixir-autogen, elixir-format msgid "Back Home" @@ -634,7 +635,7 @@ msgstr "" msgid "Copy Parent Hash" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Copy Raw Trace" msgstr "" @@ -2859,3 +2860,18 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29 +#, elixir-autogen, elixir-format +msgid "No trace entries found." +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Page not found" +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "The requested path was not found on BlockScout." +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 94f7456f47b8..4f4d45ceb67e 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -229,6 +229,7 @@ msgstr "" msgid "Average block time" msgstr "" +#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 #: lib/block_scout_web/templates/transaction/not_found.html.eex:30 #, elixir-autogen, elixir-format msgid "Back Home" @@ -634,7 +635,7 @@ msgstr "" msgid "Copy Parent Hash" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Copy Raw Trace" msgstr "" @@ -2859,3 +2860,18 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29 +#, elixir-autogen, elixir-format +msgid "No trace entries found." +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Page not found" +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "The requested path was not found on BlockScout." +msgstr "" From 01e7d696dcf07e55a382ee8dd7d79fd633136af8 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 00:36:07 +0400 Subject: [PATCH 215/723] Fix token_ids array type cast --- apps/explorer/lib/explorer/chain.ex | 6 +++--- apps/explorer/lib/explorer/chain/token_transfer.ex | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 54b762364689..8c121738bd72 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4889,10 +4889,10 @@ defmodule Explorer.Chain do left_join: instance in Instance, on: tt.token_contract_address_hash == instance.token_contract_address_hash and - (tt.token_id == instance.token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, instance.token_id)), + (tt.token_id == instance.token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, instance.token_id)), where: tt.token_contract_address_hash == ^token_contract_address and - (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)), + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, ^Decimal.new(token_id))), limit: 1, select: %{tt | instance: instance} ) @@ -5661,7 +5661,7 @@ defmodule Explorer.Chain do from(tt in TokenTransfer, where: tt.token_contract_address_hash == ^hash and - (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)) + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, ^Decimal.new(token_id))) ) Repo.exists?(query) diff --git a/apps/explorer/lib/explorer/chain/token_transfer.ex b/apps/explorer/lib/explorer/chain/token_transfer.ex index 0449a6df6092..4c23267682ec 100644 --- a/apps/explorer/lib/explorer/chain/token_transfer.ex +++ b/apps/explorer/lib/explorer/chain/token_transfer.ex @@ -177,7 +177,7 @@ defmodule Explorer.Chain.TokenTransfer do from( tt in TokenTransfer, where: tt.token_contract_address_hash == ^token_address_hash, - where: tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id), + where: tt.token_id == ^token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, ^Decimal.new(token_id)), where: not is_nil(tt.block_number), preload: [{:transaction, :block}, :token, :from_address, :to_address], order_by: [desc: tt.block_number] @@ -208,7 +208,7 @@ defmodule Explorer.Chain.TokenTransfer do tt in TokenTransfer, where: tt.token_contract_address_hash == ^token_address_hash and - (tt.token_id == ^token_id or fragment("? @> ARRAY[?::numeric]", tt.token_ids, ^token_id)), + (tt.token_id == ^token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, ^Decimal.new(token_id))), select: fragment("COUNT(*)") ) From 9dc74909f716d6eefc849e88aaee0f7bfa3ceb07 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 1 Sep 2022 23:35:41 +0300 Subject: [PATCH 216/723] Fix order of results in txlistinternal API endpoint --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/etherscan.ex | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7d9d382046e..776b59bfadbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- [#6037](https://github.com/blockscout/blockscout/pull/6037) - Fix order of results in txlistinternal API endpoint - [#6036](https://github.com/blockscout/blockscout/pull/6036) - Fix address checksum on transaction page - [#6032](https://github.com/blockscout/blockscout/pull/6032) - Sort by address.hash column in accountlist API endpoint - [#6017](https://github.com/blockscout/blockscout/pull/6017), [#6028](https://github.com/blockscout/blockscout/pull/6028) - Move "contract interaction" and "Add chain to MM" env vars to runtime diff --git a/apps/explorer/lib/explorer/etherscan.ex b/apps/explorer/lib/explorer/etherscan.ex index 44591617fd97..bafbc8d1adb8 100644 --- a/apps/explorer/lib/explorer/etherscan.ex +++ b/apps/explorer/lib/explorer/etherscan.ex @@ -202,6 +202,14 @@ defmodule Explorer.Etherscan do query_to_address_hash_wrapped |> union(^query_from_address_hash_wrapped) |> union(^query_created_contract_address_hash_wrapped) + |> Chain.wrapped_union_subquery() + |> order_by( + [q], + [ + {^options.order_by_direction, q.block_number}, + desc: q.index + ] + ) |> Repo.replica().all() else query = From b41f8391d6d4be84b6a2ce68ab8d28f96e611497 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 2 Sep 2022 11:44:18 +0300 Subject: [PATCH 217/723] Extend token name from string to text type --- CHANGELOG.md | 1 + .../migrations/20220902083436_extend_token_name_type.exs | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 apps/explorer/priv/repo/migrations/20220902083436_extend_token_name_type.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index 776b59bfadbb..c2029ecdeb4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- [#6038](https://github.com/blockscout/blockscout/pull/6038) - Extend token name from string to text type - [#6037](https://github.com/blockscout/blockscout/pull/6037) - Fix order of results in txlistinternal API endpoint - [#6036](https://github.com/blockscout/blockscout/pull/6036) - Fix address checksum on transaction page - [#6032](https://github.com/blockscout/blockscout/pull/6032) - Sort by address.hash column in accountlist API endpoint diff --git a/apps/explorer/priv/repo/migrations/20220902083436_extend_token_name_type.exs b/apps/explorer/priv/repo/migrations/20220902083436_extend_token_name_type.exs new file mode 100644 index 000000000000..fee8460def3b --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220902083436_extend_token_name_type.exs @@ -0,0 +1,9 @@ +defmodule Explorer.Repo.Migrations.ExtendTokenNameType do + use Ecto.Migration + + def change do + alter table(:tokens) do + modify(:name, :text, null: true) + end + end +end From d53bd8f1ba4435430779885b56e6778af36b5116 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 14:44:10 +0400 Subject: [PATCH 218/723] Added token_transfers and token_instances migrations --- ...03213_create_index_token_transfers_token_ids.exs | 13 +++++++++++++ ...stances_token_contract_address_hash_token_id.exs | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 apps/explorer/priv/repo/migrations/20220902103213_create_index_token_transfers_token_ids.exs create mode 100644 apps/explorer/priv/repo/migrations/20220902103527_create_indexes_token_instances_token_contract_address_hash_token_id.exs diff --git a/apps/explorer/priv/repo/migrations/20220902103213_create_index_token_transfers_token_ids.exs b/apps/explorer/priv/repo/migrations/20220902103213_create_index_token_transfers_token_ids.exs new file mode 100644 index 000000000000..e7f30e9cc07f --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220902103213_create_index_token_transfers_token_ids.exs @@ -0,0 +1,13 @@ +defmodule Explorer.Repo.Migrations.CreateIndexTokenTransfersTokenIds do + use Ecto.Migration + + def up do + execute(""" + CREATE INDEX token_transfers_token_ids_index on token_transfers USING GIN ("token_ids") + """) + end + + def down do + execute("DROP INDEX token_transfers_token_ids_index") + end +end diff --git a/apps/explorer/priv/repo/migrations/20220902103527_create_indexes_token_instances_token_contract_address_hash_token_id.exs b/apps/explorer/priv/repo/migrations/20220902103527_create_indexes_token_instances_token_contract_address_hash_token_id.exs new file mode 100644 index 000000000000..a91fc7d0fe3d --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220902103527_create_indexes_token_instances_token_contract_address_hash_token_id.exs @@ -0,0 +1,8 @@ +defmodule Explorer.Repo.Migrations.CreateIndexesTokenInstancesTokenContractAddressHashTokenId do + use Ecto.Migration + + def change do + create_if_not_exists(index(:token_instances, [:token_contract_address_hash, :token_id])) + create_if_not_exists(index(:token_instances, [:token_id])) + end +end From c4e06cb4e9892c33c3dbab5043c8532645c7fafe Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 17:14:19 +0400 Subject: [PATCH 219/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 844ac563d5e5..755733dc3c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` +- [#6013](https://github.com/blockscout/blockscout/pull/6013) - Fix ERC-1155 tokens fetching ### Chore - [#5836](https://github.com/blockscout/blockscout/pull/5836) - Bump comeonin from 4.1.2 to 5.3.3 From cb41a138f3f110f68fe88aca96825f243ec69f6a Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 19:28:00 +0400 Subject: [PATCH 220/723] Fix token instance fetching --- .../controllers/tokens/instance/holder_controller.ex | 6 +++--- .../tokens/instance/metadata_controller.ex | 8 ++++---- .../tokens/instance/transfer_controller.ex | 4 ++-- apps/explorer/lib/explorer/chain.ex | 12 +----------- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/holder_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/holder_controller.ex index 1712775ece7a..3ee291f43b45 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/holder_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/holder_controller.ex @@ -56,12 +56,12 @@ defmodule BlockScoutWeb.Tokens.Instance.HolderController do with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash), {:ok, token} <- Chain.token_from_address_hash(hash, options), - {:ok, token_transfer} <- - Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do + {:ok, token_instance} <- + Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do render( conn, "index.html", - token_instance: token_transfer, + token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)}, current_path: Controller.current_full_path(conn), token: Market.add_price(token), total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex index e075e86cff9a..a282ce5e3e49 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex @@ -9,13 +9,13 @@ defmodule BlockScoutWeb.Tokens.Instance.MetadataController do with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash), {:ok, token} <- Chain.token_from_address_hash(hash, options), - {:ok, token_transfer} <- - Chain.erc721_token_instance_from_token_id_and_token_address(token_id, hash) do - if token_transfer.instance && token_transfer.instance.metadata do + {:ok, token_instance} <- + Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do + if token_instance && token_instance.metadata do render( conn, "index.html", - token_instance: token_transfer, + token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)}, current_path: Controller.current_full_path(conn), token: Market.add_price(token), total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex index 3aa9c61878d1..1e92527d0ffd 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/transfer_controller.ex @@ -58,12 +58,12 @@ defmodule BlockScoutWeb.Tokens.Instance.TransferController do with {:ok, hash} <- Chain.string_to_address_hash(token_address_hash), {:ok, token} <- Chain.token_from_address_hash(hash, options), - {:ok, token_transfer} <- + {:ok, token_instance} <- Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do render( conn, "index.html", - token_instance: token_transfer, + token_instance: %{instance: token_instance, token_id: Decimal.new(token_id)}, current_path: Controller.current_full_path(conn), token: Market.add_price(token), total_token_transfers: Chain.count_token_transfers_from_token_hash_and_token_id(hash, token_id) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 8c121738bd72..ff8b30f4edc9 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4885,17 +4885,7 @@ defmodule Explorer.Chain do {:ok, TokenTransfer.t()} | {:error, :not_found} def erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, token_contract_address) do query = - from(tt in TokenTransfer, - left_join: instance in Instance, - on: - tt.token_contract_address_hash == instance.token_contract_address_hash and - (tt.token_id == instance.token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, instance.token_id)), - where: - tt.token_contract_address_hash == ^token_contract_address and - (tt.token_id == ^token_id or fragment("? @> ARRAY[?::decimal]", tt.token_ids, ^Decimal.new(token_id))), - limit: 1, - select: %{tt | instance: instance} - ) + from(i in Instance, where: i.token_contract_address_hash == ^token_contract_address and i.token_id == ^token_id) case Repo.one(query) do nil -> {:error, :not_found} From f2842ee1061b26b783398cc618e55834fcd54885 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 19:32:03 +0400 Subject: [PATCH 221/723] Fix dialyzer --- .../controllers/tokens/instance/metadata_controller.ex | 2 +- apps/explorer/lib/explorer/chain.ex | 2 +- apps/explorer/lib/explorer/chain/token/instance.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex index a282ce5e3e49..b404cc91b81e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/instance/metadata_controller.ex @@ -11,7 +11,7 @@ defmodule BlockScoutWeb.Tokens.Instance.MetadataController do {:ok, token} <- Chain.token_from_address_hash(hash, options), {:ok, token_instance} <- Chain.erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, hash) do - if token_instance && token_instance.metadata do + if token_instance.metadata do render( conn, "index.html", diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index ff8b30f4edc9..7b0c65c2632c 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4882,7 +4882,7 @@ defmodule Explorer.Chain do end @spec erc721_or_erc1155_token_instance_from_token_id_and_token_address(binary(), Hash.Address.t()) :: - {:ok, TokenTransfer.t()} | {:error, :not_found} + {:ok, Instance.t()} | {:error, :not_found} def erc721_or_erc1155_token_instance_from_token_id_and_token_address(token_id, token_contract_address) do query = from(i in Instance, where: i.token_contract_address_hash == ^token_contract_address and i.token_id == ^token_id) diff --git a/apps/explorer/lib/explorer/chain/token/instance.ex b/apps/explorer/lib/explorer/chain/token/instance.ex index 1a6883492bd2..005ee3a2c08c 100644 --- a/apps/explorer/lib/explorer/chain/token/instance.ex +++ b/apps/explorer/lib/explorer/chain/token/instance.ex @@ -18,7 +18,7 @@ defmodule Explorer.Chain.Token.Instance do @type t :: %Instance{ token_id: non_neg_integer(), token_contract_address_hash: Hash.Address.t(), - metadata: map(), + metadata: map() | nil, error: String.t() } From 78e13d7415358cfc38b0a726d6f96eb04d04da78 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 19:45:35 +0400 Subject: [PATCH 222/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 755733dc3c58..5f2b92711e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` - [#6013](https://github.com/blockscout/blockscout/pull/6013) - Fix ERC-1155 tokens fetching +- [#6043](https://github.com/blockscout/blockscout/pull/6043) - Fix token instance fetching ### Chore - [#5836](https://github.com/blockscout/blockscout/pull/5836) - Bump comeonin from 4.1.2 to 5.3.3 From 67561bc25ab03077ec390fb796a78536bf6ea847 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 2 Sep 2022 19:54:08 +0400 Subject: [PATCH 223/723] Fix token transfers tests --- .../instance/transfer_controller_test.exs | 44 +++++++------------ 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs index ee04094cc92d..8f4a49cabbe0 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/tokens/instance/transfer_controller_test.exs @@ -2,43 +2,29 @@ defmodule BlockScoutWeb.Tokens.Instance.TransferControllerTest do use BlockScoutWeb.ConnCase, async: false describe "GET token-transfers/2" do - test "works for ERC-721 tokens", %{conn: conn} do + test "fetches the instance", %{conn: conn} do contract_address = insert(:address) insert(:token, contract_address: contract_address) - token_id = 10 + contract_address_hash = contract_address.hash - %{log_index: log_index} = - insert(:token_transfer, - from_address: contract_address, - token_contract_address: contract_address, - token_id: token_id - ) + token_id = Decimal.new(10) - conn = get(conn, "/token/#{contract_address.hash}/instance/#{token_id}/token-transfers") + insert(:token_instance, + token_contract_address_hash: contract_address_hash, + token_id: token_id + ) - assert %{assigns: %{token_instance: %{log_index: ^log_index}}} = conn - end - - test "works for ERC-1155 tokens", %{conn: conn} do - contract_address = insert(:address) - - insert(:token, contract_address: contract_address) - - token_id = 10 - - %{log_index: log_index} = - insert(:token_transfer, - from_address: contract_address, - token_contract_address: contract_address, - token_id: nil, - token_ids: [token_id] - ) - - conn = get(conn, "/token/#{contract_address.hash}/instance/#{token_id}/token-transfers") + conn = get(conn, "/token/#{contract_address_hash}/instance/#{token_id}/token-transfers") - assert %{assigns: %{token_instance: %{log_index: ^log_index}}} = conn + assert %{ + assigns: %{ + token_instance: %{ + instance: %{token_contract_address_hash: ^contract_address_hash, token_id: ^token_id} + } + } + } = conn end end end From 7073696c0c1533f4f3e1c6a13e6110c9f2b034f3 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 2 Sep 2022 20:55:42 +0300 Subject: [PATCH 224/723] Re-use _btn_copy.html for raw trace page --- CHANGELOG.md | 1 + ISSUE_TEMPLATE.md | 1 + .../transaction_raw_trace/index.html.eex | 22 +++++++------------ apps/block_scout_web/priv/gettext/default.pot | 5 +++-- .../priv/gettext/en/LC_MESSAGES/default.po | 5 +++-- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4415485652dd..4eb2968cffaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ ### Chore +- [#6045](https://github.com/blockscout/blockscout/pull/6045) - Re-use _btn_copy.html for raw trace page - [#6035](https://github.com/blockscout/blockscout/pull/6035) - Hide copy btn if no raw trace - [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown - [#5939](https://github.com/blockscout/blockscout/pull/5939) - Bump sweetalert2 from 11.4.26 to 11.4.27 in /apps/block_scout_web/assets diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 1ed9541dc840..1e5bff013634 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -7,6 +7,7 @@ * Node JS version (`node -v`): * Operating System: * Blockscout Version/branch/commit: +* Archive node type && version (Erigon/Geth/Nethermind/Ganache/?): ### Steps to reproduce diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex index d067dbbd93a2..8bb5c03b4969 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/index.html.eex @@ -6,20 +6,14 @@

<%= gettext "Raw Trace" %> <%= if Enum.count(@internal_transactions) > 0 do %> - - - - - + <% raw_trace_text = for {line, _} <- raw_traces_with_lines(@internal_transactions), do: line %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + id: "tx-raw-trace-input", + additional_classes: ["tx-raw-input", "transaction-input"], + clipboard_text: raw_trace_text, + aria_label: gettext("Copy Value"), + title: gettext("Copy Raw Trace"), + style: "float: right;" %> <% end %>

<%= if Enum.count(@internal_transactions) > 0 do %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 6b05e7895be4..c49c49c37a51 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -635,7 +635,7 @@ msgstr "" msgid "Copy Parent Hash" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 #, elixir-autogen, elixir-format msgid "Copy Raw Trace" msgstr "" @@ -686,6 +686,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 #: lib/block_scout_web/templates/transaction/overview.html.eex:463 #: lib/block_scout_web/templates/transaction/overview.html.eex:469 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Copy Value" msgstr "" @@ -2861,7 +2862,7 @@ msgstr "" msgid "truffle flattener" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23 #, elixir-autogen, elixir-format msgid "No trace entries found." msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 864214a368b2..be81fc4f99d0 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -635,7 +635,7 @@ msgstr "" msgid "Copy Parent Hash" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:16 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 #, elixir-autogen, elixir-format msgid "Copy Raw Trace" msgstr "" @@ -686,6 +686,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 #: lib/block_scout_web/templates/transaction/overview.html.eex:463 #: lib/block_scout_web/templates/transaction/overview.html.eex:469 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Copy Value" msgstr "" @@ -2861,7 +2862,7 @@ msgstr "" msgid "truffle flattener" msgstr "" -#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:29 +#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23 #, elixir-autogen, elixir-format msgid "No trace entries found." msgstr "" From 923a4731628f491d4aa83779d4fe7b07be475efc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Sep 2022 19:20:43 +0000 Subject: [PATCH 225/723] Bump credo from 1.6.6 to 1.6.7 Bumps [credo](https://github.com/rrrene/credo) from 1.6.6 to 1.6.7. - [Release notes](https://github.com/rrrene/credo/releases) - [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md) - [Commits](https://github.com/rrrene/credo/compare/v1.6.6...v1.6.7) --- updated-dependencies: - dependency-name: credo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 0ea12393de48..ebd7454167ae 100644 --- a/mix.lock +++ b/mix.lock @@ -9,7 +9,7 @@ "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, "binary": {:hex, :binary, "0.0.5", "20d816f7274ea34f1b673b4cff2fdb9ebec9391a7a68c349070d515c66b1b2cf", [:mix], [], "hexpm", "ee1e9ebcab703a4e24db554957fbb540642fe9327eb9e295cb3f07dd7c11ddb2"}, "briefly": {:git, "https://github.com/CargoSense/briefly.git", "1dd66ee19ca84ed60f4eca47fee59227ba960fb7", []}, - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, + "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, @@ -23,7 +23,7 @@ "cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, - "credo": {:hex, :credo, "1.6.6", "f51f8d45db1af3b2e2f7bee3e6d3c871737bda4a91bff00c5eec276517d1a19c", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "625520ce0984ee0f9f1f198165cd46fa73c1e59a17ebc520038b8fce056a5bdc"}, + "credo": {:hex, :credo, "1.6.7", "323f5734350fd23a456f2688b9430e7d517afb313fbd38671b8a4449798a7854", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "41e110bfb007f7eda7f897c10bf019ceab9a0b269ce79f015d54b0dcf4fc7dd3"}, "csv": {:hex, :csv, "2.4.1", "50e32749953b6bf9818dbfed81cf1190e38cdf24f95891303108087486c5925e", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm", "54508938ac67e27966b10ef49606e3ad5995d665d7fc2688efb3eab1307c9079"}, "dataloader": {:hex, :dataloader, "1.0.10", "a42f07641b1a0572e0b21a2a5ae1be11da486a6790f3d0d14512d96ff3e3bbe9", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 1.0 or ~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "54cd70cec09addf4b2ace14cc186a283a149fd4d3ec5475b155951bf33cd963f"}, "db_connection": {:hex, :db_connection, "2.4.2", "f92e79aff2375299a16bcb069a14ee8615c3414863a6fef93156aee8e86c2ff3", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4fe53ca91b99f55ea249693a0229356a08f4d1a7931d8ffa79289b145fe83668"}, From 1f326d7767cadf8493c9fa8c3c0ec0bc12896852 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 5 Sep 2022 09:33:32 +0300 Subject: [PATCH 226/723] v4.1.8 --- .github/workflows/publish-docker-image-every-push.yml | 2 +- .github/workflows/publish-docker-image-release.yml | 2 +- CHANGELOG.md | 11 +++++++++++ apps/block_scout_web/mix.exs | 2 +- apps/ethereum_jsonrpc/mix.exs | 2 +- apps/explorer/mix.exs | 2 +- apps/indexer/mix.exs | 2 +- mix.exs | 2 +- 8 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-docker-image-every-push.yml b/.github/workflows/publish-docker-image-every-push.yml index 592ddb085dc9..e15694d1a856 100644 --- a/.github/workflows/publish-docker-image-every-push.yml +++ b/.github/workflows/publish-docker-image-every-push.yml @@ -7,7 +7,7 @@ on: env: OTP_VERSION: '24.3.4.1' ELIXIR_VERSION: '1.13.4' - NEXT_RELEASE_VERSION: 4.1.8 + NEXT_RELEASE_VERSION: 5.0.0 jobs: push_to_registry: diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index f9c7a2a18fae..2e524c5d1dc4 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -18,7 +18,7 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest env: - RELEASE_VERSION: 4.1.7 + RELEASE_VERSION: 4.1.8 steps: - name: Check out the repo uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eb2968cffaa..858a440125cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ### Features +### Fixes + +### Chore + +## 4.1.8-beta + +### Features + - [#5968](https://github.com/blockscout/blockscout/pull/5968) - Add call type in the response of txlistinternal API method - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) - [#6001](https://github.com/blockscout/blockscout/pull/6001) - Add ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES env var that filters requests and query node only if the block quantity is "latest" @@ -33,6 +41,9 @@ ### Chore +- [#5921](https://github.com/blockscout/blockscout/pull/5921) - Bump briefly from 25942fb to 1dd66ee +- [#6033](https://github.com/blockscout/blockscout/pull/6033) - Bump sass from 1.54.7 to 1.54.8 in /apps/block_scout_web/assets +- [#6046](https://github.com/blockscout/blockscout/pull/6046) - Bump credo from 1.6.6 to 1.6.7 - [#6045](https://github.com/blockscout/blockscout/pull/6045) - Re-use _btn_copy.html for raw trace page - [#6035](https://github.com/blockscout/blockscout/pull/6035) - Hide copy btn if no raw trace - [#6034](https://github.com/blockscout/blockscout/pull/6034) - Suppress empty sections in supported chain dropdown diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 55ab14dc4755..6de44d043e0a 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -23,7 +23,7 @@ defmodule BlockScoutWeb.Mixfile do dialyzer: :test ], start_permanent: Mix.env() == :prod, - version: "4.1.7" + version: "4.1.8" ] end diff --git a/apps/ethereum_jsonrpc/mix.exs b/apps/ethereum_jsonrpc/mix.exs index 5c51fbe14978..e0012546bd8c 100644 --- a/apps/ethereum_jsonrpc/mix.exs +++ b/apps/ethereum_jsonrpc/mix.exs @@ -23,7 +23,7 @@ defmodule EthereumJsonrpc.MixProject do dialyzer: :test ], start_permanent: Mix.env() == :prod, - version: "4.1.7" + version: "4.1.8" ] end diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 06b170e03e28..3a07d5a81ea2 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -24,7 +24,7 @@ defmodule Explorer.Mixfile do dialyzer: :test ], start_permanent: Mix.env() == :prod, - version: "4.1.7" + version: "8" ] end diff --git a/apps/indexer/mix.exs b/apps/indexer/mix.exs index 66cde322c5db..f8cca5a6830f 100644 --- a/apps/indexer/mix.exs +++ b/apps/indexer/mix.exs @@ -14,7 +14,7 @@ defmodule Indexer.MixProject do elixirc_paths: elixirc_paths(Mix.env()), lockfile: "../../mix.lock", start_permanent: Mix.env() == :prod, - version: "4.1.7" + version: "4.1.8" ] end diff --git a/mix.exs b/mix.exs index 816bead973d6..02e6f35047ff 100644 --- a/mix.exs +++ b/mix.exs @@ -7,7 +7,7 @@ defmodule BlockScout.Mixfile do [ # app: :block_scout, # aliases: aliases(config_env()), - version: "4.1.7", + version: "4.1.8", apps_path: "apps", deps: deps(), dialyzer: dialyzer(), From 771631eac7bb11222e6291a626f196f1e7ec6925 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 5 Sep 2022 09:42:27 +0300 Subject: [PATCH 227/723] Fix version in apps/explorer/mix.exs --- apps/explorer/mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 3a07d5a81ea2..8f27ecc6b734 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -24,7 +24,7 @@ defmodule Explorer.Mixfile do dialyzer: :test ], start_permanent: Mix.env() == :prod, - version: "8" + version: "4.1.8" ] end From f0af353776f69984a562b0145e2a8d1a89a994dd Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 5 Sep 2022 20:22:14 +0300 Subject: [PATCH 228/723] Remove double quotes from build args in release CI --- .../publish-docker-image-release.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index 2e524c5d1dc4..e6f24999bf0a 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -54,17 +54,17 @@ jobs: linux/arm64 linux/amd64 build-args: | - CACHE_EXCHANGE_RATES_PERIOD="" - DISABLE_READ_API="false" - API_PATH="/" - NETWORK_PATH="/" - DISABLE_WEBAPP="false" - DISABLE_WRITE_API="false" - CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER="" - WOBSERVER_ENABLED="false" - ADMIN_PANEL_ENABLED="" - CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL="" - SOCKET_ROOT="" + CACHE_EXCHANGE_RATES_PERIOD= + DISABLE_READ_API=false + API_PATH=/ + NETWORK_PATH=/ + DISABLE_WEBAPP=false + DISABLE_WRITE_API=false + CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER= + WOBSERVER_ENABLED=false + ADMIN_PANEL_ENABLED= + CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL= + SOCKET_ROOT= merge-master-after-release: name: Merge 'master' to specific branch after release From 5d4de6c9cc8d078a151ce940dcfd39f8c0e5f7d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 19:01:54 +0000 Subject: [PATCH 229/723] Bump jest-environment-jsdom in /apps/block_scout_web/assets Bumps [jest-environment-jsdom](https://github.com/facebook/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.0.1 to 29.0.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.2/packages/jest-environment-jsdom) --- updated-dependencies: - dependency-name: jest-environment-jsdom dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 162 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index acae87ba3198..32d8491bc674 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -80,7 +80,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.1", - "jest-environment-jsdom": "^29.0.1", + "jest-environment-jsdom": "^29.0.2", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", @@ -2637,15 +2637,15 @@ } }, "node_modules/@jest/environment": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.1.tgz", - "integrity": "sha512-iLcFfoq2K6DAB+Mc+2VNLzZVmHdwQFeSqvoM/X8SMON6s/+yEi1iuRX3snx/JfwSnvmiMXjSr0lktxNxOcqXYA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.2.tgz", + "integrity": "sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", - "jest-mock": "^29.0.1" + "jest-mock": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2677,17 +2677,17 @@ } }, "node_modules/@jest/fake-timers": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.1.tgz", - "integrity": "sha512-XZ+kAhLChVQ+KJNa5034p7O1Mz3vtWrelxDcMoxhZkgqmWDaEQAW9qJeutaeCfPvwaEwKYVyKDYfWpcyT8RiMw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.2.tgz", + "integrity": "sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.1", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1" + "jest-message-util": "^29.0.2", + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3004,9 +3004,9 @@ } }, "node_modules/@jest/types": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.1.tgz", - "integrity": "sha512-ft01rxzVsbh9qZPJ6EFgAIj3PT9FCRfBF9Xljo2/33VDOUjLZr0ZJ2oKANqh9S/K0/GERCsHDAQlBwj7RxA+9g==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.2.tgz", + "integrity": "sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -10905,18 +10905,18 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.1.tgz", - "integrity": "sha512-rMF501kfui+bw4AmwowLA2bNaYb633A3ejFMN5pVU0AeOqLv2NbMAY5XzzlMr/+lM1itEf+3ZdCr9dGGrUfoxg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.2.tgz", + "integrity": "sha512-hWqC9FQI5yT04lTd4VJnzT5QObxq0xrSrqpGkqsYfxPeJYjyhriI7W2oJC5HZ1UbhnvA+8GS1nzgPsstvRpdVw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1", + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2", "jsdom": "^20.0.0" }, "engines": { @@ -11111,18 +11111,18 @@ } }, "node_modules/jest-message-util": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.1.tgz", - "integrity": "sha512-wRMAQt3HrLpxSubdnzOo68QoTfQ+NLXFzU0Heb18ZUzO2S9GgaXNEdQ4rpd0fI9dq2NXkpCk1IUWSqzYKji64A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.2.tgz", + "integrity": "sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -11201,12 +11201,12 @@ } }, "node_modules/jest-mock": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.1.tgz", - "integrity": "sha512-i1yTceg2GKJwUNZFjIzrH7Y74fN1SKJWxQX/Vu3LT4TiJerFARH5l+4URNyapZ+DNpchHYrGOP2deVbn3ma8JA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.2.tgz", + "integrity": "sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*" }, "engines": { @@ -11707,12 +11707,12 @@ } }, "node_modules/jest-util": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.1.tgz", - "integrity": "sha512-GIWkgNfkeA9d84rORDHPGGTFBrRD13A38QVSKE0bVrGSnoR1KDn8Kqz+0yI5kezMgbT/7zrWaruWP1Kbghlb2A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.2.tgz", + "integrity": "sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -14862,9 +14862,9 @@ } }, "node_modules/pretty-format": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.1.tgz", - "integrity": "sha512-iTHy3QZMzuL484mSTYbQIM1AHhEQsH8mXWS2/vd2yFBYnG3EBqGiMONo28PlPgrW7P/8s/1ISv+y7WH306l8cw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.2.tgz", + "integrity": "sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -20469,15 +20469,15 @@ } }, "@jest/environment": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.1.tgz", - "integrity": "sha512-iLcFfoq2K6DAB+Mc+2VNLzZVmHdwQFeSqvoM/X8SMON6s/+yEi1iuRX3snx/JfwSnvmiMXjSr0lktxNxOcqXYA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.2.tgz", + "integrity": "sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA==", "dev": true, "requires": { - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", - "jest-mock": "^29.0.1" + "jest-mock": "^29.0.2" } }, "@jest/expect": { @@ -20500,17 +20500,17 @@ } }, "@jest/fake-timers": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.1.tgz", - "integrity": "sha512-XZ+kAhLChVQ+KJNa5034p7O1Mz3vtWrelxDcMoxhZkgqmWDaEQAW9qJeutaeCfPvwaEwKYVyKDYfWpcyT8RiMw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.2.tgz", + "integrity": "sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.1", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1" + "jest-message-util": "^29.0.2", + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2" } }, "@jest/globals": { @@ -20750,9 +20750,9 @@ } }, "@jest/types": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.1.tgz", - "integrity": "sha512-ft01rxzVsbh9qZPJ6EFgAIj3PT9FCRfBF9Xljo2/33VDOUjLZr0ZJ2oKANqh9S/K0/GERCsHDAQlBwj7RxA+9g==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.2.tgz", + "integrity": "sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", @@ -26949,18 +26949,18 @@ } }, "jest-environment-jsdom": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.1.tgz", - "integrity": "sha512-rMF501kfui+bw4AmwowLA2bNaYb633A3ejFMN5pVU0AeOqLv2NbMAY5XzzlMr/+lM1itEf+3ZdCr9dGGrUfoxg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.2.tgz", + "integrity": "sha512-hWqC9FQI5yT04lTd4VJnzT5QObxq0xrSrqpGkqsYfxPeJYjyhriI7W2oJC5HZ1UbhnvA+8GS1nzgPsstvRpdVw==", "dev": true, "requires": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1", + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2", "jsdom": "^20.0.0" } }, @@ -27106,18 +27106,18 @@ } }, "jest-message-util": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.1.tgz", - "integrity": "sha512-wRMAQt3HrLpxSubdnzOo68QoTfQ+NLXFzU0Heb18ZUzO2S9GgaXNEdQ4rpd0fI9dq2NXkpCk1IUWSqzYKji64A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.2.tgz", + "integrity": "sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -27174,12 +27174,12 @@ } }, "jest-mock": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.1.tgz", - "integrity": "sha512-i1yTceg2GKJwUNZFjIzrH7Y74fN1SKJWxQX/Vu3LT4TiJerFARH5l+4URNyapZ+DNpchHYrGOP2deVbn3ma8JA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.2.tgz", + "integrity": "sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*" } }, @@ -27560,12 +27560,12 @@ } }, "jest-util": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.1.tgz", - "integrity": "sha512-GIWkgNfkeA9d84rORDHPGGTFBrRD13A38QVSKE0bVrGSnoR1KDn8Kqz+0yI5kezMgbT/7zrWaruWP1Kbghlb2A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.2.tgz", + "integrity": "sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -29964,9 +29964,9 @@ "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==" }, "pretty-format": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.1.tgz", - "integrity": "sha512-iTHy3QZMzuL484mSTYbQIM1AHhEQsH8mXWS2/vd2yFBYnG3EBqGiMONo28PlPgrW7P/8s/1ISv+y7WH306l8cw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.2.tgz", + "integrity": "sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index e3e78083bd97..7b4f31f6c90f 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -92,7 +92,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.1", - "jest-environment-jsdom": "^29.0.1", + "jest-environment-jsdom": "^29.0.2", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", From d21f64dd1583b9a5dfdf5bbc8d768a1dc6788e75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 19:16:28 +0000 Subject: [PATCH 230/723] Bump @babel/core from 7.18.13 to 7.19.0 in /apps/block_scout_web/assets Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.13 to 7.19.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.19.0/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 206 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index acae87ba3198..87c07e59fc3a 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -66,7 +66,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.18.13", + "@babel/core": "^7.19.0", "@babel/preset-env": "^7.18.10", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", @@ -137,28 +137,28 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", + "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.0", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -174,11 +174,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "dependencies": { - "@babel/types": "^7.18.13", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -211,11 +211,11 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "dependencies": { - "@babel/compat-data": "^7.18.8", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" @@ -301,12 +301,12 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -347,18 +347,18 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -492,13 +492,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz", - "integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "dependencies": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -518,9 +518,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1736,18 +1736,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", + "@babel/generator": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1756,9 +1756,9 @@ } }, "node_modules/@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dependencies": { "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", @@ -18776,25 +18776,25 @@ } }, "@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==" + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==" }, "@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", + "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.0", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -18803,11 +18803,11 @@ } }, "@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "requires": { - "@babel/types": "^7.18.13", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" } @@ -18831,11 +18831,11 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "requires": { - "@babel/compat-data": "^7.18.8", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" @@ -18894,12 +18894,12 @@ } }, "@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" } }, "@babel/helper-hoist-variables": { @@ -18928,18 +18928,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "requires": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helper-optimise-call-expression": { @@ -19034,13 +19034,13 @@ } }, "@babel/helpers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz", - "integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "requires": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/highlight": { @@ -19054,9 +19054,9 @@ } }, "@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==" + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -19874,26 +19874,26 @@ } }, "@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", + "@babel/generator": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "requires": { "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index e3e78083bd97..04498add7b37 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -78,7 +78,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.18.13", + "@babel/core": "^7.19.0", "@babel/preset-env": "^7.18.10", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", From 478986393c0d7cc7c5762a6da0b14c0917823dff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 08:39:23 +0000 Subject: [PATCH 231/723] Bump @babel/preset-env in /apps/block_scout_web/assets Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.10 to 7.19.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.19.0/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 184 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 94 insertions(+), 92 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index a8f8a2b80397..6c7160344f4f 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -67,7 +67,7 @@ }, "devDependencies": { "@babel/core": "^7.19.0", - "@babel/preset-env": "^7.18.10", + "@babel/preset-env": "^7.19.0", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", @@ -249,9 +249,9 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -377,9 +377,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "engines": { "node": ">=6.9.0" } @@ -561,13 +561,13 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz", - "integrity": "sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.0.tgz", + "integrity": "sha512-nhEByMUTx3uZueJ/QkJuSlCfN4FGg+xy+vRsfGQGzSauq5ks2Deid2+05Q3KhfaUjvec1IGhw/Zm3cFm8JigTQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" }, @@ -1118,16 +1118,17 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-replace-supers": "^7.18.9", "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" @@ -1155,9 +1156,9 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz", - "integrity": "sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.18.9" @@ -1314,14 +1315,14 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz", - "integrity": "sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", "dev": true, "dependencies": { "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, @@ -1349,13 +1350,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.0.tgz", + "integrity": "sha512-HDSuqOQzkU//kfGdiHBt71/hkDTApw4U/cMVgKgX7PqfB3LOaK+2GtCEsBu1dL9CkswDm0Gwehht1dCr421ULQ==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -1503,12 +1504,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" }, "engines": { @@ -1595,18 +1596,18 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", - "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.0.tgz", + "integrity": "sha512-1YUju1TAFuzjIQqNM9WsF4U6VbD/8t3wEAlw3LFYuuEr+ywqLRcSXxFKz4DCEj+sN94l/XTDiUXYRrsvMpz9WQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/compat-data": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.18.10", + "@babel/plugin-proposal-async-generator-functions": "^7.19.0", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-class-static-block": "^7.18.6", "@babel/plugin-proposal-dynamic-import": "^7.18.6", @@ -1640,9 +1641,9 @@ "@babel/plugin-transform-async-to-generator": "^7.18.6", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", "@babel/plugin-transform-block-scoping": "^7.18.9", - "@babel/plugin-transform-classes": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", @@ -1652,9 +1653,9 @@ "@babel/plugin-transform-member-expression-literals": "^7.18.6", "@babel/plugin-transform-modules-amd": "^7.18.6", "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.9", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.0", "@babel/plugin-transform-new-target": "^7.18.6", "@babel/plugin-transform-object-super": "^7.18.6", "@babel/plugin-transform-parameters": "^7.18.8", @@ -1662,14 +1663,14 @@ "@babel/plugin-transform-regenerator": "^7.18.6", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.9", + "@babel/plugin-transform-spread": "^7.19.0", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", "@babel/plugin-transform-unicode-escapes": "^7.18.10", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.10", + "@babel/types": "^7.19.0", "babel-plugin-polyfill-corejs2": "^0.3.2", "babel-plugin-polyfill-corejs3": "^0.5.3", "babel-plugin-polyfill-regenerator": "^0.4.0", @@ -18857,9 +18858,9 @@ } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", + "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -18952,9 +18953,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==" + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==" }, "@babel/helper-remap-async-to-generator": { "version": "7.18.9", @@ -19079,13 +19080,13 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz", - "integrity": "sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.19.0.tgz", + "integrity": "sha512-nhEByMUTx3uZueJ/QkJuSlCfN4FGg+xy+vRsfGQGzSauq5ks2Deid2+05Q3KhfaUjvec1IGhw/Zm3cFm8JigTQ==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-remap-async-to-generator": "^7.18.9", "@babel/plugin-syntax-async-generators": "^7.8.4" } @@ -19447,16 +19448,17 @@ } }, "@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz", + "integrity": "sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.19.0", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-replace-supers": "^7.18.9", "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" @@ -19472,9 +19474,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.9.tgz", - "integrity": "sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA==", + "version": "7.18.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", + "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.18.9" @@ -19571,14 +19573,14 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz", - "integrity": "sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.0.tgz", + "integrity": "sha512-x9aiR0WXAWmOWsqcsnrzGR+ieaTMVyGyffPVA7F8cXAGt/UxefYv6uSHZLkAFChN5M5Iy1+wjE+xJuPt22H39A==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } @@ -19594,13 +19596,13 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.0.tgz", + "integrity": "sha512-HDSuqOQzkU//kfGdiHBt71/hkDTApw4U/cMVgKgX7PqfB3LOaK+2GtCEsBu1dL9CkswDm0Gwehht1dCr421ULQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0" } }, "@babel/plugin-transform-new-target": { @@ -19693,12 +19695,12 @@ } }, "@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" } }, @@ -19749,18 +19751,18 @@ } }, "@babel/preset-env": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", - "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.19.0.tgz", + "integrity": "sha512-1YUju1TAFuzjIQqNM9WsF4U6VbD/8t3wEAlw3LFYuuEr+ywqLRcSXxFKz4DCEj+sN94l/XTDiUXYRrsvMpz9WQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", + "@babel/compat-data": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.18.10", + "@babel/plugin-proposal-async-generator-functions": "^7.19.0", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-class-static-block": "^7.18.6", "@babel/plugin-proposal-dynamic-import": "^7.18.6", @@ -19794,9 +19796,9 @@ "@babel/plugin-transform-async-to-generator": "^7.18.6", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", "@babel/plugin-transform-block-scoping": "^7.18.9", - "@babel/plugin-transform-classes": "^7.18.9", + "@babel/plugin-transform-classes": "^7.19.0", "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.18.13", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", @@ -19806,9 +19808,9 @@ "@babel/plugin-transform-member-expression-literals": "^7.18.6", "@babel/plugin-transform-modules-amd": "^7.18.6", "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.9", + "@babel/plugin-transform-modules-systemjs": "^7.19.0", "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.0", "@babel/plugin-transform-new-target": "^7.18.6", "@babel/plugin-transform-object-super": "^7.18.6", "@babel/plugin-transform-parameters": "^7.18.8", @@ -19816,14 +19818,14 @@ "@babel/plugin-transform-regenerator": "^7.18.6", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.9", + "@babel/plugin-transform-spread": "^7.19.0", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", "@babel/plugin-transform-unicode-escapes": "^7.18.10", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.10", + "@babel/types": "^7.19.0", "babel-plugin-polyfill-corejs2": "^0.3.2", "babel-plugin-polyfill-corejs3": "^0.5.3", "babel-plugin-polyfill-regenerator": "^0.4.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 8938e894003b..fd26930d7a93 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -79,7 +79,7 @@ }, "devDependencies": { "@babel/core": "^7.19.0", - "@babel/preset-env": "^7.18.10", + "@babel/preset-env": "^7.19.0", "autoprefixer": "^10.4.8", "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", From 7825a19773523bbdabbaf818b140553cef787be8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 08:39:55 +0000 Subject: [PATCH 232/723] Bump jest from 29.0.1 to 29.0.2 in /apps/block_scout_web/assets Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.0.1 to 29.0.2. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.2/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 970 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 486 insertions(+), 486 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index a8f8a2b80397..91f5734d2972 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -79,7 +79,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.1", + "jest": "^29.0.2", "jest-environment-jsdom": "^29.0.2", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", @@ -2433,16 +2433,16 @@ } }, "node_modules/@jest/console": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.1.tgz", - "integrity": "sha512-SxLvSKf9gk4Rvt3p2KRQWVQ3sVj7S37rjlCHwp2+xNcRO/X+Uw0idbkfOtciUpjghHIxyggqcrrKhThQ+vClLQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.2.tgz", + "integrity": "sha512-Fv02ijyhF4D/Wb3DvZO3iBJQz5DnzpJEIDBDbvje8Em099N889tNMUnBw7SalmSuOI+NflNG40RA1iK71kImPw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", "slash": "^3.0.0" }, "engines": { @@ -2520,16 +2520,16 @@ } }, "node_modules/@jest/core": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.1.tgz", - "integrity": "sha512-EcFrXkYh8I1GYHRH9V4TU7jr4P6ckaPqGo/z4AIJjHDZxicjYgWB6fx1xFb5bhEM87eUjCF4FAY5t+RamLWQmA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.2.tgz", + "integrity": "sha512-imP5M6cdpHEOkmcuFYZuM5cTG1DAF7ZlVNCq1+F7kbqme2Jcl+Kh4M78hihM76DJHNkurbv4UVOnejGxBKEmww==", "dev": true, "dependencies": { - "@jest/console": "^29.0.1", - "@jest/reporters": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/reporters": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -2537,20 +2537,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.1", - "jest-haste-map": "^29.0.1", - "jest-message-util": "^29.0.1", + "jest-config": "^29.0.2", + "jest-haste-map": "^29.0.2", + "jest-message-util": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-resolve-dependencies": "^29.0.1", - "jest-runner": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", - "jest-watcher": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-resolve-dependencies": "^29.0.2", + "jest-runner": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", + "jest-watcher": "^29.0.2", "micromatch": "^4.0.4", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -2652,22 +2652,22 @@ } }, "node_modules/@jest/expect": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.1.tgz", - "integrity": "sha512-qKB3q52XDV8VUEiqKKLgLrJx7puQ8sYVqIDlul6n7SIXWS97DOK3KqbR2rDDaMtmenRHqEUl2fI+aFzx0oSemA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.2.tgz", + "integrity": "sha512-y/3geZ92p2/zovBm/F+ZjXUJ3thvT9IRzD6igqaWskFE2aR0idD+N/p5Lj/ZautEox/9RwEc6nqergebeh72uQ==", "dev": true, "dependencies": { - "expect": "^29.0.1", - "jest-snapshot": "^29.0.1" + "expect": "^29.0.2", + "jest-snapshot": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.1.tgz", - "integrity": "sha512-Tw5kUUOKmXGQDmQ9TSgTraFFS7HMC1HG/B7y0AN2G2UzjdAXz9BzK2rmNpCSDl7g7y0Gf/VLBm//blonvhtOTQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.2.tgz", + "integrity": "sha512-+wcQF9khXKvAEi8VwROnCWWmHfsJYCZAs5dmuMlJBKk57S6ZN2/FQMIlo01F29fJyT8kV/xblE7g3vkIdTLOjw==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0" @@ -2694,31 +2694,31 @@ } }, "node_modules/@jest/globals": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.1.tgz", - "integrity": "sha512-BtZWrVrKRKNUt7T1H2S8Mz31PN7ItROCmH+V5pn10hJDUfjOCTIUwb0WtLZzm0f1tJ3Uvx+5lVZrF/VTKqNaFg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.2.tgz", + "integrity": "sha512-4hcooSNJCVXuTu07/VJwCWW6HTnjLtQdqlcGisK6JST7z2ixa8emw4SkYsOk7j36WRc2ZUEydlUePnOIOTCNXg==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.1", - "@jest/expect": "^29.0.1", - "@jest/types": "^29.0.1", - "jest-mock": "^29.0.1" + "@jest/environment": "^29.0.2", + "@jest/expect": "^29.0.2", + "@jest/types": "^29.0.2", + "jest-mock": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.1.tgz", - "integrity": "sha512-dM3L8JmYYOsdeXUUVZClQy67Tz/v1sMo9h4AQv2U+716VLHV0zdA6Hh4FQNAHMhYw/95dbZbPX8Q+TRR7Rw+wA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.2.tgz", + "integrity": "sha512-Kr41qejRQHHkCgWHC9YwSe7D5xivqP4XML+PvgwsnRFaykKdNflDUb4+xLXySOU+O/bPkVdFpGzUpVNSJChCrw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -2731,9 +2731,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", + "jest-worker": "^29.0.2", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -2811,9 +2811,9 @@ } }, "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "dependencies": { "@types/node": "*", @@ -2878,13 +2878,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.1.tgz", - "integrity": "sha512-XCA4whh/igxjBaR/Hg8qwFd/uTsauoD7QAdAYUjV2CSGx0+iunhjoCRRWTwqjQrETRqOJABx6kNfw0+C0vMSgQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.2.tgz", + "integrity": "sha512-b5rDc0lLL6Kx73LyCx6370k9uZ8o5UKdCpMS6Za3ke7H9y8PtAU305y6TeghpBmf2In8p/qqi3GpftgzijSsNw==", "dev": true, "dependencies": { - "@jest/console": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/types": "^29.0.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -2893,14 +2893,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.1.tgz", - "integrity": "sha512-3GhSBMCRcWXGluP2Dw7CLP6mNke/t+EcftF5YjzhX1BJmqcatMbtZVwjuCfZy0TCME1GevXy3qTyV5PLpwIFKQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.2.tgz", + "integrity": "sha512-fsyZqHBlXNMv5ZqjQwCuYa2pskXCO0DVxh5aaVCuAtwzHuYEGrhordyEncBLQNuCGQSYgElrEEmS+7wwFnnMKw==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.1", + "@jest/test-result": "^29.0.2", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "slash": "^3.0.0" }, "engines": { @@ -2908,22 +2908,22 @@ } }, "node_modules/@jest/transform": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.1.tgz", - "integrity": "sha512-6UxXtqrPScFdDhoip8ys60dQAIYppQinyR87n9nlasR/ZnFfJohKToqzM29KK4gb9gHRv5oDFChdqZKE0SIhsg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.2.tgz", + "integrity": "sha512-lajVQx2AnsR+Pa17q2zR7eikz2PkPs1+g/qPbZkqQATeS/s6eT55H+yHcsLfuI/0YQ/4VSBepSu3bOX+44q0aA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.1", + "jest-util": "^29.0.2", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -3345,9 +3345,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.0.tgz", - "integrity": "sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==", + "version": "7.18.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.1.tgz", + "integrity": "sha512-FSdLaZh2UxaMuLp9lixWaHq/golWTRWOnRsAXzDTDSDOQLuZb1nsdCt6pJSPWSEQt2eFZ2YVk3oYhn+1kLMeMA==", "dev": true, "dependencies": { "@babel/types": "^7.3.0" @@ -4497,15 +4497,15 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/babel-jest": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.1.tgz", - "integrity": "sha512-wyI9r8tqwsZEMWiIaYjdUJ6ztZIO4DMWpGq7laW34wR71WtRS+D/iBEtXOP5W2aSYCVUQMsypRl/xiJYZznnTg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.2.tgz", + "integrity": "sha512-yTu4/WSi/HzarjQtrJSwV+/0maoNt+iP0DmpvFJdv9yY+5BuNle8TbheHzzcSWj5gIHfuhpbLYHWRDYhWKyeKQ==", "dev": true, "dependencies": { - "@jest/transform": "^29.0.1", + "@jest/transform": "^29.0.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.0", + "babel-preset-jest": "^29.0.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -4632,9 +4632,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.0.tgz", - "integrity": "sha512-B9oaXrlxXHFWeWqhDPg03iqQd2UN/mg/VdZOsLaqAVBkztru3ctTryAI4zisxLEEgmcUnLTKewqx0gGifoXD3A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", + "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -4726,12 +4726,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.0.tgz", - "integrity": "sha512-B5Ke47Xcs8rDF3p1korT3LoilpADCwbG93ALqtvqu6Xpf4d8alKkrCBTExbNzdHJcIuEPpfYvEaFFRGee2kUgQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", + "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.0.0", + "babel-plugin-jest-hoist": "^29.0.2", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -8433,16 +8433,16 @@ } }, "node_modules/expect": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.1.tgz", - "integrity": "sha512-yQgemsjLU+1S8t2A7pXT3Sn/v5/37LY8J+tocWtKEA0iEYYc6gfKbbJJX2fxHZmd7K9WpdbQqXUpmYkq1aewYg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.2.tgz", + "integrity": "sha512-JeJlAiLKn4aApT4pzUXBVxl3NaZidWIOdg//smaIlP9ZMBDkHZGFd9ubphUZP9pUyDEo7bC6M0IIZR51o75qQw==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.0.1", + "@jest/expect-utils": "^29.0.2", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1" + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10364,15 +10364,15 @@ } }, "node_modules/jest": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.1.tgz", - "integrity": "sha512-liHkwzaW6iwQyhRBFj0A4ZYKcsQ7ers1s62CCT95fPeNzoxT/vQRWwjTT4e7jpSCwrvPP2t1VESuy7GrXcr2ug==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.2.tgz", + "integrity": "sha512-enziNbNUmXTcTaTP/Uq5rV91r0Yqy2UKzLUIabxMpGm9YHz8qpbJhiRnNVNvm6vzWfzt/0o97NEHH8/3udoClA==", "dev": true, "dependencies": { - "@jest/core": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/core": "^29.0.2", + "@jest/types": "^29.0.2", "import-local": "^3.0.2", - "jest-cli": "^29.0.1" + "jest-cli": "^29.0.2" }, "bin": { "jest": "bin/jest.js" @@ -10403,28 +10403,28 @@ } }, "node_modules/jest-circus": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.1.tgz", - "integrity": "sha512-I5J4LyK3qPo8EnqPmxsMAVR+2SFx7JOaZsbqW9xQmk4UDmTCD92EQgS162Ey3Jq6CfpKJKFDhzhG3QqiE0fRbw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.2.tgz", + "integrity": "sha512-YTPEsoE1P1X0bcyDQi3QIkpt2Wl9om9k2DQRuLFdS5x8VvAKSdYAVJufgvudhnKgM8WHvvAzhBE+1DRQB8x1CQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.1", - "@jest/expect": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/expect": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.1", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", + "jest-each": "^29.0.2", + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", "p-limit": "^3.1.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -10503,21 +10503,21 @@ } }, "node_modules/jest-cli": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.1.tgz", - "integrity": "sha512-XozBHtoJCS6mnjCxNESyGm47Y4xSWzNlBJj4tix9nGrG6m068B83lrTWKtjYAenYSfOqyYVpQCkyqUp35IT+qA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.2.tgz", + "integrity": "sha512-tlf8b+4KcUbBGr25cywIi3+rbZ4+G+SiG8SvY552m9sRZbXPafdmQRyeVE/C/R8K+TiBAMrTIUmV2SlStRJ40g==", "dev": true, "dependencies": { - "@jest/core": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/core": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-config": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -10607,31 +10607,31 @@ } }, "node_modules/jest-config": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.1.tgz", - "integrity": "sha512-3duIx5ucEPIsUOESDTuasMfqHonD0oZRjqHycIMHSC4JwbvHDjAWNKN/NiM0ZxHXjAYrMTLt2QxSQ+IqlbYE5A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.2.tgz", + "integrity": "sha512-RU4gzeUNZAFktYVzDGimDxeYoaiTnH100jkYYZgldqFamaZukF0IqmFx8+QrzVeEWccYg10EEJT3ox1Dq5b74w==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.1", - "@jest/types": "^29.0.1", - "babel-jest": "^29.0.1", + "@jest/test-sequencer": "^29.0.2", + "@jest/types": "^29.0.2", + "babel-jest": "^29.0.2", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.1", - "jest-environment-node": "^29.0.1", + "jest-circus": "^29.0.2", + "jest-environment-node": "^29.0.2", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-runner": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-runner": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -10722,15 +10722,15 @@ } }, "node_modules/jest-diff": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.1.tgz", - "integrity": "sha512-l8PYeq2VhcdxG9tl5cU78ClAlg/N7RtVSp0v3MlXURR0Y99i6eFnegmasOandyTmO6uEdo20+FByAjBFEO9nuw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.2.tgz", + "integrity": "sha512-b9l9970sa1rMXH1owp2Woprmy42qIwwll/htsw4Gf7+WuSp5bZxNhkKHDuCGKL+HoHn1KhcC+tNEeAPYBkD2Jg==", "dev": true, "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10819,16 +10819,16 @@ } }, "node_modules/jest-each": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.1.tgz", - "integrity": "sha512-UmCZYU9LPvRfSDoCrKJqrCNmgTYGGb3Ga6IVsnnVjedBTRRR9GJMca7UmDKRrJ1s+U632xrVtiRD27BxaG1aaQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.2.tgz", + "integrity": "sha512-+sA9YjrJl35iCg0W0VCrgCVj+wGhDrrKQ+YAqJ/DHBC4gcDFAeePtRRhpJnX9gvOZ63G7gt52pwp2PesuSEx0Q==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.1", - "pretty-format": "^29.0.1" + "jest-util": "^29.0.2", + "pretty-format": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10924,17 +10924,17 @@ } }, "node_modules/jest-environment-node": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.1.tgz", - "integrity": "sha512-PcIRBrEBFAPBqkbL53ZpEvTptcAnOW6/lDfqBfACMm3vkVT0N7DcfkH/hqNSbDmSxzGr0FtJI6Ej3TPhveWCMA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.2.tgz", + "integrity": "sha512-4Fv8GXVCToRlMzDO94gvA8iOzKxQ7rhAbs8L+j8GPyTxGuUiYkV+63LecGeVdVhsL2KXih1sKnoqmH6tp89J7Q==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1" + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10950,20 +10950,20 @@ } }, "node_modules/jest-haste-map": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.1.tgz", - "integrity": "sha512-gcKOAydafpGoSBvcj/mGCfhOKO8fRLkAeee1KXGdcJ1Pb9O2nnOl4I8bQSIID2MaZeMHtLLgNboukh/pUGkBtg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.2.tgz", + "integrity": "sha512-SOorh2ysQ0fe8gsF4gaUDhoMIWAvi2hXOkwThEO48qT3JqA8GLAUieQcIvdSEd6M0scRDe1PVmKc5tXR3Z0U0A==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-util": "^29.0.2", + "jest-worker": "^29.0.2", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -10984,9 +10984,9 @@ } }, "node_modules/jest-haste-map/node_modules/jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "dependencies": { "@types/node": "*", @@ -11013,28 +11013,28 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.1.tgz", - "integrity": "sha512-5tISHJphB+sCmKXtVHJGQGltj7ksrLLb9vkuNWwFR86Of1tfzjskvrrrZU1gSzEfWC+qXIn4tuh8noKHYGMIPA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.2.tgz", + "integrity": "sha512-5f0493qDeAxjUldkBSQg5D1cLadRgZVyWpTQvfJeQwQUpHQInE21AyVHVv64M7P2Ue8Z5EZ4BAcoDS/dSPPgMw==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.1.tgz", - "integrity": "sha512-/e6UbCDmprRQFnl7+uBKqn4G22c/OmwriE5KCMVqxhElKCQUDcFnq5XM9iJeKtzy4DUjxT27y9VHmKPD8BQPaw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.2.tgz", + "integrity": "sha512-s62YkHFBfAx0JLA2QX1BlnCRFwHRobwAv2KP1+YhjzF6ZCbCVrf1sG8UJyn62ZUsDaQKpoo86XMTjkUyO5aWmQ==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.0.1", + "jest-diff": "^29.0.2", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11240,17 +11240,17 @@ } }, "node_modules/jest-resolve": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.1.tgz", - "integrity": "sha512-dwb5Z0lLZbptlBtPExqsHfdDamXeiRLv4vdkfPrN84vBwLSWHWcXjlM2JXD/KLSQfljBcXbzI/PDvUJuTQ84Nw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.2.tgz", + "integrity": "sha512-V3uLjSA+EHxLtjIDKTBXnY71hyx+8lusCqPXvqzkFO1uCGvVpjBfuOyp+KOLBNSuY61kM2jhepiMwt4eiJS+Vw==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -11260,13 +11260,13 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.1.tgz", - "integrity": "sha512-fUGcYlSc1NzNz+tsHDjjG0rclw6blJcFZsLEsezxm/n54bAm9HFvJxgBuCV1CJQoPtIx6AfR+tXkR9lpWJs2LQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.2.tgz", + "integrity": "sha512-fSAu6eIG7wtGdnPJUkVVdILGzYAP9Dj/4+zvC8BrGe8msaUMJ9JeygU0Hf9+Uor6/icbuuzQn5See1uajLnAqg==", "dev": true, "dependencies": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.1" + "jest-snapshot": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11343,30 +11343,30 @@ } }, "node_modules/jest-runner": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.1.tgz", - "integrity": "sha512-XeFfPmHtO7HyZyD1uJeO4Oqa8PyTbDHzS1YdGrvsFXk/A5eXinbqA5a42VUEqvsKQgNnKTl5NJD0UtDWg7cQ2A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.2.tgz", + "integrity": "sha512-+D82iPZejI8t+SfduOO1deahC/QgLFf8aJBO++Znz3l2ETtOMdM7K4ATsGWzCFnTGio5yHaRifg1Su5Ybza5Nw==", "dev": true, "dependencies": { - "@jest/console": "^29.0.1", - "@jest/environment": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/environment": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.1", - "jest-haste-map": "^29.0.1", - "jest-leak-detector": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-resolve": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-util": "^29.0.1", - "jest-watcher": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-environment-node": "^29.0.2", + "jest-haste-map": "^29.0.2", + "jest-leak-detector": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-resolve": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-util": "^29.0.2", + "jest-watcher": "^29.0.2", + "jest-worker": "^29.0.2", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -11433,9 +11433,9 @@ } }, "node_modules/jest-runner/node_modules/jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "dependencies": { "@types/node": "*", @@ -11484,31 +11484,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.1.tgz", - "integrity": "sha512-yDgz5OE0Rm44PUAfTqwA6cDFnTYnVcYbRpPECsokSASQ0I5RXpnKPVr2g0CYZWKzbsXqqtmM7TIk7CAutZJ7gQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.2.tgz", + "integrity": "sha512-DO6F81LX4okOgjJLkLySv10E5YcV5NHUbY1ZqAUtofxdQE+q4hjH0P2gNsY8x3z3sqgw7O/+919SU4r18Fcuig==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/globals": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/globals": "^29.0.2", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-mock": "^29.0.1", + "jest-haste-map": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-mock": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -11587,9 +11587,9 @@ } }, "node_modules/jest-snapshot": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.1.tgz", - "integrity": "sha512-OuYGp+lsh7RhB3DDX36z/pzrGm2F740e5ERG9PQpJyDknCRtWdhaehBQyMqDnsQdKkvC2zOcetcxskiHjO7e8Q==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.2.tgz", + "integrity": "sha512-26C4PzGKaX5gkoKg8UzYGVy2HPVcTaROSkf0gwnHu3lGeTB7bAIJBovvVPZoiJ20IximJELQs/r8WSDRCuGX2A==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -11598,23 +11598,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/expect-utils": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.1", + "expect": "^29.0.2", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.1", + "jest-diff": "^29.0.2", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.1", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", + "jest-haste-map": "^29.0.2", + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "semver": "^7.3.5" }, "engines": { @@ -11794,17 +11794,17 @@ } }, "node_modules/jest-validate": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.1.tgz", - "integrity": "sha512-mS4q7F738YXZFWBPqE+NjHU/gEOs7IBIFQ8i9zq5EO691cLrUbLhFq4larf8/lNcmauRO71tn/+DTW2y+MrLow==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.2.tgz", + "integrity": "sha512-AeRKm7cEucSy7tr54r3LhiGIXYvOILUwBM1S7jQkKs6YelwAlWKsmZGVrQR7uwsd31rBTnR5NQkODi1Z+6TKIQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11893,18 +11893,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.1.tgz", - "integrity": "sha512-0LBWDL3sZ+vyHRYxjqm2irhfwhUXHonjLSbd0oDeGq44U1e1uUh3icWNXYF8HO/UEnOoa6+OJDncLUXP2Hdg9A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.2.tgz", + "integrity": "sha512-ds2bV0oyUdYoyrUTv4Ga5uptz4cEvmmP/JzqDyzZZanvrIn8ipxg5l3SDOAIiyuAx1VdHd2FBzeXPFO5KPH8vQ==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.1", + "jest-util": "^29.0.2", "string-length": "^4.0.1" }, "engines": { @@ -16763,9 +16763,9 @@ } }, "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", "dev": true, "dependencies": { "has-flag": "^4.0.0", @@ -20317,16 +20317,16 @@ "dev": true }, "@jest/console": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.1.tgz", - "integrity": "sha512-SxLvSKf9gk4Rvt3p2KRQWVQ3sVj7S37rjlCHwp2+xNcRO/X+Uw0idbkfOtciUpjghHIxyggqcrrKhThQ+vClLQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.2.tgz", + "integrity": "sha512-Fv02ijyhF4D/Wb3DvZO3iBJQz5DnzpJEIDBDbvje8Em099N889tNMUnBw7SalmSuOI+NflNG40RA1iK71kImPw==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", "slash": "^3.0.0" }, "dependencies": { @@ -20382,16 +20382,16 @@ } }, "@jest/core": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.1.tgz", - "integrity": "sha512-EcFrXkYh8I1GYHRH9V4TU7jr4P6ckaPqGo/z4AIJjHDZxicjYgWB6fx1xFb5bhEM87eUjCF4FAY5t+RamLWQmA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.2.tgz", + "integrity": "sha512-imP5M6cdpHEOkmcuFYZuM5cTG1DAF7ZlVNCq1+F7kbqme2Jcl+Kh4M78hihM76DJHNkurbv4UVOnejGxBKEmww==", "dev": true, "requires": { - "@jest/console": "^29.0.1", - "@jest/reporters": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/reporters": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -20399,20 +20399,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.1", - "jest-haste-map": "^29.0.1", - "jest-message-util": "^29.0.1", + "jest-config": "^29.0.2", + "jest-haste-map": "^29.0.2", + "jest-message-util": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-resolve-dependencies": "^29.0.1", - "jest-runner": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", - "jest-watcher": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-resolve-dependencies": "^29.0.2", + "jest-runner": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", + "jest-watcher": "^29.0.2", "micromatch": "^4.0.4", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -20481,19 +20481,19 @@ } }, "@jest/expect": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.1.tgz", - "integrity": "sha512-qKB3q52XDV8VUEiqKKLgLrJx7puQ8sYVqIDlul6n7SIXWS97DOK3KqbR2rDDaMtmenRHqEUl2fI+aFzx0oSemA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.2.tgz", + "integrity": "sha512-y/3geZ92p2/zovBm/F+ZjXUJ3thvT9IRzD6igqaWskFE2aR0idD+N/p5Lj/ZautEox/9RwEc6nqergebeh72uQ==", "dev": true, "requires": { - "expect": "^29.0.1", - "jest-snapshot": "^29.0.1" + "expect": "^29.0.2", + "jest-snapshot": "^29.0.2" } }, "@jest/expect-utils": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.1.tgz", - "integrity": "sha512-Tw5kUUOKmXGQDmQ9TSgTraFFS7HMC1HG/B7y0AN2G2UzjdAXz9BzK2rmNpCSDl7g7y0Gf/VLBm//blonvhtOTQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.2.tgz", + "integrity": "sha512-+wcQF9khXKvAEi8VwROnCWWmHfsJYCZAs5dmuMlJBKk57S6ZN2/FQMIlo01F29fJyT8kV/xblE7g3vkIdTLOjw==", "dev": true, "requires": { "jest-get-type": "^29.0.0" @@ -20514,28 +20514,28 @@ } }, "@jest/globals": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.1.tgz", - "integrity": "sha512-BtZWrVrKRKNUt7T1H2S8Mz31PN7ItROCmH+V5pn10hJDUfjOCTIUwb0WtLZzm0f1tJ3Uvx+5lVZrF/VTKqNaFg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.2.tgz", + "integrity": "sha512-4hcooSNJCVXuTu07/VJwCWW6HTnjLtQdqlcGisK6JST7z2ixa8emw4SkYsOk7j36WRc2ZUEydlUePnOIOTCNXg==", "dev": true, "requires": { - "@jest/environment": "^29.0.1", - "@jest/expect": "^29.0.1", - "@jest/types": "^29.0.1", - "jest-mock": "^29.0.1" + "@jest/environment": "^29.0.2", + "@jest/expect": "^29.0.2", + "@jest/types": "^29.0.2", + "jest-mock": "^29.0.2" } }, "@jest/reporters": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.1.tgz", - "integrity": "sha512-dM3L8JmYYOsdeXUUVZClQy67Tz/v1sMo9h4AQv2U+716VLHV0zdA6Hh4FQNAHMhYw/95dbZbPX8Q+TRR7Rw+wA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.2.tgz", + "integrity": "sha512-Kr41qejRQHHkCgWHC9YwSe7D5xivqP4XML+PvgwsnRFaykKdNflDUb4+xLXySOU+O/bPkVdFpGzUpVNSJChCrw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -20548,9 +20548,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", + "jest-worker": "^29.0.2", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -20599,9 +20599,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "requires": { "@types/node": "*", @@ -20652,46 +20652,46 @@ } }, "@jest/test-result": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.1.tgz", - "integrity": "sha512-XCA4whh/igxjBaR/Hg8qwFd/uTsauoD7QAdAYUjV2CSGx0+iunhjoCRRWTwqjQrETRqOJABx6kNfw0+C0vMSgQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.2.tgz", + "integrity": "sha512-b5rDc0lLL6Kx73LyCx6370k9uZ8o5UKdCpMS6Za3ke7H9y8PtAU305y6TeghpBmf2In8p/qqi3GpftgzijSsNw==", "dev": true, "requires": { - "@jest/console": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/types": "^29.0.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.1.tgz", - "integrity": "sha512-3GhSBMCRcWXGluP2Dw7CLP6mNke/t+EcftF5YjzhX1BJmqcatMbtZVwjuCfZy0TCME1GevXy3qTyV5PLpwIFKQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.2.tgz", + "integrity": "sha512-fsyZqHBlXNMv5ZqjQwCuYa2pskXCO0DVxh5aaVCuAtwzHuYEGrhordyEncBLQNuCGQSYgElrEEmS+7wwFnnMKw==", "dev": true, "requires": { - "@jest/test-result": "^29.0.1", + "@jest/test-result": "^29.0.2", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.1.tgz", - "integrity": "sha512-6UxXtqrPScFdDhoip8ys60dQAIYppQinyR87n9nlasR/ZnFfJohKToqzM29KK4gb9gHRv5oDFChdqZKE0SIhsg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.2.tgz", + "integrity": "sha512-lajVQx2AnsR+Pa17q2zR7eikz2PkPs1+g/qPbZkqQATeS/s6eT55H+yHcsLfuI/0YQ/4VSBepSu3bOX+44q0aA==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.1", + "jest-util": "^29.0.2", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -21015,9 +21015,9 @@ } }, "@types/babel__traverse": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.0.tgz", - "integrity": "sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==", + "version": "7.18.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.1.tgz", + "integrity": "sha512-FSdLaZh2UxaMuLp9lixWaHq/golWTRWOnRsAXzDTDSDOQLuZb1nsdCt6pJSPWSEQt2eFZ2YVk3oYhn+1kLMeMA==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -22026,15 +22026,15 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "babel-jest": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.1.tgz", - "integrity": "sha512-wyI9r8tqwsZEMWiIaYjdUJ6ztZIO4DMWpGq7laW34wR71WtRS+D/iBEtXOP5W2aSYCVUQMsypRl/xiJYZznnTg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.2.tgz", + "integrity": "sha512-yTu4/WSi/HzarjQtrJSwV+/0maoNt+iP0DmpvFJdv9yY+5BuNle8TbheHzzcSWj5gIHfuhpbLYHWRDYhWKyeKQ==", "dev": true, "requires": { - "@jest/transform": "^29.0.1", + "@jest/transform": "^29.0.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.0", + "babel-preset-jest": "^29.0.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -22126,9 +22126,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.0.tgz", - "integrity": "sha512-B9oaXrlxXHFWeWqhDPg03iqQd2UN/mg/VdZOsLaqAVBkztru3ctTryAI4zisxLEEgmcUnLTKewqx0gGifoXD3A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", + "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -22202,12 +22202,12 @@ } }, "babel-preset-jest": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.0.tgz", - "integrity": "sha512-B5Ke47Xcs8rDF3p1korT3LoilpADCwbG93ALqtvqu6Xpf4d8alKkrCBTExbNzdHJcIuEPpfYvEaFFRGee2kUgQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", + "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.0.0", + "babel-plugin-jest-hoist": "^29.0.2", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -25124,16 +25124,16 @@ "dev": true }, "expect": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.1.tgz", - "integrity": "sha512-yQgemsjLU+1S8t2A7pXT3Sn/v5/37LY8J+tocWtKEA0iEYYc6gfKbbJJX2fxHZmd7K9WpdbQqXUpmYkq1aewYg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.2.tgz", + "integrity": "sha512-JeJlAiLKn4aApT4pzUXBVxl3NaZidWIOdg//smaIlP9ZMBDkHZGFd9ubphUZP9pUyDEo7bC6M0IIZR51o75qQw==", "dev": true, "requires": { - "@jest/expect-utils": "^29.0.1", + "@jest/expect-utils": "^29.0.2", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1" + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2" } }, "express": { @@ -26561,15 +26561,15 @@ } }, "jest": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.1.tgz", - "integrity": "sha512-liHkwzaW6iwQyhRBFj0A4ZYKcsQ7ers1s62CCT95fPeNzoxT/vQRWwjTT4e7jpSCwrvPP2t1VESuy7GrXcr2ug==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.2.tgz", + "integrity": "sha512-enziNbNUmXTcTaTP/Uq5rV91r0Yqy2UKzLUIabxMpGm9YHz8qpbJhiRnNVNvm6vzWfzt/0o97NEHH8/3udoClA==", "dev": true, "requires": { - "@jest/core": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/core": "^29.0.2", + "@jest/types": "^29.0.2", "import-local": "^3.0.2", - "jest-cli": "^29.0.1" + "jest-cli": "^29.0.2" } }, "jest-changed-files": { @@ -26583,28 +26583,28 @@ } }, "jest-circus": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.1.tgz", - "integrity": "sha512-I5J4LyK3qPo8EnqPmxsMAVR+2SFx7JOaZsbqW9xQmk4UDmTCD92EQgS162Ey3Jq6CfpKJKFDhzhG3QqiE0fRbw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.2.tgz", + "integrity": "sha512-YTPEsoE1P1X0bcyDQi3QIkpt2Wl9om9k2DQRuLFdS5x8VvAKSdYAVJufgvudhnKgM8WHvvAzhBE+1DRQB8x1CQ==", "dev": true, "requires": { - "@jest/environment": "^29.0.1", - "@jest/expect": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/expect": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.1", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", + "jest-each": "^29.0.2", + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", "p-limit": "^3.1.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -26661,21 +26661,21 @@ } }, "jest-cli": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.1.tgz", - "integrity": "sha512-XozBHtoJCS6mnjCxNESyGm47Y4xSWzNlBJj4tix9nGrG6m068B83lrTWKtjYAenYSfOqyYVpQCkyqUp35IT+qA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.2.tgz", + "integrity": "sha512-tlf8b+4KcUbBGr25cywIi3+rbZ4+G+SiG8SvY552m9sRZbXPafdmQRyeVE/C/R8K+TiBAMrTIUmV2SlStRJ40g==", "dev": true, "requires": { - "@jest/core": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/core": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-config": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -26732,31 +26732,31 @@ } }, "jest-config": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.1.tgz", - "integrity": "sha512-3duIx5ucEPIsUOESDTuasMfqHonD0oZRjqHycIMHSC4JwbvHDjAWNKN/NiM0ZxHXjAYrMTLt2QxSQ+IqlbYE5A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.2.tgz", + "integrity": "sha512-RU4gzeUNZAFktYVzDGimDxeYoaiTnH100jkYYZgldqFamaZukF0IqmFx8+QrzVeEWccYg10EEJT3ox1Dq5b74w==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.1", - "@jest/types": "^29.0.1", - "babel-jest": "^29.0.1", + "@jest/test-sequencer": "^29.0.2", + "@jest/types": "^29.0.2", + "babel-jest": "^29.0.2", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.1", - "jest-environment-node": "^29.0.1", + "jest-circus": "^29.0.2", + "jest-environment-node": "^29.0.2", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-runner": "^29.0.1", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-runner": "^29.0.2", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -26813,15 +26813,15 @@ } }, "jest-diff": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.1.tgz", - "integrity": "sha512-l8PYeq2VhcdxG9tl5cU78ClAlg/N7RtVSp0v3MlXURR0Y99i6eFnegmasOandyTmO6uEdo20+FByAjBFEO9nuw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.2.tgz", + "integrity": "sha512-b9l9970sa1rMXH1owp2Woprmy42qIwwll/htsw4Gf7+WuSp5bZxNhkKHDuCGKL+HoHn1KhcC+tNEeAPYBkD2Jg==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "dependencies": { "ansi-styles": { @@ -26885,16 +26885,16 @@ } }, "jest-each": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.1.tgz", - "integrity": "sha512-UmCZYU9LPvRfSDoCrKJqrCNmgTYGGb3Ga6IVsnnVjedBTRRR9GJMca7UmDKRrJ1s+U632xrVtiRD27BxaG1aaQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.2.tgz", + "integrity": "sha512-+sA9YjrJl35iCg0W0VCrgCVj+wGhDrrKQ+YAqJ/DHBC4gcDFAeePtRRhpJnX9gvOZ63G7gt52pwp2PesuSEx0Q==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.1", - "pretty-format": "^29.0.1" + "jest-util": "^29.0.2", + "pretty-format": "^29.0.2" }, "dependencies": { "ansi-styles": { @@ -26965,17 +26965,17 @@ } }, "jest-environment-node": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.1.tgz", - "integrity": "sha512-PcIRBrEBFAPBqkbL53ZpEvTptcAnOW6/lDfqBfACMm3vkVT0N7DcfkH/hqNSbDmSxzGr0FtJI6Ej3TPhveWCMA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.2.tgz", + "integrity": "sha512-4Fv8GXVCToRlMzDO94gvA8iOzKxQ7rhAbs8L+j8GPyTxGuUiYkV+63LecGeVdVhsL2KXih1sKnoqmH6tp89J7Q==", "dev": true, "requires": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", - "jest-mock": "^29.0.1", - "jest-util": "^29.0.1" + "jest-mock": "^29.0.2", + "jest-util": "^29.0.2" } }, "jest-get-type": { @@ -26985,12 +26985,12 @@ "dev": true }, "jest-haste-map": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.1.tgz", - "integrity": "sha512-gcKOAydafpGoSBvcj/mGCfhOKO8fRLkAeee1KXGdcJ1Pb9O2nnOl4I8bQSIID2MaZeMHtLLgNboukh/pUGkBtg==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.2.tgz", + "integrity": "sha512-SOorh2ysQ0fe8gsF4gaUDhoMIWAvi2hXOkwThEO48qT3JqA8GLAUieQcIvdSEd6M0scRDe1PVmKc5tXR3Z0U0A==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", @@ -26998,8 +26998,8 @@ "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-util": "^29.0.2", + "jest-worker": "^29.0.2", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -27011,9 +27011,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "requires": { "@types/node": "*", @@ -27033,25 +27033,25 @@ } }, "jest-leak-detector": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.1.tgz", - "integrity": "sha512-5tISHJphB+sCmKXtVHJGQGltj7ksrLLb9vkuNWwFR86Of1tfzjskvrrrZU1gSzEfWC+qXIn4tuh8noKHYGMIPA==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.2.tgz", + "integrity": "sha512-5f0493qDeAxjUldkBSQg5D1cLadRgZVyWpTQvfJeQwQUpHQInE21AyVHVv64M7P2Ue8Z5EZ4BAcoDS/dSPPgMw==", "dev": true, "requires": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" } }, "jest-matcher-utils": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.1.tgz", - "integrity": "sha512-/e6UbCDmprRQFnl7+uBKqn4G22c/OmwriE5KCMVqxhElKCQUDcFnq5XM9iJeKtzy4DUjxT27y9VHmKPD8BQPaw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.2.tgz", + "integrity": "sha512-s62YkHFBfAx0JLA2QX1BlnCRFwHRobwAv2KP1+YhjzF6ZCbCVrf1sG8UJyn62ZUsDaQKpoo86XMTjkUyO5aWmQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.0.1", + "jest-diff": "^29.0.2", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "dependencies": { "ansi-styles": { @@ -27197,17 +27197,17 @@ "dev": true }, "jest-resolve": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.1.tgz", - "integrity": "sha512-dwb5Z0lLZbptlBtPExqsHfdDamXeiRLv4vdkfPrN84vBwLSWHWcXjlM2JXD/KLSQfljBcXbzI/PDvUJuTQ84Nw==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.2.tgz", + "integrity": "sha512-V3uLjSA+EHxLtjIDKTBXnY71hyx+8lusCqPXvqzkFO1uCGvVpjBfuOyp+KOLBNSuY61kM2jhepiMwt4eiJS+Vw==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", + "jest-haste-map": "^29.0.2", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.1", - "jest-validate": "^29.0.1", + "jest-util": "^29.0.2", + "jest-validate": "^29.0.2", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -27265,40 +27265,40 @@ } }, "jest-resolve-dependencies": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.1.tgz", - "integrity": "sha512-fUGcYlSc1NzNz+tsHDjjG0rclw6blJcFZsLEsezxm/n54bAm9HFvJxgBuCV1CJQoPtIx6AfR+tXkR9lpWJs2LQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.2.tgz", + "integrity": "sha512-fSAu6eIG7wtGdnPJUkVVdILGzYAP9Dj/4+zvC8BrGe8msaUMJ9JeygU0Hf9+Uor6/icbuuzQn5See1uajLnAqg==", "dev": true, "requires": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.1" + "jest-snapshot": "^29.0.2" } }, "jest-runner": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.1.tgz", - "integrity": "sha512-XeFfPmHtO7HyZyD1uJeO4Oqa8PyTbDHzS1YdGrvsFXk/A5eXinbqA5a42VUEqvsKQgNnKTl5NJD0UtDWg7cQ2A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.2.tgz", + "integrity": "sha512-+D82iPZejI8t+SfduOO1deahC/QgLFf8aJBO++Znz3l2ETtOMdM7K4ATsGWzCFnTGio5yHaRifg1Su5Ybza5Nw==", "dev": true, "requires": { - "@jest/console": "^29.0.1", - "@jest/environment": "^29.0.1", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/console": "^29.0.2", + "@jest/environment": "^29.0.2", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.1", - "jest-haste-map": "^29.0.1", - "jest-leak-detector": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-resolve": "^29.0.1", - "jest-runtime": "^29.0.1", - "jest-util": "^29.0.1", - "jest-watcher": "^29.0.1", - "jest-worker": "^29.0.1", + "jest-environment-node": "^29.0.2", + "jest-haste-map": "^29.0.2", + "jest-leak-detector": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-resolve": "^29.0.2", + "jest-runtime": "^29.0.2", + "jest-util": "^29.0.2", + "jest-watcher": "^29.0.2", + "jest-worker": "^29.0.2", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -27344,9 +27344,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.1.tgz", - "integrity": "sha512-+B/2/8WW7goit7qVezG9vnI1QP3dlmuzi2W0zxazAQQ8dcDIA63dDn6j4pjOGBARha/ZevcwYQtNIzCySbS7fQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", + "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", "dev": true, "requires": { "@types/node": "*", @@ -27387,31 +27387,31 @@ } }, "jest-runtime": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.1.tgz", - "integrity": "sha512-yDgz5OE0Rm44PUAfTqwA6cDFnTYnVcYbRpPECsokSASQ0I5RXpnKPVr2g0CYZWKzbsXqqtmM7TIk7CAutZJ7gQ==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.2.tgz", + "integrity": "sha512-DO6F81LX4okOgjJLkLySv10E5YcV5NHUbY1ZqAUtofxdQE+q4hjH0P2gNsY8x3z3sqgw7O/+919SU4r18Fcuig==", "dev": true, "requires": { - "@jest/environment": "^29.0.1", - "@jest/fake-timers": "^29.0.1", - "@jest/globals": "^29.0.1", + "@jest/environment": "^29.0.2", + "@jest/fake-timers": "^29.0.2", + "@jest/globals": "^29.0.2", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/test-result": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-mock": "^29.0.1", + "jest-haste-map": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-mock": "^29.0.2", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.1", - "jest-snapshot": "^29.0.1", - "jest-util": "^29.0.1", + "jest-resolve": "^29.0.2", + "jest-snapshot": "^29.0.2", + "jest-util": "^29.0.2", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -27468,9 +27468,9 @@ } }, "jest-snapshot": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.1.tgz", - "integrity": "sha512-OuYGp+lsh7RhB3DDX36z/pzrGm2F740e5ERG9PQpJyDknCRtWdhaehBQyMqDnsQdKkvC2zOcetcxskiHjO7e8Q==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.2.tgz", + "integrity": "sha512-26C4PzGKaX5gkoKg8UzYGVy2HPVcTaROSkf0gwnHu3lGeTB7bAIJBovvVPZoiJ20IximJELQs/r8WSDRCuGX2A==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -27479,23 +27479,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.1", - "@jest/transform": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/expect-utils": "^29.0.2", + "@jest/transform": "^29.0.2", + "@jest/types": "^29.0.2", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.1", + "expect": "^29.0.2", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.1", + "jest-diff": "^29.0.2", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.1", - "jest-matcher-utils": "^29.0.1", - "jest-message-util": "^29.0.1", - "jest-util": "^29.0.1", + "jest-haste-map": "^29.0.2", + "jest-matcher-utils": "^29.0.2", + "jest-message-util": "^29.0.2", + "jest-util": "^29.0.2", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.1", + "pretty-format": "^29.0.2", "semver": "^7.3.5" }, "dependencies": { @@ -27625,17 +27625,17 @@ } }, "jest-validate": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.1.tgz", - "integrity": "sha512-mS4q7F738YXZFWBPqE+NjHU/gEOs7IBIFQ8i9zq5EO691cLrUbLhFq4larf8/lNcmauRO71tn/+DTW2y+MrLow==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.2.tgz", + "integrity": "sha512-AeRKm7cEucSy7tr54r3LhiGIXYvOILUwBM1S7jQkKs6YelwAlWKsmZGVrQR7uwsd31rBTnR5NQkODi1Z+6TKIQ==", "dev": true, "requires": { - "@jest/types": "^29.0.1", + "@jest/types": "^29.0.2", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.1" + "pretty-format": "^29.0.2" }, "dependencies": { "ansi-styles": { @@ -27696,18 +27696,18 @@ } }, "jest-watcher": { - "version": "29.0.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.1.tgz", - "integrity": "sha512-0LBWDL3sZ+vyHRYxjqm2irhfwhUXHonjLSbd0oDeGq44U1e1uUh3icWNXYF8HO/UEnOoa6+OJDncLUXP2Hdg9A==", + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.2.tgz", + "integrity": "sha512-ds2bV0oyUdYoyrUTv4Ga5uptz4cEvmmP/JzqDyzZZanvrIn8ipxg5l3SDOAIiyuAx1VdHd2FBzeXPFO5KPH8vQ==", "dev": true, "requires": { - "@jest/test-result": "^29.0.1", - "@jest/types": "^29.0.1", + "@jest/test-result": "^29.0.2", + "@jest/types": "^29.0.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.1", + "jest-util": "^29.0.2", "string-length": "^4.0.1" }, "dependencies": { @@ -31429,9 +31429,9 @@ } }, "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", "dev": true, "requires": { "has-flag": "^4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 8938e894003b..ae30c7339d3e 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.1", + "jest": "^29.0.2", "jest-environment-jsdom": "^29.0.2", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", From 320a41fd2e01d7303c0734905e0611014a4f5d9f Mon Sep 17 00:00:00 2001 From: ulyanas <2fizzy@gmail.com> Date: Tue, 6 Sep 2022 15:08:12 +0300 Subject: [PATCH 233/723] Update README.md Added Blockscout Discord tag --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7654e6e103ae..9a1768caf893 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@
+
+ +[![](https://dcbadge.vercel.app/api/server/blockscout?style=flat)](https://discord.gg/blockscout) + +
+ BlockScout provides a comprehensive, easy-to-use interface for users to view, confirm, and inspect transactions on EVM (Ethereum Virtual Machine) blockchains. This includes the POA Network, Gnosis Chain, Ethereum Classic and other **Ethereum testnets, private networks and sidechains**. See our [project documentation](https://docs.blockscout.com/) for detailed information and setup instructions. From f2d4d68ad0e0e96add59c14f2f0111a28f276cf8 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 18:51:26 +0300 Subject: [PATCH 234/723] Format README, change Discord link --- README.md | 15 ++++++--------- config/runtime.exs | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9a1768caf893..0addd5a0f573 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,13 @@ -

BlockScout

-

Blockchain Explorer for inspecting and analyzing EVM Chains.

-
+#
BlockScout
+
Blockchain Explorer for inspecting and analyzing EVM Chains.
+
+
[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions) - -
- -
- [![](https://dcbadge.vercel.app/api/server/blockscout?style=flat)](https://discord.gg/blockscout) -
+ + BlockScout provides a comprehensive, easy-to-use interface for users to view, confirm, and inspect transactions on EVM (Ethereum Virtual Machine) blockchains. This includes the POA Network, Gnosis Chain, Ethereum Classic and other **Ethereum testnets, private networks and sidechains**. diff --git a/config/runtime.exs b/config/runtime.exs index 8c41e45c45be..59c3e150dca8 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -27,7 +27,7 @@ indexer_empty_blocks_sanitizer_batch_size = config :indexer, Indexer.Fetcher.EmptyBlocksSanitizer, batch_size: indexer_empty_blocks_sanitizer_batch_size config :block_scout_web, :footer, - chat_link: System.get_env("FOOTER_CHAT_LINK", "https://discord.gg/XmNatGKbPS"), + chat_link: System.get_env("FOOTER_CHAT_LINK", "https://discord.gg/blockscout"), forum_link: System.get_env("FOOTER_FORUM_LINK", "https://forum.poa.network/c/blockscout"), github_link: System.get_env("FOOTER_GITHUB_LINK", "https://github.com/blockscout/blockscout") From bea81a12d15e884903a4b8cf97468612fd878ad5 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 20:18:04 +0300 Subject: [PATCH 235/723] Update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0addd5a0f573..7299556733ea 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -#
BlockScout
-
Blockchain Explorer for inspecting and analyzing EVM Chains.
+

BlockScout

+

Blockchain Explorer for inspecting and analyzing EVM Chains.


-
+

[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions) [![](https://dcbadge.vercel.app/api/server/blockscout?style=flat)](https://discord.gg/blockscout) -

+

BlockScout provides a comprehensive, easy-to-use interface for users to view, confirm, and inspect transactions on EVM (Ethereum Virtual Machine) blockchains. This includes the POA Network, Gnosis Chain, Ethereum Classic and other **Ethereum testnets, private networks and sidechains**. From 0c4b9e8f40b1640ecaa9c9c3032243ef4dec170f Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 20:18:38 +0300 Subject: [PATCH 236/723] Update README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7299556733ea..539d22bd28be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@

BlockScout

Blockchain Explorer for inspecting and analyzing EVM Chains.

-

[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions) From d7177a59fbfd99ab79876bf87c245f84c9e4f4c5 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 20:19:16 +0300 Subject: [PATCH 237/723] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 539d22bd28be..316e101047f5 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@

BlockScout

Blockchain Explorer for inspecting and analyzing EVM Chains.

-

+

[![Blockscout](https://github.com/blockscout/blockscout/workflows/Blockscout/badge.svg?branch=master)](https://github.com/blockscout/blockscout/actions) [![](https://dcbadge.vercel.app/api/server/blockscout?style=flat)](https://discord.gg/blockscout) -

+
BlockScout provides a comprehensive, easy-to-use interface for users to view, confirm, and inspect transactions on EVM (Ethereum Virtual Machine) blockchains. This includes the POA Network, Gnosis Chain, Ethereum Classic and other **Ethereum testnets, private networks and sidechains**. From f1f445f4b0601d1bf8c2ecd5d542cb24f39dc205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 18:46:18 +0000 Subject: [PATCH 238/723] Bump sweetalert2 from 11.4.29 to 11.4.31 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.4.29 to 11.4.31. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.4.29...v11.4.31) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 67c958094192..5146137d612e 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -57,7 +57,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.29", + "sweetalert2": "^11.4.31", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", @@ -16997,9 +16997,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.4.29", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.29.tgz", - "integrity": "sha512-UMCZgyEk0m+KizxspB8Bsm5ZQRdguba2t2+Rf0r8XBmq5YqhXq7ItV2C15A3VLfRlxHnEJBTYg6hkSk/x+5Ofw==", + "version": "11.4.31", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.31.tgz", + "integrity": "sha512-h5nEP8+q9qBx0O0c6Py3Lpgkq3j+AjJ/YUdQmuZwf+pR9L1TJxz9BU23j6GO9Jfr8hnTIuMJWFbUK302fc8IBQ==", "funding": { "type": "individual", "url": "https://sweetalert2.github.io/#donations" @@ -31609,9 +31609,9 @@ } }, "sweetalert2": { - "version": "11.4.29", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.29.tgz", - "integrity": "sha512-UMCZgyEk0m+KizxspB8Bsm5ZQRdguba2t2+Rf0r8XBmq5YqhXq7ItV2C15A3VLfRlxHnEJBTYg6hkSk/x+5Ofw==" + "version": "11.4.31", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.31.tgz", + "integrity": "sha512-h5nEP8+q9qBx0O0c6Py3Lpgkq3j+AjJ/YUdQmuZwf+pR9L1TJxz9BU23j6GO9Jfr8hnTIuMJWFbUK302fc8IBQ==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6f594e3d465a..c0c93532e872 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -69,7 +69,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.29", + "sweetalert2": "^11.4.31", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", From 50ca4449d6c2ac251788fb9e029c14dc22891115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 7 Sep 2022 15:07:48 +0300 Subject: [PATCH 239/723] Add vyper support for rust verifier microservice integration --- CHANGELOG.md | 1 + .../smart_contract/compiler_version.ex | 20 ++++++----- .../smart_contract/rust_verifier_interface.ex | 21 ++++++++++- .../smart_contract/solidity/verifier.ex | 4 +-- .../smart_contract/vyper/publisher.ex | 25 +++++++++++++ .../explorer/smart_contract/vyper/verifier.ex | 35 +++++++++++++++++++ 6 files changed, 95 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 858a440125cf..6c2dac2b90f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#6073](https://github.com/blockscout/blockscout/pull/6073) - Add vyper support for rust verifier microservice integration ### Fixes diff --git a/apps/explorer/lib/explorer/smart_contract/compiler_version.ex b/apps/explorer/lib/explorer/smart_contract/compiler_version.ex index 661628b3d43b..9cb35cb02f1b 100644 --- a/apps/explorer/lib/explorer/smart_contract/compiler_version.ex +++ b/apps/explorer/lib/explorer/smart_contract/compiler_version.ex @@ -39,17 +39,21 @@ defmodule Explorer.SmartContract.CompilerVersion do end defp fetch_vyper_versions do - headers = [{"Content-Type", "application/json"}] + if RustVerifierInterface.enabled?() do + RustVerifierInterface.vyper_get_versions_list() + else + headers = [{"Content-Type", "application/json"}] - case HTTPoison.get(source_url(:vyper), headers) do - {:ok, %{status_code: 200, body: body}} -> - {:ok, format_data(body, :vyper)} + case HTTPoison.get(source_url(:vyper), headers) do + {:ok, %{status_code: 200, body: body}} -> + {:ok, format_data(body, :vyper)} - {:ok, %{status_code: _status_code, body: body}} -> - {:error, decode_json(body)["error"]} + {:ok, %{status_code: _status_code, body: body}} -> + {:error, decode_json(body)["error"]} - {:error, %{reason: reason}} -> - {:error, reason} + {:error, %{reason: reason}} -> + {:error, reason} + end end end diff --git a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex index 87bc56b03c17..99df02426d99 100644 --- a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex +++ b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex @@ -1,6 +1,6 @@ defmodule Explorer.SmartContract.RustVerifierInterface do @moduledoc """ - Adapter for contracts verification with https://github.com/blockscout/blockscout-rs/tree/main/verification + Adapter for contracts verification with https://github.com/blockscout/blockscout-rs/blob/main/smart-contract-verifier """ alias HTTPoison.Response require Logger @@ -33,6 +33,17 @@ defmodule Explorer.SmartContract.RustVerifierInterface do http_post_request(standard_json_input_verification_url(), body) end + def vyper_verify_multipart( + %{ + "creation_bytecode" => _, + "deployed_bytecode" => _, + "compiler_version" => _, + "sources" => _ + } = body + ) do + http_post_request(vyper_multiple_files_verification_url(), body) + end + def http_post_request(url, body) do headers = [{"Content-Type", "application/json"}] @@ -79,6 +90,10 @@ defmodule Explorer.SmartContract.RustVerifierInterface do http_get_request(versions_list_url()) end + def vyper_get_versions_list do + http_get_request(vyper_versions_list_url()) + end + def proccess_verifier_response(body) when is_binary(body) do case Jason.decode(body) do {:ok, decoded} -> @@ -103,10 +118,14 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def multiple_files_verification_url, do: "#{base_api_url()}" <> "/solidity/verify/multiple-files" + def vyper_multiple_files_verification_url, do: "#{base_api_url()}" <> "/vyper/verify/multiple-files" + def standard_json_input_verification_url, do: "#{base_api_url()}" <> "/solidity/verify/standard-json" def versions_list_url, do: "#{base_api_url()}" <> "/solidity/versions" + def vyper_versions_list_url, do: "#{base_api_url()}" <> "/vyper/versions" + def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do diff --git a/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex b/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex index 64ed84aa67da..25ff8cf12930 100644 --- a/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex +++ b/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex @@ -36,7 +36,7 @@ defmodule Explorer.SmartContract.Solidity.Verifier do end end - def evaluate_authenticity_inner(true, address_hash, params) do + defp evaluate_authenticity_inner(true, address_hash, params) do deployed_bytecode = Chain.smart_contract_bytecode(address_hash) creation_tx_input = @@ -57,7 +57,7 @@ defmodule Explorer.SmartContract.Solidity.Verifier do |> RustVerifierInterface.verify_multi_part() end - def evaluate_authenticity_inner(false, address_hash, params) do + defp evaluate_authenticity_inner(false, address_hash, params) do latest_evm_version = List.last(CodeCompiler.allowed_evm_versions()) evm_version = Map.get(params, "evm_version", latest_evm_version) diff --git a/apps/explorer/lib/explorer/smart_contract/vyper/publisher.ex b/apps/explorer/lib/explorer/smart_contract/vyper/publisher.ex index 258f0ea888b4..0b9f0ec17a12 100644 --- a/apps/explorer/lib/explorer/smart_contract/vyper/publisher.ex +++ b/apps/explorer/lib/explorer/smart_contract/vyper/publisher.ex @@ -10,6 +10,31 @@ defmodule Explorer.SmartContract.Vyper.Publisher do def publish(address_hash, params) do case Verifier.evaluate_authenticity(address_hash, params) do + { + :ok, + %{ + "abi" => abi_string, + "compiler_version" => _, + "constructor_arguments" => _, + "contract_libraries" => contract_libraries, + "contract_name" => contract_name, + "evm_version" => _, + "file_name" => file_name, + "optimization" => _, + "optimization_runs" => _, + "sources" => sources + } = result_params + } -> + %{^file_name => contract_source_code} = sources + + prepared_params = + result_params + |> Map.put("contract_source_code", contract_source_code) + |> Map.put("external_libraries", contract_libraries) + |> Map.put("name", contract_name) + + publish_smart_contract(address_hash, prepared_params, Jason.decode!(abi_string)) + {:ok, %{abi: abi}} -> publish_smart_contract(address_hash, params, abi) diff --git a/apps/explorer/lib/explorer/smart_contract/vyper/verifier.ex b/apps/explorer/lib/explorer/smart_contract/vyper/verifier.ex index 1595223a0f6f..48f3385bb729 100644 --- a/apps/explorer/lib/explorer/smart_contract/vyper/verifier.ex +++ b/apps/explorer/lib/explorer/smart_contract/vyper/verifier.ex @@ -7,9 +7,11 @@ defmodule Explorer.SmartContract.Vyper.Verifier do against the existing Creation Address Bytecode, if it matches the contract is then Verified. """ + require Logger alias Explorer.Chain alias Explorer.SmartContract.Vyper.CodeCompiler + alias Explorer.SmartContract.RustVerifierInterface def evaluate_authenticity(_, %{"name" => ""}), do: {:error, :name} @@ -17,6 +19,39 @@ defmodule Explorer.SmartContract.Vyper.Verifier do do: {:error, :contract_source_code} def evaluate_authenticity(address_hash, params) do + try do + evaluate_authenticity_inner(RustVerifierInterface.enabled?(), address_hash, params) + rescue + exception -> + Logger.error(fn -> + [ + "Error while verifying smart-contract address: #{address_hash}, params: #{inspect(params, limit: :infinity, printable_limit: :infinity)}: ", + Exception.format(:error, exception) + ] + end) + end + end + + defp evaluate_authenticity_inner(true, address_hash, params) do + deployed_bytecode = Chain.smart_contract_bytecode(address_hash) + + creation_tx_input = + case Chain.smart_contract_creation_tx_bytecode(address_hash) do + %{init: init, created_contract_code: _created_contract_code} -> + init + + _ -> + "" + end + + params + |> Map.put("creation_bytecode", creation_tx_input) + |> Map.put("deployed_bytecode", deployed_bytecode) + |> Map.put("sources", %{"#{params["name"]}.vy" => params["contract_source_code"]}) + |> RustVerifierInterface.vyper_verify_multipart() + end + + defp evaluate_authenticity_inner(false, address_hash, params) do verify(address_hash, params) end From cad813c2ef2364b8cd3ff167153bd5f778beef0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 18:34:14 +0000 Subject: [PATCH 240/723] Bump sweetalert2 from 11.4.31 to 11.4.32 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.4.31 to 11.4.32. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.4.31...v11.4.32) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 5146137d612e..f25095849392 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -57,7 +57,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.31", + "sweetalert2": "^11.4.32", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", @@ -16997,9 +16997,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.4.31", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.31.tgz", - "integrity": "sha512-h5nEP8+q9qBx0O0c6Py3Lpgkq3j+AjJ/YUdQmuZwf+pR9L1TJxz9BU23j6GO9Jfr8hnTIuMJWFbUK302fc8IBQ==", + "version": "11.4.32", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.32.tgz", + "integrity": "sha512-fcXWPzWjqYoLqlfPLL4GHpZDZr4Lm7opkaADKAD1LDM4KHJ5ZHN/8/Les5HWP7+yl+0mrqHHkbsSxjXdvDHHlg==", "funding": { "type": "individual", "url": "https://sweetalert2.github.io/#donations" @@ -31609,9 +31609,9 @@ } }, "sweetalert2": { - "version": "11.4.31", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.31.tgz", - "integrity": "sha512-h5nEP8+q9qBx0O0c6Py3Lpgkq3j+AjJ/YUdQmuZwf+pR9L1TJxz9BU23j6GO9Jfr8hnTIuMJWFbUK302fc8IBQ==" + "version": "11.4.32", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.4.32.tgz", + "integrity": "sha512-fcXWPzWjqYoLqlfPLL4GHpZDZr4Lm7opkaADKAD1LDM4KHJ5ZHN/8/Les5HWP7+yl+0mrqHHkbsSxjXdvDHHlg==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index c0c93532e872..6c7e1bdf8f86 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -69,7 +69,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.4.31", + "sweetalert2": "^11.4.32", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.3", From 69c89c0dc0e7a007f90c7e706c0824640d6d76af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 7 Sep 2022 21:46:42 +0300 Subject: [PATCH 241/723] Remove unused Config import --- apps/indexer/config/runtime/test.exs | 2 -- config/runtime/test.exs | 2 -- 2 files changed, 4 deletions(-) diff --git a/apps/indexer/config/runtime/test.exs b/apps/indexer/config/runtime/test.exs index 476dedd9439c..b360f5f9b933 100644 --- a/apps/indexer/config/runtime/test.exs +++ b/apps/indexer/config/runtime/test.exs @@ -1,5 +1,3 @@ -import Config - variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "parity" diff --git a/config/runtime/test.exs b/config/runtime/test.exs index 38cd15e0dfbe..6f604ba05e08 100644 --- a/config/runtime/test.exs +++ b/config/runtime/test.exs @@ -1,5 +1,3 @@ -import Config - ###################### ### BlockScout Web ### ###################### From a596180c27f86264368f62a173f7fda99b4510b6 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 7 Sep 2022 11:39:33 +0300 Subject: [PATCH 242/723] add compose with smart-contract-verifier --- .../docker-compose-with-verification.yml | 57 +++++++++++++++++++ .../envs/common-smart-contract-verifier.env | 19 +++++++ 2 files changed, 76 insertions(+) create mode 100644 docker-compose/docker-compose-with-verification.yml create mode 100644 docker-compose/envs/common-smart-contract-verifier.env diff --git a/docker-compose/docker-compose-with-verification.yml b/docker-compose/docker-compose-with-verification.yml new file mode 100644 index 000000000000..02a68850faac --- /dev/null +++ b/docker-compose/docker-compose-with-verification.yml @@ -0,0 +1,57 @@ +version: '3.8' + +services: + db: + image: postgres:14 + restart: always + container_name: 'postgres' + environment: + POSTGRES_PASSWORD: '' + POSTGRES_USER: 'postgres' + POSTGRES_HOST_AUTH_METHOD: 'trust' + ports: + - 7432:5432 + + blockscout: + depends_on: + - db + - smart-contract-verifier + image: blockscout/blockscout:${DOCKER_TAG:-latest} + build: + context: .. + dockerfile: ./docker/Dockerfile + args: + COIN: "" + CACHE_EXCHANGE_RATES_PERIOD: "" + DISABLE_READ_API: "false" + API_PATH: "/" + NETWORK_PATH: "/" + DISABLE_WEBAPP: "false" + DISABLE_WRITE_API: "false" + CACHE_ENABLE_TOTAL_GAS_USAGE_COUNTER: "" + CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: "" + SOCKET_ROOT: "/" + WOBSERVER_ENABLED: "false" + ADMIN_PANEL_ENABLED: "" + restart: always + container_name: 'blockscout' + links: + - db:database + command: bash -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" + extra_hosts: + - 'host.docker.internal:host-gateway' + env_file: + - ./envs/common-blockscout.env + environment: + ENABLE_RUST_VERIFICATION_SERVICE: 'true' + RUST_VERIFICATION_SERVICE_URL: 'http://host.docker.internal:8043/' + ports: + - 4000:4000 + + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:latest + container_name: 'smart-contract-verifier' + ports: + - 8043:8043 + env_file: + - ./envs/common-smart-contract-verifier.env diff --git a/docker-compose/envs/common-smart-contract-verifier.env b/docker-compose/envs/common-smart-contract-verifier.env new file mode 100644 index 000000000000..d5c2782543e6 --- /dev/null +++ b/docker-compose/envs/common-smart-contract-verifier.env @@ -0,0 +1,19 @@ +SMART_CONTRACT_VERIFIER__SERVER__ADDR=0.0.0.0:8043 + +SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED=true +SMART_CONTRACT_VERIFIER__SOLIDITY__COMPILERS_DIR=/tmp/solidity-compilers +SMART_CONTRACT_VERIFIER__SOLIDITY__REFRESH_VERSIONS_SCHEDULE=0 0 * * * * * +SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL=https://solc-bin.ethereum.org/linux-amd64/list.json + +SMART_CONTRACT_VERIFIER__VYPER__ENABLED=true +SMART_CONTRACT_VERIFIER__SOLIDITY__COMPILERS_DIR=/tmp/vyper-compilers +SMART_CONTRACT_VERIFIER__VYPER__FETCHER__LIST__LIST_URL=https://raw.githubusercontent.com/blockscout/solc-bin/main/vyper.list.json +SMART_CONTRACT_VERIFIER__VYPER__REFRESH_VERSIONS_SCHEDULE=0 0 * * * * * + +SMART_CONTRACT_VERIFIER__SOURCIFY__ENABLED=true +SMART_CONTRACT_VERIFIER__SOURCIFY__API_URL=https://sourcify.dev/server/ +SMART_CONTRACT_VERIFIER__SOURCIFY__VERIFICATION_ATTEMPTS=3 +SMART_CONTRACT_VERIFIER__SOURCIFY__REQUEST_TIMEOUT=10 + +SMART_CONTRACT_VERIFIER__METRICS__ENABLED=false +SMART_CONTRACT_VERIFIER__JAEGER__ENABLED=false From 4f78f4bd8c963a9defbd194d2a3ff9490419fb14 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 7 Sep 2022 13:44:45 +0300 Subject: [PATCH 243/723] add tag for verification service image --- docker-compose/docker-compose-with-verification.yml | 7 ++++--- docker-compose/envs/common-smart-contract-verifier.env | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose/docker-compose-with-verification.yml b/docker-compose/docker-compose-with-verification.yml index 02a68850faac..4a1fd819cbdb 100644 --- a/docker-compose/docker-compose-with-verification.yml +++ b/docker-compose/docker-compose-with-verification.yml @@ -49,9 +49,10 @@ services: - 4000:4000 smart-contract-verifier: - image: ghcr.io/blockscout/smart-contract-verifier:latest + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always container_name: 'smart-contract-verifier' - ports: - - 8043:8043 env_file: - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/envs/common-smart-contract-verifier.env b/docker-compose/envs/common-smart-contract-verifier.env index d5c2782543e6..fdbefabf8605 100644 --- a/docker-compose/envs/common-smart-contract-verifier.env +++ b/docker-compose/envs/common-smart-contract-verifier.env @@ -1,3 +1,4 @@ +#SMART_CONTRACT_VERIFIER_DOCKER_TAG= SMART_CONTRACT_VERIFIER__SERVER__ADDR=0.0.0.0:8043 SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED=true From e5b6583ed2eeb35ce854bccd44b28ef51c6f2b3d Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 7 Sep 2022 17:11:41 +0300 Subject: [PATCH 244/723] add verification service to default compose file --- docker-compose/README.md | 13 ++++++++++--- ....yml => docker-compose-no-rust-verification.yml} | 13 ------------- docker-compose/docker-compose.yml | 12 ++++++++++++ 3 files changed, 22 insertions(+), 16 deletions(-) rename docker-compose/{docker-compose-with-verification.yml => docker-compose-no-rust-verification.yml} (71%) diff --git a/docker-compose/README.md b/docker-compose/README.md index cfc504826f1e..c88bffccf773 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -10,15 +10,22 @@ Runs BlockScout locally in Docker container with usage [docker-compose](https:// ## Building Docker containers from source -``` +```bash docker-compose up --build ``` -This command uses by-default `docker-compose.yml`, which build the explorer into Docker image and runs 2 Docker containers: +This command uses by-default `docker-compose.yml`, which build the explorer into Docker image and runs 3 Docker containers: - one for the database. Postgres 13.x, which will be available at port 7432 on localhost +- [smart-contract-verifier](https://github.com/blockscout/blockscout-rs/) service, which will be available at port 8043 on localhost - and the BlockScout explorer at http://localhost:4000 +## Building Docker contrainers from source with native smart contract verification (deprecated) + +```bash +docker-compose -f docker-compose-no-rust-verification.yml up --build +``` + ## Configs for different Ethereum clients Also, the repo contains built-in configs for different clients without need to build the image @@ -33,4 +40,4 @@ All of the configs assume, that the Ethereum JSON RPC is running at http://local In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, where replace `config_file.yml` with the file name of the config, which has been launched before. -You can play with the BlockScout environment variables, which are present at `./envs/common-blockscout.env`. The description of the environment variables are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). \ No newline at end of file +You can play with the BlockScout environment variables, which are present at `./envs/common-blockscout.env`. The description of the environment variables are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). diff --git a/docker-compose/docker-compose-with-verification.yml b/docker-compose/docker-compose-no-rust-verification.yml similarity index 71% rename from docker-compose/docker-compose-with-verification.yml rename to docker-compose/docker-compose-no-rust-verification.yml index 4a1fd819cbdb..b0e507efefd8 100644 --- a/docker-compose/docker-compose-with-verification.yml +++ b/docker-compose/docker-compose-no-rust-verification.yml @@ -15,7 +15,6 @@ services: blockscout: depends_on: - db - - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. @@ -42,17 +41,5 @@ services: - 'host.docker.internal:host-gateway' env_file: - ./envs/common-blockscout.env - environment: - ENABLE_RUST_VERIFICATION_SERVICE: 'true' - RUST_VERIFICATION_SERVICE_URL: 'http://host.docker.internal:8043/' ports: - 4000:4000 - - smart-contract-verifier: - image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} - restart: always - container_name: 'smart-contract-verifier' - env_file: - - ./envs/common-smart-contract-verifier.env - ports: - - 8043:8043 diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 3ebb5d1edfbf..4a1fd819cbdb 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,6 +15,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. @@ -41,6 +42,17 @@ services: - 'host.docker.internal:host-gateway' env_file: - ./envs/common-blockscout.env + environment: + ENABLE_RUST_VERIFICATION_SERVICE: 'true' + RUST_VERIFICATION_SERVICE_URL: 'http://host.docker.internal:8043/' ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 From f14c1affd8e2c1b309e91be55a0bcbe03fdeb1c8 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Thu, 8 Sep 2022 11:42:16 +0300 Subject: [PATCH 245/723] add verification to all compose files --- docker-compose/docker-compose-no-build-ganache.yml | 8 ++++++++ docker-compose/docker-compose-no-build-geth.yml | 8 ++++++++ .../docker-compose-no-build-hardhat-network.yml | 8 ++++++++ .../docker-compose-no-build-no-db-container.yml | 8 ++++++++ .../docker-compose-no-build-open-ethereum-nethermind.yml | 8 ++++++++ docker-compose/docker-compose-no-rust-verification.yml | 2 ++ docker-compose/docker-compose.yml | 4 ---- docker-compose/envs/common-blockscout.env | 4 ++-- 8 files changed, 44 insertions(+), 6 deletions(-) diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index 66ff9ecb104e..54b15612f886 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -37,3 +37,11 @@ services: ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/docker-compose-no-build-geth.yml b/docker-compose/docker-compose-no-build-geth.yml index 1a78efc856a6..8e069e95b787 100644 --- a/docker-compose/docker-compose-no-build-geth.yml +++ b/docker-compose/docker-compose-no-build-geth.yml @@ -37,3 +37,11 @@ services: ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/docker-compose-no-build-hardhat-network.yml b/docker-compose/docker-compose-no-build-hardhat-network.yml index 9cf66ffe2a57..d489b6e26d41 100644 --- a/docker-compose/docker-compose-no-build-hardhat-network.yml +++ b/docker-compose/docker-compose-no-build-hardhat-network.yml @@ -36,3 +36,11 @@ services: ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/docker-compose-no-build-no-db-container.yml b/docker-compose/docker-compose-no-build-no-db-container.yml index 9c924dba3f0c..d66e6eae635f 100644 --- a/docker-compose/docker-compose-no-build-no-db-container.yml +++ b/docker-compose/docker-compose-no-build-no-db-container.yml @@ -19,3 +19,11 @@ services: ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml index 02f912444530..b708aed4bad2 100644 --- a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml +++ b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml @@ -37,3 +37,11 @@ services: ports: - 4000:4000 + smart-contract-verifier: + image: ghcr.io/blockscout/smart-contract-verifier:${SMART_CONTRACT_VERIFIER_DOCKER_TAG:-latest} + restart: always + container_name: 'smart-contract-verifier' + env_file: + - ./envs/common-smart-contract-verifier.env + ports: + - 8043:8043 diff --git a/docker-compose/docker-compose-no-rust-verification.yml b/docker-compose/docker-compose-no-rust-verification.yml index b0e507efefd8..74c3b7764260 100644 --- a/docker-compose/docker-compose-no-rust-verification.yml +++ b/docker-compose/docker-compose-no-rust-verification.yml @@ -41,5 +41,7 @@ services: - 'host.docker.internal:host-gateway' env_file: - ./envs/common-blockscout.env + environment: + ENABLE_RUST_VERIFICATION_SERVICE: 'false' ports: - 4000:4000 diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 4a1fd819cbdb..21d007add632 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,7 +15,6 @@ services: blockscout: depends_on: - db - - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. @@ -42,9 +41,6 @@ services: - 'host.docker.internal:host-gateway' env_file: - ./envs/common-blockscout.env - environment: - ENABLE_RUST_VERIFICATION_SERVICE: 'true' - RUST_VERIFICATION_SERVICE_URL: 'http://host.docker.internal:8043/' ports: - 4000:4000 diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index caf206502c80..cd2a3ffdb0cf 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -122,5 +122,5 @@ API_RATE_LIMIT_BY_IP=50 API_RATE_LIMIT_WHITELISTED_IPS= API_RATE_LIMIT_STATIC_API_KEY= FETCH_REWARDS_WAY=trace_block -# ENABLE_RUST_VERIFICATION_SERVICE=true -# RUST_VERIFICATION_SERVICE_URL=http://0.0.0.0:8043/ \ No newline at end of file +ENABLE_RUST_VERIFICATION_SERVICE=true +RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ From b65313fa2f8015ef4f265c6c8d043d313d4424f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 19:02:50 +0000 Subject: [PATCH 246/723] Bump core-js from 3.25.0 to 3.25.1 in /apps/block_scout_web/assets Bumps [core-js](https://github.com/zloirock/core-js) from 3.25.0 to 3.25.1. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/compare/v3.25.0...v3.25.1) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f25095849392..27d75a99a5a6 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -16,7 +16,7 @@ "chart.js": "^3.9.1", "chartjs-adapter-luxon": "^1.2.0", "clipboard": "^2.0.11", - "core-js": "^3.25.0", + "core-js": "^3.25.1", "crypto-browserify": "^3.12.0", "dropzone": "^5.9.3", "eth-net-props": "^1.0.41", @@ -5868,9 +5868,9 @@ } }, "node_modules/core-js": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.0.tgz", - "integrity": "sha512-CVU1xvJEfJGhyCpBrzzzU1kjCfgsGUxhEvwUV2e/cOedYWHdmluamx+knDnmhqALddMG16fZvIqvs9aijsHHaA==", + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.1.tgz", + "integrity": "sha512-sr0FY4lnO1hkQ4gLDr24K0DGnweGO1QwSj5BpfQjpSJPdqWalja4cTps29Y/PJVG/P7FYlPDkH3hO+Tr0CvDgQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -23084,9 +23084,9 @@ } }, "core-js": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.0.tgz", - "integrity": "sha512-CVU1xvJEfJGhyCpBrzzzU1kjCfgsGUxhEvwUV2e/cOedYWHdmluamx+knDnmhqALddMG16fZvIqvs9aijsHHaA==" + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.25.1.tgz", + "integrity": "sha512-sr0FY4lnO1hkQ4gLDr24K0DGnweGO1QwSj5BpfQjpSJPdqWalja4cTps29Y/PJVG/P7FYlPDkH3hO+Tr0CvDgQ==" }, "core-js-compat": { "version": "3.24.1", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6c7e1bdf8f86..25927477e087 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -28,7 +28,7 @@ "chart.js": "^3.9.1", "chartjs-adapter-luxon": "^1.2.0", "clipboard": "^2.0.11", - "core-js": "^3.25.0", + "core-js": "^3.25.1", "crypto-browserify": "^3.12.0", "dropzone": "^5.9.3", "eth-net-props": "^1.0.41", From 135814f7db6b8f03e674338d670b2419573b2b15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 19:03:17 +0000 Subject: [PATCH 247/723] Bump sass from 1.54.8 to 1.54.9 in /apps/block_scout_web/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.54.8 to 1.54.9. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.8...1.54.9) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f25095849392..4068639b1056 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -84,7 +84,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.8", + "sass": "^1.54.9", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", @@ -15863,9 +15863,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.54.8", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz", - "integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==", + "version": "1.54.9", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.9.tgz", + "integrity": "sha512-xb1hjASzEH+0L0WI9oFjqhRi51t/gagWnxLiwUNMltA0Ab6jIDkAacgKiGYKM9Jhy109osM7woEEai6SXeJo5Q==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -30751,9 +30751,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.54.8", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz", - "integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==", + "version": "1.54.9", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.54.9.tgz", + "integrity": "sha512-xb1hjASzEH+0L0WI9oFjqhRi51t/gagWnxLiwUNMltA0Ab6jIDkAacgKiGYKM9Jhy109osM7woEEai6SXeJo5Q==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6c7e1bdf8f86..166bcf39ab03 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -96,7 +96,7 @@ "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", - "sass": "^1.54.8", + "sass": "^1.54.9", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", "webpack": "^5.74.0", From cf24d793e958c317ccc49c392568c50f6bdffd33 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Fri, 9 Sep 2022 12:26:56 +0300 Subject: [PATCH 248/723] add depends on SCV --- docker-compose/docker-compose-no-build-ganache.yml | 1 + docker-compose/docker-compose-no-build-geth.yml | 1 + docker-compose/docker-compose-no-build-hardhat-network.yml | 1 + docker-compose/docker-compose-no-build-no-db-container.yml | 2 ++ .../docker-compose-no-build-open-ethereum-nethermind.yml | 1 + docker-compose/docker-compose.yml | 1 + 6 files changed, 7 insertions(+) diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index 54b15612f886..619e8104b058 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -15,6 +15,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-geth.yml b/docker-compose/docker-compose-no-build-geth.yml index 8e069e95b787..ec6e64d24856 100644 --- a/docker-compose/docker-compose-no-build-geth.yml +++ b/docker-compose/docker-compose-no-build-geth.yml @@ -17,6 +17,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-hardhat-network.yml b/docker-compose/docker-compose-no-build-hardhat-network.yml index d489b6e26d41..9a74d44f1008 100644 --- a/docker-compose/docker-compose-no-build-hardhat-network.yml +++ b/docker-compose/docker-compose-no-build-hardhat-network.yml @@ -15,6 +15,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-no-db-container.yml b/docker-compose/docker-compose-no-build-no-db-container.yml index d66e6eae635f..69ebd7005e34 100644 --- a/docker-compose/docker-compose-no-build-no-db-container.yml +++ b/docker-compose/docker-compose-no-build-no-db-container.yml @@ -2,6 +2,8 @@ version: '3.8' services: blockscout: + depends_on: + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml index b708aed4bad2..9a272acb5732 100644 --- a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml +++ b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml @@ -17,6 +17,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 21d007add632..0a57ceb4ca7b 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,6 +15,7 @@ services: blockscout: depends_on: - db + - smart-contract-verifier image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. From ebb8dc2908a993dfed17215dcc84be4879c5d5e7 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 13 Feb 2022 20:25:24 +0300 Subject: [PATCH 249/723] Account/Watchlist/Notifications (#13) * Auth for debug Fix for Auth callback calls endless cycle * Logout from auth0 and add profile picture Fix styles in signin/signout * Add profile * Update dockerfiles * Make auth paths dependent of API_PATH * Change api_path to network_path * Save identity from auth into DB * Hardcode urls to make it work again Style fixes * Change sign_in icon * Create Watchlist together with identity * Add watchlist show * Add watchlist addresses Fix creating account on first login Make address as it should look like * Associate watchlist with addresses * Create watchlist address UI Add balance in coin (need to use right coin) * Add tokens on watchlist Fix warnings Fix topnav styles * Add watch_ and notify_ fields in WatchlistAddress * Notifications draft Style fixes Removed divider Watchlist Address Form: ERC-721 & ERC-1155 -> NFT Form style -> modal Move Auth into Account module Add any valid address to watchlist Fix profile namespace in router Fixes in build Notification Fixed insert notifications * Send Emails via SendGrid * Add AUTH0 & SENDGRID API keys to Makefile * Finish email variables Fix warnings Add links to email * Update & Delete Watchlist Addresses Fix styles Fix warnings * Authorize create/update watchlist_address Fix credo warnings * Refactoring and fix UI * Introduce sender & template ENVs * Fix credo warns * Fix formatter & dialyzer * Make Notifier main entrypoint * Fix tests * Fix comments * Hardcode auth0 callbacks for prod env Export it in dev env and it should work: ``` export AUTH0_CALLBACK_URL='http://localhost:4000/auth/auth0/callback' export AUTH0_LOGOUT_RETURN_URL='http://localhost:4000/auth/logout' ``` * Style fixes * Private tags on address/transaction/token pages * Add account logger * fix email subject * Fix token_transfers notifications * Prepare for release * Fix transaction dropdown * Remoe unwanted changes * Reset CI cache * Fix Dialyzer, gettext * Add logout_return_to_url to :ueberauth config for test env * Invalidate GA cache * Redefine sign_in_link for test env * Fix adding address with disabled checkboxes Remove testnet hardcode from prod config CI fix attempt * Add AUTH0_LOGOUT_URL env * Fix logger warning * current_user/1, check that mapping contains :current_user object before executing get_session function * Fix current_user * Final fix of current_user/1 * Introduce COIN_NAME env * Lowercase hashes in email * Style fix * Add block_url to email * Fix creating notifications for NFT * Add notifier to token_transfers import runner * Add processing transfer into Notifier * Fix token transfer summary * WIP: Account refactoring (#19) * Move Ueberauth settings to config.exs * Make AuthController more clear * Fix error when build_watchlist_notification returns nil * Set WatchlistAddressForm defaults * Style fix * Fix double send email for tokens * Style fix WatchlistController * Style fix AddWatchlistAddress * Style fix UserFromAuth * Use Logger instead AccountLogger * Credo fix * Fix AddWatchlistAddress * Fix Notifier Co-authored-by: Oleg Sovetnik Co-authored-by: nikitosing --- .github/workflows/config.yml | 32 +- apps/block_scout_web/assets/css/app.scss | 2 + .../assets/css/components/_account.scss | 69 +++++ apps/block_scout_web/config/config.exs | 17 ++ .../controllers/account/auth_controller.ex | 56 ++++ .../account/watchlist_address_controller.ex | 111 +++++++ .../account/watchlist_controller.ex | 33 +++ .../address_coin_balance_controller.ex | 8 +- .../address_contract_controller.ex | 8 +- .../address_decompiled_contract_controller.ex | 8 +- ...address_internal_transaction_controller.ex | 8 +- .../controllers/address_logs_controller.ex | 8 +- .../address_read_contract_controller.ex | 8 +- .../address_read_proxy_controller.ex | 8 +- .../address_token_transfer_controller.ex | 14 +- .../address_transaction_controller.ex | 8 +- .../address_validation_controller.ex | 8 +- .../address_write_contract_controller.ex | 8 +- .../address_write_proxy_controller.ex | 8 +- .../controllers/tokens/contract_controller.ex | 8 +- .../controllers/tokens/holder_controller.ex | 8 +- .../controllers/tokens/transfer_controller.ex | 8 +- .../models/add_watchlist_address.ex | 115 ++++++++ .../models/update_watchlist_address.ex | 49 ++++ .../block_scout_web/models/user_from_auth.ex | 103 +++++++ .../templates/account/auth/profile.html.eex | 45 +++ .../templates/account/watchlist/show.html.eex | 49 ++++ .../account/watchlist_address/edit.html.eex | 97 ++++++ .../account/watchlist_address/new.html.eex | 94 ++++++ .../account/watchlist_address/row.html.eex | 29 ++ .../templates/address/_labels.html.eex | 8 + .../templates/address/overview.html.eex | 26 +- .../address_coin_balance/index.html.eex | 4 +- .../templates/address_contract/index.html.eex | 4 +- .../index.html.eex | 4 +- .../index.html.eex | 4 +- .../templates/address_logs/index.html.eex | 4 +- .../address_read_contract/index.html.eex | 4 +- .../address_read_proxy/index.html.eex | 4 +- .../templates/address_token/index.html.eex | 4 +- .../address_token_transfer/index.html.eex | 4 +- .../address_transaction/index.html.eex | 4 +- .../address_validation/index.html.eex | 4 +- .../address_write_contract/index.html.eex | 4 +- .../address_write_proxy/index.html.eex | 4 +- .../templates/layout/_topnav.html.eex | 38 ++- .../templates/layout/app.html.eex | 2 +- .../templates/tokens/contract/index.html.eex | 1 + .../templates/tokens/holder/index.html.eex | 1 + .../templates/tokens/inventory/index.html.eex | 1 + .../tokens/overview/_details.html.eex | 2 + .../templates/tokens/transfer/index.html.eex | 1 + .../templates/transaction/_tile.html.eex | 3 + .../templates/transaction/overview.html.eex | 2 + .../views/account/auth_view.ex | 3 + .../views/account/watchlist_address_view.ex | 13 + .../views/account/watchlist_view.ex | 16 + .../lib/block_scout_web/views/address_view.ex | 5 + .../lib/block_scout_web/views/layout_view.ex | 21 ++ .../block_scout_web/views/transaction_view.ex | 2 + .../lib/block_scout_web/web_router.ex | 25 ++ apps/block_scout_web/mix.exs | 5 +- apps/block_scout_web/priv/gettext/default.pot | 277 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 277 +++++++++--------- apps/explorer/config/config.exs | 8 + .../lib/explorer/accounts/identity.ex | 25 ++ .../lib/explorer/accounts/notify/email.ex | 153 ++++++++++ .../lib/explorer/accounts/notify/notifier.ex | 133 +++++++++ .../lib/explorer/accounts/notify/summary.ex | 194 ++++++++++++ .../lib/explorer/accounts/watchlist.ex | 25 ++ .../explorer/accounts/watchlist_address.ex | 68 +++++ .../accounts/watchlist_address_form.ex | 52 ++++ .../accounts/watchlist_notification.ex | 72 +++++ apps/explorer/lib/explorer/chain/import.ex | 3 + .../runner/block/second_degree_relations.ex | 2 +- .../chain/import/runner/token_transfers.ex | 7 +- .../lib/explorer/env_var_translator.ex | 24 ++ apps/explorer/lib/explorer/mailer.ex | 12 + .../explorer/lib/explorer/tags/address_tag.ex | 98 +++++++ .../explorer/tags/address_tag_cataloger.ex | 198 +++++++++++++ .../lib/explorer/tags/address_to_tag.ex | 182 ++++++++++++ .../explorer/validator/metadata_retriever.ex | 2 +- apps/explorer/mix.exs | 4 +- .../migrations/20210219080523_add_tags.exs | 24 ++ ...211031164954_create_account_identities.exs | 13 + ...211105114502_create_account_watchlists.exs | 14 + ...907_create_account_watchlist_addresses.exs | 28 ++ ...create_account_watchlist_notifications.exs | 31 ++ ...add_email_and_name_to_account_identity.exs | 10 + config/config.exs | 3 +- config/dev.exs | 5 + config/prod.exs | 5 + docker/Dockerfile | 2 +- docker/Makefile | 28 ++ mix.lock | 6 +- 95 files changed, 2875 insertions(+), 364 deletions(-) create mode 100644 apps/block_scout_web/assets/css/components/_account.scss create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/auth_view.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex create mode 100644 apps/explorer/lib/explorer/accounts/identity.ex create mode 100644 apps/explorer/lib/explorer/accounts/notify/email.ex create mode 100644 apps/explorer/lib/explorer/accounts/notify/notifier.ex create mode 100644 apps/explorer/lib/explorer/accounts/notify/summary.ex create mode 100644 apps/explorer/lib/explorer/accounts/watchlist.ex create mode 100644 apps/explorer/lib/explorer/accounts/watchlist_address.ex create mode 100644 apps/explorer/lib/explorer/accounts/watchlist_address_form.ex create mode 100644 apps/explorer/lib/explorer/accounts/watchlist_notification.ex create mode 100644 apps/explorer/lib/explorer/env_var_translator.ex create mode 100644 apps/explorer/lib/explorer/mailer.ex create mode 100644 apps/explorer/lib/explorer/tags/address_tag.ex create mode 100644 apps/explorer/lib/explorer/tags/address_tag_cataloger.ex create mode 100644 apps/explorer/lib/explorer/tags/address_to_tag.ex create mode 100644 apps/explorer/priv/repo/migrations/20210219080523_add_tags.exs create mode 100644 apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs create mode 100644 apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs create mode 100644 apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs create mode 100644 apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs create mode 100644 apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index a10966c273b8..6c13d064b539 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -12,6 +12,10 @@ env: MIX_ENV: test OTP_VERSION: '24.3.4.1' ELIXIR_VERSION: '1.13.4' + AUTH0_DOMAIN: 'blockscoutcom.us.auth0.com' + AUTH0_CALLBACK_URL: 'https://blockscout.com/auth/auth0/callback' + AUTH0_LOGOUT_URL: 'https://blockscoutcom.us.auth0.com/v2/logout' + AUTH0_LOGOUT_RETURN_URL: 'https://blockscout.com/auth/logout' jobs: build-and-cache: @@ -34,7 +38,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -89,12 +93,12 @@ jobs: with: otp-version: ${{ env.OTP_VERSION }} elixir-version: ${{ env.ELIXIR_VERSION }} - + - name: Restore Mix Deps Cache uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -118,7 +122,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -141,7 +145,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -181,7 +185,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -207,7 +211,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -235,7 +239,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -281,7 +285,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -340,7 +344,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -396,7 +400,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -463,7 +467,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -524,7 +528,7 @@ jobs: uses: actions/cache@v2 id: deps-cache with: - path: | + path: | deps _build key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} @@ -571,4 +575,4 @@ jobs: ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Parity.Mox" ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" CHAIN_ID: "77" - ADMIN_PANEL_ENABLED: "true" \ No newline at end of file + ADMIN_PANEL_ENABLED: "true" diff --git a/apps/block_scout_web/assets/css/app.scss b/apps/block_scout_web/assets/css/app.scss index 330b99c4e0e3..e3468b63580c 100644 --- a/apps/block_scout_web/assets/css/app.scss +++ b/apps/block_scout_web/assets/css/app.scss @@ -124,6 +124,8 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "components/_dropzone"; @import "components/_search"; @import "components/_ad"; +@import "components/_account"; + // Font Awesome @import "components/_fontawesome_icon"; diff --git a/apps/block_scout_web/assets/css/components/_account.scss b/apps/block_scout_web/assets/css/components/_account.scss new file mode 100644 index 000000000000..4197c5c656b9 --- /dev/null +++ b/apps/block_scout_web/assets/css/components/_account.scss @@ -0,0 +1,69 @@ +div.divider { + height: inherit; + width: 1px; + background: #828ba0; + margin-left: 10px; + margin-right: 10px; +} + +input.profile-item { + margin-left: 10px; + color: #828ba0; + outline: none; +} + +.header-account { + font-size: 18px; +} + +.label-account { + font-size: 1rem; +} + +.white { + color: #fff; +} + +.card-body-account { + max-width: none !important; +} + +.form-input { + display: flex; + margin-bottom: 1rem; +} + +.form-checkbox { + margin-right: 0.5rem; + align-self: center; +} + +.label-checkbox { + font-size: 14px; + margin-bottom: 0; +} + +.o-flow-x { + overflow-x: auto; +} + +.fs-14 { + font-size: 14px; +} + +.acc-link-active { + &:hover, &:focus { + background-color: $primary !important; + color: #fff !important; + } + background-color: $primary; + color: #fff; +} + +.table-watchlist { + margin: 30px; + + @include media-breakpoint-down(md) { + margin: 0; + } +} \ No newline at end of file diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index dc2add39a879..a19693128ec8 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -78,6 +78,23 @@ config :block_scout_web, BlockScoutWeb.ApiRouter, config :block_scout_web, BlockScoutWeb.WebRouter, enabled: System.get_env("DISABLE_WEBAPP") != "true" +# Configures Ueberauth's Auth0 auth provider +config :ueberauth, Ueberauth.Strategy.Auth0.OAuth, + domain: System.get_env("AUTH0_DOMAIN"), + client_id: System.get_env("AUTH0_CLIENT_ID"), + client_secret: System.get_env("AUTH0_CLIENT_SECRET") + +# Configures Ueberauth local settings +config :ueberauth, Ueberauth, + providers: [ + auth0: { + Ueberauth.Strategy.Auth0, + [callback_url: System.get_env("AUTH0_CALLBACK_URL")] + } + ], + logout_url: System.get_env("AUTH0_LOGOUT_URL"), + logout_return_to_url: System.get_env("AUTH0_LOGOUT_RETURN_URL") + config :hammer, backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex new file mode 100644 index 000000000000..fa4cb3ac0b89 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -0,0 +1,56 @@ +defmodule BlockScoutWeb.Account.AuthController do + use BlockScoutWeb, :controller + + plug(Ueberauth) + + def logout(conn, _params) do + conn + # |> put_flash(:info, "You have been logged out!") + |> configure_session(drop: true) + |> redirect(to: root()) + end + + def profile(conn, _params), + do: conn |> get_session(:current_user) |> do_profile(conn) + + defp do_profile(nil, conn), + do: redirect(conn, to: root()) + + defp do_profile(%{} = user, conn), + do: render(conn, :profile, user: user) + + def callback(%{assigns: %{ueberauth_failure: _fails}} = conn, _params) do + conn + |> put_flash(:error, "Failed to authenticate.") + |> redirect(to: root()) + end + + def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do + case UserFromAuth.find_or_create(auth) do + {:ok, user} -> + conn + # |> put_flash(:info, "Successfully authenticated as " <> user.name <> ".") + |> put_session(:current_user, user) + |> redirect(to: root()) + + {:error, reason} -> + conn + |> put_flash(:error, reason) + |> redirect(to: root()) + end + end + + # for importing in other controllers + def authenticate!(conn) do + current_user(conn) || redirect(conn, to: root()) + end + + def current_user(%{private: %{plug_session: %{"current_user" => _}}} = conn), + do: get_session(conn, :current_user) + + def current_user(_), do: nil + + defp root do + System.get_env("NETWORK_PATH") || "/" + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex new file mode 100644 index 000000000000..619ed9294632 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex @@ -0,0 +1,111 @@ +defmodule BlockScoutWeb.Account.WatchlistAddressController do + use BlockScoutWeb, :controller + + alias Ecto.Changeset + alias Explorer.Repo + alias Explorer.Accounts.{WatchlistAddress, WatchlistAddressForm} + + import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + + def new(conn, _params) do + authenticate!(conn) + + render(conn, "new.html", watchlist_address: new_address()) + end + + def create(conn, %{"watchlist_address_form" => wa_params}) do + current_user = authenticate!(conn) + + case AddWatchlistAddress.call(current_user.watchlist_id, wa_params) do + {:ok, _watchlist_address} -> + conn + # |> put_flash(:info, "Address created!") + |> redirect(to: watchlist_path(conn, :show)) + + {:error, message = message} -> + conn + # |> put_flash(:error, message) + |> render("new.html", watchlist_address: changeset_with_error(wa_params, message)) + end + end + + def show(conn, _params) do + current_user = authenticate!(conn) + + render( + conn, + "show.html", + watchlist: watchlist(current_user) + ) + end + + def edit(conn, %{"id" => id}) do + authenticate!(conn) + + case get_watchlist_address(conn, id) do + nil -> + conn + |> put_status(404) + |> put_view(BlockScoutWeb.ErrorView) + |> render(:"404") + + %WatchlistAddress{} = wla -> + form = WatchlistAddress.to_form(wla) + changeset = WatchlistAddressForm.changeset(form, %{}) + + render(conn, "edit.html", watchlist_address_id: wla, changeset: changeset) + end + end + + def update(conn, %{"id" => id, "watchlist_address_form" => wa_params}) do + authenticate!(conn) + + wla = get_watchlist_address(conn, id) + + case UpdateWatchlistAddress.call(wla, wa_params) do + {:ok, _watchlist_address} -> + conn + # |> put_flash(:info, "Address updated") + |> redirect(to: watchlist_path(conn, :show)) + + {:error, message = message} -> + conn + # |> put_flash(:error, message) + |> render("edit.html", watchlist_address: changeset_with_error(wa_params, message)) + end + end + + def delete(conn, %{"id" => id}) do + authenticate!(conn) + + wla = get_watchlist_address(conn, id) + Repo.delete(wla) + + conn + # |> put_flash(:info, "Watchlist Address removed successfully.") + |> redirect(to: watchlist_path(conn, :show)) + end + + defp changeset(params) do + WatchlistAddressForm.changeset(%WatchlistAddressForm{}, params) + end + + defp changeset_with_error(params, message) do + %{changeset(params) | action: :insert} + |> Changeset.add_error(:address_hash, message) + end + + defp new_address, do: WatchlistAddressForm.changeset(%WatchlistAddressForm{}, %{}) + + defp watchlist(user) do + Watchlist + |> Repo.get(user.watchlist_id) + |> Repo.preload(watchlist_addresses: :address) + end + + defp get_watchlist_address(conn, id) do + WatchlistAddress + |> Repo.get_by(id: id, watchlist_id: authenticate!(conn).watchlist_id) + |> Repo.preload(:address) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex new file mode 100644 index 000000000000..8890a2208791 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex @@ -0,0 +1,33 @@ +defmodule BlockScoutWeb.Account.WatchlistController do + use BlockScoutWeb, :controller + + alias BlockScoutWeb.Account.AuthController + alias Explorer.Accounts.Watchlist + alias Explorer.Repo + + def show(conn, _params) do + case AuthController.current_user(conn) do + nil -> + conn + |> put_flash(:info, "Sign in to see watchlist!") + |> redirect(to: root()) + + %{} = user -> + render( + conn, + "show.html", + watchlist: watchlist_with_addresses(user) + ) + end + end + + defp watchlist_with_addresses(user) do + Watchlist + |> Repo.get(user.watchlist_id) + |> Repo.preload(watchlist_addresses: :address) + end + + defp root do + System.get_env("NETWORK_PATH") || "/" + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex index b024c102a0bd..37bd5e625b9a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex @@ -8,9 +8,11 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, AddressCoinBalanceView, Controller} + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.{Address, Wei} alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -71,12 +73,16 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render(conn, "index.html", address: address, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), current_path: Controller.current_full_path(conn), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex index a2f1d30cbb56..897e9247562e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex @@ -3,9 +3,11 @@ defmodule BlockScoutWeb.AddressContractController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias BlockScoutWeb.AddressContractVerificationController, as: VerificationController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -23,13 +25,17 @@ defmodule BlockScoutWeb.AddressContractController do {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), _ <- VerificationController.check_and_verify(address_hash_string), {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", address: address, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}) + counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex index 079d5d9093ce..079f2d1cad7a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex @@ -2,21 +2,27 @@ defmodule BlockScoutWeb.AddressDecompiledContractController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.find_decompiled_contract_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", address: address, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}) + counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex index a72ba8e25649..6ee8aa204698 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex @@ -8,9 +8,11 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do import BlockScoutWeb.Chain, only: [current_filter: 1, paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, Controller, InternalTransactionView} + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.{Address, Wei} alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -78,6 +80,9 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -86,7 +91,8 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do current_path: Controller.current_full_path(conn), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), filter: params["filter"], - counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}) + counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex index bcb138ca08b9..4563ab071e9b 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex @@ -6,8 +6,10 @@ defmodule BlockScoutWeb.AddressLogsController do import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, AddressLogsView, Controller} + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -57,6 +59,9 @@ defmodule BlockScoutWeb.AddressLogsController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -64,7 +69,8 @@ defmodule BlockScoutWeb.AddressLogsController do current_path: Controller.current_full_path(conn), coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}) + counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), + private_tags: private_tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex index 4734b8f0f343..01cc179b1bc2 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex @@ -9,9 +9,11 @@ defmodule BlockScoutWeb.AddressReadContractController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -29,6 +31,9 @@ defmodule BlockScoutWeb.AddressReadContractController do {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -37,7 +42,8 @@ defmodule BlockScoutWeb.AddressReadContractController do action: :read, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex index 7ed05ef4b42c..ccdca47604e1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex @@ -3,9 +3,11 @@ defmodule BlockScoutWeb.AddressReadProxyController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -23,6 +25,9 @@ defmodule BlockScoutWeb.AddressReadProxyController do {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -31,7 +36,8 @@ defmodule BlockScoutWeb.AddressReadProxyController do action: :read, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex index 3cfee0da7d4c..7ef4f34aef89 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex @@ -2,9 +2,11 @@ defmodule BlockScoutWeb.AddressTokenTransferController do use BlockScoutWeb, :controller alias BlockScoutWeb.{AccessHelpers, Controller, TransactionView} + alias BlockScoutWeb.Account.AuthController alias Explorer.ExchangeRates.Token alias Explorer.{Chain, Market} alias Explorer.Chain.Address + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -101,6 +103,9 @@ defmodule BlockScoutWeb.AddressTokenTransferController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, token} <- Chain.token_from_address_hash(token_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -109,7 +114,8 @@ defmodule BlockScoutWeb.AddressTokenTransferController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), current_path: Controller.current_full_path(conn), token: token, - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else {:restricted_access, _} -> @@ -192,6 +198,9 @@ defmodule BlockScoutWeb.AddressTokenTransferController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -200,7 +209,8 @@ defmodule BlockScoutWeb.AddressTokenTransferController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), filter: params["filter"], current_path: Controller.current_full_path(conn), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index 649bd8f4b468..f99c706ab1cf 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -8,6 +8,8 @@ defmodule BlockScoutWeb.AddressTransactionController do import BlockScoutWeb.Chain, only: [current_filter: 1, paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, Controller, TransactionView} + alias BlockScoutWeb.Account.AuthController + alias Explorer.Tags.AddressToTag alias Explorer.{Chain, Market} alias Explorer.Chain.{ @@ -114,6 +116,9 @@ defmodule BlockScoutWeb.AddressTransactionController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -122,7 +127,8 @@ defmodule BlockScoutWeb.AddressTransactionController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), filter: params["filter"], counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - current_path: Controller.current_full_path(conn) + current_path: Controller.current_full_path(conn), + private_tags: private_tags ) else :error -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex index 6f6ccdcad7ab..092e7eed9b57 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex @@ -8,7 +8,9 @@ defmodule BlockScoutWeb.AddressValidationController do only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, BlockView, Controller} + alias BlockScoutWeb.Account.AuthController alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Explorer.{Chain, Market} alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -72,6 +74,9 @@ defmodule BlockScoutWeb.AddressValidationController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, address} <- Chain.find_or_insert_address_from_hash(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -79,7 +84,8 @@ defmodule BlockScoutWeb.AddressValidationController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), current_path: Controller.current_full_path(conn), counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null() + exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex index f3b50dd4a26e..8e4a6ec5414a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex @@ -9,9 +9,11 @@ defmodule BlockScoutWeb.AddressWriteContractController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -29,6 +31,9 @@ defmodule BlockScoutWeb.AddressWriteContractController do {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -37,7 +42,8 @@ defmodule BlockScoutWeb.AddressWriteContractController do action: :write, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex index e82fc17c29fb..24cbc3ab6ba2 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex @@ -3,9 +3,11 @@ defmodule BlockScoutWeb.AddressWriteProxyController do use BlockScoutWeb, :controller alias BlockScoutWeb.AccessHelpers + alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -23,6 +25,9 @@ defmodule BlockScoutWeb.AddressWriteProxyController do {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", @@ -31,7 +36,8 @@ defmodule BlockScoutWeb.AddressWriteProxyController do action: :write, coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex index e16d9bf4707d..6905ed83aa2e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex @@ -1,9 +1,11 @@ defmodule BlockScoutWeb.Tokens.ContractController do use BlockScoutWeb, :controller + alias BlockScoutWeb.Account.AuthController alias BlockScoutWeb.{AccessHelpers, TabHelpers} alias Explorer.{Chain, Market} alias Explorer.Chain.Address + alias Explorer.Tags.AddressToTag def index(conn, %{"token_id" => address_hash_string} = params) do options = [necessity_by_association: %{[contract_address: :smart_contract] => :optional}] @@ -12,6 +14,9 @@ defmodule BlockScoutWeb.Tokens.ContractController do :ok <- Chain.check_verified_smart_contract_exists(address_hash), {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + %{type: type, action: action} = cond do TabHelpers.tab_active?("read-contract", conn.request_path) -> @@ -33,7 +38,8 @@ defmodule BlockScoutWeb.Tokens.ContractController do type: type, action: action, token: Market.add_price(token), - counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex index 806badc1958e..51a5c3633528 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex @@ -2,9 +2,11 @@ defmodule BlockScoutWeb.Tokens.HolderController do use BlockScoutWeb, :controller alias BlockScoutWeb.{AccessHelpers, Controller} + alias BlockScoutWeb.Account.AuthController alias BlockScoutWeb.Tokens.HolderView alias Explorer.{Chain, Market} alias Explorer.Chain.Address + alias Explorer.Tags.AddressToTag alias Phoenix.View import BlockScoutWeb.Chain, @@ -61,12 +63,16 @@ defmodule BlockScoutWeb.Tokens.HolderController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", current_path: Controller.current_full_path(conn), token: Market.add_price(token), - counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}) + counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex index 9c3ce0278ed2..22e5fabb945a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex @@ -2,9 +2,11 @@ defmodule BlockScoutWeb.Tokens.TransferController do use BlockScoutWeb, :controller alias BlockScoutWeb.{AccessHelpers, Controller} + alias BlockScoutWeb.Account.AuthController alias BlockScoutWeb.Tokens.TransferView alias Explorer.{Chain, Market} alias Explorer.Chain.Address + alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.TokenTotalSupplyOnDemand alias Phoenix.View @@ -65,13 +67,17 @@ defmodule BlockScoutWeb.Tokens.TransferController do with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do + current_user = AuthController.current_user(conn) + private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + render( conn, "index.html", counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}), current_path: Controller.current_full_path(conn), token: Market.add_price(token), - token_total_supply_status: TokenTotalSupplyOnDemand.trigger_fetch(address_hash) + token_total_supply_status: TokenTotalSupplyOnDemand.trigger_fetch(address_hash), + private_tags: private_tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex new file mode 100644 index 000000000000..eb18af447ef8 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex @@ -0,0 +1,115 @@ +defmodule AddWatchlistAddress do + @moduledoc """ + Create watchlist address, associated with Address and Watchlist + + params = %{ + "address_hash_string" => "0xBA80A39FD165DFD3BFE704EFAB40B7F899DA7C4B", + "name" => "wallet" + } + call(watchlist, params) + """ + + alias Explorer.{Chain, Repo} + alias Explorer.Accounts.{Watchlist, WatchlistAddress} + alias Explorer.Chain.Address + + def call(watchlist_id, %{"address_hash" => address_hash_string} = params) do + case format_address(address_hash_string) do + {:ok, address_hash} -> + try_create_watchlist_address(watchlist_id, address_hash, params) + + :error -> + {:error, "Wrong address, "} + end + end + + defp try_create_watchlist_address(watchlist_id, address_hash, params) do + case find_watchlist_address(watchlist_id, address_hash) do + %WatchlistAddress{} -> + {:error, "Address already exists!"} + + nil -> + with {:ok, %Address{} = address} <- find_or_create_address(address_hash) do + address + |> params_to_attributes(params) + |> build_watchlist_address(watchlist(watchlist_id)) + |> Repo.insert() + end + end + end + + defp params_to_attributes( + address, + %{ + "name" => name, + "watch_coin_input" => watch_coin_input, + "watch_coin_output" => watch_coin_output, + "watch_erc_20_input" => watch_erc_20_input, + "watch_erc_20_output" => watch_erc_20_output, + "watch_nft_input" => watch_nft_input, + "watch_nft_output" => watch_nft_output, + "notify_email" => notify_email + } + ) do + %{ + address_hash: address.hash, + name: name, + watch_coin_input: to_bool(watch_coin_input), + watch_coin_output: to_bool(watch_coin_output), + watch_erc_20_input: to_bool(watch_erc_20_input), + watch_erc_20_output: to_bool(watch_erc_20_output), + watch_erc_721_input: to_bool(watch_nft_input), + watch_erc_721_output: to_bool(watch_nft_output), + watch_erc_1155_input: to_bool(watch_nft_input), + watch_erc_1155_output: to_bool(watch_nft_output), + notify_email: to_bool(notify_email) + } + end + + defp to_bool("true"), do: true + defp to_bool("false"), do: false + + defp format_address(address_hash_string) do + Chain.string_to_address_hash(address_hash_string) + end + + defp find_watchlist_address(watchlist_id, address_hash) do + Repo.get_by(WatchlistAddress, + address_hash: address_hash, + watchlist_id: watchlist_id + ) + end + + defp find_or_create_address(address_hash) do + case find_address(address_hash) do + {:ok, address} -> {:ok, address} + {:error, :address_not_found} -> create_address(address_hash) + end + end + + defp create_address(address_hash) do + case Repo.insert(%Address{hash: address_hash}) do + {:ok, address} -> {:ok, address} + {:error, _} -> {:error, :wrong_address} + end + end + + defp find_address(address_hash) do + case Repo.get(Address, address_hash) do + nil -> {:error, :address_not_found} + %Address{} = address -> {:ok, address} + end + end + + defp build_watchlist_address(attributes, watchlist) do + Ecto.build_assoc( + watchlist, + :watchlist_addresses, + attributes + ) + end + + defp watchlist(watchlist_id) do + Repo.get(Watchlist, watchlist_id) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex new file mode 100644 index 000000000000..c9b4ee92392e --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex @@ -0,0 +1,49 @@ +defmodule UpdateWatchlistAddress do + @moduledoc """ + Update watchlist address, associated with Address and Watchlist + """ + + alias Ecto.Changeset + alias Explorer.Repo + + def call(watchlist_address, params) do + attrs = params_to_attributes(params) + + watchlist_address + |> changeset(attrs) + |> Repo.update() + end + + defp params_to_attributes(params) do + %{ + "name" => name, + "watch_coin_input" => watch_coin_input, + "watch_coin_output" => watch_coin_output, + "watch_erc_20_input" => watch_erc_20_input, + "watch_erc_20_output" => watch_erc_20_output, + "watch_nft_input" => watch_nft_input, + "watch_nft_output" => watch_nft_output, + "notify_email" => notify_email + } = params + + %{ + name: name, + watch_coin_input: to_bool(watch_coin_input), + watch_coin_output: to_bool(watch_coin_output), + watch_erc_20_input: to_bool(watch_erc_20_input), + watch_erc_20_output: to_bool(watch_erc_20_output), + watch_erc_721_input: to_bool(watch_nft_input), + watch_erc_721_output: to_bool(watch_nft_output), + watch_erc_1155_input: to_bool(watch_nft_input), + watch_erc_1155_output: to_bool(watch_nft_output), + notify_email: to_bool(notify_email) + } + end + + defp to_bool("true"), do: true + defp to_bool("false"), do: false + + defp changeset(watchlist_address, attrs) do + Changeset.change(watchlist_address, attrs) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex new file mode 100644 index 000000000000..0f4f660ff50f --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -0,0 +1,103 @@ +defmodule UserFromAuth do + @moduledoc """ + Retrieve the user information from an auth request + """ + require Logger + require Poison + + alias Explorer.Accounts.Identity + alias Explorer.Repo + alias Ueberauth.Auth + + import Ecto.Query, only: [from: 2] + + def find_or_create(%Auth{} = auth) do + case find_identity(auth) do + [] -> + case create_identity(auth) do + %{} = basic_info -> + {:ok, basic_info} + + {:error, changeset} -> + {:error, changeset} + end + + [%{} = identity | _] -> + {:ok, basic_info(auth, identity)} + end + end + + defp create_identity(auth) do + with {:ok, %Identity{} = identity} <- Repo.insert(new_identity(auth)), + {:ok, _watchlist} <- add_watchlist(identity) do + basic_info(auth, identity) + end + end + + defp new_identity(auth) do + %Identity{ + uid: auth.uid, + email: email_from_auth(auth), + name: name_from_auth(auth) + } + end + + defp add_watchlist(identity) do + watchlist = Ecto.build_assoc(identity, :watchlists, %{}) + + with {:ok, _} <- Repo.insert(watchlist), + do: {:ok, identity} + end + + defp find_identity(auth) do + Repo.all(query_identity(auth)) + end + + defp query_identity(auth) do + from(i in Identity, where: i.uid == ^auth.uid) + end + + defp basic_info(auth, identity) do + %{watchlists: [watchlist | _]} = Repo.preload(identity, :watchlists) + + %{ + id: identity.id, + uid: auth.uid, + email: email_from_auth(auth), + name: name_from_auth(auth), + nickname: nickname_from_auth(auth), + avatar: avatar_from_auth(auth), + watchlist_id: watchlist.id + } + end + + # github does it this way + defp avatar_from_auth(%{info: %{urls: %{avatar_url: image}}}), do: image + + # facebook does it this way + defp avatar_from_auth(%{info: %{image: image}}), do: image + + # default case if nothing matches + defp avatar_from_auth(auth) do + Logger.warn(auth.provider <> " needs to find an avatar URL!") + Logger.debug(Poison.encode!(auth)) + nil + end + + defp email_from_auth(%{info: %{email: email}}), do: email + + defp nickname_from_auth(%{info: %{nickname: nickname}}), do: nickname + + defp name_from_auth(%{info: %{name: name} = info}) do + if name do + name + else + [info.first_name, info.last_name] + |> Enum.filter(&(&1 != nil and &1 != "")) + |> case do + [] -> info.nickname + name -> Enum.join(name, " ") + end + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex new file mode 100644 index 000000000000..9a96ccb99a45 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex @@ -0,0 +1,45 @@ +
+
+
+ +
+
+
+
+

Profile

+
+
+ <%= @user.nickname %> +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex new file mode 100644 index 000000000000..cbe08dab1841 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex @@ -0,0 +1,49 @@ +
+
+
+ +
+
+
+
+

Watchlist

+
+
+
+ <%= if @watchlist.watchlist_addresses == [] do %> +
+
+ You don't have addresses on you watchlist yet +
+
+

+ <% else %> + + + + + + + + + + + <%= Enum.map(@watchlist.watchlist_addresses, fn wa -> + render(WatchlistAddressView, "row.html", watchlist_address: wa, exchange_rate: exchange_rate(), conn: @conn) + end) %> + +
NameAddressBalanceActions
+ <% end %> +
+
+ Add address +
+
+
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex new file mode 100644 index 000000000000..ba559e7b858f --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex @@ -0,0 +1,97 @@ +
+
+
+ +
+ +
+
+
+

Edit Watchlist address

+ +
+
+
+
+
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex new file mode 100644 index 000000000000..a0bbed09d8bc --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex @@ -0,0 +1,94 @@ +
+
+
+ +
+ +
+
+
+

Add address to the Watchlist

+ +
+
+
+
+
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex new file mode 100644 index 000000000000..f782893fbe7a --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex @@ -0,0 +1,29 @@ + + <%= @watchlist_address.name %> + +
+ <%= link(trimmed_hash(@watchlist_address.address_hash), to: address_path(@conn, :show, @watchlist_address.address_hash)) %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @watchlist_address.address_hash, aria_label: gettext("Copy From Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> +
+ + + <%= balance_ether(@watchlist_address.address) %> +
+ + + ( + ) + + + + <%= link("Edit", to: watchlist_address_path(@conn, :edit, @watchlist_address.id)) %> + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex new file mode 100644 index 000000000000..5f54dc9b0eaf --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex @@ -0,0 +1,8 @@ +<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> +<%= for private_tag <- private_tags do %> + <%= if private_tag.label =~ "dark forest" do %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: private_tag.display_name, additional_classes: ["df", "ml-1"] %> + <% else %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: private_tag.display_name, additional_classes: [tag_name_to_label(private_tag.label), "ml-1"] %> + <% end %> +<% end %> \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex index 7fee0bfbb37e..5d30346e150e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex @@ -5,6 +5,7 @@ <% circles_addresses_list = CustomContractsHelpers.get_custom_addresses_list(:circles_addresses) %> <% current_address = "0x" <> Base.encode16(@address.hash.bytes, case: :lower) %> <% created_from_address_hash = if from_address_hash(@address), do: "0x" <> Base.encode16(from_address_hash(@address).bytes, case: :lower), else: nil %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %>
@@ -28,6 +29,7 @@ <% end %>

<%= address_title(@address) %> <%= gettext "Details" %>
+ <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @address.hash, private_tags: private_tags %> <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", @@ -37,25 +39,6 @@ aria_label: gettext("Copy Address"), title: gettext("Copy Address") %> <%= render BlockScoutWeb.CommonComponentsView, "_btn_qr_code.html" %> - <%= if validator_metadata = primary_validator_metadata(@address) do %> - - - - - - - - <% end %>

<%= @address %>

@@ -306,9 +289,4 @@ <%= render BlockScoutWeb.CommonComponentsView, "_modal_qr_code.html", qr_code: qr_code(@address), title: @address %> - -<%= if validator_metadata do %> - <%= render BlockScoutWeb.AddressView, "_validator_metadata_modal.html", address_name: address_name, validator_metadata: validator_metadata %> -<% end %> - <%= render BlockScoutWeb.Advertisement.BannersAdView, "_banner_728.html", conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index 4654533a7f1d..6238d89d4cd4 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -3,7 +3,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 7f2b8dbbe31f..21af497ee5b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -8,7 +8,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex index 7ab239233639..5a8b6e319098 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> <% contract = last_decompiled_contract_version(@address.decompiled_smart_contracts) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index c3103928e187..7c46cfc0297a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex index d4ef3d3ccbdf..9fb3f6db32da 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex index 7631094bfb25..c6bf965021f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex @@ -2,7 +2,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex index 7631094bfb25..c6bf965021f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex @@ -2,7 +2,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex index 8c682078ac4e..8c6335c8e1a3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex index f34d473899a2..8640128273ec 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index 0bc1b9bce431..493e93fbd663 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -2,7 +2,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex index 143190b9b5dd..ea3253bbeb5c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex @@ -1,7 +1,9 @@
<% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex index 7631094bfb25..c6bf965021f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex @@ -2,7 +2,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex index 7631094bfb25..c6bf965021f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex @@ -2,7 +2,9 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %> + <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %>
<%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 8f2689610004..85abbe0c4c38 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -166,13 +166,39 @@ <% end %>
- - - + <%= if @current_user do %> + + <% else %> +
  • + + + <%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> + + Sign in + +
  • + <% end %> + <%= render BlockScoutWeb.LayoutView, "_search.html", conn: @conn, id: "main-search-autocomplete", additional_classes: ["mobile-search-hide"] %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index ef1f7acc5db7..ed909fdfdc4c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -223,7 +223,7 @@ <%= gettext("- We're indexing this chain right now. Some of the counts may be inaccurate.") %>
    <% end %> - <%= render BlockScoutWeb.LayoutView, "_topnav.html", assigns %> + <%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: Conn.get_session(@conn, :current_user), conn: @conn %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex index fde314766433..0edb2873da1b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex @@ -4,6 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, + private_tags: (if assigns[:private_tags], do: @private_tags, else: []), conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex index 5d2aaef94ab4..9a8fe21a394f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex @@ -4,6 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, + private_tags: (if assigns[:private_tags], do: @private_tags, else: []), conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex index 04cc6998f30c..76266bd77b89 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex @@ -4,6 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, + private_tags: (if assigns[:private_tags], do: @private_tags, else: []), conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex index 60ffda7eba6a..fcf9a531df2b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex @@ -2,6 +2,7 @@ <% address_hash_str = "0x" <> Base.encode16(@token.contract_address_hash.bytes, case: :lower) %> <% {:ok, created_from_address} = if @token.contract_address_hash, do: Chain.hash_to_address(@token.contract_address_hash), else: {:ok, nil} %> <% created_from_address_hash = if from_address_hash(created_from_address), do: "0x" <> Base.encode16(from_address_hash(created_from_address).bytes, case: :lower), else: nil %> +<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %>
    <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
    @@ -33,6 +34,7 @@ <% else %> <%= gettext("Token Details") %> <% end %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @token.contract_address_hash, private_tags: private_tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex index f9d6cc62e926..af888b926eb1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex @@ -4,6 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, + private_tags: (if assigns[:private_tags], do: @private_tags, else: []), conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex index a8faa835bfcd..eca2e870b3d5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex @@ -1,5 +1,7 @@ <% status = transaction_status(@transaction) %> <% error_in_internal_tx = @transaction.has_error_in_internal_txs %> +<% current_user = AuthController.current_user(@conn) %> +<% private_tags = AddressToTag.get_private_tags_on_address(@transaction.to_address_hash, current_user) %>
    @@ -31,6 +33,7 @@ <%= if method_name do %> <%= render BlockScoutWeb.FormView, "_tag.html", text: method_name, additional_classes: ["method", "ml-1"] %> <% end %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, height_auto: true, private_tags: private_tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 217b702e3526..b5c8d480caf5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -26,6 +26,7 @@ <% address_hash_str = if to_address_hash, do: "0x" <> Base.encode16(to_address_hash.bytes, case: :lower), else: nil %> <% {:ok, created_from_address} = if to_address_hash, do: Chain.hash_to_address(to_address_hash), else: {:ok, nil} %> <% created_from_address_hash_str = if from_address_hash(created_from_address), do: "0x" <> Base.encode16(from_address_hash(created_from_address).bytes, case: :lower), else: nil %> +<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
    @@ -49,6 +50,7 @@
    <%= gettext "Transaction Details" %>
    + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, private_tags: private_tags %> <%= if status == :pending do %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/auth_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/auth_view.ex new file mode 100644 index 000000000000..cfbeb001e0fb --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/auth_view.ex @@ -0,0 +1,3 @@ +defmodule BlockScoutWeb.Account.AuthView do + use BlockScoutWeb, :view +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex new file mode 100644 index 000000000000..0605862572be --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex @@ -0,0 +1,13 @@ +defmodule BlockScoutWeb.Account.WatchlistAddressView do + use BlockScoutWeb, :view + import BlockScoutWeb.AddressView, only: [trimmed_hash: 1] + import BlockScoutWeb.WeiHelpers, only: [format_wei_value: 2] + + alias Explorer.Chain.Address + + def balance_ether(%Address{fetched_coin_balance: nil}), do: "" + + def balance_ether(%Address{fetched_coin_balance: balance}) do + format_wei_value(balance, :ether) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex new file mode 100644 index 000000000000..aa4f1394c8ec --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex @@ -0,0 +1,16 @@ +defmodule BlockScoutWeb.Account.WatchlistView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.Account.WatchlistAddressView + alias Explorer.ExchangeRates.Token + alias Explorer.Market + alias Indexer.Fetcher.CoinBalanceOnDemand + + def coin_balance_status(address) do + CoinBalanceOnDemand.trigger_fetch(address) + end + + def exchange_rate do + Market.get_exchange_rate(Explorer.coin()) || Token.null() + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index f0b262d2913e..6ebb53fd236b 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -446,4 +446,9 @@ defmodule BlockScoutWeb.AddressView do end def smart_contract_is_gnosis_safe_proxy?(_address), do: false + + def tag_name_to_label(tag_name) do + tag_name + |> String.replace(" ", "-") + end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex index 16907be09255..97368e880bf9 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex @@ -252,4 +252,25 @@ defmodule BlockScoutWeb.LayoutView do end defp validate_url(_), do: :error + + def sign_in_link do + if Mix.env() == :test do + "/auth/auth0" + else + Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:url][:path] <> "auth/auth0" + end + end + + def sign_out_link do + client_id = Application.get_env(:ueberauth, Ueberauth.Strategy.Auth0.OAuth)[:client_id] + return_to = Application.get_env(:ueberauth, Ueberauth)[:logout_return_to_url] + logout_url = Application.get_env(:ueberauth, Ueberauth)[:logout_url] + + params = [ + client_id: client_id, + returnTo: return_to + ] + + [logout_url, "?", URI.encode_query(params)] + end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 31d9feffff5a..c16b3b8676bc 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -2,12 +2,14 @@ defmodule BlockScoutWeb.TransactionView do use BlockScoutWeb, :view alias BlockScoutWeb.{AccessHelpers, AddressView, BlockView, TabHelpers} + alias BlockScoutWeb.Account.AuthController alias BlockScoutWeb.Cldr.Number alias Explorer.{Chain, CustomContractsHelpers, Repo} alias Explorer.Chain.Block.Reward alias Explorer.Chain.{Address, Block, InternalTransaction, Transaction, Wei} alias Explorer.Counters.AverageBlockTime alias Explorer.ExchangeRates.Token + alias Explorer.Tags.AddressToTag alias Timex.Duration import BlockScoutWeb.Gettext diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index c3ad18e43d69..828639071456 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.WebRouter do Router for web app """ use BlockScoutWeb, :router + require Ueberauth pipeline :browser do plug(:accepts, ["html"]) @@ -13,6 +14,30 @@ defmodule BlockScoutWeb.WebRouter do plug(BlockScoutWeb.ChecksumAddress) end + if Mix.env() == :dev do + forward("/sent_emails", Bamboo.SentEmailViewerPlug) + end + + scope "/auth", BlockScoutWeb do + pipe_through(:browser) + + get("/profile", Account.AuthController, :profile) + get("/logout", Account.AuthController, :logout) + get("/:provider", Account.AuthController, :request) + get("/:provider/callback", Account.AuthController, :callback) + end + + scope "/account", BlockScoutWeb do + pipe_through(:browser) + + resources("/watchlist", Account.WatchlistController, only: [:show], singleton: true, as: :watchlist) + + resources("/watchlist_address", Account.WatchlistAddressController, + only: [:new, :create, :edit, :update, :delete], + as: :watchlist_address + ) + end + # Disallows Iframes (write routes) scope "/", BlockScoutWeb do pipe_through(:browser) diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 6de44d043e0a..1e747873d5f4 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -44,6 +44,7 @@ defmodule BlockScoutWeb.Mixfile do defp extra_applications, do: [ + :ueberauth_auth0, :logger, :runtime_tools ] @@ -127,7 +128,9 @@ defmodule BlockScoutWeb.Mixfile do # `:cowboy` `~> 2.0` and Phoenix 1.4 compatibility {:websocket_client, "~> 1.3"}, {:wobserver, "~> 0.2.0", github: "poanetwork/wobserver", branch: "support-https"}, - {:ex_json_schema, "~> 0.9.1"} + {:ex_json_schema, "~> 0.9.1"}, + {:ueberauth, "~> 0.7"}, + {:ueberauth_auth0, "~> 2.0"} ] end diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index c49c49c37a51..e0e4544d124f 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -63,7 +63,7 @@ msgstr "" msgid "%{subnetwork} Explorer - BlockScout" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:349 +#: lib/block_scout_web/views/transaction_view.ex:351 #, elixir-autogen, elixir-format msgid "(Awaiting internal transactions for status)" msgstr "" @@ -189,7 +189,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -241,7 +241,7 @@ msgstr "" msgid "Balance" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Balances" msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Block Mined, awaiting import..." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:33 +#: lib/block_scout_web/views/transaction_view.ex:35 #, elixir-autogen, elixir-format msgid "Block Pending" msgstr "" @@ -441,12 +441,12 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:65 +#: lib/block_scout_web/templates/address_contract/index.html.eex:67 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:342 +#: lib/block_scout_web/views/transaction_view.ex:344 #, elixir-autogen, elixir-format msgid "Confirmed" msgstr "" @@ -467,35 +467,35 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:4 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:6 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:4 -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:15 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Connection Lost" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #: lib/block_scout_web/templates/block/index.html.eex:5 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer blocks" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer internal transactions" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 #: lib/block_scout_web/templates/transaction/index.html.eex:22 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer transactions" msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:10 +#: lib/block_scout_web/templates/address_validation/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:90 +#: lib/block_scout_web/templates/address_contract/index.html.eex:92 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" @@ -506,7 +506,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:122 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -524,18 +524,18 @@ msgstr "" msgid "Contract Address Pending" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:457 +#: lib/block_scout_web/views/transaction_view.ex:459 #, elixir-autogen, elixir-format msgid "Contract Call" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:454 +#: lib/block_scout_web/views/transaction_view.ex:456 #, elixir-autogen, elixir-format msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:138 -#: lib/block_scout_web/templates/address_contract/index.html.eex:153 +#: lib/block_scout_web/templates/address_contract/index.html.eex:140 +#: lib/block_scout_web/templates/address_contract/index.html.eex:155 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -546,29 +546,29 @@ msgstr "" msgid "Contract Libraries" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:93 +#: lib/block_scout_web/templates/address/overview.html.eex:76 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_name_field.html.eex:3 #, elixir-autogen, elixir-format msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:25 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:57 +#: lib/block_scout_web/templates/address_contract/index.html.eex:59 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:100 +#: lib/block_scout_web/templates/address_contract/index.html.eex:102 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:144 +#: lib/block_scout_web/templates/address_contract/index.html.eex:146 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -578,38 +578,40 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:124 +#: lib/block_scout_web/templates/address_contract/index.html.eex:126 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:37 -#: lib/block_scout_web/templates/address/overview.html.eex:38 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 +#: lib/block_scout_web/templates/address/overview.html.eex:39 +#: lib/block_scout_web/templates/address/overview.html.eex:40 #: lib/block_scout_web/templates/block/overview.html.eex:104 #: lib/block_scout_web/templates/block/overview.html.eex:105 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:42 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:43 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:44 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:45 #, elixir-autogen, elixir-format msgid "Copy Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:156 +#: lib/block_scout_web/templates/address_contract/index.html.eex:142 +#: lib/block_scout_web/templates/address_contract/index.html.eex:158 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:21 #, elixir-autogen, elixir-format msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:183 -#: lib/block_scout_web/templates/address_contract/index.html.eex:193 +#: lib/block_scout_web/templates/address_contract/index.html.eex:185 +#: lib/block_scout_web/templates/address_contract/index.html.eex:195 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:14 #: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:15 #: lib/block_scout_web/templates/transaction/overview.html.eex:201 @@ -640,8 +642,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 -#: lib/block_scout_web/templates/address_contract/index.html.eex:113 +#: lib/block_scout_web/templates/address_contract/index.html.eex:104 +#: lib/block_scout_web/templates/address_contract/index.html.eex:115 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -701,7 +703,7 @@ msgstr "" msgid "Create2" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:120 +#: lib/block_scout_web/templates/address/overview.html.eex:103 #, elixir-autogen, elixir-format msgid "Creator" msgstr "" @@ -741,7 +743,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:132 #, elixir-autogen, elixir-format msgid "Decimals" msgstr "" @@ -767,12 +769,12 @@ msgstr "" msgid "Decompiled code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 #, elixir-autogen, elixir-format msgid "Decompiled contract code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Decompiler version" msgstr "" @@ -782,8 +784,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:181 -#: lib/block_scout_web/templates/address_contract/index.html.eex:189 +#: lib/block_scout_web/templates/address_contract/index.html.eex:183 +#: lib/block_scout_web/templates/address_contract/index.html.eex:191 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -796,7 +798,7 @@ msgstr "" msgid "Description" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:30 +#: lib/block_scout_web/templates/address/overview.html.eex:31 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127 #, elixir-autogen, elixir-format @@ -808,7 +810,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:145 +#: lib/block_scout_web/templates/address_contract/index.html.eex:147 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -843,17 +845,17 @@ msgstr "" msgid "EIP-1167" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:214 +#: lib/block_scout_web/views/transaction_view.ex:216 #, elixir-autogen, elixir-format msgid "ERC-1155 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:212 +#: lib/block_scout_web/views/transaction_view.ex:214 #, elixir-autogen, elixir-format msgid "ERC-20 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:213 +#: lib/block_scout_web/views/transaction_view.ex:215 #, elixir-autogen, elixir-format msgid "ERC-721 " msgstr "" @@ -871,7 +873,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:78 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -924,17 +926,17 @@ msgstr "" msgid "Error trying to fetch balances." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:353 +#: lib/block_scout_web/views/transaction_view.ex:355 #, elixir-autogen, elixir-format msgid "Error: %{reason}" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:351 +#: lib/block_scout_web/views/transaction_view.ex:353 #, elixir-autogen, elixir-format msgid "Error: (Awaiting internal transactions for reason)" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:137 +#: lib/block_scout_web/templates/address/overview.html.eex:120 #, elixir-autogen, elixir-format msgid "Error: Could not determine contract creator." msgstr "" @@ -944,6 +946,9 @@ msgstr "" msgid "Eth RPC" msgstr "" +#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:37 +#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:35 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 #: lib/block_scout_web/templates/address/overview.html.eex:181 @@ -981,7 +986,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:224 +#: lib/block_scout_web/templates/address_contract/index.html.eex:226 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1007,7 +1012,7 @@ msgstr "" msgid "Fetching gas used..." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:111 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:113 #, elixir-autogen, elixir-format msgid "Fetching holders..." msgstr "" @@ -1138,7 +1143,7 @@ msgstr "" msgid "Hex (Default)" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 #, elixir-autogen, elixir-format msgid "Holders" msgstr "" @@ -1154,7 +1159,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr msgstr "" #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:86 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:89 #, elixir-autogen, elixir-format msgid "IN" msgstr "" @@ -1215,11 +1220,11 @@ msgid "Internal Transaction" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:361 -#: lib/block_scout_web/views/transaction_view.ex:512 +#: lib/block_scout_web/views/transaction_view.ex:514 #, elixir-autogen, elixir-format msgid "Internal Transactions" msgstr "" @@ -1229,7 +1234,7 @@ msgstr "" msgid "Invalid Transaction Hash" msgstr "" -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:15 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:19 #: lib/block_scout_web/views/tokens/overview_view.ex:42 #, elixir-autogen, elixir-format @@ -1291,7 +1296,7 @@ msgstr "" msgid "List of token transferred in the transaction." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:20 #, elixir-autogen, elixir-format msgid "Loading chart..." msgstr "" @@ -1302,11 +1307,11 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:133 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:49 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:45 -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:12 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:12 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:12 -#: lib/block_scout_web/templates/tokens/contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/tokens/contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Loading..." msgstr "" @@ -1322,11 +1327,11 @@ msgid "Log Index" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:10 +#: lib/block_scout_web/templates/address_logs/index.html.eex:12 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:372 -#: lib/block_scout_web/views/transaction_view.ex:513 +#: lib/block_scout_web/views/transaction_view.ex:515 #, elixir-autogen, elixir-format msgid "Logs" msgstr "" @@ -1338,7 +1343,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:46 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:85 #: lib/block_scout_web/views/address_view.ex:142 #, elixir-autogen, elixir-format msgid "Market Cap" @@ -1354,7 +1359,7 @@ msgstr "" msgid "Max Priority Fee per Gas" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:319 +#: lib/block_scout_web/views/transaction_view.ex:321 #, elixir-autogen, elixir-format msgid "Max of" msgstr "" @@ -1414,12 +1419,12 @@ msgstr "" msgid "Module" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:14 #, elixir-autogen, elixir-format msgid "More internal transactions have come in" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:46 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 #: lib/block_scout_web/templates/chain/show.html.eex:216 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction/index.html.eex:19 @@ -1497,7 +1502,7 @@ msgstr "" msgid "Not unique Token" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #, elixir-autogen, elixir-format msgid "Number of accounts holding the token" msgstr "" @@ -1507,7 +1512,7 @@ msgstr "" msgid "Number of blocks validated by this validator." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:129 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #, elixir-autogen, elixir-format msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" @@ -1517,7 +1522,7 @@ msgstr "" msgid "Number of transactions related to this address." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:117 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format msgid "Number of transfers for the token" msgstr "" @@ -1528,7 +1533,7 @@ msgid "Number of transfers to/from this address." msgstr "" #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:82 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:85 #, elixir-autogen, elixir-format msgid "OUT" msgstr "" @@ -1538,12 +1543,12 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:61 +#: lib/block_scout_web/templates/address_contract/index.html.eex:63 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:70 +#: lib/block_scout_web/templates/address_contract/index.html.eex:72 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:58 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -1623,12 +1628,12 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/layout/app.html.eex:47 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96 #, elixir-autogen, elixir-format msgid "Price" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:93 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #, elixir-autogen, elixir-format msgid "Price per token on the exchanges" msgstr "" @@ -1673,7 +1678,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:514 +#: lib/block_scout_web/views/transaction_view.ex:516 #, elixir-autogen, elixir-format msgid "Raw Trace" msgstr "" @@ -1746,7 +1751,7 @@ msgstr "" msgid "Run" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:16 +#: lib/block_scout_web/templates/address_logs/index.html.eex:18 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format msgid "Search" @@ -1788,11 +1793,6 @@ msgstr "" msgid "Show QR Code" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:47 -#, elixir-autogen, elixir-format -msgid "Show Validator Info" -msgstr "" - #: lib/block_scout_web/templates/address_token/overview.html.eex:52 #, elixir-autogen, elixir-format msgid "Shows the current" @@ -1838,11 +1838,11 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:22 #: lib/block_scout_web/templates/chain/show.html.eex:157 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:18 -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:23 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:24 #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:23 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:23 -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:22 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:21 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:23 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:22 #: lib/block_scout_web/templates/transaction/index.html.eex:25 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 @@ -1897,13 +1897,13 @@ msgid "Submit an Issue" msgstr "" #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 -#: lib/block_scout_web/views/transaction_view.ex:350 +#: lib/block_scout_web/views/transaction_view.ex:352 #, elixir-autogen, elixir-format msgid "Success" msgstr "" #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:46 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:49 #, elixir-autogen, elixir-format msgid "TX Fee" msgstr "" @@ -1938,12 +1938,12 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:92 +#: lib/block_scout_web/templates/address/overview.html.eex:75 #, elixir-autogen, elixir-format msgid "The name found in the source code of the Contract." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:103 +#: lib/block_scout_web/templates/address/overview.html.eex:86 #, elixir-autogen, elixir-format msgid "The name of the validator." msgstr "" @@ -1968,7 +1968,7 @@ msgstr "" msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:67 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #, elixir-autogen, elixir-format msgid "The total amount of tokens issued" msgstr "" @@ -1978,7 +1978,7 @@ msgstr "" msgid "The total gas amount used in the block and its percentage of gas filled in the block." msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:16 +#: lib/block_scout_web/templates/address_validation/index.html.eex:18 #, elixir-autogen, elixir-format msgid "There are no blocks validated by this address." msgstr "" @@ -1988,12 +1988,12 @@ msgstr "" msgid "There are no blocks." msgstr "" -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:28 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:29 #, elixir-autogen, elixir-format msgid "There are no holders for this Token." msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 #, elixir-autogen, elixir-format msgid "There are no internal transactions for this address." msgstr "" @@ -2003,7 +2003,7 @@ msgstr "" msgid "There are no internal transactions for this transaction." msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:28 +#: lib/block_scout_web/templates/address_logs/index.html.eex:30 #, elixir-autogen, elixir-format msgid "There are no logs for this address." msgstr "" @@ -2018,7 +2018,7 @@ msgstr "" msgid "There are no pending transactions." msgstr "" -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:55 #, elixir-autogen, elixir-format msgid "There are no token transfers for this address." msgstr "" @@ -2028,17 +2028,17 @@ msgstr "" msgid "There are no token transfers for this transaction" msgstr "" -#: lib/block_scout_web/templates/address_token/index.html.eex:65 +#: lib/block_scout_web/templates/address_token/index.html.eex:67 #, elixir-autogen, elixir-format msgid "There are no tokens for this address." msgstr "" -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:27 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:28 #, elixir-autogen, elixir-format msgid "There are no tokens." msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:57 #, elixir-autogen, elixir-format msgid "There are no transactions for this address." msgstr "" @@ -2055,22 +2055,22 @@ msgstr "" #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:28 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:28 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:26 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:27 #, elixir-autogen, elixir-format msgid "There are no transfers for this Token." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:37 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:31 #, elixir-autogen, elixir-format msgid "There is no decompilded contracts for this address." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:21 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:23 #: lib/block_scout_web/templates/chain/show.html.eex:9 #, elixir-autogen, elixir-format msgid "There was a problem loading the chart." @@ -2091,12 +2091,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:41 +#: lib/block_scout_web/templates/address_contract/index.html.eex:43 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:45 +#: lib/block_scout_web/templates/address_contract/index.html.eex:47 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2145,30 +2145,30 @@ msgstr "" msgid "Toggle navigation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:73 +#: lib/block_scout_web/templates/address/overview.html.eex:56 #, elixir-autogen, elixir-format msgid "Token" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:3 -#: lib/block_scout_web/views/transaction_view.ex:448 +#: lib/block_scout_web/views/transaction_view.ex:450 #, elixir-autogen, elixir-format msgid "Token Burning" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:449 +#: lib/block_scout_web/views/transaction_view.ex:451 #, elixir-autogen, elixir-format msgid "Token Creation" msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:10 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:34 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:35 #, elixir-autogen, elixir-format msgid "Token Details" msgstr "" -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:16 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:17 #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:16 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:17 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:11 @@ -2185,40 +2185,40 @@ msgid "Token ID" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:5 -#: lib/block_scout_web/views/transaction_view.ex:447 +#: lib/block_scout_web/views/transaction_view.ex:449 #, elixir-autogen, elixir-format msgid "Token Minting" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:9 #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:11 -#: lib/block_scout_web/views/transaction_view.ex:450 +#: lib/block_scout_web/views/transaction_view.ex:452 #, elixir-autogen, elixir-format msgid "Token Transfer" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:21 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:5 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:14 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:15 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 #: lib/block_scout_web/views/address_view.ex:363 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:195 #: lib/block_scout_web/views/tokens/overview_view.ex:39 -#: lib/block_scout_web/views/transaction_view.ex:511 +#: lib/block_scout_web/views/transaction_view.ex:513 #, elixir-autogen, elixir-format msgid "Token Transfers" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:72 +#: lib/block_scout_web/templates/address/overview.html.eex:55 #, elixir-autogen, elixir-format msgid "Token name and symbol." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143 #, elixir-autogen, elixir-format msgid "Token type" msgstr "" @@ -2259,7 +2259,7 @@ msgstr "" msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:14 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Topic" msgstr "" @@ -2275,7 +2275,7 @@ msgstr "" msgid "Total Difficulty" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:82 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #, elixir-autogen, elixir-format msgid "Total Supply * Price" msgstr "" @@ -2295,7 +2295,7 @@ msgstr "" msgid "Total gas limit provided by all transactions in the block." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:70 #, elixir-autogen, elixir-format msgid "Total supply" msgstr "" @@ -2311,7 +2311,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 -#: lib/block_scout_web/views/transaction_view.ex:460 +#: lib/block_scout_web/views/transaction_view.ex:462 #, elixir-autogen, elixir-format msgid "Transaction" msgstr "" @@ -2381,7 +2381,7 @@ msgstr "" msgid "Transactions" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:119 +#: lib/block_scout_web/templates/address/overview.html.eex:102 #, elixir-autogen, elixir-format msgid "Transactions and address of creation." msgstr "" @@ -2395,7 +2395,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:237 #: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120 #, elixir-autogen, elixir-format msgid "Transfers" msgstr "" @@ -2422,7 +2422,7 @@ msgstr "" msgid "Type" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:140 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #, elixir-autogen, elixir-format msgid "Type of the token standard" msgstr "" @@ -2443,7 +2443,7 @@ msgstr "" msgid "Uncles" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:341 +#: lib/block_scout_web/views/transaction_view.ex:343 #, elixir-autogen, elixir-format msgid "Unconfirmed" msgstr "" @@ -2493,12 +2493,7 @@ msgstr "" msgid "Validator Data" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:51 -#, elixir-autogen, elixir-format -msgid "Validator Info" -msgstr "" - -#: lib/block_scout_web/templates/address/overview.html.eex:104 +#: lib/block_scout_web/templates/address/overview.html.eex:87 #, elixir-autogen, elixir-format msgid "Validator Name" msgstr "" @@ -2513,17 +2508,17 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:82 +#: lib/block_scout_web/templates/address_contract/index.html.eex:84 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:160 -#: lib/block_scout_web/templates/address_contract/index.html.eex:166 -#: lib/block_scout_web/templates/address_contract/index.html.eex:197 -#: lib/block_scout_web/templates/address_contract/index.html.eex:203 +#: lib/block_scout_web/templates/address_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_contract/index.html.eex:162 +#: lib/block_scout_web/templates/address_contract/index.html.eex:168 +#: lib/block_scout_web/templates/address_contract/index.html.eex:199 +#: lib/block_scout_web/templates/address_contract/index.html.eex:205 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -2586,12 +2581,12 @@ msgstr "" msgid "View Contract" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:67 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:70 #, elixir-autogen, elixir-format msgid "View Less Transfers" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:66 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:69 #, elixir-autogen, elixir-format msgid "View More Transfers" msgstr "" @@ -2678,7 +2673,7 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:129 +#: lib/block_scout_web/templates/address/overview.html.eex:112 #, elixir-autogen, elixir-format msgid "at" msgstr "" @@ -2698,7 +2693,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "button" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index be81fc4f99d0..7a6e5214efa3 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -63,7 +63,7 @@ msgstr "" msgid "%{subnetwork} Explorer - BlockScout" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:349 +#: lib/block_scout_web/views/transaction_view.ex:351 #, elixir-autogen, elixir-format msgid "(Awaiting internal transactions for status)" msgstr "" @@ -189,7 +189,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -241,7 +241,7 @@ msgstr "" msgid "Balance" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Balances" msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Block Mined, awaiting import..." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:33 +#: lib/block_scout_web/views/transaction_view.ex:35 #, elixir-autogen, elixir-format msgid "Block Pending" msgstr "" @@ -441,12 +441,12 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:65 +#: lib/block_scout_web/templates/address_contract/index.html.eex:67 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:342 +#: lib/block_scout_web/views/transaction_view.ex:344 #, elixir-autogen, elixir-format msgid "Confirmed" msgstr "" @@ -467,35 +467,35 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:4 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:6 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:4 -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:15 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Connection Lost" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #: lib/block_scout_web/templates/block/index.html.eex:5 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer blocks" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer internal transactions" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 #: lib/block_scout_web/templates/transaction/index.html.eex:22 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer transactions" msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:10 +#: lib/block_scout_web/templates/address_validation/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:90 +#: lib/block_scout_web/templates/address_contract/index.html.eex:92 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" @@ -506,7 +506,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:122 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -524,18 +524,18 @@ msgstr "" msgid "Contract Address Pending" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:457 +#: lib/block_scout_web/views/transaction_view.ex:459 #, elixir-autogen, elixir-format msgid "Contract Call" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:454 +#: lib/block_scout_web/views/transaction_view.ex:456 #, elixir-autogen, elixir-format msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:138 -#: lib/block_scout_web/templates/address_contract/index.html.eex:153 +#: lib/block_scout_web/templates/address_contract/index.html.eex:140 +#: lib/block_scout_web/templates/address_contract/index.html.eex:155 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -546,29 +546,29 @@ msgstr "" msgid "Contract Libraries" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:93 +#: lib/block_scout_web/templates/address/overview.html.eex:76 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_name_field.html.eex:3 #, elixir-autogen, elixir-format msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:25 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:57 +#: lib/block_scout_web/templates/address_contract/index.html.eex:59 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:100 +#: lib/block_scout_web/templates/address_contract/index.html.eex:102 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:144 +#: lib/block_scout_web/templates/address_contract/index.html.eex:146 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -578,38 +578,40 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:124 +#: lib/block_scout_web/templates/address_contract/index.html.eex:126 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:37 -#: lib/block_scout_web/templates/address/overview.html.eex:38 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 +#: lib/block_scout_web/templates/address/overview.html.eex:39 +#: lib/block_scout_web/templates/address/overview.html.eex:40 #: lib/block_scout_web/templates/block/overview.html.eex:104 #: lib/block_scout_web/templates/block/overview.html.eex:105 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:42 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:43 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:44 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:45 #, elixir-autogen, elixir-format msgid "Copy Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:156 +#: lib/block_scout_web/templates/address_contract/index.html.eex:142 +#: lib/block_scout_web/templates/address_contract/index.html.eex:158 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:21 #, elixir-autogen, elixir-format msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:183 -#: lib/block_scout_web/templates/address_contract/index.html.eex:193 +#: lib/block_scout_web/templates/address_contract/index.html.eex:185 +#: lib/block_scout_web/templates/address_contract/index.html.eex:195 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:14 #: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:15 #: lib/block_scout_web/templates/transaction/overview.html.eex:201 @@ -640,8 +642,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 -#: lib/block_scout_web/templates/address_contract/index.html.eex:113 +#: lib/block_scout_web/templates/address_contract/index.html.eex:104 +#: lib/block_scout_web/templates/address_contract/index.html.eex:115 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -701,7 +703,7 @@ msgstr "" msgid "Create2" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:120 +#: lib/block_scout_web/templates/address/overview.html.eex:103 #, elixir-autogen, elixir-format msgid "Creator" msgstr "" @@ -741,7 +743,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:132 #, elixir-autogen, elixir-format msgid "Decimals" msgstr "" @@ -767,12 +769,12 @@ msgstr "" msgid "Decompiled code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 #, elixir-autogen, elixir-format msgid "Decompiled contract code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Decompiler version" msgstr "" @@ -782,8 +784,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:181 -#: lib/block_scout_web/templates/address_contract/index.html.eex:189 +#: lib/block_scout_web/templates/address_contract/index.html.eex:183 +#: lib/block_scout_web/templates/address_contract/index.html.eex:191 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -796,7 +798,7 @@ msgstr "" msgid "Description" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:30 +#: lib/block_scout_web/templates/address/overview.html.eex:31 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127 #, elixir-autogen, elixir-format @@ -808,7 +810,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:145 +#: lib/block_scout_web/templates/address_contract/index.html.eex:147 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -843,17 +845,17 @@ msgstr "" msgid "EIP-1167" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:214 +#: lib/block_scout_web/views/transaction_view.ex:216 #, elixir-autogen, elixir-format msgid "ERC-1155 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:212 +#: lib/block_scout_web/views/transaction_view.ex:214 #, elixir-autogen, elixir-format msgid "ERC-20 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:213 +#: lib/block_scout_web/views/transaction_view.ex:215 #, elixir-autogen, elixir-format msgid "ERC-721 " msgstr "" @@ -871,7 +873,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:78 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -924,17 +926,17 @@ msgstr "" msgid "Error trying to fetch balances." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:353 +#: lib/block_scout_web/views/transaction_view.ex:355 #, elixir-autogen, elixir-format msgid "Error: %{reason}" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:351 +#: lib/block_scout_web/views/transaction_view.ex:353 #, elixir-autogen, elixir-format msgid "Error: (Awaiting internal transactions for reason)" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:137 +#: lib/block_scout_web/templates/address/overview.html.eex:120 #, elixir-autogen, elixir-format msgid "Error: Could not determine contract creator." msgstr "" @@ -944,6 +946,9 @@ msgstr "" msgid "Eth RPC" msgstr "" +#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:37 +#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:35 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 #: lib/block_scout_web/templates/address/overview.html.eex:181 @@ -981,7 +986,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:224 +#: lib/block_scout_web/templates/address_contract/index.html.eex:226 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1007,7 +1012,7 @@ msgstr "" msgid "Fetching gas used..." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:111 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:113 #, elixir-autogen, elixir-format msgid "Fetching holders..." msgstr "" @@ -1138,7 +1143,7 @@ msgstr "" msgid "Hex (Default)" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 #, elixir-autogen, elixir-format msgid "Holders" msgstr "" @@ -1154,7 +1159,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr msgstr "" #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:86 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:89 #, elixir-autogen, elixir-format msgid "IN" msgstr "" @@ -1215,11 +1220,11 @@ msgid "Internal Transaction" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:361 -#: lib/block_scout_web/views/transaction_view.ex:512 +#: lib/block_scout_web/views/transaction_view.ex:514 #, elixir-autogen, elixir-format msgid "Internal Transactions" msgstr "" @@ -1229,7 +1234,7 @@ msgstr "" msgid "Invalid Transaction Hash" msgstr "" -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:15 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:19 #: lib/block_scout_web/views/tokens/overview_view.ex:42 #, elixir-autogen, elixir-format @@ -1291,7 +1296,7 @@ msgstr "" msgid "List of token transferred in the transaction." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:20 #, elixir-autogen, elixir-format msgid "Loading chart..." msgstr "" @@ -1302,11 +1307,11 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:133 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:49 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:45 -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:12 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:12 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:12 -#: lib/block_scout_web/templates/tokens/contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/tokens/contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Loading..." msgstr "" @@ -1322,11 +1327,11 @@ msgid "Log Index" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:10 +#: lib/block_scout_web/templates/address_logs/index.html.eex:12 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:372 -#: lib/block_scout_web/views/transaction_view.ex:513 +#: lib/block_scout_web/views/transaction_view.ex:515 #, elixir-autogen, elixir-format msgid "Logs" msgstr "" @@ -1338,7 +1343,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:46 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:85 #: lib/block_scout_web/views/address_view.ex:142 #, elixir-autogen, elixir-format msgid "Market Cap" @@ -1354,7 +1359,7 @@ msgstr "" msgid "Max Priority Fee per Gas" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:319 +#: lib/block_scout_web/views/transaction_view.ex:321 #, elixir-autogen, elixir-format msgid "Max of" msgstr "" @@ -1414,12 +1419,12 @@ msgstr "" msgid "Module" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:14 #, elixir-autogen, elixir-format msgid "More internal transactions have come in" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:46 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 #: lib/block_scout_web/templates/chain/show.html.eex:216 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction/index.html.eex:19 @@ -1497,7 +1502,7 @@ msgstr "" msgid "Not unique Token" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #, elixir-autogen, elixir-format msgid "Number of accounts holding the token" msgstr "" @@ -1507,7 +1512,7 @@ msgstr "" msgid "Number of blocks validated by this validator." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:129 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #, elixir-autogen, elixir-format msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" @@ -1517,7 +1522,7 @@ msgstr "" msgid "Number of transactions related to this address." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:117 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format msgid "Number of transfers for the token" msgstr "" @@ -1528,7 +1533,7 @@ msgid "Number of transfers to/from this address." msgstr "" #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:82 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:85 #, elixir-autogen, elixir-format msgid "OUT" msgstr "" @@ -1538,12 +1543,12 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:61 +#: lib/block_scout_web/templates/address_contract/index.html.eex:63 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:70 +#: lib/block_scout_web/templates/address_contract/index.html.eex:72 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:58 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -1623,12 +1628,12 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/layout/app.html.eex:47 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96 #, elixir-autogen, elixir-format msgid "Price" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:93 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #, elixir-autogen, elixir-format msgid "Price per token on the exchanges" msgstr "" @@ -1673,7 +1678,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:514 +#: lib/block_scout_web/views/transaction_view.ex:516 #, elixir-autogen, elixir-format msgid "Raw Trace" msgstr "" @@ -1746,7 +1751,7 @@ msgstr "" msgid "Run" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:16 +#: lib/block_scout_web/templates/address_logs/index.html.eex:18 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format msgid "Search" @@ -1788,11 +1793,6 @@ msgstr "" msgid "Show QR Code" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:47 -#, elixir-autogen, elixir-format -msgid "Show Validator Info" -msgstr "" - #: lib/block_scout_web/templates/address_token/overview.html.eex:52 #, elixir-autogen, elixir-format msgid "Shows the current" @@ -1838,11 +1838,11 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:22 #: lib/block_scout_web/templates/chain/show.html.eex:157 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:18 -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:23 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:24 #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:23 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:23 -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:22 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:21 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:23 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:22 #: lib/block_scout_web/templates/transaction/index.html.eex:25 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 @@ -1897,13 +1897,13 @@ msgid "Submit an Issue" msgstr "" #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 -#: lib/block_scout_web/views/transaction_view.ex:350 +#: lib/block_scout_web/views/transaction_view.ex:352 #, elixir-autogen, elixir-format msgid "Success" msgstr "" #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:46 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:49 #, elixir-autogen, elixir-format msgid "TX Fee" msgstr "" @@ -1938,12 +1938,12 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:92 +#: lib/block_scout_web/templates/address/overview.html.eex:75 #, elixir-autogen, elixir-format msgid "The name found in the source code of the Contract." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:103 +#: lib/block_scout_web/templates/address/overview.html.eex:86 #, elixir-autogen, elixir-format msgid "The name of the validator." msgstr "" @@ -1968,7 +1968,7 @@ msgstr "" msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:67 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #, elixir-autogen, elixir-format msgid "The total amount of tokens issued" msgstr "" @@ -1978,7 +1978,7 @@ msgstr "" msgid "The total gas amount used in the block and its percentage of gas filled in the block." msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:16 +#: lib/block_scout_web/templates/address_validation/index.html.eex:18 #, elixir-autogen, elixir-format msgid "There are no blocks validated by this address." msgstr "" @@ -1988,12 +1988,12 @@ msgstr "" msgid "There are no blocks." msgstr "" -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:28 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:29 #, elixir-autogen, elixir-format msgid "There are no holders for this Token." msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 #, elixir-autogen, elixir-format msgid "There are no internal transactions for this address." msgstr "" @@ -2003,7 +2003,7 @@ msgstr "" msgid "There are no internal transactions for this transaction." msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:28 +#: lib/block_scout_web/templates/address_logs/index.html.eex:30 #, elixir-autogen, elixir-format msgid "There are no logs for this address." msgstr "" @@ -2018,7 +2018,7 @@ msgstr "" msgid "There are no pending transactions." msgstr "" -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:55 #, elixir-autogen, elixir-format msgid "There are no token transfers for this address." msgstr "" @@ -2028,17 +2028,17 @@ msgstr "" msgid "There are no token transfers for this transaction" msgstr "" -#: lib/block_scout_web/templates/address_token/index.html.eex:65 +#: lib/block_scout_web/templates/address_token/index.html.eex:67 #, elixir-autogen, elixir-format msgid "There are no tokens for this address." msgstr "" -#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:27 +#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:28 #, elixir-autogen, elixir-format msgid "There are no tokens." msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:57 #, elixir-autogen, elixir-format msgid "There are no transactions for this address." msgstr "" @@ -2055,22 +2055,22 @@ msgstr "" #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:28 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:28 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:26 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:27 #, elixir-autogen, elixir-format msgid "There are no transfers for this Token." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:37 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:31 #, elixir-autogen, elixir-format msgid "There is no decompilded contracts for this address." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:21 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:23 #: lib/block_scout_web/templates/chain/show.html.eex:9 #, elixir-autogen, elixir-format msgid "There was a problem loading the chart." @@ -2091,12 +2091,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:41 +#: lib/block_scout_web/templates/address_contract/index.html.eex:43 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:45 +#: lib/block_scout_web/templates/address_contract/index.html.eex:47 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2145,30 +2145,30 @@ msgstr "" msgid "Toggle navigation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:73 +#: lib/block_scout_web/templates/address/overview.html.eex:56 #, elixir-autogen, elixir-format msgid "Token" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:3 -#: lib/block_scout_web/views/transaction_view.ex:448 +#: lib/block_scout_web/views/transaction_view.ex:450 #, elixir-autogen, elixir-format msgid "Token Burning" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:449 +#: lib/block_scout_web/views/transaction_view.ex:451 #, elixir-autogen, elixir-format msgid "Token Creation" msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:10 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:34 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:35 #, elixir-autogen, elixir-format msgid "Token Details" msgstr "" -#: lib/block_scout_web/templates/tokens/holder/index.html.eex:16 +#: lib/block_scout_web/templates/tokens/holder/index.html.eex:17 #: lib/block_scout_web/templates/tokens/instance/holder/index.html.eex:16 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:17 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:11 @@ -2185,40 +2185,40 @@ msgid "Token ID" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:5 -#: lib/block_scout_web/views/transaction_view.ex:447 +#: lib/block_scout_web/views/transaction_view.ex:449 #, elixir-autogen, elixir-format msgid "Token Minting" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:9 #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:11 -#: lib/block_scout_web/views/transaction_view.ex:450 +#: lib/block_scout_web/views/transaction_view.ex:452 #, elixir-autogen, elixir-format msgid "Token Transfer" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:21 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:5 -#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:14 +#: lib/block_scout_web/templates/tokens/transfer/index.html.eex:15 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 #: lib/block_scout_web/views/address_view.ex:363 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:195 #: lib/block_scout_web/views/tokens/overview_view.ex:39 -#: lib/block_scout_web/views/transaction_view.ex:511 +#: lib/block_scout_web/views/transaction_view.ex:513 #, elixir-autogen, elixir-format msgid "Token Transfers" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:72 +#: lib/block_scout_web/templates/address/overview.html.eex:55 #, elixir-autogen, elixir-format msgid "Token name and symbol." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143 #, elixir-autogen, elixir-format msgid "Token type" msgstr "" @@ -2259,7 +2259,7 @@ msgstr "" msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:14 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #, elixir-autogen, elixir-format msgid "Topic" msgstr "" @@ -2275,7 +2275,7 @@ msgstr "" msgid "Total Difficulty" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:82 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #, elixir-autogen, elixir-format msgid "Total Supply * Price" msgstr "" @@ -2295,7 +2295,7 @@ msgstr "" msgid "Total gas limit provided by all transactions in the block." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:70 #, elixir-autogen, elixir-format msgid "Total supply" msgstr "" @@ -2311,7 +2311,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 -#: lib/block_scout_web/views/transaction_view.ex:460 +#: lib/block_scout_web/views/transaction_view.ex:462 #, elixir-autogen, elixir-format msgid "Transaction" msgstr "" @@ -2381,7 +2381,7 @@ msgstr "" msgid "Transactions" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:119 +#: lib/block_scout_web/templates/address/overview.html.eex:102 #, elixir-autogen, elixir-format msgid "Transactions and address of creation." msgstr "" @@ -2395,7 +2395,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:237 #: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120 #, elixir-autogen, elixir-format msgid "Transfers" msgstr "" @@ -2422,7 +2422,7 @@ msgstr "" msgid "Type" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:140 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #, elixir-autogen, elixir-format msgid "Type of the token standard" msgstr "" @@ -2443,7 +2443,7 @@ msgstr "" msgid "Uncles" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:341 +#: lib/block_scout_web/views/transaction_view.ex:343 #, elixir-autogen, elixir-format msgid "Unconfirmed" msgstr "" @@ -2493,12 +2493,7 @@ msgstr "" msgid "Validator Data" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:51 -#, elixir-autogen, elixir-format -msgid "Validator Info" -msgstr "" - -#: lib/block_scout_web/templates/address/overview.html.eex:104 +#: lib/block_scout_web/templates/address/overview.html.eex:87 #, elixir-autogen, elixir-format msgid "Validator Name" msgstr "" @@ -2513,17 +2508,17 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:82 +#: lib/block_scout_web/templates/address_contract/index.html.eex:84 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:160 -#: lib/block_scout_web/templates/address_contract/index.html.eex:166 -#: lib/block_scout_web/templates/address_contract/index.html.eex:197 -#: lib/block_scout_web/templates/address_contract/index.html.eex:203 +#: lib/block_scout_web/templates/address_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_contract/index.html.eex:162 +#: lib/block_scout_web/templates/address_contract/index.html.eex:168 +#: lib/block_scout_web/templates/address_contract/index.html.eex:199 +#: lib/block_scout_web/templates/address_contract/index.html.eex:205 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -2586,12 +2581,12 @@ msgstr "" msgid "View Contract" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:67 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:70 #, elixir-autogen, elixir-format msgid "View Less Transfers" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:66 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:69 #, elixir-autogen, elixir-format msgid "View More Transfers" msgstr "" @@ -2678,7 +2673,7 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:129 +#: lib/block_scout_web/templates/address/overview.html.eex:112 #, elixir-autogen, elixir-format msgid "at" msgstr "" @@ -2698,7 +2693,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "button" msgstr "" diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index cc58587a54ad..d3b35bc16c54 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -112,6 +112,14 @@ config :spandex_ecto, SpandexEcto.EctoLogger, tracer: Explorer.Tracer, otp_app: :explorer +config :explorer, Explorer.Mailer, + adapter: Bamboo.SendGridAdapter, + api_key: System.get_env("SENDGRID_API_KEY") + +config :explorer, + sendgrid_sender: System.get_env("SENDGRID_SENDER"), + sendgrid_template: System.get_env("SENDGRID_TEMPLATE") + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{config_env()}.exs" diff --git a/apps/explorer/lib/explorer/accounts/identity.ex b/apps/explorer/lib/explorer/accounts/identity.ex new file mode 100644 index 000000000000..b8cab8f3579f --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/identity.ex @@ -0,0 +1,25 @@ +defmodule Explorer.Accounts.Identity do + @moduledoc """ + Identity of user fetched via Oauth + """ + + use Ecto.Schema + import Ecto.Changeset + alias Explorer.Accounts.Watchlist + + schema "account_identities" do + field(:uid, :string) + field(:email, :string) + field(:name, :string) + has_many(:watchlists, Watchlist) + + timestamps() + end + + @doc false + def changeset(identity, attrs) do + identity + |> cast(attrs, [:uid, :email, :name]) + |> validate_required([:uid, :email, :name]) + end +end diff --git a/apps/explorer/lib/explorer/accounts/notify/email.ex b/apps/explorer/lib/explorer/accounts/notify/email.ex new file mode 100644 index 000000000000..c617ca3a5863 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/notify/email.ex @@ -0,0 +1,153 @@ +defmodule Explorer.Accounts.Notify.Email do + @moduledoc """ + Composing an email to sendgrid + """ + + require Logger + + alias BlockScoutWeb.WebRouter.Helpers + alias Explorer.Accounts.{Identity, Watchlist, WatchlistAddress, WatchlistNotification} + alias Explorer.Repo + + import Bamboo.{Email, SendGridHelper} + + def compose(notification, %{notify_email: notify}) when notify do + notification = preload(notification) + + email = compose_email(notification) + Logger.debug("--- composed email", fetcher: :account) + Logger.debug(email, fetcher: :account) + email + end + + defp compose_email(notification) do + email = new_email(from: sender(), to: email(notification)) + + email + |> with_template(template()) + |> add_dynamic_field("username", username(notification)) + |> add_dynamic_field("address_hash", address_hash_string(notification)) + |> add_dynamic_field("address_name", notification.watchlist_address.name) + |> add_dynamic_field("transaction_hash", hash_string(notification.transaction_hash)) + |> add_dynamic_field("from_address_hash", hash_string(notification.from_address_hash)) + |> add_dynamic_field("to_address_hash", hash_string(notification.to_address_hash)) + |> add_dynamic_field("block_number", notification.block_number) + |> add_dynamic_field("amount", amount(notification)) + |> add_dynamic_field("name", notification.name) + |> add_dynamic_field("tx_fee", notification.tx_fee) + |> add_dynamic_field("direction", direction(notification)) + |> add_dynamic_field("method", notification.method) + |> add_dynamic_field("transaction_url", transaction_url(notification)) + |> add_dynamic_field("address_url", address_url(notification.watchlist_address.address_hash)) + |> add_dynamic_field("from_url", address_url(notification.from_address_hash)) + |> add_dynamic_field("to_url", address_url(notification.to_address_hash)) + |> add_dynamic_field("block_url", block_url(notification)) + end + + defp amount(%WatchlistNotification{amount: amount, type: type}) do + case type do + "COIN" -> + amount + + "ERC-20" -> + amount + + "ERC-721" -> + "Token ID: " <> to_string(amount) <> " of " + + "ERC-1155" -> + "Token ID: " <> to_string(amount) <> " of " + end + end + + defp email(%WatchlistNotification{ + watchlist_address: %WatchlistAddress{ + watchlist: %Watchlist{ + identity: %Identity{ + email: email + } + } + } + }), + do: email + + defp username(%WatchlistNotification{ + watchlist_address: %WatchlistAddress{ + watchlist: %Watchlist{ + identity: %Identity{ + name: name + } + } + } + }), + do: name + + defp address_hash_string(%WatchlistNotification{ + watchlist_address: %WatchlistAddress{address: address} + }), + do: hash_string(address.hash) + + defp hash_string(hash) do + "0x" <> Base.encode16(hash.bytes, case: :lower) + end + + defp direction(notification) do + affect(notification) <> " " <> place(notification) + end + + defp place(%WatchlistNotification{direction: direction}) do + case direction do + "incoming" -> "at" + "outgoing" -> "from" + _ -> "unknown" + end + end + + defp affect(%WatchlistNotification{direction: direction}) do + case direction do + "incoming" -> "received" + "outgoing" -> "sent" + _ -> "unknown" + end + end + + defp preload(notification) do + Repo.preload(notification, watchlist_address: [:address, watchlist: :identity]) + end + + defp address_url(address_hash) do + Helpers.address_url(uri(), :show, address_hash) + end + + defp block_url(notification) do + URI.to_string(uri()) <> "block/" <> Integer.to_string(notification.block_number) + end + + defp transaction_url(notification) do + Helpers.transaction_url(uri(), :show, notification.transaction_hash) + end + + defp uri do + %URI{scheme: "https", host: host(), path: path()} + end + + defp host do + if System.get_env("MIX_ENV") == "prod" do + "blockscout.com" + else + Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:url][:host] + end + end + + defp path do + Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:url][:path] + end + + defp sender do + Application.get_env(:explorer, :sendgrid_sender) + end + + defp template do + Application.get_env(:explorer, :sendgrid_template) + end +end diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex new file mode 100644 index 000000000000..51ef53bfd4d1 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -0,0 +1,133 @@ +defmodule Explorer.Accounts.Notify.Notifier do + @moduledoc """ + Composing notification, store and send it to email + """ + + alias Explorer.Accounts.Notify.{Email, Summary} + alias Explorer.Accounts.{WatchlistAddress, WatchlistNotification} + alias Explorer.Chain.{TokenTransfer, Transaction} + alias Explorer.{Mailer, Repo} + + require Logger + + import Ecto.Query, only: [from: 2] + + def notify(nil), do: nil + def notify([]), do: nil + + def notify(transactions) when is_list(transactions) do + Enum.map(transactions, fn transaction -> process(transaction) end) + end + + defp process(%TokenTransfer{} = transfer) do + Logger.debug(transfer, fetcher: :account) + + transfer + |> Summary.process() + |> Enum.map(fn summary -> notify_watchlists(summary) end) + end + + defp process(%Transaction{} = transaction) do + Logger.debug(transaction, fetcher: :account) + + transaction + |> Summary.process() + |> Enum.map(fn summary -> notify_watchlists(summary) end) + end + + defp process(_), do: nil + + defp notify_watchlists(%Summary{from_address_hash: nil}), do: nil + defp notify_watchlists(%Summary{to_address_hash: nil}), do: nil + + defp notify_watchlists(%Summary{} = summary) do + incoming_addresses = find_watchlists_addresses(summary.to_address_hash) + outgoing_addresses = find_watchlists_addresses(summary.from_address_hash) + + Logger.debug("--- filled summary", fetcher: :account) + Logger.debug(summary, fetcher: :account) + + Enum.each(incoming_addresses, fn address -> notity_watchlist(address, summary, :incoming) end) + Enum.each(outgoing_addresses, fn address -> notity_watchlist(address, summary, :outgoing) end) + end + + defp notity_watchlist(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do + with %WatchlistNotification{} = notification <- + build_watchlist_notification(address, summary, direction) do + case Repo.all(query_notification(notification, address)) do + [] -> save_and_send_notification(notification, address) + _ -> nil + end + end + end + + defp query_notification(notification, watchlist_address) do + from(wn in WatchlistNotification, + where: + wn.watchlist_address_id == ^watchlist_address.id and + wn.from_address_hash == ^notification.from_address_hash and + wn.to_address_hash == ^notification.to_address_hash and + wn.transaction_hash == ^notification.transaction_hash and + wn.block_number == ^notification.block_number and + wn.direction == ^notification.direction and + wn.amount == ^notification.amount + ) + end + + defp save_and_send_notification(%WatchlistNotification{} = notification, %WatchlistAddress{} = address) do + Repo.insert(notification) + + email = Email.compose(notification, address) + + case Mailer.deliver_now(email, response: true) do + {:ok, _email, response} -> + Logger.info("--- email delivery response: SUCCESS", fetcher: :account) + Logger.info(response, fetcher: :account) + + {:error, error} -> + Logger.info("--- email delivery response: FAILED", fetcher: :account) + Logger.info(error, fetcher: :account) + end + end + + defp save_and_send_notification(_, _), do: nil + + @doc """ + direction = :incoming || :outgoing + """ + def build_watchlist_notification(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do + if is_watched(address, summary, direction) do + %WatchlistNotification{ + watchlist_address_id: address.id, + transaction_hash: summary.transaction_hash, + from_address_hash: summary.from_address_hash, + to_address_hash: summary.to_address_hash, + direction: to_string(direction), + method: summary.method, + block_number: summary.block_number, + amount: summary.amount, + tx_fee: summary.tx_fee, + name: summary.name, + type: summary.type + } + end + end + + defp is_watched(%WatchlistAddress{} = address, %{type: type}, direction) do + case {type, direction} do + {"COIN", :incoming} -> address.watch_coin_input + {"COIN", :outgoing} -> address.watch_coin_output + {"ERC-20", :incoming} -> address.watch_erc_20_input + {"ERC-20", :outgoing} -> address.watch_erc_20_output + {"ERC-721", :incoming} -> address.watch_erc_721_input + {"ERC-721", :outgoing} -> address.watch_erc_721_output + {"ERC-1155", :incoming} -> address.watch_erc_1155_input + {"ERC-1155", :outgoing} -> address.watch_erc_1155_output + end + end + + defp find_watchlists_addresses(%Explorer.Chain.Hash{} = address_hash) do + query = from(wa in WatchlistAddress, where: wa.address_hash == ^address_hash) + Repo.all(query) + end +end diff --git a/apps/explorer/lib/explorer/accounts/notify/summary.ex b/apps/explorer/lib/explorer/accounts/notify/summary.ex new file mode 100644 index 000000000000..882d17dda35e --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/notify/summary.ex @@ -0,0 +1,194 @@ +defmodule Explorer.Accounts.Notify.Summary do + @moduledoc """ + Compose a summary from transactions + """ + + require Logger + + alias Explorer.Accounts.Notify.Summary + alias Explorer.{Chain, Repo} + alias Explorer.Chain.Wei + + defstruct [ + :transaction_hash, + :from_address_hash, + :to_address_hash, + :method, + :block_number, + :amount, + :tx_fee, + :name, + :type + ] + + def process(%Chain.TokenTransfer{} = transfer) do + preloaded_transfer = preload(transfer) + + summary = fetch_summary(preloaded_transfer.transaction, preloaded_transfer) + + Logger.debug("--- transfer summary", fetcher: :account) + Logger.debug(summary, fetcher: :account) + + [summary] + end + + def process(%Chain.Transaction{} = transaction) do + preloaded_transaction = preload(transaction) + + transfers_summaries = handle_collection(transaction, preloaded_transaction.token_transfers) + + transaction_summary = fetch_summary(transaction) + + Logger.debug("--- transaction summary", fetcher: :account) + Logger.debug(transaction_summary, fetcher: :account) + Logger.debug("--- transfers summaries", fetcher: :account) + Logger.debug(transfers_summaries, fetcher: :account) + + [transaction_summary | transfers_summaries] + |> Enum.filter(fn summary -> + not (is_nil(summary) or + is_nil(summary.amount) or + summary.amount == Decimal.new(0)) + end) + end + + def process(_), do: nil + + def handle_collection(_transaction, []), do: [] + + def handle_collection(transaction, transfers_list) do + Enum.map( + transfers_list, + fn transfer -> + summary = fetch_summary(transaction, transfer) + Logger.info(summary, fetcher: :account) + summary + end + ) + end + + def fetch_summary(%Chain.Transaction{block_number: nil}), do: nil + + def fetch_summary(%Chain.Transaction{} = transaction) do + %Summary{ + transaction_hash: transaction.hash, + method: method(transaction), + from_address_hash: transaction.from_address_hash, + to_address_hash: transaction.to_address_hash, + block_number: transaction.block_number, + amount: amount(transaction), + tx_fee: fee(transaction), + name: Application.get_env(:explorer, :coin_name), + type: "COIN" + } + end + + def fetch_summary(_), do: :nothing + + def fetch_summary(%Chain.Transaction{block_number: nil}, _), do: nil + + def fetch_summary( + %Chain.Transaction{} = transaction, + %Chain.TokenTransfer{} = transfer + ) do + case transfer.token.type do + "ERC-20" -> + %Summary{ + transaction_hash: transaction.hash, + method: method(transfer), + from_address_hash: transfer.from_address_hash, + to_address_hash: transfer.to_address_hash, + block_number: transfer.block_number, + amount: amount(transfer), + tx_fee: fee(transaction), + name: transfer.token.name, + type: transfer.token.type + } + + "ERC-721" -> + %Summary{ + transaction_hash: transaction.hash, + method: method(transfer), + from_address_hash: transfer.from_address_hash, + to_address_hash: transfer.to_address_hash, + block_number: transfer.block_number, + amount: transfer.token_id, + tx_fee: fee(transaction), + name: transfer.token.name, + type: transfer.token.type + } + + "ERC-1155" -> + %Summary{ + transaction_hash: transaction.hash, + method: method(transfer), + from_address_hash: transfer.from_address_hash, + to_address_hash: transfer.to_address_hash, + block_number: transfer.block_number, + amount: transfer.token_id, + tx_fee: fee(transaction), + name: transfer.token.name, + type: transfer.token.type + } + end + end + + @burn_address "0x0000000000000000000000000000000000000000" + + def method(%{from_address_hash: from, to_address_hash: to}) do + {:ok, burn_address} = format_address(@burn_address) + + cond do + burn_address == from -> "mint" + burn_address == to -> "burn" + true -> "transfer" + end + end + + def format_address(address_hash_string) do + Chain.string_to_address_hash(address_hash_string) + end + + def amount(%Chain.Transaction{} = transaction) do + Wei.to(transaction.value, :ether) + end + + def amount(%Chain.TokenTransfer{amount: amount}) when is_nil(amount), do: nil + + def amount(%Chain.TokenTransfer{amount: amount} = transfer) do + decimals = + Decimal.new( + Integer.pow( + 10, + Decimal.to_integer(token_decimals(transfer)) + ) + ) + + Decimal.div( + amount, + decimals + ) + end + + def token_decimals(%Chain.TokenTransfer{} = transfer) do + transfer.token.decimals || Decimal.new(1) + end + + def type(%Chain.Transaction{}), do: :coin + def type(%Chain.InternalTransaction{}), do: :coin + + def fee(%Chain.Transaction{} = transaction) do + {_, fee} = Chain.fee(transaction, :gwei) + fee + end + + def preload(%Chain.Transaction{} = transaction) do + Repo.preload(transaction, [:internal_transactions, token_transfers: :token]) + end + + def preload(%Chain.TokenTransfer{} = transfer) do + Repo.preload(transfer, [:transaction, :token]) + end + + def preload(_), do: nil +end diff --git a/apps/explorer/lib/explorer/accounts/watchlist.ex b/apps/explorer/lib/explorer/accounts/watchlist.ex new file mode 100644 index 000000000000..3bf4e1d3cf62 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/watchlist.ex @@ -0,0 +1,25 @@ +defmodule Explorer.Accounts.Watchlist do + @moduledoc """ + Watchlist is root entity for WatchlistAddresses + """ + + use Ecto.Schema + import Ecto.Changeset + alias Explorer.Accounts.{Identity, WatchlistAddress} + + schema "account_watchlists" do + field(:name, :string) + belongs_to(:identity, Identity) + has_many(:watchlist_addresses, WatchlistAddress) + has_many(:addresses, through: [:watchlist_addresses, :address]) + + timestamps() + end + + @doc false + def changeset(watchlist, attrs) do + watchlist + |> cast(attrs, [:name]) + |> validate_required([:name]) + end +end diff --git a/apps/explorer/lib/explorer/accounts/watchlist_address.ex b/apps/explorer/lib/explorer/accounts/watchlist_address.ex new file mode 100644 index 000000000000..375a90447599 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/watchlist_address.ex @@ -0,0 +1,68 @@ +defmodule Explorer.Accounts.WatchlistAddress do + @moduledoc """ + WatchlistAddress entity + """ + + use Ecto.Schema + import Ecto.Changeset + + alias Explorer.Accounts.{Watchlist, WatchlistAddress, WatchlistAddressForm} + alias Explorer.Chain.{Address, Hash} + + schema "account_watchlist_addresses" do + field(:name, :string) + belongs_to(:address, Address, foreign_key: :address_hash, references: :hash, type: Hash.Address) + belongs_to(:watchlist, Watchlist) + + field(:watch_coin_input, :boolean) + field(:watch_coin_output, :boolean) + field(:watch_erc_20_input, :boolean) + field(:watch_erc_20_output, :boolean) + field(:watch_erc_721_input, :boolean) + field(:watch_erc_721_output, :boolean) + field(:watch_erc_1155_input, :boolean) + field(:watch_erc_1155_output, :boolean) + field(:notify_email, :boolean) + field(:notify_epns, :boolean) + field(:notify_feed, :boolean) + field(:notify_inapp, :boolean) + + timestamps() + end + + @doc false + def changeset(watchlist_address, attrs) do + watchlist_address + |> cast(attrs, [ + :name, + :address_hash, + :watch_coin_input, + :watch_coin_output, + :watch_erc_20_input, + :watch_erc_20_output, + :watch_erc_721_input, + :watch_erc_721_output, + :watch_erc_1155_input, + :watch_erc_1155_output, + :notify_email, + :notify_epns, + :notify_feed, + :notify_inapp + ]) + |> validate_required([:name, :address_hash]) + end + + def to_form(%WatchlistAddress{} = wa) do + %WatchlistAddressForm{ + address_hash: wa.address.hash, + name: wa.name, + watch_coin_input: wa.watch_coin_input, + watch_coin_output: wa.watch_coin_output, + watch_erc_20_input: wa.watch_erc_20_input, + watch_erc_20_output: wa.watch_erc_20_output, + watch_nft_input: wa.watch_erc_721_input, + watch_nft_output: wa.watch_erc_721_output, + notify_email: wa.notify_email + } + end +end diff --git a/apps/explorer/lib/explorer/accounts/watchlist_address_form.ex b/apps/explorer/lib/explorer/accounts/watchlist_address_form.ex new file mode 100644 index 000000000000..5194308c0efa --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/watchlist_address_form.ex @@ -0,0 +1,52 @@ +defmodule Explorer.Accounts.WatchlistAddressForm do + @moduledoc """ + WatchlistAddressForm + needed for substitute WatchlistAddress, + because of nft boolean fields expand to 721 & 1155 + """ + + use Ecto.Schema + import Ecto.Changeset + + alias Explorer.Accounts.Watchlist + alias Explorer.Chain.{Address, Hash} + + embedded_schema do + field(:name, :string) + belongs_to(:address, Address, foreign_key: :address_hash, references: :hash, type: Hash.Address) + belongs_to(:watchlist, Watchlist) + + field(:watch_coin_input, :boolean, default: true) + field(:watch_coin_output, :boolean, default: true) + field(:watch_erc_20_input, :boolean, default: true) + field(:watch_erc_20_output, :boolean, default: true) + field(:watch_nft_input, :boolean, default: true) + field(:watch_nft_output, :boolean, default: true) + field(:notify_email, :boolean, default: true) + field(:notify_epns, :boolean, default: true) + field(:notify_feed, :boolean, default: true) + field(:notify_inapp, :boolean, default: true) + + timestamps() + end + + @doc false + def changeset(watchlist_address, attrs) do + watchlist_address + |> cast(attrs, [ + :name, + :address_hash, + :watch_coin_input, + :watch_coin_output, + :watch_erc_20_input, + :watch_erc_20_output, + :watch_nft_input, + :watch_nft_output, + :notify_email, + :notify_epns, + :notify_feed, + :notify_inapp + ]) + |> validate_required([:name, :address_hash]) + end +end diff --git a/apps/explorer/lib/explorer/accounts/watchlist_notification.ex b/apps/explorer/lib/explorer/accounts/watchlist_notification.ex new file mode 100644 index 000000000000..a1d3ddc6b22d --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/watchlist_notification.ex @@ -0,0 +1,72 @@ +defmodule Explorer.Accounts.WatchlistNotification do + @moduledoc """ + Strored notification about event + related to WatchlistAddress + """ + + use Ecto.Schema + import Ecto.Changeset + + alias Explorer.Accounts.WatchlistAddress + + alias Explorer.Chain.{ + Address, + Hash, + Transaction + } + + schema "account_watchlist_notifications" do + field(:amount, :decimal) + field(:block_number, :integer) + field(:direction, :string) + field(:method, :string) + field(:name, :string) + field(:tx_fee, :decimal) + field(:type, :string) + field(:viewed_at, :integer) + + belongs_to(:watchlist_address, WatchlistAddress) + + belongs_to( + :from_address, + Address, + foreign_key: :from_address_hash, + references: :hash, + type: Hash.Address + ) + + belongs_to( + :to_address, + Address, + foreign_key: :to_address_hash, + references: :hash, + type: Hash.Address + ) + + belongs_to(:transaction, Transaction, + foreign_key: :transaction_hash, + references: :hash, + type: Hash.Full + ) + + timestamps() + end + + @doc false + def changeset(watchlist_notifications, attrs) do + watchlist_notifications + |> cast(attrs, [:amount, :direction, :name, :type, :method, :block_number, :tx_fee, :value, :decimals, :viewed_at]) + |> validate_required([ + :amount, + :direction, + :name, + :type, + :method, + :block_number, + :tx_fee, + :value, + :decimals, + :viewed_at + ]) + end +end diff --git a/apps/explorer/lib/explorer/chain/import.ex b/apps/explorer/lib/explorer/chain/import.ex index b3aa19ac423f..b0e3aa7b7b20 100644 --- a/apps/explorer/lib/explorer/chain/import.ex +++ b/apps/explorer/lib/explorer/chain/import.ex @@ -4,6 +4,7 @@ defmodule Explorer.Chain.Import do """ alias Ecto.Changeset + alias Explorer.Accounts.Notify.Notifier alias Explorer.Chain.Events.Publisher alias Explorer.Chain.Import alias Explorer.Repo @@ -302,6 +303,8 @@ defmodule Explorer.Chain.Import do Keyword.delete(options, :for) ) + Notifier.notify(inserted) + {:ok, inserted} end diff --git a/apps/explorer/lib/explorer/chain/import/runner/block/second_degree_relations.ex b/apps/explorer/lib/explorer/chain/import/runner/block/second_degree_relations.ex index 18b8eb089c38..014bef4a042a 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/block/second_degree_relations.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/block/second_degree_relations.ex @@ -57,7 +57,7 @@ defmodule Explorer.Chain.Import.Runner.Block.SecondDegreeRelations do optional(:on_conflict) => Import.Runner.on_conflict(), required(:timeout) => timeout }) :: - {:ok, %{nephew_hash: Hash.Full.t(), uncle_hash: Hash.Full.t(), index: non_neg_integer()}} + {:ok, nil | %{nephew_hash: Hash.Full.t(), uncle_hash: Hash.Full.t(), index: non_neg_integer()}} | {:error, [Changeset.t()]} defp insert(repo, changes_list, %{timeout: timeout} = options) when is_atom(repo) and is_list(changes_list) do on_conflict = Map.get_lazy(options, :on_conflict, &default_on_conflict/0) diff --git a/apps/explorer/lib/explorer/chain/import/runner/token_transfers.ex b/apps/explorer/lib/explorer/chain/import/runner/token_transfers.ex index 3935fb53b51f..f6ecb1eedf9a 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/token_transfers.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/token_transfers.ex @@ -8,6 +8,7 @@ defmodule Explorer.Chain.Import.Runner.TokenTransfers do import Ecto.Query, only: [from: 2] alias Ecto.{Changeset, Multi, Repo} + alias Explorer.Accounts.Notify.Notifier alias Explorer.Chain.{Import, TokenTransfer} @behaviour Import.Runner @@ -57,7 +58,7 @@ defmodule Explorer.Chain.Import.Runner.TokenTransfers do # Enforce TokenTransfer ShareLocks order (see docs: sharelocks.md) ordered_changes_list = Enum.sort_by(changes_list, &{&1.transaction_hash, &1.block_hash, &1.log_index}) - {:ok, _} = + {:ok, inserted} = Import.insert_changes_list( repo, ordered_changes_list, @@ -68,6 +69,10 @@ defmodule Explorer.Chain.Import.Runner.TokenTransfers do timeout: timeout, timestamps: timestamps ) + + Notifier.notify(inserted) + + {:ok, inserted} end defp default_on_conflict do diff --git a/apps/explorer/lib/explorer/env_var_translator.ex b/apps/explorer/lib/explorer/env_var_translator.ex new file mode 100644 index 000000000000..62f3da9003a0 --- /dev/null +++ b/apps/explorer/lib/explorer/env_var_translator.ex @@ -0,0 +1,24 @@ +defmodule Explorer.EnvVarTranslator do + @moduledoc """ + The module for transaformation of environment variables + """ + + alias Poison.Parser + + @spec map_array_env_var_to_list(atom()) :: list() + def map_array_env_var_to_list(config_name) do + env_var = Application.get_env(:block_scout_web, config_name) + + if env_var do + try do + env_var + |> Parser.parse!(%{keys: :atoms!}) + rescue + _ -> + [] + end + else + [] + end + end +end diff --git a/apps/explorer/lib/explorer/mailer.ex b/apps/explorer/lib/explorer/mailer.ex new file mode 100644 index 000000000000..ba5c095714bc --- /dev/null +++ b/apps/explorer/lib/explorer/mailer.ex @@ -0,0 +1,12 @@ +defmodule Explorer.Mailer do + @moduledoc """ + Base module for mail sending + + add in your module: + alias Explorer.Mailer + + and call + Mailer.deliver_now!(email) + """ + use Bamboo.Mailer, otp_app: :explorer +end diff --git a/apps/explorer/lib/explorer/tags/address_tag.ex b/apps/explorer/lib/explorer/tags/address_tag.ex new file mode 100644 index 000000000000..617423560881 --- /dev/null +++ b/apps/explorer/lib/explorer/tags/address_tag.ex @@ -0,0 +1,98 @@ +defmodule Explorer.Tags.AddressTag do + @moduledoc """ + Represents a Tag object. + """ + + use Explorer.Schema + + import Ecto.Changeset + + import Ecto.Query, + only: [ + from: 2 + ] + + alias Explorer.Chain.Address + alias Explorer.Repo + alias Explorer.Tags.{AddressTag, AddressToTag} + + @typedoc """ + * `:id` - id of Tag + * `:label` - Tag's label + * `:label` - Label's display name + """ + @type t :: %AddressTag{ + label: String.t() + } + + schema "address_tags" do + field(:label, :string) + field(:display_name, :string) + has_many(:addresses, Address, foreign_key: :hash) + has_many(:tag_id, AddressToTag, foreign_key: :id) + + timestamps() + end + + @required_attrs ~w(label display_name)a + + @doc false + def changeset(struct, params \\ %{}) do + struct + |> cast(params, @required_attrs) + |> validate_required(@required_attrs) + |> unique_constraint(:label, name: :address_tags_label_index) + end + + def set_tag(name, display_name) do + tag = get_tag(name) + + if tag do + tag + |> AddressTag.changeset(%{display_name: display_name}) + |> Repo.update() + else + %AddressTag{} + |> AddressTag.changeset(%{label: name, display_name: display_name}) + |> Repo.insert() + end + end + + def get_tag_id(nil), do: nil + + def get_tag_id(label) do + query = + from( + tag in AddressTag, + where: tag.label == ^label, + select: tag.id + ) + + query + |> Repo.one() + end + + def get_tag(nil), do: nil + + def get_tag(label) do + query = + from( + tag in AddressTag, + where: tag.label == ^label + ) + + query + |> Repo.one() + end + + def get_all_tags do + query = + from( + tag in AddressTag, + select: tag + ) + + query + |> Repo.all() + end +end diff --git a/apps/explorer/lib/explorer/tags/address_tag_cataloger.ex b/apps/explorer/lib/explorer/tags/address_tag_cataloger.ex new file mode 100644 index 000000000000..3256f3f3c257 --- /dev/null +++ b/apps/explorer/lib/explorer/tags/address_tag_cataloger.ex @@ -0,0 +1,198 @@ +defmodule Explorer.Tags.AddressTag.Cataloger do + @moduledoc """ + Actualizes address tags. + """ + + use GenServer + + alias Explorer.EnvVarTranslator + alias Explorer.Tags.{AddressTag, AddressToTag} + alias Explorer.Validator.MetadataRetriever + alias Poison.Parser + + def start_link(_) do + GenServer.start_link(__MODULE__, :ok, name: __MODULE__) + end + + @impl GenServer + def init(args) do + send(self(), :fetch_tags) + + {:ok, args} + end + + @impl GenServer + def handle_info(:fetch_tags, state) do + # set tag for every chainlink oracle + create_chainlink_oracle_tag() + + create_new_tags() + + send(self(), :bind_addresses) + + {:noreply, state} + end + + def handle_info(:bind_addresses, state) do + # set validator tag + set_validator_tag() + + # set amb bridge mediators tag + set_amb_mediators_tag() + + # set omni bridge tag + set_omni_tag() + + # set L2 tag + set_l2_tag() + + all_tags = AddressTag.get_all_tags() + + all_tags + |> Enum.each(fn %{label: tag_name} -> + if tag_name !== "validator" && tag_name !== "amb bridge mediators" && tag_name !== "omni bridge" && + tag_name !== "l2" && !String.contains?(tag_name, "chainlink") do + env_var_name = "CUSTOM_CONTRACT_ADDRESSES_#{tag_name_to_env_var_part(tag_name)}" + set_tag_for_env_var_multiple_addresses(env_var_name, tag_name) + end + end) + + {:noreply, state} + end + + defp tag_name_to_env_var_part(tag_name) do + tag_name + |> String.upcase() + |> String.replace(" ", "_") + |> String.replace(".", "_") + end + + def create_chainlink_oracle_tag do + chainlink_oracles_config = Application.get_env(:block_scout_web, :chainlink_oracles) + + if chainlink_oracles_config do + chainlink_oracles_config + |> Parser.parse!(%{keys: :atoms!}) + |> Enum.each(fn %{:name => name, :address => address} -> + chainlink_tag_name = "chainlink oracle #{String.downcase(name)}" + AddressTag.set_tag(chainlink_tag_name, chainlink_tag_name) + tag_id = AddressTag.get_tag_id(chainlink_tag_name) + AddressToTag.set_tag_to_addresses(tag_id, [address]) + end) + end + end + + defp set_tag_for_multiple_env_var_addresses(env_vars, tag) do + addresses = + env_vars + |> Enum.map(fn env_var -> + env_var + |> System.get_env("") + |> String.downcase() + end) + + tag_id = AddressTag.get_tag_id(tag) + AddressToTag.set_tag_to_addresses(tag_id, addresses) + end + + defp set_tag_for_multiple_env_var_array_addresses(env_vars, tag) do + addresses = + env_vars + |> Enum.reduce([], fn env_var, acc -> + env_var + |> System.get_env("") + |> String.split(",") + |> Enum.reduce(acc, fn env_var, acc_inner -> + addr = + env_var + |> String.downcase() + + [addr | acc_inner] + end) + end) + + tag_id = AddressTag.get_tag_id(tag) + AddressToTag.set_tag_to_addresses(tag_id, addresses) + end + + def create_new_tags do + tags = EnvVarTranslator.map_array_env_var_to_list(:new_tags) + + tags + |> Enum.each(fn %{tag: tag_name, title: tag_display_name} -> + AddressTag.set_tag(tag_name, tag_display_name) + end) + end + + defp set_tag_for_env_var_multiple_addresses(env_var, tag) do + addresses = env_var_string_array_to_list(env_var) + + tag_id = AddressTag.get_tag_id(tag) + AddressToTag.set_tag_to_addresses(tag_id, addresses) + end + + defp env_var_string_array_to_list(env_var_array_string) do + env_var = + env_var_array_string + |> System.get_env(nil) + + if env_var do + env_var + |> String.split(",") + |> Enum.map(fn env_var_array_string_item -> + env_var_array_string_item + |> String.downcase() + end) + else + [] + end + end + + defp set_validator_tag do + validators = MetadataRetriever.fetch_validators_list() + tag_id = AddressTag.get_tag_id("validator") + AddressToTag.set_tag_to_addresses(tag_id, validators) + end + + defp set_amb_mediators_tag do + set_tag_for_multiple_env_var_array_addresses( + ["AMB_BRIDGE_MEDIATORS", "CUSTOM_CONTRACT_ADDRESSES_AMB_BRIDGE_MEDIATORS"], + "amb bridge mediators" + ) + end + + defp set_omni_tag do + set_tag_for_multiple_env_var_addresses( + ["ETH_OMNI_BRIDGE_MEDIATOR", "BSC_OMNI_BRIDGE_MEDIATOR", "POA_OMNI_BRIDGE_MEDIATOR"], + "omni bridge" + ) + end + + defp set_l2_tag do + set_tag_for_multiple_env_var_addresses(["CUSTOM_CONTRACT_ADDRESSES_AOX"], "l2") + end + + def set_chainlink_oracle_tag do + chainlink_oracles = chainlink_oracles_list() + + tag_id = AddressTag.get_tag_id("chainlink oracle") + AddressToTag.set_tag_to_addresses(tag_id, chainlink_oracles) + end + + defp chainlink_oracles_list do + chainlink_oracles_config = Application.get_env(:block_scout_web, :chainlink_oracles) + + if chainlink_oracles_config do + try do + chainlink_oracles_config + |> Parser.parse!(%{keys: :atoms!}) + |> Enum.map(fn %{:name => _name, :address => address} -> address end) + rescue + _ -> + [] + end + else + [] + end + end +end diff --git a/apps/explorer/lib/explorer/tags/address_to_tag.ex b/apps/explorer/lib/explorer/tags/address_to_tag.ex new file mode 100644 index 000000000000..9522aa39d42f --- /dev/null +++ b/apps/explorer/lib/explorer/tags/address_to_tag.ex @@ -0,0 +1,182 @@ +defmodule Explorer.Tags.AddressToTag do + @moduledoc """ + Represents ann Address to Tag relation. + """ + + use Explorer.Schema + + import Ecto.Changeset + + alias Explorer.Accounts.WatchlistAddress + alias Explorer.{Chain, Repo} + alias Explorer.Chain.{Address, Hash} + alias Explorer.Tags.{AddressTag, AddressToTag} + + # Notation.import_types(BlockScoutWeb.Schema.Types) + + @typedoc """ + * `:tag_id` - id of Tag + * `:address_hash` - hash of Address + """ + @type t :: %AddressToTag{ + tag_id: Decimal.t(), + address_hash: Hash.Address.t() + } + + schema "address_to_tags" do + belongs_to( + :tag, + AddressTag, + foreign_key: :tag_id, + references: :id, + type: :integer + ) + + belongs_to( + :address, + Address, + foreign_key: :address_hash, + references: :hash, + type: Hash.Address + ) + + timestamps() + end + + @required_attrs ~w(address_hash tag_id)a + + @doc false + def changeset(struct, params \\ %{}) do + struct + |> cast(params, @required_attrs) + |> unique_constraint([:address_hash, :tag_id], name: :address_to_tags_address_hash_tag_id_index) + end + + defp get_address_hashes_mapped_to_tag(nil), do: nil + + defp get_address_hashes_mapped_to_tag(tag_id) do + query = + from( + att in AddressToTag, + where: att.tag_id == ^tag_id, + select: att.address_hash + ) + + query + |> Repo.all() + end + + def get_tags_on_address(address_hash) when is_nil(address_hash), do: [] + + def get_tags_on_address(address_hash) do + query = + from( + tt in AddressTag, + left_join: att in AddressToTag, + on: tt.id == att.tag_id, + where: att.address_hash == ^address_hash, + where: tt.label != ^"validator", + select: tt + ) + + query + |> Repo.all() + end + + def get_private_tags_on_address(address_hash, _current_user) when is_nil(address_hash), do: [] + + def get_private_tags_on_address(address_hash, current_user) do + if current_user do + query = + from( + wa in WatchlistAddress, + where: wa.address_hash == ^address_hash, + where: wa.watchlist_id == ^current_user.watchlist_id, + select: %{label: wa.name, display_name: wa.name} + ) + + query + |> Repo.all() + else + [] + end + end + + def set_tag_to_addresses(tag_id, address_hash_string_list) do + current_address_hashes = get_address_hashes_mapped_to_tag(tag_id) + + if current_address_hashes do + current_address_hashes_strings = + current_address_hashes + |> Enum.map(fn address_hash -> + "0x" <> Base.encode16(address_hash.bytes, case: :lower) + end) + + current_address_hashes_strings_tuples = MapSet.new(current_address_hashes_strings) + new_address_hashes_strings_tuples = MapSet.new(address_hash_string_list) + + all_tuples = MapSet.union(current_address_hashes_strings_tuples, new_address_hashes_strings_tuples) + + addresses_to_delete = + all_tuples + |> MapSet.difference(new_address_hashes_strings_tuples) + |> MapSet.to_list() + + addresses_to_add = + all_tuples + |> MapSet.difference(current_address_hashes_strings_tuples) + |> MapSet.to_list() + + changeset_to_add_list = + addresses_to_add + |> Enum.map(fn address_hash_string -> + with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), + :ok <- Chain.check_address_exists(address_hash) do + %{ + tag_id: tag_id, + address_hash: address_hash, + inserted_at: DateTime.utc_now(), + updated_at: DateTime.utc_now() + } + else + _ -> + nil + end + end) + |> Enum.filter(&(!is_nil(&1))) + + if Enum.count(addresses_to_delete) > 0 do + delete_query_base = + from( + att in AddressToTag, + where: att.tag_id == ^tag_id + ) + + delete_query = + delete_query_base + |> where_addresses(addresses_to_delete) + + Repo.delete_all(delete_query) + end + + Repo.insert_all(AddressToTag, changeset_to_add_list, + on_conflict: :nothing, + conflict_target: [:address_hash, :tag_id] + ) + end + end + + defp where_addresses(query, addresses_to_delete) do + addresses_to_delete + |> Enum.reduce(query, fn address_hash_string, acc -> + case Chain.string_to_address_hash(address_hash_string) do + {:ok, address_hash} -> + acc + |> where(address_hash: ^address_hash) + + _ -> + acc + end + end) + end +end diff --git a/apps/explorer/lib/explorer/validator/metadata_retriever.ex b/apps/explorer/lib/explorer/validator/metadata_retriever.ex index 99fb83db799d..3a5d13eefad6 100644 --- a/apps/explorer/lib/explorer/validator/metadata_retriever.ex +++ b/apps/explorer/lib/explorer/validator/metadata_retriever.ex @@ -15,7 +15,7 @@ defmodule Explorer.Validator.MetadataRetriever do end) end - defp fetch_validators_list do + def fetch_validators_list do # b7ab4db5 = keccak256(getValidators()) case Reader.query_contract( config(:validators_contract_address), diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 8f27ecc6b734..8d607e2b351f 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -24,7 +24,8 @@ defmodule Explorer.Mixfile do dialyzer: :test ], start_permanent: Mix.env() == :prod, - version: "4.1.8" + version: "4.1.8", + xref: [exclude: [BlockScoutWeb.WebRouter.Helpers]] ] end @@ -56,6 +57,7 @@ defmodule Explorer.Mixfile do # Type `mix help deps` for examples and options. defp deps do [ + {:bamboo, "~> 2.2.0"}, {:bcrypt_elixir, "~> 3.0"}, # benchmark optimizations {:benchee, "~> 1.1.0", only: :test}, diff --git a/apps/explorer/priv/repo/migrations/20210219080523_add_tags.exs b/apps/explorer/priv/repo/migrations/20210219080523_add_tags.exs new file mode 100644 index 000000000000..79e83f808ce6 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20210219080523_add_tags.exs @@ -0,0 +1,24 @@ +defmodule Explorer.Repo.Migrations.AddTags do + use Ecto.Migration + + def change do + create table(:address_tags, primary_key: false) do + add(:id, :serial, null: false) + add(:label, :string, null: false) + + timestamps() + end + + create(unique_index(:address_tags, [:id])) + create(unique_index(:address_tags, [:label])) + + create table(:address_to_tags) do + add(:address_hash, references(:addresses, column: :hash, type: :bytea), null: false) + add(:tag_id, references(:address_tags, column: :id, type: :serial), null: false) + + timestamps() + end + + create(unique_index(:address_to_tags, [:address_hash, :tag_id])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs b/apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs new file mode 100644 index 000000000000..1da855996ac0 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs @@ -0,0 +1,13 @@ +defmodule Explorer.Repo.Migrations.CreateAccountIdentities do + use Ecto.Migration + + def change do + create table(:account_identities) do + add(:uid, :string) + + timestamps() + end + + create(unique_index(:account_identities, [:uid])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs b/apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs new file mode 100644 index 000000000000..58924200fea5 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs @@ -0,0 +1,14 @@ +defmodule Explorer.Repo.Migrations.CreateAccountWatchlists do + use Ecto.Migration + + def change do + create table(:account_watchlists) do + add(:name, :string, default: "default") + add(:identity_id, references(:account_identities, on_delete: :delete_all)) + + timestamps() + end + + create(index(:account_watchlists, [:identity_id])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs b/apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs new file mode 100644 index 000000000000..98f0aa9ac161 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs @@ -0,0 +1,28 @@ +defmodule Explorer.Repo.Migrations.CreateAccountWatchlistAddresses do + use Ecto.Migration + + def change do + create table(:account_watchlist_addresses) do + add(:name, :string) + add(:address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + add(:watchlist_id, references(:account_watchlists, on_delete: :delete_all)) + add(:watch_coin_input, :boolean, default: true) + add(:watch_coin_output, :boolean, default: true) + add(:watch_erc_20_input, :boolean, default: true) + add(:watch_erc_20_output, :boolean, default: true) + add(:watch_erc_721_input, :boolean, default: true) + add(:watch_erc_721_output, :boolean, default: true) + add(:watch_erc_1155_input, :boolean, default: true) + add(:watch_erc_1155_output, :boolean, default: true) + add(:notify_email, :boolean, default: true) + add(:notify_epns, :boolean, default: false) + add(:notify_feed, :boolean, default: true) + add(:notify_inapp, :boolean, default: false) + + timestamps() + end + + create(index(:account_watchlist_addresses, [:watchlist_id])) + create(index(:account_watchlist_addresses, [:address_hash])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs b/apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs new file mode 100644 index 000000000000..8310df5dfcf9 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs @@ -0,0 +1,31 @@ +defmodule Explorer.Repo.Migrations.CreateAccountWatchlistNotifications do + use Ecto.Migration + + def change do + create table(:account_watchlist_notifications) do + add(:watchlist_address_id, references(:account_watchlist_addresses, on_delete: :delete_all)) + + add(:transaction_hash, references(:transactions, column: :hash, type: :bytea, on_delete: :delete_all)) + + add(:from_address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + + add(:to_address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + + add(:direction, :string) + add(:name, :string) + add(:type, :string) + add(:method, :string) + add(:block_number, :integer) + add(:amount, :decimal) + add(:tx_fee, :decimal) + add(:viewed_at, :utc_datetime_usec) + + timestamps(null: false, type: :utc_datetime_usec) + end + + create(index(:account_watchlist_notifications, [:watchlist_address_id])) + create(index(:account_watchlist_notifications, [:transaction_hash])) + create(index(:account_watchlist_notifications, [:from_address_hash])) + create(index(:account_watchlist_notifications, [:to_address_hash])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs b/apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs new file mode 100644 index 000000000000..bf87606d6c4b --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs @@ -0,0 +1,10 @@ +defmodule Explorer.Repo.Migrations.AddEmailToAccountIdentity do + use Ecto.Migration + + def change do + alter table(:account_identities) do + add(:email, :string) + add(:name, :string) + end + end +end diff --git a/config/config.exs b/config/config.exs index ffdbc800322b..8ec1d3431278 100644 --- a/config/config.exs +++ b/config/config.exs @@ -35,7 +35,8 @@ config :logger, {LoggerFileBackend, :pending_transactions_to_refetch}, {LoggerFileBackend, :empty_blocks_to_refetch}, {LoggerFileBackend, :api}, - {LoggerFileBackend, :block_import_timings} + {LoggerFileBackend, :block_import_timings}, + {LoggerFileBackend, :account} ] config :logger, :console, diff --git a/config/dev.exs b/config/dev.exs index 21e6c9fd40f7..323212e107f7 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -8,3 +8,8 @@ config :logger, :ecto, path: Path.absname("logs/dev/ecto.log") config :logger, :error, path: Path.absname("logs/dev/error.log") + +config :logger, :account, + level: :debug, + path: Path.absname("logs/dev/account.log"), + metadata_filter: [fetcher: :account] diff --git a/config/prod.exs b/config/prod.exs index 2175810d041f..f2e802208007 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -12,3 +12,8 @@ config :logger, :ecto, config :logger, :error, path: Path.absname("logs/prod/error.log"), rotate: %{max_bytes: 52_428_800, keep: 19} + +config :logger, :account, + level: :info, + path: Path.absname("logs/prod/account.log"), + metadata_filter: [fetcher: :account] diff --git a/docker/Dockerfile b/docker/Dockerfile index b0a6f0591b82..7c2f68a62e86 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,7 +43,7 @@ ADD apps/explorer/mix.exs ./apps/explorer/ ADD apps/ethereum_jsonrpc/mix.exs ./apps/ethereum_jsonrpc/ ADD apps/indexer/mix.exs ./apps/indexer/ -RUN mix do deps.get, local.rebar --force, deps.compile +RUN HEX_HTTP_TIMEOUT=3600 mix do deps.get, local.rebar --force, deps.compile ADD . . diff --git a/docker/Makefile b/docker/Makefile index f16843d91e3b..b67174ad241a 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -67,6 +67,9 @@ endif ifdef COIN BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN=$(COIN)' endif +ifdef COIN_NAME + BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)' +endif ifdef METADATA_CONTRACT BLOCKSCOUT_CONTAINER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)' endif @@ -352,6 +355,31 @@ endif ifdef CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD=$(CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD)' endif +ifdef AUTH0_DOMAIN + BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_DOMAIN=$(AUTH0_DOMAIN)' +endif +ifdef AUTH0_CLIENT_ID + BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_CLIENT_ID=$(AUTH0_CLIENT_ID)' +endif +ifdef AUTH0_CLIENT_SECRET + BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_CLIENT_SECRET=$(AUTH0_CLIENT_SECRET)' +endif +ifdef AUTH0_CALLBACK_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_CALLBACK_URL=$(AUTH0_CALLBACK_URL)' +endif +ifdef AUTH0_LOGOUT_RETURN_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_LOGOUT_RETURN_URL=$(AUTH0_LOGOUT_RETURN_URL)' +endif +ifdef SENDGRID_API_KEY + BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_API_KEY)' +endif +ifdef SENDGRID_SENDER + BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_SENDER)' +endif +ifdef SENDGRID_TEMPLATE + BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_TEMPLATE)' +endif + ifdef API_RATE_LIMIT BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT=$(API_RATE_LIMIT)' endif diff --git a/mix.lock b/mix.lock index ebd7454167ae..082855811494 100644 --- a/mix.lock +++ b/mix.lock @@ -4,6 +4,7 @@ "absinthe_plug": {:git, "https://github.com/blockscout/absinthe_plug.git", "c435d43f316769e1beee1dbe500b623124c96785", [tag: "1.5.3"]}, "absinthe_relay": {:hex, :absinthe_relay, "1.5.2", "cfb8aed70f4e4c7718d3f1c212332d2ea728f17c7fc0f68f1e461f0f5f0c4b9a", [:mix], [{:absinthe, "~> 1.5.0 or ~> 1.6.0 or ~> 1.7.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "0587ee913afa31512e1457a5064ee88427f8fe7bcfbeeecd41c71d9cff0b62b6"}, "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, + "bamboo": {:hex, :bamboo, "2.2.0", "f10a406d2b7f5123eb1f02edfa043c259db04b47ab956041f279eaac776ef5ce", [:mix], [{:hackney, ">= 1.15.2", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.4", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "8c3b14ba7d2f40cb4be04128ed1e2aff06d91d9413d38bafb4afccffa3ade4fc"}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "3.0.1", "9be815469e6bfefec40fa74658ecbbe6897acfb57614df1416eeccd4903f602c", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "486bb95efb645d1efc6794c1ddd776a186a9a713abf06f45708a6ce324fb96cf"}, "benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"}, "benchee_csv": {:hex, :benchee_csv, "1.0.0", "0b3b9223290bfcb8003552705bec9bcf1a89b4a83b70bd686e45295c264f3d16", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:csv, "~> 2.0", [hex: :csv, repo: "hexpm", optional: false]}], "hexpm", "cdefb804c021dcf7a99199492026584be9b5a21d6644ac0d01c81c5d97c520d5"}, @@ -76,7 +77,7 @@ "meck": {:hex, :meck, "0.9.2", "85ccbab053f1db86c7ca240e9fc718170ee5bda03810a6292b5306bf31bae5f5", [:rebar3], [], "hexpm", "81344f561357dc40a8344afa53767c32669153355b626ea9fcbc8da6b3045826"}, "memento": {:hex, :memento, "0.3.2", "38cfc8ff9bcb1adff7cbd0f3b78a762636b86dff764729d1c82d0464c539bdd0", [:mix], [], "hexpm", "25cf691a98a0cb70262f4a7543c04bab24648cb2041d937eb64154a8d6f8012b"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, - "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, + "mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mimetype_parser": {:hex, :mimetype_parser, "0.1.3", "628ac9fe56aa7edcedb534d68397dd66674ab82493c8ebe39acb9a19b666099d", [:mix], [], "hexpm", "7d8f80c567807ce78cd93c938e7f4b0a20b1aaaaab914bf286f68457d9f7a852"}, "mix_erlang_tasks": {:hex, :mix_erlang_tasks, "0.1.0", "36819fec60b80689eb1380938675af215565a89320a9e29c72c70d97512e4649", [:mix], [], "hexpm", "95d2839c422c482a70c08a8702da8242f86b773f8ab6e8602a4eb72da8da04ed"}, @@ -88,6 +89,7 @@ "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "number": {:hex, :number, "1.0.3", "932c8a2d478a181c624138958ca88a78070332191b8061717270d939778c9857", [:mix], [{:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "dd397bbc096b2ca965a6a430126cc9cf7b9ef7421130def69bcf572232ca0f18"}, "numbers": {:hex, :numbers, "5.2.4", "f123d5bb7f6acc366f8f445e10a32bd403c8469bdbce8ce049e1f0972b607080", [:mix], [{:coerce, "~> 1.0", [hex: :coerce, repo: "hexpm", optional: false]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "eeccf5c61d5f4922198395bf87a465b6f980b8b862dd22d28198c5e6fab38582"}, + "oauth2": {:hex, :oauth2, "2.0.0", "338382079fe16c514420fa218b0903f8ad2d4bfc0ad0c9f988867dfa246731b0", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "881b8364ac7385f9fddc7949379cbe3f7081da37233a1aa7aab844670a91e7e7"}, "optimal": {:hex, :optimal, "0.3.6", "46bbf52fbbbd238cda81e02560caa84f93a53c75620f1fe19e81e4ae7b07d1dd", [:mix], [], "hexpm", "1a06ea6a653120226b35b283a1cd10039550f2c566edcdec22b29316d73640fd"}, "parallel_stream": {:hex, :parallel_stream, "1.0.6", "b967be2b23f0f6787fab7ed681b4c45a215a81481fb62b01a5b750fa8f30f76c", [:mix], [], "hexpm", "639b2e8749e11b87b9eb42f2ad325d161c170b39b288ac8d04c4f31f8f0823eb"}, "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, @@ -127,6 +129,8 @@ "timex": {:hex, :timex, "3.7.9", "790cdfc4acfce434e442f98c02ea6d84d0239073bfd668968f82ac63e9a6788d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "64691582e5bb87130f721fc709acfb70f24405833998fabf35be968984860ce1"}, "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, + "ueberauth": {:hex, :ueberauth, "0.7.0", "9c44f41798b5fa27f872561b6f7d2bb0f10f03fdd22b90f454232d7b087f4b75", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2efad9022e949834f16cc52cd935165049d81fa9e925690f91035c2e4b58d905"}, + "ueberauth_auth0": {:hex, :ueberauth_auth0, "2.0.0", "f3919834f1f473b39e423f2e90dfc1801929d319634e6649d9e198f4ccd46f3e", [:mix], [{:oauth2, "~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.7", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "7b7b8fd7f2f7314ab910e9327452e5c904296f0dbba227d02b445f25a334a012"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "wallaby": {:hex, :wallaby, "0.30.1", "81342a34080867ab359aca23de4d1d8c6bbdeb35d8ce2a8c42e42b758d539963", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "457251df6a94ff80816524136edbce6400cb1ee979586c90224ff634e9543d78"}, "web_driver_client": {:hex, :web_driver_client, "0.2.0", "63b76cd9eb3b0716ec5467a0f8bead73d3d9612e63f7560d21357f03ad86e31a", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:tesla, "~> 1.3", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "83cc6092bc3e74926d1c8455f0ce927d5d1d36707b74d9a65e38c084aab0350f"}, From df56a5fa6bd2eeb521d205717a6b4b586e1b1ebb Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sun, 13 Feb 2022 20:51:13 +0300 Subject: [PATCH 250/723] Style fixes --- .../account/watchlist_address_controller.ex | 8 +++---- .../models/add_watchlist_address.ex | 12 ++++------ .../models/update_watchlist_address.ex | 4 +--- .../block_scout_web/models/user_from_auth.ex | 22 ++++++++++--------- .../lib/explorer/accounts/notify/notifier.ex | 7 ++++-- .../lib/explorer/accounts/notify/summary.ex | 6 ++--- 6 files changed, 29 insertions(+), 30 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex index 619ed9294632..71d4d7afe4e9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_address_controller.ex @@ -42,7 +42,7 @@ defmodule BlockScoutWeb.Account.WatchlistAddressController do def edit(conn, %{"id" => id}) do authenticate!(conn) - case get_watchlist_address(conn, id) do + case get_watchlist_address!(conn, id) do nil -> conn |> put_status(404) @@ -60,7 +60,7 @@ defmodule BlockScoutWeb.Account.WatchlistAddressController do def update(conn, %{"id" => id, "watchlist_address_form" => wa_params}) do authenticate!(conn) - wla = get_watchlist_address(conn, id) + wla = get_watchlist_address!(conn, id) case UpdateWatchlistAddress.call(wla, wa_params) do {:ok, _watchlist_address} -> @@ -78,7 +78,7 @@ defmodule BlockScoutWeb.Account.WatchlistAddressController do def delete(conn, %{"id" => id}) do authenticate!(conn) - wla = get_watchlist_address(conn, id) + wla = get_watchlist_address!(conn, id) Repo.delete(wla) conn @@ -103,7 +103,7 @@ defmodule BlockScoutWeb.Account.WatchlistAddressController do |> Repo.preload(watchlist_addresses: :address) end - defp get_watchlist_address(conn, id) do + defp get_watchlist_address!(conn, id) do WatchlistAddress |> Repo.get_by(id: id, watchlist_id: authenticate!(conn).watchlist_id) |> Repo.preload(:address) diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex index eb18af447ef8..bef9b986da01 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex @@ -81,17 +81,13 @@ defmodule AddWatchlistAddress do end defp find_or_create_address(address_hash) do - case find_address(address_hash) do - {:ok, address} -> {:ok, address} - {:error, :address_not_found} -> create_address(address_hash) - end + with {:error, :address_not_found} <- find_address(address_hash), + do: create_address(address_hash) end defp create_address(address_hash) do - case Repo.insert(%Address{hash: address_hash}) do - {:ok, address} -> {:ok, address} - {:error, _} -> {:error, :wrong_address} - end + with {:error, _} <- Repo.insert(%Address{hash: address_hash}), + do: {:error, :wrong_address} end defp find_address(address_hash) do diff --git a/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex index c9b4ee92392e..faf894d8c8cf 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/update_watchlist_address.ex @@ -43,7 +43,5 @@ defmodule UpdateWatchlistAddress do defp to_bool("true"), do: true defp to_bool("false"), do: false - defp changeset(watchlist_address, attrs) do - Changeset.change(watchlist_address, attrs) - end + defdelegate changeset(watchlist_address, attrs), to: Changeset, as: :change end diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index 0f4f660ff50f..c1b239ccd566 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -88,16 +88,18 @@ defmodule UserFromAuth do defp nickname_from_auth(%{info: %{nickname: nickname}}), do: nickname - defp name_from_auth(%{info: %{name: name} = info}) do - if name do - name - else - [info.first_name, info.last_name] - |> Enum.filter(&(&1 != nil and &1 != "")) - |> case do - [] -> info.nickname - name -> Enum.join(name, " ") - end + defp name_from_auth(%{info: %{name: name}}) + when name != "" and not is_nil(name), + do: name + + defp name_from_auth(%{info: info}) do + [info.first_name, info.last_name, info.nickname] + |> Enum.map(&(&1 |> to_string() |> String.trim())) + |> case do + ["", "", nick] -> nick + ["", lastname, _] -> lastname + [name, "", _] -> name + [name, lastname, _] -> name <> " " <> lastname end end end diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex index 51ef53bfd4d1..856b772c32a2 100644 --- a/apps/explorer/lib/explorer/accounts/notify/notifier.ex +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -54,9 +54,12 @@ defmodule Explorer.Accounts.Notify.Notifier do defp notity_watchlist(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do with %WatchlistNotification{} = notification <- build_watchlist_notification(address, summary, direction) do - case Repo.all(query_notification(notification, address)) do + notification + |> query_notification(address) + |> Repo.all() + |> case do [] -> save_and_send_notification(notification, address) - _ -> nil + _ -> :ok end end end diff --git a/apps/explorer/lib/explorer/accounts/notify/summary.ex b/apps/explorer/lib/explorer/accounts/notify/summary.ex index 882d17dda35e..c882120b2ab9 100644 --- a/apps/explorer/lib/explorer/accounts/notify/summary.ex +++ b/apps/explorer/lib/explorer/accounts/notify/summary.ex @@ -60,9 +60,9 @@ defmodule Explorer.Accounts.Notify.Summary do Enum.map( transfers_list, fn transfer -> - summary = fetch_summary(transaction, transfer) - Logger.info(summary, fetcher: :account) - summary + transaction + |> fetch_summary(transfer) + |> tap(&Logger.info(&1, fetcher: :account)) end ) end From a1c1640bd68d8a84793d9a7f7d10f85debc2e7f1 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Tue, 22 Feb 2022 17:37:38 +0300 Subject: [PATCH 251/723] Add account to github action --- .github/workflows/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 6c13d064b539..e40313eb46aa 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,9 +4,12 @@ on: push: branches: - master + - account pull_request: branches: - master + - account + env: MIX_ENV: test From b706ac19bd583d29e0bac98b5d952555858e8fde Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Tue, 22 Feb 2022 18:08:06 +0300 Subject: [PATCH 252/723] Remove unused definition (dialyzer fix) --- apps/explorer/lib/explorer/accounts/notify/notifier.ex | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex index 856b772c32a2..fe9ee8fb7874 100644 --- a/apps/explorer/lib/explorer/accounts/notify/notifier.ex +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -93,8 +93,6 @@ defmodule Explorer.Accounts.Notify.Notifier do end end - defp save_and_send_notification(_, _), do: nil - @doc """ direction = :incoming || :outgoing """ From 4cf8976bdb558fbea0dbc10adca44d827bfea1a2 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Fri, 18 Mar 2022 00:06:19 +0300 Subject: [PATCH 253/723] Add this branch to actions --- .github/workflows/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index e40313eb46aa..ace214313490 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -5,6 +5,7 @@ on: branches: - master - account + - account-rebased pull_request: branches: - master From 69f9dcdd0f1a0bbd433ba3b7df92eb261d5312cc Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Thu, 17 Feb 2022 17:45:02 +0300 Subject: [PATCH 254/723] Create Address Tags and UI Add tags to controllers Get rid of private_tags Add address tags link into topnav Add model to get tags --- .../account/tag_address_controller.ex | 81 +++++++ .../address_coin_balance_controller.ex | 5 +- .../address_contract_controller.ex | 5 +- .../address_decompiled_contract_controller.ex | 5 +- ...address_internal_transaction_controller.ex | 5 +- .../controllers/address_logs_controller.ex | 5 +- .../address_read_contract_controller.ex | 5 +- .../address_read_proxy_controller.ex | 5 +- .../address_token_transfer_controller.ex | 9 +- .../address_transaction_controller.ex | 5 +- .../address_validation_controller.ex | 5 +- .../address_write_contract_controller.ex | 5 +- .../address_write_proxy_controller.ex | 5 +- .../controllers/tokens/contract_controller.ex | 5 +- .../controllers/tokens/holder_controller.ex | 5 +- .../controllers/tokens/transfer_controller.ex | 5 +- .../block_scout_web/models/add_tag_address.ex | 71 ++++++ .../models/get_address_tags.ex | 67 +++++ .../templates/account/auth/profile.html.eex | 3 + .../templates/account/common/_nav.html.eex | 13 + .../account/tag_address/index.html.eex | 38 +++ .../account/tag_address/new.html.eex | 41 ++++ .../account/tag_address/row.html.eex | 11 + .../templates/account/watchlist/show.html.eex | 11 +- .../account/watchlist_address/edit.html.eex | 12 +- .../account/watchlist_address/new.html.eex | 12 +- .../templates/address/_labels.html.eex | 18 +- .../templates/address/overview.html.eex | 3 +- .../address_coin_balance/index.html.eex | 4 +- .../templates/address_contract/index.html.eex | 48 ++-- .../index.html.eex | 4 +- .../index.html.eex | 4 +- .../templates/address_logs/index.html.eex | 4 +- .../address_read_contract/index.html.eex | 4 +- .../address_read_proxy/index.html.eex | 4 +- .../templates/address_token/index.html.eex | 4 +- .../address_token_transfer/index.html.eex | 4 +- .../address_transaction/index.html.eex | 4 +- .../address_validation/index.html.eex | 4 +- .../address_write_contract/index.html.eex | 4 +- .../address_write_proxy/index.html.eex | 4 +- .../templates/layout/_topnav.html.eex | 3 +- .../templates/tokens/contract/index.html.eex | 2 +- .../templates/tokens/holder/index.html.eex | 2 +- .../templates/tokens/inventory/index.html.eex | 2 +- .../tokens/overview/_details.html.eex | 3 +- .../templates/tokens/transfer/index.html.eex | 2 +- .../templates/transaction/_tile.html.eex | 4 +- .../templates/transaction/overview.html.eex | 4 +- .../views/account/common_view.ex | 3 + .../views/account/tag_address_view.ex | 7 + .../block_scout_web/views/transaction_view.ex | 1 - .../lib/block_scout_web/web_router.ex | 16 +- apps/block_scout_web/priv/gettext/default.pot | 228 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 228 +++++++++--------- .../lib/explorer/accounts/identity.ex | 3 +- .../lib/explorer/accounts/tag_address.ex | 32 +++ .../lib/explorer/exchange_rates/token.ex | 1 + .../lib/explorer/tags/address_to_tag.ex | 37 --- ...212222222_create_account_tag_addresses.exs | 20 ++ docker/Makefile | 4 +- 61 files changed, 722 insertions(+), 436 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/add_tag_address.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/common_view.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex create mode 100644 apps/explorer/lib/explorer/accounts/tag_address.ex create mode 100644 apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex new file mode 100644 index 000000000000..36557df4de20 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex @@ -0,0 +1,81 @@ +defmodule BlockScoutWeb.Account.TagAddressController do + use BlockScoutWeb, :controller + + alias BlockScoutWeb.Account.AuthController + alias Ecto.Changeset + alias Explorer.Accounts.TagAddress + alias Explorer.Repo + + import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + + def index(conn, _params) do + case AuthController.current_user(conn) do + nil -> + conn + # |> put_flash(:info, "Sign in to see address tags") + |> redirect(to: root()) + + %{} = user -> + render( + conn, + "index.html", + address_tags: address_tags(user) + ) + end + end + + def new(conn, _params) do + authenticate!(conn) + + render(conn, "new.html", new_tag: new_tag()) + end + + def create(conn, %{"tag_address" => params}) do + current_user = authenticate!(conn) + + case AddTagAddress.call(current_user.id, params) do + {:ok, _tag_address} -> + conn + # |> put_flash(:info, "Tag Address created!") + |> redirect(to: tag_address_path(conn, :index)) + + {:error, message = message} -> + conn + # |> put_flash(:error, message) + |> render("new.html", new_tag: changeset_with_error(params, message)) + end + end + + def delete(conn, %{"id" => id}) do + current_user = authenticate!(conn) + + TagAddress + |> Repo.get_by(id: id, identity_id: current_user.id) + |> Repo.delete() + + conn + # |> put_flash(:info, "Tag Address removed successfully.") + |> redirect(to: tag_address_path(conn, :index)) + end + + def address_tags(user) do + TagAddress + |> Repo.all(identity_id: user.id) + |> Repo.preload(:address) + end + + defp new_tag, do: TagAddress.changeset(%TagAddress{}, %{}) + + defp changeset_with_error(params, message) do + %{changeset(params) | action: :insert} + |> Changeset.add_error(:address_hash, message) + end + + defp changeset(params) do + TagAddress.changeset(%TagAddress{}, params) + end + + defp root do + System.get_env("NETWORK_PATH") || "/" + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex index 37bd5e625b9a..b0f0486b951a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex @@ -12,7 +12,6 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do alias Explorer.{Chain, Market} alias Explorer.Chain.{Address, Wei} alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -74,7 +73,7 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render(conn, "index.html", address: address, @@ -82,7 +81,7 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), current_path: Controller.current_full_path(conn), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex index 897e9247562e..7ddba6ea184b 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_contract_controller.ex @@ -7,7 +7,6 @@ defmodule BlockScoutWeb.AddressContractController do alias BlockScoutWeb.AddressContractVerificationController, as: VerificationController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -26,7 +25,7 @@ defmodule BlockScoutWeb.AddressContractController do _ <- VerificationController.check_and_verify(address_hash_string), {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -35,7 +34,7 @@ defmodule BlockScoutWeb.AddressContractController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex index 079f2d1cad7a..03a166cc296d 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_decompiled_contract_controller.ex @@ -5,7 +5,6 @@ defmodule BlockScoutWeb.AddressDecompiledContractController do alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -13,7 +12,7 @@ defmodule BlockScoutWeb.AddressDecompiledContractController do {:ok, address} <- Chain.find_decompiled_contract_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -22,7 +21,7 @@ defmodule BlockScoutWeb.AddressDecompiledContractController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex index 6ee8aa204698..404eef84d854 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_internal_transaction_controller.ex @@ -12,7 +12,6 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do alias Explorer.{Chain, Market} alias Explorer.Chain.{Address, Wei} alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -81,7 +80,7 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -92,7 +91,7 @@ defmodule BlockScoutWeb.AddressInternalTransactionController do exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), filter: params["filter"], counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex index 4563ab071e9b..5bf1189d46c1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_logs_controller.ex @@ -9,7 +9,6 @@ defmodule BlockScoutWeb.AddressLogsController do alias BlockScoutWeb.Account.AuthController alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -60,7 +59,7 @@ defmodule BlockScoutWeb.AddressLogsController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -70,7 +69,7 @@ defmodule BlockScoutWeb.AddressLogsController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), - private_tags: private_tags + tags: tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex index 01cc179b1bc2..174408b6f809 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_contract_controller.ex @@ -13,7 +13,6 @@ defmodule BlockScoutWeb.AddressReadContractController do alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -32,7 +31,7 @@ defmodule BlockScoutWeb.AddressReadContractController do false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -43,7 +42,7 @@ defmodule BlockScoutWeb.AddressReadContractController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex index ccdca47604e1..d8f5c404a7aa 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_read_proxy_controller.ex @@ -7,7 +7,6 @@ defmodule BlockScoutWeb.AddressReadProxyController do alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -26,7 +25,7 @@ defmodule BlockScoutWeb.AddressReadProxyController do false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -37,7 +36,7 @@ defmodule BlockScoutWeb.AddressReadProxyController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex index 7ef4f34aef89..60d5ff2637b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_token_transfer_controller.ex @@ -6,7 +6,6 @@ defmodule BlockScoutWeb.AddressTokenTransferController do alias Explorer.ExchangeRates.Token alias Explorer.{Chain, Market} alias Explorer.Chain.Address - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -104,7 +103,7 @@ defmodule BlockScoutWeb.AddressTokenTransferController do {:ok, token} <- Chain.token_from_address_hash(token_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -115,7 +114,7 @@ defmodule BlockScoutWeb.AddressTokenTransferController do current_path: Controller.current_full_path(conn), token: token, counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> @@ -199,7 +198,7 @@ defmodule BlockScoutWeb.AddressTokenTransferController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -210,7 +209,7 @@ defmodule BlockScoutWeb.AddressTokenTransferController do filter: params["filter"], current_path: Controller.current_full_path(conn), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex index f99c706ab1cf..71c4e7df1dac 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex @@ -9,7 +9,6 @@ defmodule BlockScoutWeb.AddressTransactionController do alias BlockScoutWeb.{AccessHelpers, Controller, TransactionView} alias BlockScoutWeb.Account.AuthController - alias Explorer.Tags.AddressToTag alias Explorer.{Chain, Market} alias Explorer.Chain.{ @@ -117,7 +116,7 @@ defmodule BlockScoutWeb.AddressTransactionController do {:ok, address} <- Chain.hash_to_address(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -128,7 +127,7 @@ defmodule BlockScoutWeb.AddressTransactionController do filter: params["filter"], counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), current_path: Controller.current_full_path(conn), - private_tags: private_tags + tags: tags ) else :error -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex index 092e7eed9b57..6fd97841c1ab 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_validation_controller.ex @@ -10,7 +10,6 @@ defmodule BlockScoutWeb.AddressValidationController do alias BlockScoutWeb.{AccessHelpers, BlockView, Controller} alias BlockScoutWeb.Account.AuthController alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Explorer.{Chain, Market} alias Indexer.Fetcher.CoinBalanceOnDemand alias Phoenix.View @@ -75,7 +74,7 @@ defmodule BlockScoutWeb.AddressValidationController do {:ok, address} <- Chain.find_or_insert_address_from_hash(address_hash), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -85,7 +84,7 @@ defmodule BlockScoutWeb.AddressValidationController do current_path: Controller.current_full_path(conn), counters_path: address_path(conn, :address_counters, %{"id" => address_hash_string}), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex index 8e4a6ec5414a..2b376a5d6ff9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_contract_controller.ex @@ -13,7 +13,6 @@ defmodule BlockScoutWeb.AddressWriteContractController do alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -32,7 +31,7 @@ defmodule BlockScoutWeb.AddressWriteContractController do false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -43,7 +42,7 @@ defmodule BlockScoutWeb.AddressWriteContractController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex index 24cbc3ab6ba2..6f3f1497cf74 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_write_proxy_controller.ex @@ -7,7 +7,6 @@ defmodule BlockScoutWeb.AddressWriteProxyController do alias Explorer.{Chain, Market} alias Explorer.Chain.Address alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.CoinBalanceOnDemand def index(conn, %{"address_id" => address_hash_string} = params) do @@ -26,7 +25,7 @@ defmodule BlockScoutWeb.AddressWriteProxyController do false <- is_nil(address.smart_contract), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -37,7 +36,7 @@ defmodule BlockScoutWeb.AddressWriteProxyController do coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else _ -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex index 6905ed83aa2e..a71d03af7133 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/contract_controller.ex @@ -5,7 +5,6 @@ defmodule BlockScoutWeb.Tokens.ContractController do alias BlockScoutWeb.{AccessHelpers, TabHelpers} alias Explorer.{Chain, Market} alias Explorer.Chain.Address - alias Explorer.Tags.AddressToTag def index(conn, %{"token_id" => address_hash_string} = params) do options = [necessity_by_association: %{[contract_address: :smart_contract] => :optional}] @@ -15,7 +14,7 @@ defmodule BlockScoutWeb.Tokens.ContractController do {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) %{type: type, action: action} = cond do @@ -39,7 +38,7 @@ defmodule BlockScoutWeb.Tokens.ContractController do action: action, token: Market.add_price(token), counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex index 51a5c3633528..0699cecf924f 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex @@ -6,7 +6,6 @@ defmodule BlockScoutWeb.Tokens.HolderController do alias BlockScoutWeb.Tokens.HolderView alias Explorer.{Chain, Market} alias Explorer.Chain.Address - alias Explorer.Tags.AddressToTag alias Phoenix.View import BlockScoutWeb.Chain, @@ -64,7 +63,7 @@ defmodule BlockScoutWeb.Tokens.HolderController do {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -72,7 +71,7 @@ defmodule BlockScoutWeb.Tokens.HolderController do current_path: Controller.current_full_path(conn), token: Market.add_price(token), counters_path: token_path(conn, :token_counters, %{"id" => Address.checksum(address_hash)}), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex index 22e5fabb945a..cc42b2af49ad 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex @@ -6,7 +6,6 @@ defmodule BlockScoutWeb.Tokens.TransferController do alias BlockScoutWeb.Tokens.TransferView alias Explorer.{Chain, Market} alias Explorer.Chain.Address - alias Explorer.Tags.AddressToTag alias Indexer.Fetcher.TokenTotalSupplyOnDemand alias Phoenix.View @@ -68,7 +67,7 @@ defmodule BlockScoutWeb.Tokens.TransferController do {:ok, token} <- Chain.token_from_address_hash(address_hash, options), {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do current_user = AuthController.current_user(conn) - private_tags = AddressToTag.get_private_tags_on_address(address_hash, current_user) + tags = GetAddressTags.call(address_hash, current_user) render( conn, @@ -77,7 +76,7 @@ defmodule BlockScoutWeb.Tokens.TransferController do current_path: Controller.current_full_path(conn), token: Market.add_price(token), token_total_supply_status: TokenTotalSupplyOnDemand.trigger_fetch(address_hash), - private_tags: private_tags + tags: tags ) else {:restricted_access, _} -> diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_tag_address.ex b/apps/block_scout_web/lib/block_scout_web/models/add_tag_address.ex new file mode 100644 index 000000000000..a30d3ea28ed6 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/add_tag_address.ex @@ -0,0 +1,71 @@ +defmodule AddTagAddress do + @moduledoc """ + Create tag address, associated with Address and Identity + """ + + alias Explorer.Accounts.TagAddress + alias Explorer.{Chain, Repo} + alias Explorer.Chain.Address + + def call(identity_id, %{"address_hash" => address_hash_string} = params) do + case format_address(address_hash_string) do + {:ok, address_hash} -> + try_create_tag_address(identity_id, address_hash, params) + + :error -> + {:error, "Wrong address, "} + end + end + + defp try_create_tag_address(identity_id, address_hash, params) do + case find_tag_address(identity_id, address_hash) do + %TagAddress{} -> + {:error, "Address tag already exists!"} + + nil -> + with {:ok, %Address{} = address} <- find_or_create_address(address_hash) do + address + |> build_tag_address(identity_id, params) + |> Repo.insert() + end + end + end + + defp format_address(address_hash_string) do + Chain.string_to_address_hash(address_hash_string) + end + + defp find_tag_address(identity_id, address_hash) do + Repo.get_by(TagAddress, + address_hash: address_hash, + identity_id: identity_id + ) + end + + defp find_or_create_address(address_hash) do + with {:error, :address_not_found} <- find_address(address_hash), + do: create_address(address_hash) + end + + defp create_address(address_hash) do + with {:error, _} <- Repo.insert(%Address{hash: address_hash}), + do: {:error, :wrong_address} + end + + defp find_address(address_hash) do + case Repo.get(Address, address_hash) do + nil -> {:error, :address_not_found} + %Address{} = address -> {:ok, address} + end + end + + defp build_tag_address(address, identity_id, %{"name" => name}) do + TagAddress.changeset( + %TagAddress{ + identity_id: identity_id, + address_hash: address.hash + }, + %{name: name} + ) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex new file mode 100644 index 000000000000..4d92a48fbb65 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex @@ -0,0 +1,67 @@ +defmodule GetAddressTags do + @moduledoc """ + Get various types of tags associated with the address + """ + + import Ecto.Query, only: [from: 2] + + alias Explorer.Accounts.{TagAddress, WatchlistAddress} + alias Explorer.Chain.Hash + alias Explorer.Repo + alias Explorer.Tags.{AddressTag, AddressToTag} + + def call(nil, nil), + do: %{personal_tags: [], watchlist_names: []} + + def call(%Hash{} = address_hash, current_user) do + %{ + # common_tags: get_tags_on_address(address_hash), + personal_tags: get_personal_tags(address_hash, current_user), + watchlist_names: get_watchlist_names_on_address(address_hash, current_user) + } + end + + def get_tags_on_address(%Hash{} = address_hash) do + query = + from( + tt in AddressTag, + left_join: att in AddressToTag, + on: tt.id == att.tag_id, + where: att.address_hash == ^address_hash, + where: tt.label != ^"validator", + select: %{label: tt.label, display_name: tt.display_name} + ) + + Repo.all(query) + end + + def get_tags_on_address(_), do: [] + + def get_personal_tags(%Hash{} = address_hash, %{id: id}) do + query = + from( + ta in TagAddress, + where: ta.address_hash == ^address_hash, + where: ta.identity_id == ^id, + select: %{label: ta.name, display_name: ta.name} + ) + + Repo.all(query) + end + + def get_personal_tags(_, _), do: [] + + def get_watchlist_names_on_address(%Hash{} = address_hash, %{watchlist_id: watchlist_id}) do + query = + from( + wa in WatchlistAddress, + where: wa.address_hash == ^address_hash, + where: wa.watchlist_id == ^watchlist_id, + select: %{label: wa.name, display_name: wa.name} + ) + + Repo.all(query) + end + + def get_watchlist_names_on_address(_, _), do: [] +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex index 9a96ccb99a45..6b8fda08d22d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/auth/profile.html.eex @@ -8,6 +8,9 @@ +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex new file mode 100644 index 000000000000..2bdfb55caedf --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex @@ -0,0 +1,13 @@ +
    + +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex new file mode 100644 index 000000000000..fdb44d163b16 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex @@ -0,0 +1,38 @@ +
    +
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> +
    +
    +
    +

    Address Tags

    +
    +
    +
    + <%= if @address_tags == [] do %> +
    +
    + You don't have address tags yet +
    +
    +

    + <% else %> + + + + + + + + + <%= Enum.map(@address_tags, fn at -> + render(TagAddressView, "row.html", address_tag: at, conn: @conn) + end) %> + +
    NameAddress
    + <% end %> +
    +
    + Add address tag +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex new file mode 100644 index 000000000000..50cc42a5f26e --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex @@ -0,0 +1,41 @@ +
    +
    +
    + +
    + +
    +
    +
    +

    Add address tag

    + +
    +
    +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex new file mode 100644 index 000000000000..6c934a08163f --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex @@ -0,0 +1,11 @@ + + <%= @address_tag.name %> + +
    + <%= link(trimmed_hash(@address_tag.address_hash), to: address_path(@conn, :show, @address_tag.address_hash)) %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @address_tag.address_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> + <%= link "Remove Tag", to: tag_address_path(@conn, :delete, @address_tag.id), method: :delete, class: "btn btn-danger white button-sm", style: "color: #fff !important;" %> +
    + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex index cbe08dab1841..ef5b9cdb4385 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex @@ -1,15 +1,6 @@
    -
    - -
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex index ba559e7b858f..fb5ddb3dd370 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/edit.html.eex @@ -1,16 +1,6 @@
    -
    - -
    - + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex index a0bbed09d8bc..e0f71ccb9eb8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/new.html.eex @@ -1,16 +1,6 @@
    -
    - -
    - + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex index 5f54dc9b0eaf..d14d3fe7ea55 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex @@ -1,8 +1,14 @@ -<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> -<%= for private_tag <- private_tags do %> - <%= if private_tag.label =~ "dark forest" do %> - <%= render BlockScoutWeb.FormView, "_tag.html", text: private_tag.display_name, additional_classes: ["df", "ml-1"] %> +<%= for personal_tag <- @tags.personal_tags do %> + <%= if personal_tag.label =~ "dark forest" do %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: ["df", "ml-1"] %> <% else %> - <%= render BlockScoutWeb.FormView, "_tag.html", text: private_tag.display_name, additional_classes: [tag_name_to_label(private_tag.label), "ml-1"] %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: [tag_name_to_label(personal_tag.label), "ml-1"] %> <% end %> -<% end %> \ No newline at end of file +<% end %> +<%= for watchlist_name <- @tags.watchlist_names do %> + <%= if watchlist_name.label =~ "dark forest" do %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: watchlist_name.display_name, additional_classes: ["df", "ml-1"] %> + <% else %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: watchlist_name.display_name, additional_classes: [tag_name_to_label(watchlist_name.label), "ml-1"] %> + <% end %> +<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex index 5d30346e150e..28a1920d02b0 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex @@ -5,7 +5,6 @@ <% circles_addresses_list = CustomContractsHelpers.get_custom_addresses_list(:circles_addresses) %> <% current_address = "0x" <> Base.encode16(@address.hash.bytes, case: :lower) %> <% created_from_address_hash = if from_address_hash(@address), do: "0x" <> Base.encode16(from_address_hash(@address).bytes, case: :lower), else: nil %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %>
    @@ -29,7 +28,7 @@ <% end %>

    <%= address_title(@address) %> <%= gettext "Details" %>
    - <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @address.hash, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @address.hash, tags: @tags %> <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index 6238d89d4cd4..9292206e045b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -3,9 +3,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 21af497ee5b1..f3b11b67071f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -8,9 +8,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> @@ -157,20 +155,14 @@ - <%= if match?({:selfdestructed, _}, contract_creation_code) do %> -
    - <%= gettext("Verify & Publish") %> -
    - <% else %> - <%= if !fully_verified do %> - <% path = address_verify_contract_path(@conn, :new, @address.hash) %> - <%= link( - gettext("Verify & Publish"), - to: path, - class: "button button-primary button-sm float-right ml-3", - "data-test": "verify_and_publish" - ) %> - <% end %> + <%= if !fully_verified do %> + <% path = address_verify_contract_path(@conn, :new, @address.hash) %> + <%= link( + gettext("Verify & Publish"), + to: path, + class: "button button-primary button-sm float-right ml-3", + "data-test": "verify_and_publish" + ) %> <% end %>
    @@ -194,20 +186,14 @@ - <%= if match?({:selfdestructed, _}, contract_creation_code) and !creation_code(@address) do %> -
    - <%= gettext("Verify & Publish") %> -
    - <% else %> - <%= if !fully_verified and !creation_code(@address) do %> - <% path = address_verify_contract_path(@conn, :new, @address.hash) %> - <%= link( - gettext("Verify & Publish"), - to: path, - class: "button button-primary button-sm float-right ml-3", - "data-test": "verify_and_publish" - ) %> - <% end %> + <%= if !fully_verified and !creation_code(@address) do %> + <% path = address_verify_contract_path(@conn, :new, @address.hash) %> + <%= link( + gettext("Verify & Publish"), + to: path, + class: "button button-primary button-sm float-right ml-3", + "data-test": "verify_and_publish" + ) %> <% end %>

    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex index 5a8b6e319098..18abbbcdfdcd 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> <% contract = last_decompiled_contract_version(@address.decompiled_smart_contracts) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index 7c46cfc0297a..feb70111791c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex index 9fb3f6db32da..5cb430a48d3a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex index c6bf965021f8..a3577a7cb925 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex @@ -2,9 +2,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex index c6bf965021f8..a3577a7cb925 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex @@ -2,9 +2,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex index 8c6335c8e1a3..1fd811570f6b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex index 8640128273ec..94f202d1c359 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index 493e93fbd663..a5b57868439b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -2,9 +2,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex index ea3253bbeb5c..e435195fe3b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex @@ -1,9 +1,7 @@
    <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex index c6bf965021f8..a3577a7cb925 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex @@ -2,9 +2,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex index c6bf965021f8..a3577a7cb925 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex @@ -2,9 +2,7 @@ <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> - <% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> - - <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path, tags: @tags %>
    <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 85abbe0c4c38..9fa05a90fbf8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -185,6 +185,7 @@
    Profile Watch list + Address Tags Sign out
    @@ -203,4 +204,4 @@
    <%= render BlockScoutWeb.LayoutView, "_search.html", conn: @conn, id: "main-search-autocomplete-mobile", additional_classes: ["mobile-search-show"] %> - \ No newline at end of file + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex index 0edb2873da1b..99bb26342d7a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/index.html.eex @@ -4,7 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, - private_tags: (if assigns[:private_tags], do: @private_tags, else: []), + tags: @tags, conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex index 9a8fe21a394f..9d78dcc4e043 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex @@ -4,7 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, - private_tags: (if assigns[:private_tags], do: @private_tags, else: []), + tags: @tags, conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex index 76266bd77b89..e41c420c3d4b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex @@ -4,7 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, - private_tags: (if assigns[:private_tags], do: @private_tags, else: []), + tags: @tags, conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex index fcf9a531df2b..86470ae594d8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex @@ -2,7 +2,6 @@ <% address_hash_str = "0x" <> Base.encode16(@token.contract_address_hash.bytes, case: :lower) %> <% {:ok, created_from_address} = if @token.contract_address_hash, do: Chain.hash_to_address(@token.contract_address_hash), else: {:ok, nil} %> <% created_from_address_hash = if from_address_hash(created_from_address), do: "0x" <> Base.encode16(from_address_hash(created_from_address).bytes, case: :lower), else: nil %> -<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %>
    <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
    @@ -34,7 +33,7 @@ <% else %> <%= gettext("Token Details") %> <% end %> - <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @token.contract_address_hash, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @token.contract_address_hash, tags: @tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex index af888b926eb1..5ea6121e395c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex @@ -4,7 +4,7 @@ "_details.html", token: @token, counters_path: @counters_path, - private_tags: (if assigns[:private_tags], do: @private_tags, else: []), + tags: @tags, conn: @conn ) %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex index eca2e870b3d5..95b59d1394d4 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex @@ -1,7 +1,7 @@ <% status = transaction_status(@transaction) %> <% error_in_internal_tx = @transaction.has_error_in_internal_txs %> <% current_user = AuthController.current_user(@conn) %> -<% private_tags = AddressToTag.get_private_tags_on_address(@transaction.to_address_hash, current_user) %> +<% tags = GetAddressTags.call(@transaction.to_address_hash, current_user) %>
    @@ -33,7 +33,7 @@ <%= if method_name do %> <%= render BlockScoutWeb.FormView, "_tag.html", text: method_name, additional_classes: ["method", "ml-1"] %> <% end %> - <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, height_auto: true, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, height_auto: true, tags: tags %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index b5c8d480caf5..f76c6ae11e21 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -26,7 +26,7 @@ <% address_hash_str = if to_address_hash, do: "0x" <> Base.encode16(to_address_hash.bytes, case: :lower), else: nil %> <% {:ok, created_from_address} = if to_address_hash, do: Chain.hash_to_address(to_address_hash), else: {:ok, nil} %> <% created_from_address_hash_str = if from_address_hash(created_from_address), do: "0x" <> Base.encode16(from_address_hash(created_from_address).bytes, case: :lower), else: nil %> -<% private_tags = if assigns[:private_tags], do: @private_tags, else: [] %> +<% tags = if assigns[:tags], do: @tags, else: %{common_tags: [], personal_tags: [], watchlist_names: []} %> <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
    @@ -50,7 +50,7 @@
    <%= gettext "Transaction Details" %>
    - <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, private_tags: private_tags %> + <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, tags: tags %> <%= if status == :pending do %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/common_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/common_view.ex new file mode 100644 index 000000000000..426e82b03b25 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/common_view.ex @@ -0,0 +1,3 @@ +defmodule BlockScoutWeb.Account.CommonView do + use BlockScoutWeb, :view +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex new file mode 100644 index 000000000000..2fb4a7aec6ee --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex @@ -0,0 +1,7 @@ +defmodule BlockScoutWeb.Account.TagAddressView do + use BlockScoutWeb, :view + + import BlockScoutWeb.AddressView, only: [trimmed_hash: 1] + + alias BlockScoutWeb.Account.TagAddressView +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index c16b3b8676bc..40eaf3826df4 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -9,7 +9,6 @@ defmodule BlockScoutWeb.TransactionView do alias Explorer.Chain.{Address, Block, InternalTransaction, Transaction, Wei} alias Explorer.Counters.AverageBlockTime alias Explorer.ExchangeRates.Token - alias Explorer.Tags.AddressToTag alias Timex.Duration import BlockScoutWeb.Gettext diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 828639071456..d47b6c69327a 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -30,7 +30,16 @@ defmodule BlockScoutWeb.WebRouter do scope "/account", BlockScoutWeb do pipe_through(:browser) - resources("/watchlist", Account.WatchlistController, only: [:show], singleton: true, as: :watchlist) + resources("/tag_address", Account.TagAddressController, + only: [:index, :new, :create, :edit, :update, :delete], + as: :tag_address + ) + + resources("/watchlist", Account.WatchlistController, + only: [:show], + singleton: true, + as: :watchlist + ) resources("/watchlist_address", Account.WatchlistAddressController, only: [:new, :create, :edit, :update, :delete], @@ -65,7 +74,10 @@ defmodule BlockScoutWeb.WebRouter do resources("/blocks", BlockController, as: :blocks, only: [:index]) - resources "/blocks", BlockController, as: :block_secondary, only: [:show], param: "hash_or_number" do + resources "/blocks", BlockController, + as: :block_secondary, + only: [:show], + param: "hash_or_number" do resources("/transactions", BlockTransactionController, only: [:index], as: :transaction) end diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index e0e4544d124f..aa1022d372fb 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -63,7 +63,7 @@ msgstr "" msgid "%{subnetwork} Explorer - BlockScout" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:351 +#: lib/block_scout_web/views/transaction_view.ex:350 #, elixir-autogen, elixir-format msgid "(Awaiting internal transactions for status)" msgstr "" @@ -189,7 +189,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -241,7 +241,7 @@ msgstr "" msgid "Balance" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Balances" msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Block Mined, awaiting import..." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:35 +#: lib/block_scout_web/views/transaction_view.ex:34 #, elixir-autogen, elixir-format msgid "Block Pending" msgstr "" @@ -441,12 +441,12 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:67 +#: lib/block_scout_web/templates/address_contract/index.html.eex:65 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:344 +#: lib/block_scout_web/views/transaction_view.ex:343 #, elixir-autogen, elixir-format msgid "Confirmed" msgstr "" @@ -472,30 +472,30 @@ msgstr "" msgid "Connection Lost" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 #: lib/block_scout_web/templates/block/index.html.eex:5 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer blocks" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer internal transactions" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 #: lib/block_scout_web/templates/transaction/index.html.eex:22 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer transactions" msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:12 +#: lib/block_scout_web/templates/address_validation/index.html.eex:10 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:92 +#: lib/block_scout_web/templates/address_contract/index.html.eex:90 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" @@ -506,7 +506,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:124 +#: lib/block_scout_web/templates/address_contract/index.html.eex:122 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -524,18 +524,18 @@ msgstr "" msgid "Contract Address Pending" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:459 +#: lib/block_scout_web/views/transaction_view.ex:458 #, elixir-autogen, elixir-format msgid "Contract Call" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:456 +#: lib/block_scout_web/views/transaction_view.ex:455 #, elixir-autogen, elixir-format msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:155 +#: lib/block_scout_web/templates/address_contract/index.html.eex:138 +#: lib/block_scout_web/templates/address_contract/index.html.eex:153 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -546,29 +546,29 @@ msgstr "" msgid "Contract Libraries" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:76 +#: lib/block_scout_web/templates/address/overview.html.eex:75 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_name_field.html.eex:3 #, elixir-autogen, elixir-format msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:25 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:59 +#: lib/block_scout_web/templates/address_contract/index.html.eex:57 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 +#: lib/block_scout_web/templates/address_contract/index.html.eex:100 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:146 +#: lib/block_scout_web/templates/address_contract/index.html.eex:144 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -578,35 +578,37 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:126 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 +#: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 -#: lib/block_scout_web/templates/address/overview.html.eex:40 #: lib/block_scout_web/templates/block/overview.html.eex:104 #: lib/block_scout_web/templates/block/overview.html.eex:105 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:43 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:44 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:45 #, elixir-autogen, elixir-format msgid "Copy Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:142 -#: lib/block_scout_web/templates/address_contract/index.html.eex:158 +#: lib/block_scout_web/templates/address_contract/index.html.eex:140 +#: lib/block_scout_web/templates/address_contract/index.html.eex:156 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:21 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 #, elixir-autogen, elixir-format msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:185 -#: lib/block_scout_web/templates/address_contract/index.html.eex:195 +#: lib/block_scout_web/templates/address_contract/index.html.eex:177 +#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -642,8 +644,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:104 -#: lib/block_scout_web/templates/address_contract/index.html.eex:115 +#: lib/block_scout_web/templates/address_contract/index.html.eex:102 +#: lib/block_scout_web/templates/address_contract/index.html.eex:113 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -703,7 +705,7 @@ msgstr "" msgid "Create2" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:103 +#: lib/block_scout_web/templates/address/overview.html.eex:102 #, elixir-autogen, elixir-format msgid "Creator" msgstr "" @@ -743,7 +745,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:132 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #, elixir-autogen, elixir-format msgid "Decimals" msgstr "" @@ -769,12 +771,12 @@ msgstr "" msgid "Decompiled code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Decompiled contract code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 #, elixir-autogen, elixir-format msgid "Decompiler version" msgstr "" @@ -784,8 +786,8 @@ msgstr "" msgid "Delegate Call" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #: lib/block_scout_web/templates/address_contract/index.html.eex:183 -#: lib/block_scout_web/templates/address_contract/index.html.eex:191 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -798,7 +800,7 @@ msgstr "" msgid "Description" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:31 +#: lib/block_scout_web/templates/address/overview.html.eex:30 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127 #, elixir-autogen, elixir-format @@ -810,7 +812,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:145 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -845,17 +847,17 @@ msgstr "" msgid "EIP-1167" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:216 +#: lib/block_scout_web/views/transaction_view.ex:215 #, elixir-autogen, elixir-format msgid "ERC-1155 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:214 +#: lib/block_scout_web/views/transaction_view.ex:213 #, elixir-autogen, elixir-format msgid "ERC-20 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:215 +#: lib/block_scout_web/views/transaction_view.ex:214 #, elixir-autogen, elixir-format msgid "ERC-721 " msgstr "" @@ -873,7 +875,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:78 +#: lib/block_scout_web/templates/address_contract/index.html.eex:76 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -926,17 +928,17 @@ msgstr "" msgid "Error trying to fetch balances." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:355 +#: lib/block_scout_web/views/transaction_view.ex:354 #, elixir-autogen, elixir-format msgid "Error: %{reason}" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:353 +#: lib/block_scout_web/views/transaction_view.ex:352 #, elixir-autogen, elixir-format msgid "Error: (Awaiting internal transactions for reason)" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:120 +#: lib/block_scout_web/templates/address/overview.html.eex:119 #, elixir-autogen, elixir-format msgid "Error: Could not determine contract creator." msgstr "" @@ -946,8 +948,8 @@ msgstr "" msgid "Eth RPC" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:37 -#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:35 +#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:27 +#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:25 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 @@ -986,7 +988,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:226 +#: lib/block_scout_web/templates/address_contract/index.html.eex:212 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1012,7 +1014,7 @@ msgstr "" msgid "Fetching gas used..." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:113 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:112 #, elixir-autogen, elixir-format msgid "Fetching holders..." msgstr "" @@ -1143,7 +1145,7 @@ msgstr "" msgid "Hex (Default)" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #, elixir-autogen, elixir-format msgid "Holders" msgstr "" @@ -1220,11 +1222,11 @@ msgid "Internal Transaction" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:361 -#: lib/block_scout_web/views/transaction_view.ex:514 +#: lib/block_scout_web/views/transaction_view.ex:513 #, elixir-autogen, elixir-format msgid "Internal Transactions" msgstr "" @@ -1296,7 +1298,7 @@ msgstr "" msgid "List of token transferred in the transaction." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:20 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 #, elixir-autogen, elixir-format msgid "Loading chart..." msgstr "" @@ -1307,10 +1309,10 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:133 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:49 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:45 -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:12 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:12 #: lib/block_scout_web/templates/tokens/contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Loading..." @@ -1327,11 +1329,11 @@ msgid "Log Index" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:12 +#: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:372 -#: lib/block_scout_web/views/transaction_view.ex:515 +#: lib/block_scout_web/views/transaction_view.ex:514 #, elixir-autogen, elixir-format msgid "Logs" msgstr "" @@ -1343,7 +1345,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:46 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:85 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #: lib/block_scout_web/views/address_view.ex:142 #, elixir-autogen, elixir-format msgid "Market Cap" @@ -1359,7 +1361,7 @@ msgstr "" msgid "Max Priority Fee per Gas" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:321 +#: lib/block_scout_web/views/transaction_view.ex:320 #, elixir-autogen, elixir-format msgid "Max of" msgstr "" @@ -1419,12 +1421,12 @@ msgstr "" msgid "Module" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:14 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 #, elixir-autogen, elixir-format msgid "More internal transactions have come in" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:46 #: lib/block_scout_web/templates/chain/show.html.eex:216 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction/index.html.eex:19 @@ -1502,7 +1504,7 @@ msgstr "" msgid "Not unique Token" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 #, elixir-autogen, elixir-format msgid "Number of accounts holding the token" msgstr "" @@ -1512,7 +1514,7 @@ msgstr "" msgid "Number of blocks validated by this validator." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 #, elixir-autogen, elixir-format msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" @@ -1522,7 +1524,7 @@ msgstr "" msgid "Number of transactions related to this address." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #, elixir-autogen, elixir-format msgid "Number of transfers for the token" msgstr "" @@ -1543,12 +1545,12 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:63 +#: lib/block_scout_web/templates/address_contract/index.html.eex:61 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:72 +#: lib/block_scout_web/templates/address_contract/index.html.eex:70 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:58 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -1628,12 +1630,12 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/layout/app.html.eex:47 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #, elixir-autogen, elixir-format msgid "Price" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 #, elixir-autogen, elixir-format msgid "Price per token on the exchanges" msgstr "" @@ -1678,7 +1680,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:516 +#: lib/block_scout_web/views/transaction_view.ex:515 #, elixir-autogen, elixir-format msgid "Raw Trace" msgstr "" @@ -1751,7 +1753,7 @@ msgstr "" msgid "Run" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:18 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format msgid "Search" @@ -1897,7 +1899,7 @@ msgid "Submit an Issue" msgstr "" #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 -#: lib/block_scout_web/views/transaction_view.ex:352 +#: lib/block_scout_web/views/transaction_view.ex:351 #, elixir-autogen, elixir-format msgid "Success" msgstr "" @@ -1938,12 +1940,12 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:75 +#: lib/block_scout_web/templates/address/overview.html.eex:74 #, elixir-autogen, elixir-format msgid "The name found in the source code of the Contract." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:86 +#: lib/block_scout_web/templates/address/overview.html.eex:85 #, elixir-autogen, elixir-format msgid "The name of the validator." msgstr "" @@ -1968,7 +1970,7 @@ msgstr "" msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 #, elixir-autogen, elixir-format msgid "The total amount of tokens issued" msgstr "" @@ -1978,7 +1980,7 @@ msgstr "" msgid "The total gas amount used in the block and its percentage of gas filled in the block." msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:18 +#: lib/block_scout_web/templates/address_validation/index.html.eex:16 #, elixir-autogen, elixir-format msgid "There are no blocks validated by this address." msgstr "" @@ -1993,7 +1995,7 @@ msgstr "" msgid "There are no holders for this Token." msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 #, elixir-autogen, elixir-format msgid "There are no internal transactions for this address." msgstr "" @@ -2003,7 +2005,7 @@ msgstr "" msgid "There are no internal transactions for this transaction." msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:30 +#: lib/block_scout_web/templates/address_logs/index.html.eex:28 #, elixir-autogen, elixir-format msgid "There are no logs for this address." msgstr "" @@ -2018,7 +2020,7 @@ msgstr "" msgid "There are no pending transactions." msgstr "" -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:55 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 #, elixir-autogen, elixir-format msgid "There are no token transfers for this address." msgstr "" @@ -2028,7 +2030,7 @@ msgstr "" msgid "There are no token transfers for this transaction" msgstr "" -#: lib/block_scout_web/templates/address_token/index.html.eex:67 +#: lib/block_scout_web/templates/address_token/index.html.eex:65 #, elixir-autogen, elixir-format msgid "There are no tokens for this address." msgstr "" @@ -2038,7 +2040,7 @@ msgstr "" msgid "There are no tokens." msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:57 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 #, elixir-autogen, elixir-format msgid "There are no transactions for this address." msgstr "" @@ -2060,17 +2062,17 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:37 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "There is no decompilded contracts for this address." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:23 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:21 #: lib/block_scout_web/templates/chain/show.html.eex:9 #, elixir-autogen, elixir-format msgid "There was a problem loading the chart." @@ -2091,12 +2093,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:43 +#: lib/block_scout_web/templates/address_contract/index.html.eex:41 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:47 +#: lib/block_scout_web/templates/address_contract/index.html.eex:45 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2145,25 +2147,25 @@ msgstr "" msgid "Toggle navigation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:56 +#: lib/block_scout_web/templates/address/overview.html.eex:55 #, elixir-autogen, elixir-format msgid "Token" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:3 -#: lib/block_scout_web/views/transaction_view.ex:450 +#: lib/block_scout_web/views/transaction_view.ex:449 #, elixir-autogen, elixir-format msgid "Token Burning" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:451 +#: lib/block_scout_web/views/transaction_view.ex:450 #, elixir-autogen, elixir-format msgid "Token Creation" msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:10 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:35 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:34 #, elixir-autogen, elixir-format msgid "Token Details" msgstr "" @@ -2185,20 +2187,20 @@ msgid "Token ID" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:5 -#: lib/block_scout_web/views/transaction_view.ex:449 +#: lib/block_scout_web/views/transaction_view.ex:448 #, elixir-autogen, elixir-format msgid "Token Minting" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:9 #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:11 -#: lib/block_scout_web/views/transaction_view.ex:452 +#: lib/block_scout_web/views/transaction_view.ex:451 #, elixir-autogen, elixir-format msgid "Token Transfer" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:21 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:5 @@ -2208,17 +2210,17 @@ msgstr "" #: lib/block_scout_web/views/address_view.ex:363 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:195 #: lib/block_scout_web/views/tokens/overview_view.ex:39 -#: lib/block_scout_web/views/transaction_view.ex:513 +#: lib/block_scout_web/views/transaction_view.ex:512 #, elixir-autogen, elixir-format msgid "Token Transfers" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:55 +#: lib/block_scout_web/templates/address/overview.html.eex:54 #, elixir-autogen, elixir-format msgid "Token name and symbol." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #, elixir-autogen, elixir-format msgid "Token type" msgstr "" @@ -2259,7 +2261,7 @@ msgstr "" msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:16 +#: lib/block_scout_web/templates/address_logs/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Topic" msgstr "" @@ -2275,7 +2277,7 @@ msgstr "" msgid "Total Difficulty" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 #, elixir-autogen, elixir-format msgid "Total Supply * Price" msgstr "" @@ -2295,7 +2297,7 @@ msgstr "" msgid "Total gas limit provided by all transactions in the block." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:70 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #, elixir-autogen, elixir-format msgid "Total supply" msgstr "" @@ -2311,7 +2313,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 -#: lib/block_scout_web/views/transaction_view.ex:462 +#: lib/block_scout_web/views/transaction_view.ex:461 #, elixir-autogen, elixir-format msgid "Transaction" msgstr "" @@ -2381,7 +2383,7 @@ msgstr "" msgid "Transactions" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:102 +#: lib/block_scout_web/templates/address/overview.html.eex:101 #, elixir-autogen, elixir-format msgid "Transactions and address of creation." msgstr "" @@ -2395,7 +2397,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:237 #: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format msgid "Transfers" msgstr "" @@ -2422,7 +2424,7 @@ msgstr "" msgid "Type" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 #, elixir-autogen, elixir-format msgid "Type of the token standard" msgstr "" @@ -2443,7 +2445,7 @@ msgstr "" msgid "Uncles" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:343 +#: lib/block_scout_web/views/transaction_view.ex:342 #, elixir-autogen, elixir-format msgid "Unconfirmed" msgstr "" @@ -2493,7 +2495,7 @@ msgstr "" msgid "Validator Data" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:87 +#: lib/block_scout_web/templates/address/overview.html.eex:86 #, elixir-autogen, elixir-format msgid "Validator Name" msgstr "" @@ -2508,17 +2510,15 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:84 +#: lib/block_scout_web/templates/address_contract/index.html.eex:82 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:31 -#: lib/block_scout_web/templates/address_contract/index.html.eex:162 -#: lib/block_scout_web/templates/address_contract/index.html.eex:168 -#: lib/block_scout_web/templates/address_contract/index.html.eex:199 -#: lib/block_scout_web/templates/address_contract/index.html.eex:205 +#: lib/block_scout_web/templates/address_contract/index.html.eex:161 +#: lib/block_scout_web/templates/address_contract/index.html.eex:192 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -2673,7 +2673,7 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:112 +#: lib/block_scout_web/templates/address/overview.html.eex:111 #, elixir-autogen, elixir-format msgid "at" msgstr "" @@ -2693,7 +2693,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #, elixir-autogen, elixir-format msgid "button" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 7a6e5214efa3..97ab1a8cb90c 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -63,7 +63,7 @@ msgstr "" msgid "%{subnetwork} Explorer - BlockScout" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:351 +#: lib/block_scout_web/views/transaction_view.ex:350 #, elixir-autogen, elixir-format msgid "(Awaiting internal transactions for status)" msgstr "" @@ -189,7 +189,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -241,7 +241,7 @@ msgstr "" msgid "Balance" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Balances" msgstr "" @@ -296,7 +296,7 @@ msgstr "" msgid "Block Mined, awaiting import..." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:35 +#: lib/block_scout_web/views/transaction_view.ex:34 #, elixir-autogen, elixir-format msgid "Block Pending" msgstr "" @@ -441,12 +441,12 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:67 +#: lib/block_scout_web/templates/address_contract/index.html.eex:65 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:344 +#: lib/block_scout_web/views/transaction_view.ex:343 #, elixir-autogen, elixir-format msgid "Confirmed" msgstr "" @@ -472,30 +472,30 @@ msgstr "" msgid "Connection Lost" msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 #: lib/block_scout_web/templates/block/index.html.eex:5 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer blocks" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer internal transactions" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:16 #: lib/block_scout_web/templates/transaction/index.html.eex:22 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer transactions" msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:12 +#: lib/block_scout_web/templates/address_validation/index.html.eex:10 #, elixir-autogen, elixir-format msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:92 +#: lib/block_scout_web/templates/address_contract/index.html.eex:90 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" @@ -506,7 +506,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:124 +#: lib/block_scout_web/templates/address_contract/index.html.eex:122 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -524,18 +524,18 @@ msgstr "" msgid "Contract Address Pending" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:459 +#: lib/block_scout_web/views/transaction_view.ex:458 #, elixir-autogen, elixir-format msgid "Contract Call" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:456 +#: lib/block_scout_web/views/transaction_view.ex:455 #, elixir-autogen, elixir-format msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:155 +#: lib/block_scout_web/templates/address_contract/index.html.eex:138 +#: lib/block_scout_web/templates/address_contract/index.html.eex:153 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -546,29 +546,29 @@ msgstr "" msgid "Contract Libraries" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:76 +#: lib/block_scout_web/templates/address/overview.html.eex:75 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_name_field.html.eex:3 #, elixir-autogen, elixir-format msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:25 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:59 +#: lib/block_scout_web/templates/address_contract/index.html.eex:57 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 +#: lib/block_scout_web/templates/address_contract/index.html.eex:100 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:146 +#: lib/block_scout_web/templates/address_contract/index.html.eex:144 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -578,35 +578,37 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:126 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 +#: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 -#: lib/block_scout_web/templates/address/overview.html.eex:40 #: lib/block_scout_web/templates/block/overview.html.eex:104 #: lib/block_scout_web/templates/block/overview.html.eex:105 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:43 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:44 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:45 #, elixir-autogen, elixir-format msgid "Copy Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:142 -#: lib/block_scout_web/templates/address_contract/index.html.eex:158 +#: lib/block_scout_web/templates/address_contract/index.html.eex:140 +#: lib/block_scout_web/templates/address_contract/index.html.eex:156 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:21 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 #, elixir-autogen, elixir-format msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:185 -#: lib/block_scout_web/templates/address_contract/index.html.eex:195 +#: lib/block_scout_web/templates/address_contract/index.html.eex:177 +#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -642,8 +644,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:104 -#: lib/block_scout_web/templates/address_contract/index.html.eex:115 +#: lib/block_scout_web/templates/address_contract/index.html.eex:102 +#: lib/block_scout_web/templates/address_contract/index.html.eex:113 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -703,7 +705,7 @@ msgstr "" msgid "Create2" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:103 +#: lib/block_scout_web/templates/address/overview.html.eex:102 #, elixir-autogen, elixir-format msgid "Creator" msgstr "" @@ -743,7 +745,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:132 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #, elixir-autogen, elixir-format msgid "Decimals" msgstr "" @@ -769,12 +771,12 @@ msgstr "" msgid "Decompiled code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Decompiled contract code" msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 #, elixir-autogen, elixir-format msgid "Decompiler version" msgstr "" @@ -784,8 +786,8 @@ msgstr "" msgid "Delegate Call" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #: lib/block_scout_web/templates/address_contract/index.html.eex:183 -#: lib/block_scout_web/templates/address_contract/index.html.eex:191 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -798,7 +800,7 @@ msgstr "" msgid "Description" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:31 +#: lib/block_scout_web/templates/address/overview.html.eex:30 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127 #, elixir-autogen, elixir-format @@ -810,7 +812,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:145 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -845,17 +847,17 @@ msgstr "" msgid "EIP-1167" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:216 +#: lib/block_scout_web/views/transaction_view.ex:215 #, elixir-autogen, elixir-format msgid "ERC-1155 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:214 +#: lib/block_scout_web/views/transaction_view.ex:213 #, elixir-autogen, elixir-format msgid "ERC-20 " msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:215 +#: lib/block_scout_web/views/transaction_view.ex:214 #, elixir-autogen, elixir-format msgid "ERC-721 " msgstr "" @@ -873,7 +875,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:78 +#: lib/block_scout_web/templates/address_contract/index.html.eex:76 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -926,17 +928,17 @@ msgstr "" msgid "Error trying to fetch balances." msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:355 +#: lib/block_scout_web/views/transaction_view.ex:354 #, elixir-autogen, elixir-format msgid "Error: %{reason}" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:353 +#: lib/block_scout_web/views/transaction_view.ex:352 #, elixir-autogen, elixir-format msgid "Error: (Awaiting internal transactions for reason)" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:120 +#: lib/block_scout_web/templates/address/overview.html.eex:119 #, elixir-autogen, elixir-format msgid "Error: Could not determine contract creator." msgstr "" @@ -946,8 +948,8 @@ msgstr "" msgid "Eth RPC" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:37 -#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:35 +#: lib/block_scout_web/templates/account/watchlist_address/edit.html.eex:27 +#: lib/block_scout_web/templates/account/watchlist_address/new.html.eex:25 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 @@ -986,7 +988,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:226 +#: lib/block_scout_web/templates/address_contract/index.html.eex:212 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1012,7 +1014,7 @@ msgstr "" msgid "Fetching gas used..." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:113 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:112 #, elixir-autogen, elixir-format msgid "Fetching holders..." msgstr "" @@ -1143,7 +1145,7 @@ msgstr "" msgid "Hex (Default)" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:109 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #, elixir-autogen, elixir-format msgid "Holders" msgstr "" @@ -1220,11 +1222,11 @@ msgid "Internal Transaction" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:361 -#: lib/block_scout_web/views/transaction_view.ex:514 +#: lib/block_scout_web/views/transaction_view.ex:513 #, elixir-autogen, elixir-format msgid "Internal Transactions" msgstr "" @@ -1296,7 +1298,7 @@ msgstr "" msgid "List of token transferred in the transaction." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:20 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 #, elixir-autogen, elixir-format msgid "Loading chart..." msgstr "" @@ -1307,10 +1309,10 @@ msgstr "" #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:133 #: lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex:49 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:45 -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:12 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:12 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:12 #: lib/block_scout_web/templates/tokens/contract/index.html.eex:17 #, elixir-autogen, elixir-format msgid "Loading..." @@ -1327,11 +1329,11 @@ msgid "Log Index" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:12 +#: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:372 -#: lib/block_scout_web/views/transaction_view.ex:515 +#: lib/block_scout_web/views/transaction_view.ex:514 #, elixir-autogen, elixir-format msgid "Logs" msgstr "" @@ -1343,7 +1345,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:46 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:85 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #: lib/block_scout_web/views/address_view.ex:142 #, elixir-autogen, elixir-format msgid "Market Cap" @@ -1359,7 +1361,7 @@ msgstr "" msgid "Max Priority Fee per Gas" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:321 +#: lib/block_scout_web/views/transaction_view.ex:320 #, elixir-autogen, elixir-format msgid "Max of" msgstr "" @@ -1419,12 +1421,12 @@ msgstr "" msgid "Module" msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:14 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 #, elixir-autogen, elixir-format msgid "More internal transactions have come in" msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:46 #: lib/block_scout_web/templates/chain/show.html.eex:216 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction/index.html.eex:19 @@ -1502,7 +1504,7 @@ msgstr "" msgid "Not unique Token" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 #, elixir-autogen, elixir-format msgid "Number of accounts holding the token" msgstr "" @@ -1512,7 +1514,7 @@ msgstr "" msgid "Number of blocks validated by this validator." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 #, elixir-autogen, elixir-format msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" @@ -1522,7 +1524,7 @@ msgstr "" msgid "Number of transactions related to this address." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #, elixir-autogen, elixir-format msgid "Number of transfers for the token" msgstr "" @@ -1543,12 +1545,12 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:63 +#: lib/block_scout_web/templates/address_contract/index.html.eex:61 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:72 +#: lib/block_scout_web/templates/address_contract/index.html.eex:70 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:58 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -1628,12 +1630,12 @@ msgstr "" #: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/layout/app.html.eex:47 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #, elixir-autogen, elixir-format msgid "Price" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 #, elixir-autogen, elixir-format msgid "Price per token on the exchanges" msgstr "" @@ -1678,7 +1680,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:516 +#: lib/block_scout_web/views/transaction_view.ex:515 #, elixir-autogen, elixir-format msgid "Raw Trace" msgstr "" @@ -1751,7 +1753,7 @@ msgstr "" msgid "Run" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:18 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format msgid "Search" @@ -1897,7 +1899,7 @@ msgid "Submit an Issue" msgstr "" #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:8 -#: lib/block_scout_web/views/transaction_view.ex:352 +#: lib/block_scout_web/views/transaction_view.ex:351 #, elixir-autogen, elixir-format msgid "Success" msgstr "" @@ -1938,12 +1940,12 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:75 +#: lib/block_scout_web/templates/address/overview.html.eex:74 #, elixir-autogen, elixir-format msgid "The name found in the source code of the Contract." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:86 +#: lib/block_scout_web/templates/address/overview.html.eex:85 #, elixir-autogen, elixir-format msgid "The name of the validator." msgstr "" @@ -1968,7 +1970,7 @@ msgstr "" msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 #, elixir-autogen, elixir-format msgid "The total amount of tokens issued" msgstr "" @@ -1978,7 +1980,7 @@ msgstr "" msgid "The total gas amount used in the block and its percentage of gas filled in the block." msgstr "" -#: lib/block_scout_web/templates/address_validation/index.html.eex:18 +#: lib/block_scout_web/templates/address_validation/index.html.eex:16 #, elixir-autogen, elixir-format msgid "There are no blocks validated by this address." msgstr "" @@ -1993,7 +1995,7 @@ msgstr "" msgid "There are no holders for this Token." msgstr "" -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 #, elixir-autogen, elixir-format msgid "There are no internal transactions for this address." msgstr "" @@ -2003,7 +2005,7 @@ msgstr "" msgid "There are no internal transactions for this transaction." msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:30 +#: lib/block_scout_web/templates/address_logs/index.html.eex:28 #, elixir-autogen, elixir-format msgid "There are no logs for this address." msgstr "" @@ -2018,7 +2020,7 @@ msgstr "" msgid "There are no pending transactions." msgstr "" -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:55 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 #, elixir-autogen, elixir-format msgid "There are no token transfers for this address." msgstr "" @@ -2028,7 +2030,7 @@ msgstr "" msgid "There are no token transfers for this transaction" msgstr "" -#: lib/block_scout_web/templates/address_token/index.html.eex:67 +#: lib/block_scout_web/templates/address_token/index.html.eex:65 #, elixir-autogen, elixir-format msgid "There are no tokens for this address." msgstr "" @@ -2038,7 +2040,7 @@ msgstr "" msgid "There are no tokens." msgstr "" -#: lib/block_scout_web/templates/address_transaction/index.html.eex:57 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 #, elixir-autogen, elixir-format msgid "There are no transactions for this address." msgstr "" @@ -2060,17 +2062,17 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:37 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." msgstr "" -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 #, elixir-autogen, elixir-format msgid "There is no decompilded contracts for this address." msgstr "" -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:23 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:21 #: lib/block_scout_web/templates/chain/show.html.eex:9 #, elixir-autogen, elixir-format msgid "There was a problem loading the chart." @@ -2091,12 +2093,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:43 +#: lib/block_scout_web/templates/address_contract/index.html.eex:41 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:47 +#: lib/block_scout_web/templates/address_contract/index.html.eex:45 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2145,25 +2147,25 @@ msgstr "" msgid "Toggle navigation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:56 +#: lib/block_scout_web/templates/address/overview.html.eex:55 #, elixir-autogen, elixir-format msgid "Token" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:3 -#: lib/block_scout_web/views/transaction_view.ex:450 +#: lib/block_scout_web/views/transaction_view.ex:449 #, elixir-autogen, elixir-format msgid "Token Burning" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:7 -#: lib/block_scout_web/views/transaction_view.ex:451 +#: lib/block_scout_web/views/transaction_view.ex:450 #, elixir-autogen, elixir-format msgid "Token Creation" msgstr "" #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:10 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:35 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:34 #, elixir-autogen, elixir-format msgid "Token Details" msgstr "" @@ -2185,20 +2187,20 @@ msgid "Token ID" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:5 -#: lib/block_scout_web/views/transaction_view.ex:449 +#: lib/block_scout_web/views/transaction_view.ex:448 #, elixir-autogen, elixir-format msgid "Token Minting" msgstr "" #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:9 #: lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:11 -#: lib/block_scout_web/views/transaction_view.ex:452 +#: lib/block_scout_web/views/transaction_view.ex:451 #, elixir-autogen, elixir-format msgid "Token Transfer" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:21 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:5 @@ -2208,17 +2210,17 @@ msgstr "" #: lib/block_scout_web/views/address_view.ex:363 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:195 #: lib/block_scout_web/views/tokens/overview_view.ex:39 -#: lib/block_scout_web/views/transaction_view.ex:513 +#: lib/block_scout_web/views/transaction_view.ex:512 #, elixir-autogen, elixir-format msgid "Token Transfers" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:55 +#: lib/block_scout_web/templates/address/overview.html.eex:54 #, elixir-autogen, elixir-format msgid "Token name and symbol." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #, elixir-autogen, elixir-format msgid "Token type" msgstr "" @@ -2259,7 +2261,7 @@ msgstr "" msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" -#: lib/block_scout_web/templates/address_logs/index.html.eex:16 +#: lib/block_scout_web/templates/address_logs/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Topic" msgstr "" @@ -2275,7 +2277,7 @@ msgstr "" msgid "Total Difficulty" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 #, elixir-autogen, elixir-format msgid "Total Supply * Price" msgstr "" @@ -2295,7 +2297,7 @@ msgstr "" msgid "Total gas limit provided by all transactions in the block." msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:70 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #, elixir-autogen, elixir-format msgid "Total supply" msgstr "" @@ -2311,7 +2313,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 -#: lib/block_scout_web/views/transaction_view.ex:462 +#: lib/block_scout_web/views/transaction_view.ex:461 #, elixir-autogen, elixir-format msgid "Transaction" msgstr "" @@ -2381,7 +2383,7 @@ msgstr "" msgid "Transactions" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:102 +#: lib/block_scout_web/templates/address/overview.html.eex:101 #, elixir-autogen, elixir-format msgid "Transactions and address of creation." msgstr "" @@ -2395,7 +2397,7 @@ msgstr "" #: lib/block_scout_web/templates/address/overview.html.eex:237 #: lib/block_scout_web/templates/address/overview.html.eex:245 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format msgid "Transfers" msgstr "" @@ -2422,7 +2424,7 @@ msgstr "" msgid "Type" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 #, elixir-autogen, elixir-format msgid "Type of the token standard" msgstr "" @@ -2443,7 +2445,7 @@ msgstr "" msgid "Uncles" msgstr "" -#: lib/block_scout_web/views/transaction_view.ex:343 +#: lib/block_scout_web/views/transaction_view.ex:342 #, elixir-autogen, elixir-format msgid "Unconfirmed" msgstr "" @@ -2493,7 +2495,7 @@ msgstr "" msgid "Validator Data" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:87 +#: lib/block_scout_web/templates/address/overview.html.eex:86 #, elixir-autogen, elixir-format msgid "Validator Name" msgstr "" @@ -2508,17 +2510,15 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:84 +#: lib/block_scout_web/templates/address_contract/index.html.eex:82 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:31 -#: lib/block_scout_web/templates/address_contract/index.html.eex:162 -#: lib/block_scout_web/templates/address_contract/index.html.eex:168 -#: lib/block_scout_web/templates/address_contract/index.html.eex:199 -#: lib/block_scout_web/templates/address_contract/index.html.eex:205 +#: lib/block_scout_web/templates/address_contract/index.html.eex:161 +#: lib/block_scout_web/templates/address_contract/index.html.eex:192 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -2673,7 +2673,7 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:112 +#: lib/block_scout_web/templates/address/overview.html.eex:111 #, elixir-autogen, elixir-format msgid "at" msgstr "" @@ -2693,7 +2693,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 +#: lib/block_scout_web/templates/address_contract/index.html.eex:27 #, elixir-autogen, elixir-format msgid "button" msgstr "" diff --git a/apps/explorer/lib/explorer/accounts/identity.ex b/apps/explorer/lib/explorer/accounts/identity.ex index b8cab8f3579f..202d159607c3 100644 --- a/apps/explorer/lib/explorer/accounts/identity.ex +++ b/apps/explorer/lib/explorer/accounts/identity.ex @@ -5,12 +5,13 @@ defmodule Explorer.Accounts.Identity do use Ecto.Schema import Ecto.Changeset - alias Explorer.Accounts.Watchlist + alias Explorer.Accounts.{TagAddress, Watchlist} schema "account_identities" do field(:uid, :string) field(:email, :string) field(:name, :string) + has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) timestamps() diff --git a/apps/explorer/lib/explorer/accounts/tag_address.ex b/apps/explorer/lib/explorer/accounts/tag_address.ex new file mode 100644 index 000000000000..617bd99a98ac --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/tag_address.ex @@ -0,0 +1,32 @@ +defmodule Explorer.Accounts.TagAddress do + @moduledoc """ + Watchlist is root entity for WatchlistAddresses + """ + + use Ecto.Schema + + import Ecto.Changeset + + alias Explorer.Accounts.Identity + alias Explorer.Chain.{Address, Hash} + + schema "account_tag_addresses" do + field(:name, :string) + belongs_to(:identity, Identity) + + belongs_to(:address, Address, + foreign_key: :address_hash, + references: :hash, + type: Hash.Address + ) + + timestamps() + end + + @doc false + def changeset(tag, attrs) do + tag + |> cast(attrs, [:name, :identity_id, :address_hash]) + |> validate_required([:name, :identity_id, :address_hash]) + end +end diff --git a/apps/explorer/lib/explorer/exchange_rates/token.ex b/apps/explorer/lib/explorer/exchange_rates/token.ex index 6521181c1234..8aa6d3b721aa 100644 --- a/apps/explorer/lib/explorer/exchange_rates/token.ex +++ b/apps/explorer/lib/explorer/exchange_rates/token.ex @@ -30,6 +30,7 @@ defmodule Explorer.ExchangeRates.Token do volume_24h_usd: Decimal.t() } + @derive Jason.Encoder @enforce_keys ~w(available_supply total_supply btc_value id last_updated market_cap_usd name symbol usd_value volume_24h_usd)a defstruct ~w(available_supply total_supply btc_value id last_updated market_cap_usd name symbol usd_value volume_24h_usd)a diff --git a/apps/explorer/lib/explorer/tags/address_to_tag.ex b/apps/explorer/lib/explorer/tags/address_to_tag.ex index 9522aa39d42f..26468cf29abb 100644 --- a/apps/explorer/lib/explorer/tags/address_to_tag.ex +++ b/apps/explorer/lib/explorer/tags/address_to_tag.ex @@ -7,7 +7,6 @@ defmodule Explorer.Tags.AddressToTag do import Ecto.Changeset - alias Explorer.Accounts.WatchlistAddress alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Hash} alias Explorer.Tags.{AddressTag, AddressToTag} @@ -66,42 +65,6 @@ defmodule Explorer.Tags.AddressToTag do |> Repo.all() end - def get_tags_on_address(address_hash) when is_nil(address_hash), do: [] - - def get_tags_on_address(address_hash) do - query = - from( - tt in AddressTag, - left_join: att in AddressToTag, - on: tt.id == att.tag_id, - where: att.address_hash == ^address_hash, - where: tt.label != ^"validator", - select: tt - ) - - query - |> Repo.all() - end - - def get_private_tags_on_address(address_hash, _current_user) when is_nil(address_hash), do: [] - - def get_private_tags_on_address(address_hash, current_user) do - if current_user do - query = - from( - wa in WatchlistAddress, - where: wa.address_hash == ^address_hash, - where: wa.watchlist_id == ^current_user.watchlist_id, - select: %{label: wa.name, display_name: wa.name} - ) - - query - |> Repo.all() - else - [] - end - end - def set_tag_to_addresses(tag_id, address_hash_string_list) do current_address_hashes = get_address_hashes_mapped_to_tag(tag_id) diff --git a/apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs b/apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs new file mode 100644 index 000000000000..0a306516ff30 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs @@ -0,0 +1,20 @@ +defmodule Explorer.Repo.Migrations.CreateAccountTagAddresses do + use Ecto.Migration + + def change do + create table(:account_tag_addresses) do + add(:name, :string) + add(:identity_id, references(:account_identities, on_delete: :delete_all)) + + add( + :address_hash, + references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all) + ) + + timestamps() + end + + create(index(:account_tag_addresses, [:identity_id])) + create(index(:account_tag_addresses, [:address_hash])) + end +end diff --git a/docker/Makefile b/docker/Makefile index b67174ad241a..777071c9ba15 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -374,10 +374,10 @@ ifdef SENDGRID_API_KEY BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_API_KEY)' endif ifdef SENDGRID_SENDER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_SENDER)' + BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_SENDER=$(SENDGRID_SENDER)' endif ifdef SENDGRID_TEMPLATE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_TEMPLATE)' + BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_TEMPLATE=$(SENDGRID_TEMPLATE)' endif ifdef API_RATE_LIMIT From 32c94b7ef95c9f453097205bfda1e4e800d28e83 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Fri, 18 Mar 2022 16:10:23 +0300 Subject: [PATCH 255/723] Style fixes --- .../templates/account/tag_address/index.html.eex | 3 ++- .../templates/account/tag_address/new.html.eex | 12 +----------- .../templates/account/tag_address/row.html.eex | 4 +++- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex index fdb44d163b16..c0323020e748 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex @@ -1,6 +1,6 @@
    - <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %>
    @@ -21,6 +21,7 @@ Name Address + Action diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex index 50cc42a5f26e..c817e5adb4e6 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/new.html.eex @@ -1,16 +1,6 @@
    -
    - -
    - + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex index 6c934a08163f..6e3a6cdf6dfa 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex @@ -5,7 +5,9 @@ <%= link(trimmed_hash(@address_tag.address_hash), to: address_path(@conn, :show, @address_tag.address_hash)) %> <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @address_tag.address_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> - <%= link "Remove Tag", to: tag_address_path(@conn, :delete, @address_tag.id), method: :delete, class: "btn btn-danger white button-sm", style: "color: #fff !important;" %> + + + <%= link "Remove Tag", to: tag_address_path(@conn, :delete, @address_tag.id), method: :delete %>
    From 357dff2f99c0a9b32a6604bd4a6f342ed8628b5e Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sat, 19 Mar 2022 23:48:51 +0300 Subject: [PATCH 256/723] Tag Transaction & UI --- .../account/tag_transaction_controller.ex | 81 +++++++++++++++++++ .../models/add_tag_transaction.ex | 72 +++++++++++++++++ .../templates/account/common/_nav.html.eex | 3 + .../account/tag_transaction/index.html.eex | 39 +++++++++ .../account/tag_transaction/new.html.eex | 31 +++++++ .../account/tag_transaction/row.html.eex | 16 ++++ .../templates/layout/_topnav.html.eex | 1 + .../views/account/tag_transaction_view.ex | 5 ++ .../lib/block_scout_web/web_router.ex | 7 +- .../lib/explorer/accounts/tag_transaction.ex | 32 ++++++++ ...133333_create_account_tag_transactions.exs | 20 +++++ 11 files changed, 306 insertions(+), 1 deletion(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/models/add_tag_transaction.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/new.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex create mode 100644 apps/explorer/lib/explorer/accounts/tag_transaction.ex create mode 100644 apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex new file mode 100644 index 000000000000..45decbce8d5d --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex @@ -0,0 +1,81 @@ +defmodule BlockScoutWeb.Account.TagTransactionController do + use BlockScoutWeb, :controller + + alias BlockScoutWeb.Account.AuthController + alias Ecto.Changeset + alias Explorer.Accounts.TagTransaction + alias Explorer.Repo + + import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + + def index(conn, _params) do + case AuthController.current_user(conn) do + nil -> + conn + # |> put_flash(:info, "Sign in to see tx tags") + |> redirect(to: root()) + + %{} = user -> + render( + conn, + "index.html", + tx_tags: tx_tags(user) + ) + end + end + + def new(conn, _params) do + authenticate!(conn) + + render(conn, "new.html", new_tag: new_tag()) + end + + def create(conn, %{"tag_transaction" => params}) do + current_user = authenticate!(conn) + + case AddTagTransaction.call(current_user.id, params) do + {:ok, _tag_tx} -> + conn + # |> put_flash(:info, "Tag Transaction created!") + |> redirect(to: tag_transaction_path(conn, :index)) + + {:error, message = message} -> + conn + # |> put_flash(:error, message) + |> render("new.html", new_tag: changeset_with_error(params, message)) + end + end + + def delete(conn, %{"id" => id}) do + current_user = authenticate!(conn) + + TagTransaction + |> Repo.get_by(id: id, identity_id: current_user.id) + |> Repo.delete() + + conn + # |> put_flash(:info, "Tag transaction removed successfully.") + |> redirect(to: tag_transaction_path(conn, :index)) + end + + def tx_tags(user) do + TagTransaction + |> Repo.all(identity_id: user.id) + |> Repo.preload(:transaction) + end + + defp new_tag, do: TagTransaction.changeset(%TagTransaction{}, %{}) + + defp changeset_with_error(params, message) do + %{changeset(params) | action: :insert} + |> Changeset.add_error(:tx_hash, message) + end + + defp changeset(params) do + TagTransaction.changeset(%TagTransaction{}, params) + end + + defp root do + System.get_env("NETWORK_PATH") || "/" + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_tag_transaction.ex b/apps/block_scout_web/lib/block_scout_web/models/add_tag_transaction.ex new file mode 100644 index 000000000000..700b7c114826 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/models/add_tag_transaction.ex @@ -0,0 +1,72 @@ +defmodule AddTagTransaction do + @moduledoc """ + Create tag transaction, + associated with Transaction and Identity + """ + + alias Explorer.Accounts.TagTransaction + alias Explorer.{Chain, Repo} + alias Explorer.Chain.Transaction + + def call(identity_id, %{"tx_hash" => tx_hash_string} = params) do + case format_tx(tx_hash_string) do + {:ok, tx_hash} -> + try_create_tag_tx(identity_id, tx_hash, params) + + :error -> + {:error, "Wrong address, "} + end + end + + defp try_create_tag_tx(identity_id, tx_hash, params) do + case find_tag_tx(identity_id, tx_hash) do + %TagTransaction{} -> + {:error, "Transaction tag already exists!"} + + nil -> + with {:ok, %Transaction{} = address} <- find_or_create_tx(tx_hash) do + address + |> build_tag_tx(identity_id, params) + |> Repo.insert() + end + end + end + + defp format_tx(tx_hash_string) do + Chain.string_to_transaction_hash(tx_hash_string) + end + + defp find_tag_tx(identity_id, tx_hash) do + Repo.get_by(TagTransaction, + tx_hash: tx_hash, + identity_id: identity_id + ) + end + + defp find_or_create_tx(tx_hash) do + with {:error, :tx_not_found} <- find_tx(tx_hash), + do: create_tx(tx_hash) + end + + defp create_tx(tx_hash) do + with {:error, _} <- Repo.insert(%Transaction{hash: tx_hash}), + do: {:error, :wrong_tx} + end + + defp find_tx(tx_hash) do + case Repo.get(Transaction, tx_hash) do + nil -> {:error, :tx_not_found} + %Transaction{} = address -> {:ok, address} + end + end + + defp build_tag_tx(address, identity_id, %{"name" => name}) do + TagTransaction.changeset( + %TagTransaction{ + identity_id: identity_id, + tx_hash: address.hash + }, + %{name: name} + ) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex index 2bdfb55caedf..d632c0b1690f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex @@ -9,5 +9,8 @@ +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex new file mode 100644 index 000000000000..de8cca014ddf --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex @@ -0,0 +1,39 @@ +
    +
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> +
    +
    +
    +

    Transaction Tags

    +
    +
    +
    + <%= if @tx_tags == [] do %> +
    +
    + You don't have transaction tags yet +
    +
    +

    + <% else %> + + + + + + + + + + <%= Enum.map(@tx_tags, fn at -> + render(TagTransactionView, "row.html", tx_tag: at, conn: @conn) + end) %> + +
    NameTransactionAction
    + <% end %> +
    +
    + Add transaction tag +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/new.html.eex new file mode 100644 index 000000000000..0cfa04b19511 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/new.html.eex @@ -0,0 +1,31 @@ +
    +
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> +
    +
    +
    +

    Add transaction tag

    + +
    +
    +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex new file mode 100644 index 000000000000..028d3f74fa77 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex @@ -0,0 +1,16 @@ + + <%= @tx_tag.name %> + +
    + <%= link(@tx_tag.tx_hash, + to: transaction_path(BlockScoutWeb.Endpoint, :show, @tx_tag.tx_hash), + "data-test": "transaction_hash_link", + class: "text-truncate") %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @tx_tag.tx_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> +
    + + + <%= link "Remove Tag", to: tag_transaction_path(@conn, :delete, @tx_tag.id), method: :delete %> + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 9fa05a90fbf8..8709d502ec22 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -186,6 +186,7 @@ Profile Watch list Address Tags + Transaction Tags Sign out
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex new file mode 100644 index 000000000000..9f35347f96df --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex @@ -0,0 +1,5 @@ +defmodule BlockScoutWeb.Account.TagTransactionView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.Account.TagTransactionView +end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index d47b6c69327a..c1db47744801 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -31,10 +31,15 @@ defmodule BlockScoutWeb.WebRouter do pipe_through(:browser) resources("/tag_address", Account.TagAddressController, - only: [:index, :new, :create, :edit, :update, :delete], + only: [:index, :new, :create, :delete], as: :tag_address ) + resources("/tag_transaction", Account.TagTransactionController, + only: [:index, :new, :create, :delete], + as: :tag_transaction + ) + resources("/watchlist", Account.WatchlistController, only: [:show], singleton: true, diff --git a/apps/explorer/lib/explorer/accounts/tag_transaction.ex b/apps/explorer/lib/explorer/accounts/tag_transaction.ex new file mode 100644 index 000000000000..1bc6ba88779f --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/tag_transaction.ex @@ -0,0 +1,32 @@ +defmodule Explorer.Accounts.TagTransaction do + @moduledoc """ + This is a personal tag for transaction + """ + + use Ecto.Schema + + import Ecto.Changeset + + alias Explorer.Accounts.Identity + alias Explorer.Chain.{Hash, Transaction} + + schema "account_tag_transactions" do + field(:name, :string) + belongs_to(:identity, Identity) + + belongs_to(:transaction, Transaction, + foreign_key: :tx_hash, + references: :hash, + type: Hash.Full + ) + + timestamps() + end + + @doc false + def changeset(tag, attrs) do + tag + |> cast(attrs, [:name, :identity_id, :tx_hash]) + |> validate_required([:name, :identity_id, :tx_hash]) + end +end diff --git a/apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs b/apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs new file mode 100644 index 000000000000..49facab8c09f --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs @@ -0,0 +1,20 @@ +defmodule Explorer.Repo.Migrations.CreateAccountTagTransactions do + use Ecto.Migration + + def change do + create table(:account_tag_transactions) do + add(:name, :string) + add(:identity_id, references(:account_identities, on_delete: :delete_all)) + + add( + :tx_hash, + references(:transactions, column: :hash, type: :bytea, on_delete: :delete_all) + ) + + timestamps() + end + + create(index(:account_tag_transactions, [:identity_id])) + create(index(:account_tag_transactions, [:tx_hash])) + end +end From 1728c126083131a526cdd0b1160772cfdc3fc04e Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sun, 20 Mar 2022 00:03:19 +0300 Subject: [PATCH 257/723] Add this branch to GA workflows --- .github/workflows/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index ace214313490..b30f2d0bfa77 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -5,7 +5,7 @@ on: branches: - master - account - - account-rebased + - account-tags pull_request: branches: - master From 3d532f10c769854d24f2c79a753b19460f682ff3 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sun, 20 Mar 2022 00:34:48 +0300 Subject: [PATCH 258/723] Extract gettext --- apps/block_scout_web/priv/gettext/default.pot | 2 ++ apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index aa1022d372fb..ca936a112980 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -585,6 +585,8 @@ msgstr "" #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 97ab1a8cb90c..c979e80a7aac 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -585,6 +585,8 @@ msgstr "" #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 From 89d358c6b6bdac08ce70a5b4fd1d45d22700da3d Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 28 Mar 2022 12:51:17 +0400 Subject: [PATCH 259/723] Remove CI run from PR, leave only at push to the branch --- .github/workflows/config.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index b30f2d0bfa77..4b8dab0c6310 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -3,14 +3,8 @@ name: Blockscout on: push: branches: - - master - account - account-tags - pull_request: - branches: - - master - - account - env: MIX_ENV: test From d8244f1cc7f24c917cf84ebf1590149d7326a04e Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Fri, 25 Mar 2022 02:48:16 +0300 Subject: [PATCH 260/723] Fix batch ERC-1155 email notifications --- .../lib/explorer/accounts/notify/email.ex | 8 +++++--- .../lib/explorer/accounts/notify/notifier.ex | 7 ++++--- .../lib/explorer/accounts/notify/summary.ex | 18 ++++++++++++++---- .../accounts/watchlist_notification.ex | 1 + ..._add_subject_to_watchlist_notifications.exs | 9 +++++++++ 5 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs diff --git a/apps/explorer/lib/explorer/accounts/notify/email.ex b/apps/explorer/lib/explorer/accounts/notify/email.ex index c617ca3a5863..0e59d1bad82c 100644 --- a/apps/explorer/lib/explorer/accounts/notify/email.ex +++ b/apps/explorer/lib/explorer/accounts/notify/email.ex @@ -20,6 +20,8 @@ defmodule Explorer.Accounts.Notify.Email do email end + def compose(_, _), do: nil + defp compose_email(notification) do email = new_email(from: sender(), to: email(notification)) @@ -44,7 +46,7 @@ defmodule Explorer.Accounts.Notify.Email do |> add_dynamic_field("block_url", block_url(notification)) end - defp amount(%WatchlistNotification{amount: amount, type: type}) do + defp amount(%WatchlistNotification{amount: amount, subject: subject, type: type}) do case type do "COIN" -> amount @@ -53,10 +55,10 @@ defmodule Explorer.Accounts.Notify.Email do amount "ERC-721" -> - "Token ID: " <> to_string(amount) <> " of " + "Token ID: " <> subject <> " of " "ERC-1155" -> - "Token ID: " <> to_string(amount) <> " of " + "Token ID: " <> subject <> " of " end end diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex index fe9ee8fb7874..c9117ed8e62b 100644 --- a/apps/explorer/lib/explorer/accounts/notify/notifier.ex +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -47,11 +47,11 @@ defmodule Explorer.Accounts.Notify.Notifier do Logger.debug("--- filled summary", fetcher: :account) Logger.debug(summary, fetcher: :account) - Enum.each(incoming_addresses, fn address -> notity_watchlist(address, summary, :incoming) end) - Enum.each(outgoing_addresses, fn address -> notity_watchlist(address, summary, :outgoing) end) + Enum.each(incoming_addresses, fn address -> notify_watchlist(address, summary, :incoming) end) + Enum.each(outgoing_addresses, fn address -> notify_watchlist(address, summary, :outgoing) end) end - defp notity_watchlist(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do + defp notify_watchlist(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do with %WatchlistNotification{} = notification <- build_watchlist_notification(address, summary, direction) do notification @@ -73,6 +73,7 @@ defmodule Explorer.Accounts.Notify.Notifier do wn.transaction_hash == ^notification.transaction_hash and wn.block_number == ^notification.block_number and wn.direction == ^notification.direction and + wn.subject == ^notification.subject and wn.amount == ^notification.amount ) end diff --git a/apps/explorer/lib/explorer/accounts/notify/summary.ex b/apps/explorer/lib/explorer/accounts/notify/summary.ex index c882120b2ab9..ad26424a5593 100644 --- a/apps/explorer/lib/explorer/accounts/notify/summary.ex +++ b/apps/explorer/lib/explorer/accounts/notify/summary.ex @@ -18,6 +18,7 @@ defmodule Explorer.Accounts.Notify.Summary do :amount, :tx_fee, :name, + :subject, :type ] @@ -39,8 +40,11 @@ defmodule Explorer.Accounts.Notify.Summary do transaction_summary = fetch_summary(transaction) - Logger.debug("--- transaction summary", fetcher: :account) - Logger.debug(transaction_summary, fetcher: :account) + if transaction_summary do + Logger.debug("--- transaction summary", fetcher: :account) + Logger.debug(transaction_summary, fetcher: :account) + end + Logger.debug("--- transfers summaries", fetcher: :account) Logger.debug(transfers_summaries, fetcher: :account) @@ -107,12 +111,13 @@ defmodule Explorer.Accounts.Notify.Summary do "ERC-721" -> %Summary{ + amount: 0, transaction_hash: transaction.hash, method: method(transfer), from_address_hash: transfer.from_address_hash, to_address_hash: transfer.to_address_hash, block_number: transfer.block_number, - amount: transfer.token_id, + subject: to_string(transfer.token_id), tx_fee: fee(transaction), name: transfer.token.name, type: transfer.token.type @@ -120,12 +125,13 @@ defmodule Explorer.Accounts.Notify.Summary do "ERC-1155" -> %Summary{ + amount: 0, transaction_hash: transaction.hash, method: method(transfer), from_address_hash: transfer.from_address_hash, to_address_hash: transfer.to_address_hash, block_number: transfer.block_number, - amount: transfer.token_id, + subject: to_string(token_ids(transfer)), tx_fee: fee(transaction), name: transfer.token.name, type: transfer.token.type @@ -170,6 +176,10 @@ defmodule Explorer.Accounts.Notify.Summary do ) end + def token_ids(%Chain.TokenTransfer{token_id: token_id, token_ids: token_ids}) do + token_id || token_ids + end + def token_decimals(%Chain.TokenTransfer{} = transfer) do transfer.token.decimals || Decimal.new(1) end diff --git a/apps/explorer/lib/explorer/accounts/watchlist_notification.ex b/apps/explorer/lib/explorer/accounts/watchlist_notification.ex index a1d3ddc6b22d..8cb9e97589ff 100644 --- a/apps/explorer/lib/explorer/accounts/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/accounts/watchlist_notification.ex @@ -21,6 +21,7 @@ defmodule Explorer.Accounts.WatchlistNotification do field(:direction, :string) field(:method, :string) field(:name, :string) + field(:subject, :string) field(:tx_fee, :decimal) field(:type, :string) field(:viewed_at, :integer) diff --git a/apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs b/apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs new file mode 100644 index 000000000000..7f644aaf87ac --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs @@ -0,0 +1,9 @@ +defmodule Explorer.Repo.Migrations.AddSubjectToWatchlistNotifications do + use Ecto.Migration + + def change do + alter table(:account_watchlist_notifications) do + add(:subject, :string, null: true) + end + end +end From 5cebbe81d68068b9b5f57fbe8f421b28f95874eb Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sun, 27 Mar 2022 21:40:11 +0300 Subject: [PATCH 261/723] Forbidden to notify address check --- .../models/add_watchlist_address.ex | 15 ++-- .../accounts/notify/forbidden_address.ex | 68 +++++++++++++++++++ .../lib/explorer/accounts/notify/notifier.ex | 30 +++++--- 3 files changed, 94 insertions(+), 19 deletions(-) create mode 100644 apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex diff --git a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex index bef9b986da01..04b6b164d60b 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/add_watchlist_address.ex @@ -9,24 +9,25 @@ defmodule AddWatchlistAddress do call(watchlist, params) """ - alias Explorer.{Chain, Repo} + alias Explorer.Accounts.Notify.ForbiddenAddress alias Explorer.Accounts.{Watchlist, WatchlistAddress} alias Explorer.Chain.Address + alias Explorer.Repo def call(watchlist_id, %{"address_hash" => address_hash_string} = params) do - case format_address(address_hash_string) do + case ForbiddenAddress.check(address_hash_string) do {:ok, address_hash} -> try_create_watchlist_address(watchlist_id, address_hash, params) - :error -> - {:error, "Wrong address, "} + {:error, message} -> + {:error, message} end end defp try_create_watchlist_address(watchlist_id, address_hash, params) do case find_watchlist_address(watchlist_id, address_hash) do %WatchlistAddress{} -> - {:error, "Address already exists!"} + {:error, "Address already added it this watchlist"} nil -> with {:ok, %Address{} = address} <- find_or_create_address(address_hash) do @@ -69,10 +70,6 @@ defmodule AddWatchlistAddress do defp to_bool("true"), do: true defp to_bool("false"), do: false - defp format_address(address_hash_string) do - Chain.string_to_address_hash(address_hash_string) - end - defp find_watchlist_address(watchlist_id, address_hash) do Repo.get_by(WatchlistAddress, address_hash: address_hash, diff --git a/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex b/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex new file mode 100644 index 000000000000..56ff1e618e24 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex @@ -0,0 +1,68 @@ +defmodule Explorer.Accounts.Notify.ForbiddenAddress do + @moduledoc """ + Check if address is forbidden to notify + """ + + @blacklist [ + "0x0000000000000000000000000000000000000000", + "0x000000000000000000000000000000000000dEaD" + ] + + # alias Explorer.Repo + alias Explorer.{Chain, Repo} + alias Explorer.Chain.{Address, Token} + + import Ecto.Query, only: [from: 2] + import Explorer.Chain, only: [string_to_address_hash: 1] + + def check(address_string) when is_bitstring(address_string) do + case format_address(address_string) do + {:error, message} -> + {:error, message} + + address_hash -> + check(address_hash) + end + end + + def check(%Explorer.Chain.Hash{} = address_hash) do + cond do + address_hash in blacklist() -> + {:error, "This address is blacklisted."} + + is_contract(address_hash) -> + {:error, "This address isn't personal."} + + address_hash -> + {:ok, address_hash} + end + end + + defp is_contract(%Explorer.Chain.Hash{} = address_hash) do + query = + from( + token in Token, + where: token.contract_address_hash == ^address_hash + ) + + contract_addresses = Repo.all(query) + List.first(contract_addresses) + end + + defp format_address(address_hash_string) do + case Chain.string_to_address_hash(address_hash_string) do + {:ok, address_hash} -> + address_hash + + :error -> + {:error, "Address "} + end + end + + defp blacklist do + Enum.map( + @blacklist, + &format_address(&1) + ) + end +end diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex index c9117ed8e62b..6860cec4be5b 100644 --- a/apps/explorer/lib/explorer/accounts/notify/notifier.ex +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -3,7 +3,7 @@ defmodule Explorer.Accounts.Notify.Notifier do Composing notification, store and send it to email """ - alias Explorer.Accounts.Notify.{Email, Summary} + alias Explorer.Accounts.Notify.{Email, ForbiddenAddress, Summary} alias Explorer.Accounts.{WatchlistAddress, WatchlistNotification} alias Explorer.Chain.{TokenTransfer, Transaction} alias Explorer.{Mailer, Repo} @@ -52,15 +52,25 @@ defmodule Explorer.Accounts.Notify.Notifier do end defp notify_watchlist(%Explorer.Accounts.WatchlistAddress{} = address, summary, direction) do - with %WatchlistNotification{} = notification <- - build_watchlist_notification(address, summary, direction) do - notification - |> query_notification(address) - |> Repo.all() - |> case do - [] -> save_and_send_notification(notification, address) - _ -> :ok - end + case ForbiddenAddress.check(address.address_hash) do + {:ok, _address_hash} -> + with %WatchlistNotification{} = notification <- + build_watchlist_notification( + address, + summary, + direction + ) do + notification + |> query_notification(address) + |> Repo.all() + |> case do + [] -> save_and_send_notification(notification, address) + _ -> :ok + end + end + + {:error, _message} -> + nil end end From 613b4dfddc877ee9e96482569e079887dd88000c Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 28 Mar 2022 12:40:11 +0400 Subject: [PATCH 262/723] Remove unused aliases --- .../lib/explorer/accounts/notify/forbidden_address.ex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex b/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex index 56ff1e618e24..558bb156ebe0 100644 --- a/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex +++ b/apps/explorer/lib/explorer/accounts/notify/forbidden_address.ex @@ -8,9 +8,8 @@ defmodule Explorer.Accounts.Notify.ForbiddenAddress do "0x000000000000000000000000000000000000dEaD" ] - # alias Explorer.Repo - alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Token} + alias Explorer.Chain.Token + alias Explorer.Repo import Ecto.Query, only: [from: 2] import Explorer.Chain, only: [string_to_address_hash: 1] @@ -50,7 +49,7 @@ defmodule Explorer.Accounts.Notify.ForbiddenAddress do end defp format_address(address_hash_string) do - case Chain.string_to_address_hash(address_hash_string) do + case string_to_address_hash(address_hash_string) do {:ok, address_hash} -> address_hash From 25ee96d97a373c9d3a396058e09401489c04d475 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Tue, 29 Mar 2022 00:54:35 +0300 Subject: [PATCH 263/723] Fix nil comparsion and list conversion errors --- .../lib/explorer/accounts/notify/notifier.ex | 1 + .../explorer/lib/explorer/accounts/notify/summary.ex | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/accounts/notify/notifier.ex b/apps/explorer/lib/explorer/accounts/notify/notifier.ex index 6860cec4be5b..b9477b5d5abe 100644 --- a/apps/explorer/lib/explorer/accounts/notify/notifier.ex +++ b/apps/explorer/lib/explorer/accounts/notify/notifier.ex @@ -118,6 +118,7 @@ defmodule Explorer.Accounts.Notify.Notifier do method: summary.method, block_number: summary.block_number, amount: summary.amount, + subject: summary.subject, tx_fee: summary.tx_fee, name: summary.name, type: summary.type diff --git a/apps/explorer/lib/explorer/accounts/notify/summary.ex b/apps/explorer/lib/explorer/accounts/notify/summary.ex index ad26424a5593..d097fdbc293d 100644 --- a/apps/explorer/lib/explorer/accounts/notify/summary.ex +++ b/apps/explorer/lib/explorer/accounts/notify/summary.ex @@ -83,6 +83,7 @@ defmodule Explorer.Accounts.Notify.Summary do amount: amount(transaction), tx_fee: fee(transaction), name: Application.get_env(:explorer, :coin_name), + subject: "Coin transaction", type: "COIN" } end @@ -104,6 +105,7 @@ defmodule Explorer.Accounts.Notify.Summary do to_address_hash: transfer.to_address_hash, block_number: transfer.block_number, amount: amount(transfer), + subject: transfer.token.type, tx_fee: fee(transaction), name: transfer.token.name, type: transfer.token.type @@ -131,7 +133,7 @@ defmodule Explorer.Accounts.Notify.Summary do from_address_hash: transfer.from_address_hash, to_address_hash: transfer.to_address_hash, block_number: transfer.block_number, - subject: to_string(token_ids(transfer)), + subject: token_ids(transfer), tx_fee: fee(transaction), name: transfer.token.name, type: transfer.token.type @@ -177,7 +179,13 @@ defmodule Explorer.Accounts.Notify.Summary do end def token_ids(%Chain.TokenTransfer{token_id: token_id, token_ids: token_ids}) do - token_id || token_ids + case token_id do + nil -> + Enum.map_join(token_ids, ", ", fn id -> to_string(id) end) + + _ -> + to_string(token_id) + end end def token_decimals(%Chain.TokenTransfer{} = transfer) do From aa15ce72b54efad72165af55bae0c22da3e072f3 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Wed, 30 Mar 2022 01:33:40 +0300 Subject: [PATCH 264/723] Show personal_tx_tag on Transaction overview page --- .../transaction_internal_transaction_controller.ex | 13 +++++++++++-- .../transaction_token_transfer_controller.ex | 13 +++++++++++-- .../templates/transaction/overview.html.eex | 4 ++++ .../lib/block_scout_web/views/transaction_view.ex | 2 +- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex index 61b7122180a7..77a6871cca11 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex @@ -1,10 +1,12 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do use BlockScoutWeb, :controller + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, Controller, InternalTransactionView, TransactionController} - alias Explorer.{Chain, Market} + alias Explorer.Accounts.TagTransaction + alias Explorer.{Chain, Market, Repo} alias Explorer.ExchangeRates.Token alias Phoenix.View @@ -103,7 +105,8 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do current_path: Controller.current_full_path(conn), block_height: Chain.block_height(), show_token_transfers: Chain.transaction_has_token_transfers?(transaction_hash), - transaction: transaction + transaction: transaction, + personal_tx_tag: get_tag(conn, transaction_hash) ) else {:restricted_access, _} -> @@ -116,4 +119,10 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do TransactionController.set_not_found_view(conn, transaction_hash_string) end end + + defp get_tag(conn, transaction_hash) do + if user = current_user(conn) do + Repo.get_by(TagTransaction, tx_hash: transaction_hash, identity_id: user.id) + end + end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex index 95e5b34d0a40..ef346e482862 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex @@ -1,10 +1,12 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do use BlockScoutWeb, :controller + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1] alias BlockScoutWeb.{AccessHelpers, Controller, TransactionController, TransactionTokenTransferView} - alias Explorer.{Chain, Market} + alias Explorer.Accounts.TagTransaction + alias Explorer.{Chain, Market, Repo} alias Explorer.ExchangeRates.Token alias Phoenix.View @@ -107,7 +109,8 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do block_height: Chain.block_height(), current_path: Controller.current_full_path(conn), show_token_transfers: true, - transaction: transaction + transaction: transaction, + personal_tx_tag: get_tag(conn, transaction_hash) ) else :not_found -> @@ -123,4 +126,10 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do TransactionController.set_not_found_view(conn, transaction_hash_string) end end + + defp get_tag(conn, transaction_hash) do + if user = current_user(conn) do + Repo.get_by(TagTransaction, tx_hash: transaction_hash, identity_id: user.id) + end + end end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index f76c6ae11e21..5fcd7c820294 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -49,6 +49,10 @@

    <%= gettext "Transaction Details" %> + <% personal_tx_tag = if assigns[:personal_tx_tag], do: @personal_tx_tag, else: nil %> + <%= if personal_tx_tag do %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tx_tag.name, additional_classes: [tag_name_to_label(personal_tx_tag.name), "ml-1"] %> + <% end %>
    <%= render BlockScoutWeb.AddressView, "_labels.html", address_hash: @transaction.to_address_hash, tags: tags %>

    diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 40eaf3826df4..72f300bc4c7f 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -12,7 +12,7 @@ defmodule BlockScoutWeb.TransactionView do alias Timex.Duration import BlockScoutWeb.Gettext - import BlockScoutWeb.AddressView, only: [from_address_hash: 1, short_token_id: 2] + import BlockScoutWeb.AddressView, only: [from_address_hash: 1, short_token_id: 2, tag_name_to_label: 1] import BlockScoutWeb.Tokens.Helpers @tabs ["token-transfers", "internal-transactions", "logs", "raw-trace"] From b652d3aa3b6a3486c02600aae1d4a651b6b0d4f5 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Sat, 2 Apr 2022 19:19:03 +0300 Subject: [PATCH 265/723] Fix the index query for tags --- .../controllers/account/tag_address_controller.ex | 10 ++++++++-- .../controllers/account/tag_transaction_controller.ex | 10 +++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex index 36557df4de20..476f8ff4a5e6 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_address_controller.ex @@ -7,6 +7,7 @@ defmodule BlockScoutWeb.Account.TagAddressController do alias Explorer.Repo import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + import Ecto.Query, only: [from: 2] def index(conn, _params) do case AuthController.current_user(conn) do @@ -59,8 +60,13 @@ defmodule BlockScoutWeb.Account.TagAddressController do end def address_tags(user) do - TagAddress - |> Repo.all(identity_id: user.id) + query = + from(ta in TagAddress, + where: ta.identity_id == ^user.id + ) + + query + |> Repo.all() |> Repo.preload(:address) end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex index 45decbce8d5d..4b110bd57dac 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/tag_transaction_controller.ex @@ -7,6 +7,7 @@ defmodule BlockScoutWeb.Account.TagTransactionController do alias Explorer.Repo import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + import Ecto.Query, only: [from: 2] def index(conn, _params) do case AuthController.current_user(conn) do @@ -59,9 +60,12 @@ defmodule BlockScoutWeb.Account.TagTransactionController do end def tx_tags(user) do - TagTransaction - |> Repo.all(identity_id: user.id) - |> Repo.preload(:transaction) + query = + from(tt in TagTransaction, + where: tt.identity_id == ^user.id + ) + + Repo.all(query) end defp new_tag, do: TagTransaction.changeset(%TagTransaction{}, %{}) From 5b7c33c7de2f5b2a644343f5d5e69cb11df16739 Mon Sep 17 00:00:00 2001 From: Oleg Sovetnik Date: Wed, 6 Apr 2022 03:01:45 +0300 Subject: [PATCH 266/723] Wrap notifier call in try/resque --- apps/explorer/lib/explorer/chain/import.ex | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/chain/import.ex b/apps/explorer/lib/explorer/chain/import.ex index b0e3aa7b7b20..db7fb57a0972 100644 --- a/apps/explorer/lib/explorer/chain/import.ex +++ b/apps/explorer/lib/explorer/chain/import.ex @@ -9,6 +9,8 @@ defmodule Explorer.Chain.Import do alias Explorer.Chain.Import alias Explorer.Repo + require Logger + @stages [ Import.Stage.Addresses, Import.Stage.AddressReferencing, @@ -303,7 +305,13 @@ defmodule Explorer.Chain.Import do Keyword.delete(options, :for) ) - Notifier.notify(inserted) + try do + Notifier.notify(inserted) + rescue + err -> + Logger.info("--- Notifier error", fetcher: :account) + Logger.info(err, fetcher: :account) + end {:ok, inserted} end From 96d3bbc63b2d345ecce2b90c83ea585d8dda6744 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Wed, 13 Apr 2022 13:31:11 +0300 Subject: [PATCH 267/723] Update CI config --- .github/workflows/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 4b8dab0c6310..2a1cada62789 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,7 +4,6 @@ on: push: branches: - account - - account-tags env: MIX_ENV: test From 464f260f136ef7b7d87225f6208e570ea2c1500e Mon Sep 17 00:00:00 2001 From: nikitosing Date: Sun, 10 Apr 2022 12:56:28 +0300 Subject: [PATCH 268/723] Add API keys to account --- .../controllers/account/api_key_controller.ex | 68 +++++++++++ .../templates/account/api_key/form.html.eex | 34 ++++++ .../templates/account/api_key/index.html.eex | 44 +++++++ .../templates/account/api_key/row.html.eex | 14 +++ .../templates/account/common/_nav.html.eex | 3 + .../templates/layout/_topnav.html.eex | 1 + .../block_scout_web/views/access_helpers.ex | 20 ++++ .../views/account/api_key_view.ex | 3 + .../lib/block_scout_web/web_router.ex | 5 + apps/block_scout_web/priv/gettext/default.pot | 38 ++++++ .../priv/gettext/en/LC_MESSAGES/default.po | 38 ++++++ .../explorer/lib/explorer/accounts/api/key.ex | 113 ++++++++++++++++++ .../lib/explorer/accounts/api/plan.ex | 13 ++ .../lib/explorer/accounts/identity.ex | 2 + ...07134152_add_api_keys_and_plans_tables.exs | 34 ++++++ 15 files changed, 430 insertions(+) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/account/api_key/row.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex create mode 100644 apps/explorer/lib/explorer/accounts/api/key.ex create mode 100644 apps/explorer/lib/explorer/accounts/api/plan.ex create mode 100644 apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex new file mode 100644 index 000000000000..8f49af2d2f83 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex @@ -0,0 +1,68 @@ +defmodule BlockScoutWeb.Account.ApiKeyController do + use BlockScoutWeb, :controller + + alias Explorer.Account.Api.Key, as: ApiKey + + import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + + def new(conn, _params) do + authenticate!(conn) + + render(conn, "form.html", method: :create, api_key: empty_api_key()) + end + + def create(conn, %{"key" => api_key}) do + current_user = authenticate!(conn) + + case ApiKey.create_api_key_changeset_and_insert(%ApiKey{}, %{name: api_key["name"], identity_id: current_user.id}) do + {:ok, _} -> + redirect(conn, to: api_key_path(conn, :index)) + + {:error, invalid_api_key} -> + render(conn, "form.html", method: :create, api_key: invalid_api_key) + end + end + + def create(conn, _) do + redirect(conn, to: api_key_path(conn, :index)) + end + + def index(conn, _params) do + current_user = authenticate!(conn) + + render(conn, "index.html", api_keys: ApiKey.get_api_keys_by_user_id(current_user.id)) + end + + def edit(conn, %{"id" => api_key}) do + current_user = authenticate!(conn) + + case ApiKey.api_key_by_api_key_and_identity_id(api_key, current_user.id) do + nil -> + conn + |> put_status(:not_found) + |> put_view(BlockScoutWeb.PageNotFoundView) + |> render("index.html", token: nil) + + %ApiKey{} = api_key -> + render(conn, "form.html", method: :update, api_key: ApiKey.changeset(api_key)) + end + end + + def update(conn, %{"id" => api_key, "key" => %{"api_key" => api_key, "name" => name}}) do + current_user = authenticate!(conn) + + ApiKey.update_name_api_key(name, current_user.id, api_key) + + redirect(conn, to: api_key_path(conn, :index)) + end + + def delete(conn, %{"id" => api_key}) do + current_user = authenticate!(conn) + + ApiKey.delete_api_key(current_user.id, api_key) + + redirect(conn, to: api_key_path(conn, :index)) + end + + defp empty_api_key, do: ApiKey.changeset() +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex new file mode 100644 index 000000000000..f34f47cbc651 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex @@ -0,0 +1,34 @@ +
    +
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> +
    +
    +
    +

    <%=if @method == :update, do: gettext("Update"), else: gettext("Add") %> <%= gettext "API key"%>

    + +
    +
    +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex new file mode 100644 index 000000000000..e31705f84752 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex @@ -0,0 +1,44 @@ +
    +
    + <%= render BlockScoutWeb.Account.CommonView, "_nav.html", conn: @conn %> +
    +
    +
    +

    <%= gettext "Api keys" %>

    +
    +
    +
    + <%= if @api_keys == [] do %> +
    +
    + <%= gettext "You don't have API keys yet" %> +
    +
    +

    + <% else %> + + + + + + + + + + + <%= Enum.map(@api_keys, fn key -> + render("row.html", api_key: key, conn: @conn) + end) %> + +
    <%= gettext "Name" %><%= gettext "API key" %>
    + <% end %> +
    +
    + <%= if Enum.count(@api_keys) < 3 do %> + <%= gettext "Add API key" %> + <% end %> +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/row.html.eex new file mode 100644 index 000000000000..3481209f09b1 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/row.html.eex @@ -0,0 +1,14 @@ + + <%= @api_key.name %> + + <%= @api_key.api_key %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @api_key.api_key, aria_label: gettext("Copy API key"), title: gettext("Copy API key"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> + + + <%= link gettext("Remove"), to: api_key_path(@conn, :delete, @api_key.api_key), method: :delete %> + + + <%= link gettext("Edit"), to: api_key_path(@conn, :edit, @api_key.api_key) %> + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex index d632c0b1690f..0b4e839f9bdc 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex @@ -12,5 +12,8 @@ +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 8709d502ec22..26de81222252 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -187,6 +187,7 @@ Watch list Address Tags Transaction Tags + <%= gettext "API keys" %> Sign out
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex index c89ac104353d..c3cbaeedef8b 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex @@ -8,6 +8,7 @@ defmodule BlockScoutWeb.AccessHelpers do alias BlockScoutWeb.API.APILogger alias BlockScoutWeb.API.RPC.RPCView alias BlockScoutWeb.WebRouter.Helpers + alias Explorer.Account.Api.Key, as: ApiKey alias Plug.Conn alias RemoteIp @@ -81,11 +82,18 @@ defmodule BlockScoutWeb.AccessHelpers do ip = remote_ip_from_headers || remote_ip ip_string = to_string(:inet_parse.ntoa(ip)) + plan = get_plan(conn.query_params) + cond do conn.query_params && Map.has_key?(conn.query_params, "apikey") && Map.get(conn.query_params, "apikey") == static_api_key -> rate_limit_by_key(static_api_key, api_rate_limit_by_key) + conn.query_params && Map.has_key?(conn.query_params, "apikey") && !is_nil(plan) -> + conn.query_params + |> Map.get("apikey") + |> rate_limit_by_key(plan.max_req_per_second) + Enum.member?(api_rate_limit_whitelisted_ips(), ip_string) -> rate_limit_by_ip(ip_string, api_rate_limit_by_ip) @@ -95,6 +103,18 @@ defmodule BlockScoutWeb.AccessHelpers do end end + defp get_plan(query_params) do + with true <- query_params && Map.has_key?(query_params, "apikey"), + {:ok, casted_api_key} <- ApiKey.cast_api_key(Map.get(query_params, "apikey")), + api_key <- ApiKey.api_key_with_plan_by_api_key(casted_api_key), + true <- !is_nil(api_key) do + api_key.identity.plan + else + _ -> + nil + end + end + defp rate_limit_by_key(api_key, api_rate_limit_by_key) do case Hammer.check_rate("api-#{api_key}", 1_000, api_rate_limit_by_key) do {:allow, _count} -> diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex new file mode 100644 index 000000000000..14b112e96dec --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex @@ -0,0 +1,3 @@ +defmodule BlockScoutWeb.Account.ApiKeyView do + use BlockScoutWeb, :view +end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index c1db47744801..9b3c1e23cbf0 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -50,6 +50,11 @@ defmodule BlockScoutWeb.WebRouter do only: [:new, :create, :edit, :update, :delete], as: :watchlist_address ) + + resources("/api_key", Account.ApiKeyController, + only: [:new, :create, :edit, :update, :delete, :index], + as: :api_key + ) end # Disallows Iframes (write routes) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index ca936a112980..d3f83464aa8f 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -141,6 +141,11 @@ msgstr "" msgid "Add" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Add API key" +msgstr "" + #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 #: lib/block_scout_web/views/address_view.ex:104 @@ -583,6 +588,12 @@ msgstr "" msgid "Copy ABI" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:6 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:6 +#, elixir-autogen, elixir-format +msgid "Copy API key" +msgstr "" + #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 @@ -889,6 +900,11 @@ msgstr "" msgid "Easy Cowboy! This block does not exist yet!" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:12 +#, elixir-autogen, elixir-format +msgid "Edit" +msgstr "" + #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:5 #, elixir-autogen, elixir-format msgid "Emission Contract" @@ -1447,6 +1463,8 @@ msgstr "" msgid "N/A bytes" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:22 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:4 @@ -1455,6 +1473,11 @@ msgstr "" msgid "Name" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:20 +#, elixir-autogen, elixir-format +msgid "Name this API key" +msgstr "" + #: lib/block_scout_web/templates/address_token/overview.html.eex:44 #, elixir-autogen, elixir-format msgid "Net Worth" @@ -1707,6 +1730,11 @@ msgstr "" msgid "Records" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Remove" +msgstr "" + #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:155 #, elixir-autogen, elixir-format msgid "Request URL" @@ -1755,6 +1783,11 @@ msgstr "" msgid "Run" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:26 +#, elixir-autogen, elixir-format +msgid "Save" +msgstr "" + #: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format @@ -2675,6 +2708,11 @@ msgstr "" msgid "Yes" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have API keys yet" +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:111 #, elixir-autogen, elixir-format msgid "at" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index c979e80a7aac..53d903f8e00c 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -141,6 +141,11 @@ msgstr "" msgid "Add" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Add API key" +msgstr "" + #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 #: lib/block_scout_web/views/address_view.ex:104 @@ -583,6 +588,12 @@ msgstr "" msgid "Copy ABI" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:6 +#: lib/block_scout_web/templates/account/api_key/row.html.eex:6 +#, elixir-autogen, elixir-format +msgid "Copy API key" +msgstr "" + #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 #: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 @@ -889,6 +900,11 @@ msgstr "" msgid "Easy Cowboy! This block does not exist yet!" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:12 +#, elixir-autogen, elixir-format +msgid "Edit" +msgstr "" + #: lib/block_scout_web/templates/transaction/_emission_reward_tile.html.eex:5 #, elixir-autogen, elixir-format msgid "Emission Contract" @@ -1447,6 +1463,8 @@ msgstr "" msgid "N/A bytes" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:22 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:4 @@ -1455,6 +1473,11 @@ msgstr "" msgid "Name" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:20 +#, elixir-autogen, elixir-format +msgid "Name this API key" +msgstr "" + #: lib/block_scout_web/templates/address_token/overview.html.eex:44 #, elixir-autogen, elixir-format msgid "Net Worth" @@ -1707,6 +1730,11 @@ msgstr "" msgid "Records" msgstr "" +#: lib/block_scout_web/templates/account/api_key/row.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Remove" +msgstr "" + #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:155 #, elixir-autogen, elixir-format msgid "Request URL" @@ -1755,6 +1783,11 @@ msgstr "" msgid "Run" msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:26 +#, elixir-autogen, elixir-format +msgid "Save" +msgstr "" + #: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_search.html.eex:34 #, elixir-autogen, elixir-format @@ -2675,6 +2708,11 @@ msgstr "" msgid "Yes" msgstr "" +#: lib/block_scout_web/templates/account/api_key/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have API keys yet" +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:111 #, elixir-autogen, elixir-format msgid "at" diff --git a/apps/explorer/lib/explorer/accounts/api/key.ex b/apps/explorer/lib/explorer/accounts/api/key.ex new file mode 100644 index 000000000000..fdb789aa8d7e --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/api/key.ex @@ -0,0 +1,113 @@ +defmodule Explorer.Account.Api.Key do + @moduledoc """ + Module is responsible for schema for API keys, keys is used to track number of requests to the API endpoints + """ + use Explorer.Schema + + alias Explorer.Accounts.Identity + alias Ecto.{Changeset, UUID} + alias Explorer.Repo + + import Ecto.Changeset + + @max_key_per_account 3 + + @primary_key false + schema "account_api_keys" do + field(:name, :string) + field(:api_key, UUID, primary_key: true) + belongs_to(:identity, Identity) + + timestamps() + end + + @attrs ~w(api_key name identity_id)a + + def changeset do + %__MODULE__{} + |> cast(%{}, @attrs) + end + + def changeset(%__MODULE__{} = api_key, attrs \\ %{}) do + api_key + |> cast(attrs, @attrs) + |> validate_required(@attrs) + end + + def create_api_key_changeset_and_insert(%__MODULE__{} = api_key \\ %__MODULE__{}, attrs \\ %{}) do + api_key + |> cast(attrs, @attrs) + |> put_change(:api_key, generate_api_key()) + |> validate_required(@attrs) + |> unique_constraint(:api_key) + |> api_key_count_constraint() + |> Repo.insert() + end + + def api_key_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = api_key) do + if identity_id + |> api_keys_by_identity_id_query() + |> limit(@max_key_per_account) + |> Repo.aggregate(:count, :api_key) == @max_key_per_account do + api_key + |> add_error(:name, "Max #{@max_key_per_account} keys per account") + else + api_key + end + end + + def generate_api_key do + UUID.generate() + end + + def api_keys_by_identity_id_query(id) do + __MODULE__ + |> where([api_key], api_key.identity_id == ^id) + end + + def api_key_by_api_key_and_identity_id_query(api_key, identity_id) do + __MODULE__ + |> where([api_key], api_key.identity_id == ^identity_id and api_key.api_key == ^api_key) + end + + def api_key_by_api_key_and_identity_id(api_key, identity_id) do + api_key + |> api_key_by_api_key_and_identity_id_query(identity_id) + |> Repo.one() + end + + def update_name_api_key(new_name, identity_id, api_key) do + api_key + |> api_key_by_api_key_and_identity_id_query(identity_id) + |> update([key], set: [name: ^new_name, updated_at: fragment("NOW()")]) + |> Repo.update_all([]) + end + + def delete_api_key(identity_id, api_key) do + api_key + |> api_key_by_api_key_and_identity_id_query(identity_id) + |> Repo.delete_all() + end + + def to_string(api_key_value) do + api_key_value + |> Base.encode64() + end + + def get_api_keys_by_user_id(id) do + id + |> api_keys_by_identity_id_query() + |> Repo.all() + end + + def api_key_with_plan_by_api_key(api_key) do + __MODULE__ + |> where([api_key], api_key.api_key == ^api_key) + |> Repo.one() + |> Repo.preload(identity: :plan) + end + + def cast_api_key(api_key) do + UUID.cast(api_key) + end +end diff --git a/apps/explorer/lib/explorer/accounts/api/plan.ex b/apps/explorer/lib/explorer/accounts/api/plan.ex new file mode 100644 index 000000000000..b89b33bc9cb7 --- /dev/null +++ b/apps/explorer/lib/explorer/accounts/api/plan.ex @@ -0,0 +1,13 @@ +defmodule Explorer.Account.Api.Plan do + @moduledoc """ + Module is responsible for schema for API plans, each plan contains its name and maximum number of requests per second + """ + use Explorer.Schema + + schema "account_api_plans" do + field(:name, :string) + field(:max_req_per_second, :integer) + + timestamps() + end +end diff --git a/apps/explorer/lib/explorer/accounts/identity.ex b/apps/explorer/lib/explorer/accounts/identity.ex index 202d159607c3..cb1c69886a99 100644 --- a/apps/explorer/lib/explorer/accounts/identity.ex +++ b/apps/explorer/lib/explorer/accounts/identity.ex @@ -5,6 +5,7 @@ defmodule Explorer.Accounts.Identity do use Ecto.Schema import Ecto.Changeset + alias Explorer.Account.Api.Plan alias Explorer.Accounts.{TagAddress, Watchlist} schema "account_identities" do @@ -13,6 +14,7 @@ defmodule Explorer.Accounts.Identity do field(:name, :string) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) + belongs_to(:plan, Plan) timestamps() end diff --git a/apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs b/apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs new file mode 100644 index 000000000000..94362b20a049 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs @@ -0,0 +1,34 @@ +defmodule Explorer.Repo.Migrations.AddApiKeysAndPlansTables do + use Ecto.Migration + + def change do + create table(:account_api_plans, primary_key: false) do + add(:id, :serial, null: false, primary_key: true) + add(:max_req_per_second, :smallint) + add(:name, :string) + + timestamps() + end + + create(unique_index(:account_api_plans, [:id])) + + execute( + "INSERT INTO account_api_plans (id, max_req_per_second, name, inserted_at, updated_at) VALUES (1, 10, 'Free Plan', NOW(), NOW());" + ) + + create table(:account_api_keys, primary_key: false) do + add(:identity_id, references(:account_identities, column: :id, on_delete: :delete_all), null: false) + add(:name, :string) + add(:api_key, :uuid, null: false, primary_key: true) + + timestamps() + end + + alter table(:account_identities) do + add(:plan_id, references(:account_api_plans, column: :id), default: 1) + end + + create(unique_index(:account_api_keys, [:api_key])) + create(index(:account_api_keys, [:identity_id])) + end +end From a2a65e8568f3388442e10dea9d61169e8706b33c Mon Sep 17 00:00:00 2001 From: nikitosing Date: Wed, 13 Apr 2022 13:10:07 +0300 Subject: [PATCH 269/723] Fix code complexity --- .../lib/block_scout_web/views/access_helpers.ex | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex index c3cbaeedef8b..e79815346ab6 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex @@ -85,13 +85,12 @@ defmodule BlockScoutWeb.AccessHelpers do plan = get_plan(conn.query_params) cond do - conn.query_params && Map.has_key?(conn.query_params, "apikey") && - Map.get(conn.query_params, "apikey") == static_api_key -> + check_api_key(conn) && get_api_key(conn) == static_api_key -> rate_limit_by_key(static_api_key, api_rate_limit_by_key) - conn.query_params && Map.has_key?(conn.query_params, "apikey") && !is_nil(plan) -> - conn.query_params - |> Map.get("apikey") + check_api_key(conn) && !is_nil(plan) -> + conn + |> get_api_key() |> rate_limit_by_key(plan.max_req_per_second) Enum.member?(api_rate_limit_whitelisted_ips(), ip_string) -> @@ -103,6 +102,14 @@ defmodule BlockScoutWeb.AccessHelpers do end end + defp check_api_key(conn) do + conn.query_params && Map.has_key?(conn.query_params, "apikey") + end + + defp get_api_key(conn) do + Map.get(conn.query_params, "apikey") + end + defp get_plan(query_params) do with true <- query_params && Map.has_key?(query_params, "apikey"), {:ok, casted_api_key} <- ApiKey.cast_api_key(Map.get(query_params, "apikey")), From dc3d68433bdde3368b29ef7df5863e5f8a337968 Mon Sep 17 00:00:00 2001 From: nikitosing Date: Wed, 13 Apr 2022 16:22:25 +0300 Subject: [PATCH 270/723] Review changes --- .../controllers/account/api_key_controller.ex | 8 +- .../templates/account/api_key/form.html.eex | 10 +-- .../templates/account/api_key/row.html.eex | 8 +- .../block_scout_web/views/access_helpers.ex | 6 +- .../explorer/lib/explorer/accounts/api/key.ex | 78 ++++++++++++------- ...07134152_add_api_keys_and_plans_tables.exs | 10 +-- 6 files changed, 71 insertions(+), 49 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex index 8f49af2d2f83..8c69caffde64 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api_key_controller.ex @@ -30,13 +30,13 @@ defmodule BlockScoutWeb.Account.ApiKeyController do def index(conn, _params) do current_user = authenticate!(conn) - render(conn, "index.html", api_keys: ApiKey.get_api_keys_by_user_id(current_user.id)) + render(conn, "index.html", api_keys: ApiKey.get_api_keys_by_identity_id(current_user.id)) end def edit(conn, %{"id" => api_key}) do current_user = authenticate!(conn) - case ApiKey.api_key_by_api_key_and_identity_id(api_key, current_user.id) do + case ApiKey.api_key_by_value_and_identity_id(api_key, current_user.id) do nil -> conn |> put_status(:not_found) @@ -48,10 +48,10 @@ defmodule BlockScoutWeb.Account.ApiKeyController do end end - def update(conn, %{"id" => api_key, "key" => %{"api_key" => api_key, "name" => name}}) do + def update(conn, %{"id" => api_key, "key" => %{"value" => api_key, "name" => name}}) do current_user = authenticate!(conn) - ApiKey.update_name_api_key(name, current_user.id, api_key) + ApiKey.update_api_key_name(name, current_user.id, api_key) redirect(conn, to: api_key_path(conn, :index)) end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex index f34f47cbc651..8fd8d99b4223 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex @@ -6,13 +6,13 @@

    <%=if @method == :update, do: gettext("Update"), else: gettext("Add") %> <%= gettext "API key"%>

    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex index e3c73039e524..c1cca8adec1c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex @@ -4,14 +4,14 @@
    -

    Transaction Tags

    +

    <%= gettext "Transaction Tags" %>


    <%= if @tx_tags == [] do %>
    - You don't have transaction tags yet + <%= gettext "You don't have transaction tags yet" %>

    @@ -19,21 +19,23 @@ - - - + + + <%= Enum.map(@tx_tags, fn at -> - render(TagTransactionView, "row.html", tx_tag: at, conn: @conn) + render("row.html", tx_tag: at, conn: @conn) end) %>
    NameTransactionAction<%= gettext "Name" %><%= gettext "Transaction" %><%= gettext "Action" %>
    <% end %>
    - Add transaction tag + <%= if Enum.count(@tx_tags) < TagTransaction.get_max_tags_count() do %> + <%= gettext "Add transaction tag" %> + <% end %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex index 9a6ec978cc51..592532f625e8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex @@ -4,14 +4,14 @@
    -

    Watchlist

    +

    <%= gettext "Watch list" %>


    <%= if @watchlist.watchlist_addresses == [] do %>
    - You don't have addresses on you watchlist yet + <%= gettext "You don't have addresses on you watchlist yet" %>

    @@ -19,10 +19,10 @@ - - - - + + + + @@ -34,7 +34,9 @@ <% end %> - Add address + <%= if Enum.count(@watchlist.watchlist_addresses) < WatchlistAddress.get_max_watchlist_addresses_count() do %> + <%= gettext "Add address" %> + <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex index cb607fcc35a5..430de6ffef10 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex @@ -4,7 +4,7 @@
    -

    <%=if @method == :update, do: gettext("Edit Watchlist address"), else: gettext "Add address to the Watchlist" %>

    +

    <%=if @method == :update, do: gettext("Edit Watch list address"), else: gettext "Add address to the Watch list" %>

    diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex index 14b112e96dec..a0b21b79da2d 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api_key_view.ex @@ -1,3 +1,5 @@ defmodule BlockScoutWeb.Account.ApiKeyView do use BlockScoutWeb, :view + + alias Explorer.Account.Api.Key end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/custom_abi_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/custom_abi_view.ex index b7ddbf4f2869..3b38effa417b 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/custom_abi_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/custom_abi_view.ex @@ -2,6 +2,7 @@ defmodule BlockScoutWeb.Account.CustomABIView do use BlockScoutWeb, :view alias Ecto.Changeset + alias Explorer.Account.CustomABI def format_abi(custom_abi) do with {_type, abi} <- Changeset.fetch_field(custom_abi, :abi), diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/public_tags_request_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/public_tags_request_view.ex index 319e311372e9..2a13dd8d7ea3 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/public_tags_request_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/public_tags_request_view.ex @@ -1,6 +1,8 @@ defmodule BlockScoutWeb.Account.PublicTagsRequestView do use BlockScoutWeb, :view use Phoenix.HTML + + alias Explorer.Account.PublicTagsRequest alias Phoenix.HTML.Form def array_input(form, field, attrs \\ []) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex index 2fb4a7aec6ee..74886c33e9e5 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/tag_address_view.ex @@ -3,5 +3,5 @@ defmodule BlockScoutWeb.Account.TagAddressView do import BlockScoutWeb.AddressView, only: [trimmed_hash: 1] - alias BlockScoutWeb.Account.TagAddressView + alias Explorer.Account.TagAddress end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex index 9f35347f96df..7edfa1e3403e 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/tag_transaction_view.ex @@ -1,5 +1,5 @@ defmodule BlockScoutWeb.Account.TagTransactionView do use BlockScoutWeb, :view - alias BlockScoutWeb.Account.TagTransactionView + alias Explorer.Account.TagTransaction end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex index aa4f1394c8ec..70373de160a3 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex @@ -1,6 +1,7 @@ defmodule BlockScoutWeb.Account.WatchlistView do use BlockScoutWeb, :view + alias Explorer.Account.WatchlistAddress alias BlockScoutWeb.Account.WatchlistAddressView alias Explorer.ExchangeRates.Token alias Explorer.Market diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index ea31345865b0..68786489150e 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -131,6 +131,8 @@ msgstr "" msgid "APIs" msgstr "" +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:24 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:24 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69 #, elixir-autogen, elixir-format msgid "Action" @@ -146,32 +148,31 @@ msgstr "" msgid "Add" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:45 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:44 #, elixir-autogen, elixir-format msgid "Add API key" msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:45 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:44 #, elixir-autogen, elixir-format msgid "Add Custom ABI" msgstr "" #: lib/block_scout_web/templates/account/tag_address/form.html.eex:7 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Add address tag" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Add address to the Watchlist" -msgstr "" - #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:7 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Add transaction tag" msgstr "" #: lib/block_scout_web/templates/account/tag_address/form.html.eex:11 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:23 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:23 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:12 #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 @@ -559,7 +560,7 @@ msgid "Contract ABI" msgstr "" #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:18 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:30 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:29 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_address_field.html.eex:3 #: lib/block_scout_web/views/address_view.ex:105 #, elixir-autogen, elixir-format @@ -763,12 +764,12 @@ msgstr "" msgid "Create" msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:13 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Create a Custom ABI to interact with contracts." msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Create an API key to use with your RPC и EthRPC API requests." msgstr "" @@ -802,7 +803,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:19 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:8 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:7 #: lib/block_scout_web/templates/layout/_topnav.html.eex:182 #, elixir-autogen, elixir-format msgid "Custom ABI" @@ -1002,15 +1003,11 @@ msgstr "" #: lib/block_scout_web/templates/account/api_key/row.html.eex:16 #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:16 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:27 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Edit Watchlist address" -msgstr "" - #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:71 #, elixir-autogen, elixir-format msgid "Email notifications" @@ -1381,8 +1378,8 @@ msgstr "" msgid "Last Balance Update" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:12 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:18 #, elixir-autogen, elixir-format msgid "Learn more" msgstr "" @@ -1582,11 +1579,14 @@ msgid "N/A bytes" msgstr "" #: lib/block_scout_web/templates/account/api_key/form.html.eex:19 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:28 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:13 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:29 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:28 #: lib/block_scout_web/templates/account/tag_address/form.html.eex:18 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:22 #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:18 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:22 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:22 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 @@ -1919,7 +1919,7 @@ msgstr "" msgid "Request a public tag/label" msgstr "" -#: lib/block_scout_web/templates/account/public_tags_request/index.html.eex:36 +#: lib/block_scout_web/templates/account/public_tags_request/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Request to add public tag" msgstr "" @@ -2567,6 +2567,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:11 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:23 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 #: lib/block_scout_web/views/transaction_view.ex:461 #, elixir-autogen, elixir-format @@ -2902,16 +2903,13 @@ msgstr "" msgid "Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky." msgstr "" +#: lib/block_scout_web/templates/account/common/_nav.html.eex:7 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:7 #: lib/block_scout_web/templates/layout/_topnav.html.eex:178 #, elixir-autogen, elixir-format msgid "Watch list" msgstr "" -#: lib/block_scout_web/templates/account/common/_nav.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Watchlist" -msgstr "" - #: lib/block_scout_web/views/wei_helpers.ex:76 #, elixir-autogen, elixir-format msgid "Wei" @@ -2944,12 +2942,12 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:18 #, elixir-autogen, elixir-format msgid "You can create 3 API keys per account." msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:19 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:18 #, elixir-autogen, elixir-format msgid "You can create up to 15 Custom ABIs per account." msgstr "" @@ -3167,3 +3165,48 @@ msgstr "" #, elixir-autogen, elixir-format msgid "The requested path was not found on BlockScout." msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:25 +#, elixir-autogen, elixir-format +msgid "Actions" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Add address" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Add address to the Watch list" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:81 +#, elixir-autogen, elixir-format +msgid "Back to Watch list (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Edit Watch list address" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:77 +#, elixir-autogen, elixir-format +msgid "Remove from Watch list" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have address tags yet" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have addresses on you watchlist yet" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have transaction tags yet" +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 7370353d7408..715fd375aa87 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -131,6 +131,8 @@ msgstr "" msgid "APIs" msgstr "" +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:24 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:24 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69 #, elixir-autogen, elixir-format msgid "Action" @@ -146,32 +148,31 @@ msgstr "" msgid "Add" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:45 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:44 #, elixir-autogen, elixir-format msgid "Add API key" msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:45 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:44 #, elixir-autogen, elixir-format msgid "Add Custom ABI" msgstr "" #: lib/block_scout_web/templates/account/tag_address/form.html.eex:7 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Add address tag" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Add address to the Watchlist" -msgstr "" - #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:7 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Add transaction tag" msgstr "" #: lib/block_scout_web/templates/account/tag_address/form.html.eex:11 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:23 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:23 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:12 #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 @@ -559,7 +560,7 @@ msgid "Contract ABI" msgstr "" #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:18 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:30 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:29 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_contract_address_field.html.eex:3 #: lib/block_scout_web/views/address_view.ex:105 #, elixir-autogen, elixir-format @@ -763,12 +764,12 @@ msgstr "" msgid "Create" msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:13 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Create a Custom ABI to interact with contracts." msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:12 #, elixir-autogen, elixir-format msgid "Create an API key to use with your RPC и EthRPC API requests." msgstr "" @@ -802,7 +803,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:19 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:8 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:7 #: lib/block_scout_web/templates/layout/_topnav.html.eex:182 #, elixir-autogen, elixir-format msgid "Custom ABI" @@ -1002,15 +1003,11 @@ msgstr "" #: lib/block_scout_web/templates/account/api_key/row.html.eex:16 #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:16 +#: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:27 #, elixir-autogen, elixir-format msgid "Edit" msgstr "" -#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Edit Watchlist address" -msgstr "" - #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:71 #, elixir-autogen, elixir-format msgid "Email notifications" @@ -1381,8 +1378,8 @@ msgstr "" msgid "Last Balance Update" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:13 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:12 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:18 #, elixir-autogen, elixir-format msgid "Learn more" msgstr "" @@ -1582,11 +1579,14 @@ msgid "N/A bytes" msgstr "" #: lib/block_scout_web/templates/account/api_key/form.html.eex:19 -#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:28 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:13 -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:29 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:28 #: lib/block_scout_web/templates/account/tag_address/form.html.eex:18 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:22 #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:18 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:22 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:22 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 @@ -1919,7 +1919,7 @@ msgstr "" msgid "Request a public tag/label" msgstr "" -#: lib/block_scout_web/templates/account/public_tags_request/index.html.eex:36 +#: lib/block_scout_web/templates/account/public_tags_request/index.html.eex:37 #, elixir-autogen, elixir-format msgid "Request to add public tag" msgstr "" @@ -2567,6 +2567,7 @@ msgid "Total transactions" msgstr "" #: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:11 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:23 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:19 #: lib/block_scout_web/views/transaction_view.ex:461 #, elixir-autogen, elixir-format @@ -2902,16 +2903,13 @@ msgstr "" msgid "Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky." msgstr "" +#: lib/block_scout_web/templates/account/common/_nav.html.eex:7 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:7 #: lib/block_scout_web/templates/layout/_topnav.html.eex:178 #, elixir-autogen, elixir-format msgid "Watch list" msgstr "" -#: lib/block_scout_web/templates/account/common/_nav.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Watchlist" -msgstr "" - #: lib/block_scout_web/views/wei_helpers.ex:76 #, elixir-autogen, elixir-format msgid "Wei" @@ -2944,12 +2942,12 @@ msgstr "" msgid "Yes" msgstr "" -#: lib/block_scout_web/templates/account/api_key/index.html.eex:19 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:18 #, elixir-autogen, elixir-format msgid "You can create 3 API keys per account." msgstr "" -#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:19 +#: lib/block_scout_web/templates/account/custom_abi/index.html.eex:18 #, elixir-autogen, elixir-format msgid "You can create up to 15 Custom ABIs per account." msgstr "" @@ -3167,3 +3165,48 @@ msgstr "" #, elixir-autogen, elixir-format msgid "The requested path was not found on BlockScout." msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:25 +#, elixir-autogen, elixir-format, fuzzy +msgid "Actions" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:38 +#, elixir-autogen, elixir-format, fuzzy +msgid "Add address" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 +#, elixir-autogen, elixir-format, fuzzy +msgid "Add address to the Watch list" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:81 +#, elixir-autogen, elixir-format, fuzzy +msgid "Back to Watch list (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:7 +#, elixir-autogen, elixir-format, fuzzy +msgid "Edit Watch list address" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:77 +#, elixir-autogen, elixir-format +msgid "Remove from Watch list" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have address tags yet" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have addresses on you watchlist yet" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:14 +#, elixir-autogen, elixir-format +msgid "You don't have transaction tags yet" +msgstr "" diff --git a/apps/explorer/lib/explorer/account/api/key.ex b/apps/explorer/lib/explorer/account/api/key.ex index c80918b19ff8..ef24979034d2 100644 --- a/apps/explorer/lib/explorer/account/api/key.ex +++ b/apps/explorer/lib/explorer/account/api/key.ex @@ -124,4 +124,6 @@ defmodule Explorer.Account.Api.Key do end def api_key_with_plan_by_value(_), do: nil + + def get_max_api_keys_count, do: @max_key_per_account end diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index c4039e0af4e6..e18e809ae3a7 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -213,4 +213,6 @@ defmodule Explorer.Account.CustomABI do {:error, %{reason: :item_not_found}} end end + + def get_max_custom_abis_count, do: @max_abis_per_account end diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index b07a32b23fae..9883b14eddb8 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -12,6 +12,7 @@ defmodule Explorer.Account.PublicTagsRequest do import Ecto.Changeset + @max_public_tags_request_per_account 10 @max_addresses_per_request 10 @max_tags_per_request 2 @max_tag_length 35 @@ -60,6 +61,7 @@ defmodule Explorer.Account.PublicTagsRequest do |> validate_length(:addresses, min: 1, max: @max_addresses_per_request) |> extract_and_validate_addresses() |> foreign_key_constraint(:identity_id) + |> public_tags_request_count_constraint() end def changeset_without_constraints(%__MODULE__{} = public_tags_request \\ %__MODULE__{}, attrs \\ %{}) do @@ -93,6 +95,20 @@ defmodule Explorer.Account.PublicTagsRequest do defp trim_empty_addresses(attrs), do: attrs + def public_tags_request_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = request) do + if identity_id + |> public_tags_requests_by_identity_id_query() + |> limit(@max_public_tags_request_per_account) + |> Repo.aggregate(:count, :id) >= @max_public_tags_request_per_account do + request + |> add_error(:tags, "Max #{@max_public_tags_request_per_account} public tags requests per account") + else + request + end + end + + def public_tags_request_count_constraint(changeset), do: changeset + defp extract_and_validate_addresses(%Changeset{} = changeset) do with {:fetch, {_src, addresses}} <- {:fetch, fetch_field(changeset, :addresses)}, false <- is_nil(addresses), @@ -210,4 +226,6 @@ defmodule Explorer.Account.PublicTagsRequest do false end end + + def get_max_public_tags_request_count, do: @max_public_tags_request_per_account end diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index f21c9fb85a36..6a3bd89c2b41 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -12,6 +12,8 @@ defmodule Explorer.Account.TagAddress do alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Hash} + @max_tag_address_per_account 15 + schema "account_tag_addresses" do field(:name, :string) belongs_to(:identity, Identity) @@ -27,6 +29,11 @@ defmodule Explorer.Account.TagAddress do @attrs ~w(name identity_id address_hash)a + def changeset do + %__MODULE__{} + |> cast(%{}, @attrs) + end + @doc false def changeset(tag, attrs) do tag @@ -36,6 +43,7 @@ defmodule Explorer.Account.TagAddress do |> unique_constraint([:identity_id, :address_hash], message: "Address tag already exists") |> check_existance_or_create_address() |> foreign_key_constraint(:address_hash, message: "") + |> tag_address_count_constraint() end def create(attrs) do @@ -53,6 +61,20 @@ defmodule Explorer.Account.TagAddress do defp check_existance_or_create_address(changeset), do: changeset + def tag_address_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = tag_address) do + if identity_id + |> tags_address_by_identity_id_query() + |> limit(@max_tag_address_per_account) + |> Repo.aggregate(:count, :id) >= @max_tag_address_per_account do + tag_address + |> add_error(:name, "Max #{@max_tag_address_per_account} tags per account") + else + tag_address + end + end + + def tag_address_count_constraint(changeset), do: changeset + def tags_address_by_identity_id_query(id) when not is_nil(id) do __MODULE__ |> where([tag], tag.identity_id == ^id) @@ -120,4 +142,6 @@ defmodule Explorer.Account.TagAddress do {:error, %{reason: :item_not_found}} end end + + def get_max_tags_count, do: @max_tag_address_per_account end diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 25b2e196ab3a..b8d6d405386b 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -7,10 +7,13 @@ defmodule Explorer.Account.TagTransaction do import Ecto.Changeset + alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.Chain.{Hash, Transaction} alias Explorer.Repo + @max_tag_transaction_per_account 15 + schema "account_tag_transactions" do field(:name, :string) belongs_to(:identity, Identity) @@ -26,6 +29,11 @@ defmodule Explorer.Account.TagTransaction do @attrs ~w(name identity_id tx_hash)a + def changeset do + %__MODULE__{} + |> cast(%{}, @attrs) + end + @doc false def changeset(tag, attrs) do tag @@ -34,6 +42,7 @@ defmodule Explorer.Account.TagTransaction do |> validate_length(:name, min: 1, max: 35) |> unique_constraint([:identity_id, :tx_hash], message: "Transaction tag already exists") |> foreign_key_constraint(:tx_hash, message: "Transaction does not exist") + |> tag_transaction_count_constraint() end def create(attrs) do @@ -42,6 +51,20 @@ defmodule Explorer.Account.TagTransaction do |> Repo.insert() end + def tag_transaction_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = tag_transaction) do + if identity_id + |> tags_transaction_by_identity_id_query() + |> limit(@max_tag_transaction_per_account) + |> Repo.aggregate(:count, :id) >= @max_tag_transaction_per_account do + tag_transaction + |> add_error(:name, "Max #{@max_tag_transaction_per_account} tags per account") + else + tag_transaction + end + end + + def tag_transaction_count_constraint(changeset), do: changeset + def tags_transaction_by_identity_id_query(id) when not is_nil(id) do __MODULE__ |> where([tag], tag.identity_id == ^id) @@ -109,4 +132,6 @@ defmodule Explorer.Account.TagTransaction do {:error, %{reason: :item_not_found}} end end + + def get_max_tags_count, do: @max_tag_transaction_per_account end diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index 4e18df63da73..65abb8b69e63 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -13,6 +13,8 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Hash} + @max_watchlist_addresses_per_account 10 + schema "account_watchlist_addresses" do field(:name, :string) belongs_to(:address, Address, foreign_key: :address_hash, references: :hash, type: Hash.Address) @@ -36,15 +38,21 @@ defmodule Explorer.Account.WatchlistAddress do @attrs ~w(name address_hash watch_coin_input watch_coin_output watch_erc_20_input watch_erc_20_output watch_erc_721_input watch_erc_721_output watch_erc_1155_input watch_erc_1155_output notify_email notify_epns notify_feed notify_inapp watchlist_id)a + def changeset do + %__MODULE__{} + |> cast(%{}, @attrs) + end + @doc false def changeset(watchlist_address, attrs \\ %{}) do watchlist_address |> cast(attrs, @attrs) |> validate_length(:name, min: 1, max: 35) |> validate_required([:name, :address_hash, :watchlist_id], message: "Required") - |> unique_constraint([:watchlist_id, :address_hash], message: "Address already added to the watchlist") + |> unique_constraint([:watchlist_id, :address_hash], message: "Address already added to the watch list") |> check_address() |> foreign_key_constraint(:address_hash, message: "") + |> watchlist_address_count_constraint() end def create(attrs) do @@ -53,6 +61,20 @@ defmodule Explorer.Account.WatchlistAddress do |> Repo.insert() end + def watchlist_address_count_constraint(%Changeset{changes: %{watchlist_id: watchlist_id}} = watchlist_address) do + if watchlist_id + |> watchlist_addresses_by_watchlist_id_query() + |> limit(@max_watchlist_addresses_per_account) + |> Repo.aggregate(:count, :id) >= @max_watchlist_addresses_per_account do + watchlist_address + |> add_error(:name, "Max #{@max_watchlist_addresses_per_account} watch list addresses per account") + else + watchlist_address + end + end + + def watchlist_address_count_constraint(changeset), do: changeset + defp check_address(%Changeset{changes: %{address_hash: address_hash}, valid?: true} = changeset) do with {:ok, address_hash} <- ForbiddenAddress.check(address_hash), {:ok, %Address{}} <- Chain.find_or_insert_address_from_hash(address_hash, []) do @@ -68,11 +90,17 @@ defmodule Explorer.Account.WatchlistAddress do defp check_address(changeset), do: changeset + def watchlist_addresses_by_watchlist_id_query(watchlist_id) when not is_nil(watchlist_id) do + __MODULE__ + |> where([wl_address], wl_address.watchlist_id == ^watchlist_id) + end + + def watchlist_addresses_by_watchlist_id_query(_), do: nil + def watchlist_address_by_id_and_watchlist_id_query(watchlist_address_id, watchlist_id) when not is_nil(watchlist_address_id) and not is_nil(watchlist_id) do __MODULE__ |> where([wl_address], wl_address.watchlist_id == ^watchlist_id and wl_address.id == ^watchlist_address_id) - |> order_by([wl_address], desc: wl_address.id) end def watchlist_address_by_id_and_watchlist_id_query(_, _), do: nil @@ -106,4 +134,6 @@ defmodule Explorer.Account.WatchlistAddress do {:error, %{reason: :item_not_found}} end end + + def get_max_watchlist_addresses_count, do: @max_watchlist_addresses_per_account end From d0d677a4472b20b17a7d9a64b65741908d1a2bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 14 Aug 2022 22:12:45 +0300 Subject: [PATCH 341/723] Add limit: only unique addresses within 24 hours --- .../explorer/account/public_tags_request.ex | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index 9883b14eddb8..abe02be37904 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -12,7 +12,9 @@ defmodule Explorer.Account.PublicTagsRequest do import Ecto.Changeset - @max_public_tags_request_per_account 10 + @distance_between_same_addresses 24 * 3600 + + @max_public_tags_request_per_account 15 @max_addresses_per_request 10 @max_tags_per_request 2 @max_tag_length 35 @@ -62,6 +64,7 @@ defmodule Explorer.Account.PublicTagsRequest do |> extract_and_validate_addresses() |> foreign_key_constraint(:identity_id) |> public_tags_request_count_constraint() + |> public_tags_request_time_interval_uniqueness() end def changeset_without_constraints(%__MODULE__{} = public_tags_request \\ %__MODULE__{}, attrs \\ %{}) do @@ -109,6 +112,33 @@ defmodule Explorer.Account.PublicTagsRequest do def public_tags_request_count_constraint(changeset), do: changeset + defp public_tags_request_time_interval_uniqueness(%Changeset{changes: %{addresses: addresses}} = request) do + public_tags_request = + request + |> fetch_field!(:identity_id) + |> public_tags_requests_by_identity_id_query() + |> where( + [public_tags_request], + fragment("? && ?", public_tags_request.addresses, ^Enum.map(addresses, fn x -> x.bytes end)) + ) + |> limit(1) + |> Repo.one() + + now = DateTime.utc_now() + + if !is_nil(public_tags_request) && + public_tags_request.inserted_at + |> DateTime.add(@distance_between_same_addresses, :second) + |> DateTime.compare(now) == :gt |> debug("compare") do + request + |> add_error(:addresses, "You have already submitted the same public tag address in the last 24 hours") + else + request + end + end + + defp public_tags_request_time_interval_uniqueness(changeset), do: changeset + defp extract_and_validate_addresses(%Changeset{} = changeset) do with {:fetch, {_src, addresses}} <- {:fetch, fetch_field(changeset, :addresses)}, false <- is_nil(addresses), From ed46bc3136b9e0136bc7ad82e48a7b389310fc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 14 Aug 2022 22:21:39 +0300 Subject: [PATCH 342/723] Remove debug; Fix credo --- .../lib/block_scout_web/views/account/watchlist_view.ex | 2 +- apps/explorer/lib/explorer/account/public_tags_request.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex index 70373de160a3..fa3966323606 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_view.ex @@ -1,8 +1,8 @@ defmodule BlockScoutWeb.Account.WatchlistView do use BlockScoutWeb, :view - alias Explorer.Account.WatchlistAddress alias BlockScoutWeb.Account.WatchlistAddressView + alias Explorer.Account.WatchlistAddress alias Explorer.ExchangeRates.Token alias Explorer.Market alias Indexer.Fetcher.CoinBalanceOnDemand diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index abe02be37904..32f749133dda 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -129,7 +129,7 @@ defmodule Explorer.Account.PublicTagsRequest do if !is_nil(public_tags_request) && public_tags_request.inserted_at |> DateTime.add(@distance_between_same_addresses, :second) - |> DateTime.compare(now) == :gt |> debug("compare") do + |> DateTime.compare(now) == :gt do request |> add_error(:addresses, "You have already submitted the same public tag address in the last 24 hours") else From 186178ede987c3ac5d4fd553a027170927ea2aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 15 Aug 2022 16:36:52 +0300 Subject: [PATCH 343/723] Remove migration which will be performed manually --- .../20220811121307_remove_redundant_indexes.exs | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 apps/explorer/priv/repo/migrations/20220811121307_remove_redundant_indexes.exs diff --git a/apps/explorer/priv/repo/migrations/20220811121307_remove_redundant_indexes.exs b/apps/explorer/priv/repo/migrations/20220811121307_remove_redundant_indexes.exs deleted file mode 100644 index b98c77e57a58..000000000000 --- a/apps/explorer/priv/repo/migrations/20220811121307_remove_redundant_indexes.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule Explorer.Repo.Migrations.RemoveRedundantIndexes do - use Ecto.Migration - - def change do - drop_if_exists(unique_index(:account_custom_abis, [:id])) - drop_if_exists(unique_index(:account_api_keys, [:value])) - end -end From f67550d346ecdbc56ed4833d15f7d6bf4509edda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 15 Aug 2022 19:22:27 +0300 Subject: [PATCH 344/723] Add desc order for watchlist addresses; Fix tests; Update docs --- apps/block_scout_web/API blueprint.md | 909 ++++++++++-------- apps/block_scout_web/API.md | 830 +++++++++------- .../account/api/v1/user_controller.ex | 11 +- .../account/watchlist_controller.ex | 5 +- .../account/api/v1/user_controller_test.exs | 28 +- apps/block_scout_web/test/test_helper.exs | 12 +- .../explorer/account/public_tags_request.ex | 14 +- apps/explorer/test/support/factory.ex | 4 +- 8 files changed, 1002 insertions(+), 811 deletions(-) diff --git a/apps/block_scout_web/API blueprint.md b/apps/block_scout_web/API blueprint.md index 18995e6bc15b..77f2961f15cc 100644 --- a/apps/block_scout_web/API blueprint.md +++ b/apps/block_scout_web/API blueprint.md @@ -22,6 +22,28 @@ {"auth_token":"..."} +# Group BlockScoutWeb.Account.Api.V1.AuthController +## BlockScoutWeb.Account.Api.V1.AuthController [/auth/api/logout] +### BlockScoutWeb.Account.Api.V1.AuthController info [GET /auth/api/logout] + + + + + ++ Logout +**GET**  `/auth/api/logout` + + + Headers + + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY5MjFmOGQtNjBiNC00ODE5LTk4MGEtNzFmZjcwYTAyMGNkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.yX_VbSJf6VKnszqXQXxm7JdkHlxxzmlQYUAF-1HWwoS9tVoWxiEcuo9DDOfVP6xmOSXp_pfabbX10y9XX7rQLw + ++ Response 200 + + + Body + + OK + + # Group BlockScoutWeb.Account.Api.V1.UserController ## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/info] ### BlockScoutWeb.Account.Api.V1.UserController info [GET /api/account/v1/user/info] @@ -35,7 +57,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDI5NDBiMGUtY2I1Ny00YzQ5LWJjMmUtMTIxZjBmZGNkMGIzIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.1v4u5r5o0f8FBGr4eZ0U3_rF9hJmL8PxNnDZLMxi6EtO6SlmM5FiUdC0AmPYjdMhOSvrTF-hJUHy6u3PztMNUQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY5MjFmOGQtNjBiNC00ODE5LTk4MGEtNzFmZjcwYTAyMGNkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.yX_VbSJf6VKnszqXQXxm7JdkHlxxzmlQYUAF-1HWwoS9tVoWxiEcuo9DDOfVP6xmOSXp_pfabbX10y9XX7rQLw + Response 200 @@ -43,17 +65,17 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9OSIm67azAAABJB + x-request-id: FwuQnPvkXpQ_AFwAABPB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "nickname": "test_user19", - "name": "User Test19", - "email": "test_user-19@blockscout.com", - "avatar": "https://example.com/avatar/test_user19" + "nickname": "test_user5", + "name": "User Test5", + "email": "test_user-5@blockscout.com", + "avatar": "https://example.com/avatar/test_user5" } ### BlockScoutWeb.Account.Api.V1.UserController create_tag_address [POST /api/account/v1/user/tags/address] @@ -66,7 +88,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGRkMWFhNmQtNTNlYy00ODUwLTlhNjMtYTQ0ZDEzMzI4NzYxIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.Y358pcM31Tr8trpa-YQ4Gw7V-o8MafjUtrWcIvPvQpg-N50uxCWfuJ82mp6tAtuPzaSY_r2-YqZnUavQdm3Pvw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZkYjczZWEtYjRhOC00NjQ1LWJiZTMtZDU2OWQyYTM3ODY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.hWPDoWz6sjih4_W6d0_dGJzUBDaX8391rX2DhQ_PNo8JhsQ2NlQzGSk8fZ_09GNhGHvoKuZXnyJSHoIu-yt7XQ content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -81,15 +103,15 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8nMFI1lqPkAAAuh + x-request-id: FwuQnQulkfs31PUAAB7B + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "name": "MyName", - "id": 127, + "id": 186, "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b" } @@ -110,7 +132,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGRkMWFhNmQtNTNlYy00ODUwLTlhNjMtYTQ0ZDEzMzI4NzYxIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.Y358pcM31Tr8trpa-YQ4Gw7V-o8MafjUtrWcIvPvQpg-N50uxCWfuJ82mp6tAtuPzaSY_r2-YqZnUavQdm3Pvw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZkYjczZWEtYjRhOC00NjQ1LWJiZTMtZDU2OWQyYTM3ODY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.hWPDoWz6sjih4_W6d0_dGJzUBDaX8391rX2DhQ_PNo8JhsQ2NlQzGSk8fZ_09GNhGHvoKuZXnyJSHoIu-yt7XQ + Response 200 @@ -118,10 +140,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8oI7GZlqPkAAAvB + x-request-id: FwuQnQvZW8s31PUAAB7h + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -137,29 +159,29 @@ } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/128] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/187] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_address [PUT /api/account/v1/user/tags/address/{id}] + Parameters - + id: `128` - id: 128 + + id: `187` + id: 187 + Request Edit private address tag -**PUT**  `/api/account/v1/user/tags/address/128` +**PUT**  `/api/account/v1/user/tags/address/187` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGQxNTAyMTAtYjMxNy00MjgzLWI0NjAtZDIzNmQ2MGZkMzlmIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIwIiwidHlwIjoiYWNjZXNzIn0.JdHdw1NwwHTzZqCZ0WjiMG6gnTOVspvXFL7M9FhSkJiwLvmyhcBxo410Z3MlqqKEnuP93nQua6i6AIynuHr2Kw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzMwMzNmZTgtZTcwOS00YmU3LWI5Y2MtMzRhOTdjMGM0NzIyIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.9X0Kzbgoz9dO4NF390Umo4m_iqJbzDbssIl2Rm9WzEL3Q2bkAqtM1Pt_M3-uRTlATOCrlyNCN0LV1UYMPmEQAQ content-type: multipart/mixed; boundary=plug_conn_test + Body { "name": "name3", - "address_hash": "0x000000000000000000000000000000000000002f" + "address_hash": "0x0000000000000000000000000000000000000087" } + Response 200 @@ -168,16 +190,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9P_gHp-3AQAABMh + x-request-id: FwuQnRItprfUTWIAACPB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "name": "name3", - "id": 128, - "address_hash": "0x000000000000000000000000000000000000002f" + "id": 187, + "address_hash": "0x0000000000000000000000000000000000000087" } ### BlockScoutWeb.Account.Api.V1.UserController tags_address [GET /api/account/v1/user/tags/address] @@ -190,7 +212,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjVmZTUyNWMtNGIzNi00NDJjLWEwM2QtOGM2MTgwOWEyOTdkIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.lbGj3MpBlPgOwlfoaIWqzsQrFz8XhGZAwFJNd7b5xrdEjhehdQNCCsLyAdr3OOenldwsXHKefkcsMtPrllbwfw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDY2MzY5MmEtOGIyMC00NGYwLWExNzItYWJlYmM2OWU5YjQ3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.48A1cvh2LlJSNm5R-gpJOE5DzikztneJ0BA04Q6vpyjinzWYuI43-L9dQ0zju_OFx_GSQZ2jiVbvMS1qRqW2WA + Response 200 @@ -198,27 +220,27 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8a8MMUw_lsAAAah + x-request-id: FwuQnQXweZ7Vod4AABrB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ { - "name": "name0", - "id": 124, - "address_hash": "0x0000000000000000000000000000000000000003" + "name": "name2", + "id": 185, + "address_hash": "0x000000000000000000000000000000000000005f" }, { "name": "name1", - "id": 125, - "address_hash": "0x0000000000000000000000000000000000000004" + "id": 184, + "address_hash": "0x000000000000000000000000000000000000005e" }, { - "name": "name2", - "id": 126, - "address_hash": "0x0000000000000000000000000000000000000005" + "name": "name0", + "id": 183, + "address_hash": "0x000000000000000000000000000000000000005d" } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_address [DELETE /api/account/v1/user/tags/address/{id}] @@ -227,16 +249,16 @@ + Parameters - + id: `129` - id: 129 + + id: `180` + id: 180 + Request Delete private address tag -**DELETE**  `/api/account/v1/user/tags/address/129` +**DELETE**  `/api/account/v1/user/tags/address/180` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDBkNGU0N2UtYzE3OS00OWFjLThlMzQtZWJjNmMwZWYyYWZhIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIzIiwidHlwIjoiYWNjZXNzIn0.EFn5CLnK97TZjHHdyqZfboDWuSRvgmaBZQSe9TgPejixPrg_dMRIOpXiGNkM64flduFmSGKcsmLYKSaZ-LHO0Q + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGRmZDM5OWItYzI2My00Mjg2LWFjYzEtN2JhYzdlNzk3ODcwIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.S6enBZxXhYvL5JrJolfuYYDHn_oW36UpHUdyKVi6FHpH5wUZGTeOQ4Gj_9HaNcvm-wC7HNqU5OLTT6epq8rjuw + Response 200 @@ -244,10 +266,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9f16PR-c2IAAAuC + x-request-id: FwuQnPYnRIrQD4QAAAHE + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -264,12 +286,12 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTc0NzA5ODktN2MxYi00MjBlLTk0YzQtMDQ5NjZlYzdjZDM3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.7qv6zbqlLEWzwpztNfXshGLDHLL95FOghZIu_9Cl_lj7_mYkEjbky14RI0Ro5Y0cK817FmPq0CSYX-ZCxmpESg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA content-type: multipart/mixed; boundary=plug_conn_test + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", "name": "MyName" } @@ -279,16 +301,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9FrA4SXFKIAAAYi + x-request-id: FwuQnQl3iGVb82YAAB1B + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", "name": "MyName", - "id": 149 + "id": 209 } @@ -297,12 +319,12 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTc0NzA5ODktN2MxYi00MjBlLTk0YzQtMDQ5NjZlYzdjZDM3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.7qv6zbqlLEWzwpztNfXshGLDHLL95FOghZIu_9Cl_lj7_mYkEjbky14RI0Ro5Y0cK817FmPq0CSYX-ZCxmpESg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA content-type: multipart/mixed; boundary=plug_conn_test + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000005", "name": "MyName" } @@ -312,10 +334,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9EuXVCXFKIAAA-B + x-request-id: FwuQnQlK1bBb82YAAB0h + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -327,23 +349,23 @@ } # Group BlockScoutWeb.Account.Api.V1.TagsController -## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009] +## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006] ### BlockScoutWeb.Account.Api.V1.TagsController tags_transaction [GET /api/account/v1/tags/transaction/{transaction_hash}] + Parameters - + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000009` - transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000009 + + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000006` + transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000006 + Request Get tags for transaction -**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009` +**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTc0NzA5ODktN2MxYi00MjBlLTk0YzQtMDQ5NjZlYzdjZDM3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.7qv6zbqlLEWzwpztNfXshGLDHLL95FOghZIu_9Cl_lj7_mYkEjbky14RI0Ro5Y0cK817FmPq0CSYX-ZCxmpESg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA + Response 200 @@ -351,10 +373,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9F50_-XFKIAAA-h + x-request-id: FwuQnQmM88tb82YAAB1h + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -367,28 +389,28 @@ } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/144] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/204] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_transaction [PUT /api/account/v1/user/tags/transaction/{id}] + Parameters - + id: `144` - id: 144 + + id: `204` + id: 204 + Request Edit private transaction tag -**PUT**  `/api/account/v1/user/tags/transaction/144` +**PUT**  `/api/account/v1/user/tags/transaction/204` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMTBhMGYyYTItNzc3MC00Y2Y2LTgxMzgtNDcwZjI2ZmNhOWZiIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.IxHBdrhZjcVbN9DKUBAcxdlL8UJDqK-4Vcu5vTbmnvZPgqYuRfqMlkDDL6z9Uvs613_7bAWXP1QLFJB3k0JdSQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODRkMGU4ZGEtY2JjMi00NjVmLWE2MzgtM2Q3ZjYzY2FjZTdiIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.h6ACZ8fDDQp-XGwcG7mw3-B-kNrM0gdcAVFFTFJPH8p7Yh8c0kN_pSNBfZog1efajV6jZhJlf-XpSaekXDi3KQ content-type: multipart/mixed; boundary=plug_conn_test + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", "name": "name1" } @@ -398,16 +420,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H85G2H7pPTUAAAQi + x-request-id: FwuQnQNlh9q_YHIAABiB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", "name": "name1", - "id": 144 + "id": 204 } ### BlockScoutWeb.Account.Api.V1.UserController tags_transaction [GET /api/account/v1/user/tags/transaction] @@ -420,7 +442,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWVkMjFiNGEtZGVlZC00NzMzLWJhNWQtZWZhMzc4MWQ0Y2JmIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.IZ0bV7ZpzlQLrWcvuDI5gLkiHO4Tlb4gHWYp0BPko67c65i1Go4CGQla48PGrV4tmAtB52No9EJOPIx5BFi3HA + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMTAwZGRiNjUtYzlkYi00NjA5LWIwZTktNzc3OGQ3Y2FjNDU2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.CykUrkOmwHt_1jl3eu54NXtMzx-v0sbPCPTBilbQf82mTjhXLvNT9Qr8AV9mFm9Yseb8LNVlAfBMhyNs4zbywQ + Response 200 @@ -428,27 +450,27 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8vIbEt0TAgAAAiD + x-request-id: FwuQnRER4BGMdJQAAAni + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "name": "name0", - "id": 141 + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "name": "name2", + "id": 212 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", "name": "name1", - "id": 142 + "id": 211 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", - "name": "name2", - "id": 143 + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007", + "name": "name0", + "id": 210 } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_transaction [DELETE /api/account/v1/user/tags/transaction/{id}] @@ -457,16 +479,16 @@ + Parameters - + id: `145` - id: 145 + + id: `205` + id: 205 + Request Delete private transaction tag -**DELETE**  `/api/account/v1/user/tags/transaction/145` +**DELETE**  `/api/account/v1/user/tags/transaction/205` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOWMzMmNhMDYtZWQ1MS00N2FkLThhOGUtNjQ3ZDQ1YjA2Yzc1IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.zoyPtivvXWSp-bmco0TZk23SaEDkExrePwwUELiJmpLROmayNTbAat2iWPwjS5aoi4vrJ5i3TovSnkgyto2FPw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODNmODk3ZjktMGYwOS00YmE4LTk2NjItYTkwNTgyMjg4YjU4IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.F0g8CraaDyRHqI3wEZRMPMpg-mvyMBT2kExHmdG0Kh0iM7qs0vuHghXKBGZbnRaF_g6ebHj3sqkXNIZqgaHgRw + Response 200 @@ -474,10 +496,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8_XjGhcVs8AAAUC + x-request-id: FwuQnQf2NAcAeg4AAAZC + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -489,12 +511,12 @@ -+ Request Add address to watchlist ++ Request Add address to watch list **POST**  `/api/account/v1/user/watchlist` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiY2JkNThlMmYtNTlmNy00MWMxLTgzNGQtYzZhNzg1NWFhNTMwIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.ugSCWLPiRXd8nrldXQae9s-O93Y9jMyGSrqAIVNycbE303ws06ZJC4OELTs3z5qJE4Vu2gT430f7JU9diO4hwQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjY2MWJiZDMtZjE5Yy00NGI0LTk1MmYtN2M3N2NmYmU1YjE3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.W1hndEZ1_BeNMjTRi_NFnsRDrkbZ6odl2kHotJKownHzFqy_aStjwwnvMUDf0eSDbaH41EWVejYkU-e0t3Jb7A content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -502,10 +524,10 @@ "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": false }, "ERC-20": { @@ -514,10 +536,10 @@ } }, "notification_methods": { - "email": true + "email": false }, - "name": "test10", - "address_hash": "0x0000000000000000000000000000000000000030" + "name": "test18", + "address_hash": "0x0000000000000000000000000000000000000053" } + Response 200 @@ -526,20 +548,20 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9RGF0el_skAAAhi + x-request-id: FwuQnP-UqzU3wm8AABXB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": false }, "ERC-20": { @@ -548,12 +570,12 @@ } }, "notification_methods": { - "email": true + "email": false }, - "name": "test10", - "id": 143, + "name": "test18", + "id": 210, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000030", + "address_hash": "0x0000000000000000000000000000000000000053", "address_balance": null } ### BlockScoutWeb.Account.Api.V1.UserController watchlist [GET /api/account/v1/user/watchlist] @@ -567,7 +589,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiY2JkNThlMmYtNTlmNy00MWMxLTgzNGQtYzZhNzg1NWFhNTMwIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.ugSCWLPiRXd8nrldXQae9s-O93Y9jMyGSrqAIVNycbE303ws06ZJC4OELTs3z5qJE4Vu2gT430f7JU9diO4hwQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjY2MWJiZDMtZjE5Yy00NGI0LTk1MmYtN2M3N2NmYmU1YjE3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.W1hndEZ1_BeNMjTRi_NFnsRDrkbZ6odl2kHotJKownHzFqy_aStjwwnvMUDf0eSDbaH41EWVejYkU-e0t3Jb7A + Response 200 @@ -575,10 +597,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9TRT0Cl_skAAAjC + x-request-id: FwuQnQCLxGQ3wm8AABZB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ @@ -589,7 +611,7 @@ "incoming": true }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": false }, "ERC-20": { @@ -598,36 +620,36 @@ } }, "notification_methods": { - "email": true + "email": false }, - "name": "test10", - "id": 143, + "name": "test19", + "id": 211, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000030", + "address_hash": "0x0000000000000000000000000000000000000054", "address_balance": null }, { "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false }, "ERC-20": { - "outcoming": true, + "outcoming": false, "incoming": false } }, "notification_methods": { "email": false }, - "name": "test11", - "id": 144, + "name": "test18", + "id": 210, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000031", + "address_hash": "0x0000000000000000000000000000000000000053", "address_balance": null } ] @@ -637,16 +659,16 @@ + Parameters - + id: `141` - id: 141 + + id: `214` + id: 214 + Request Delete address from watchlist by id -**DELETE**  `/api/account/v1/user/watchlist/141` +**DELETE**  `/api/account/v1/user/watchlist/214` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOTBjOTk3NWMtMmFlNC00ZjA2LWJmOTktYjZhNGM3NzAxMTgyIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.0L0xwmjeU1spzJuJpHXOhOhmdui3ftU14ALdGsVdevRg2HLdjY34XTgdfS6oDquXOT3DXJmKwUYOQL2YVXT5zw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGNiMDRmYjgtMjA1Mi00NjNkLTk4NTYtZWFlNjc5MzBlZjkwIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.Z7mQYkFDdcMSc851qemRQR3Q-IBqA-fIWjmRMZtkvWdskeW1_bbjfOI8DHHaM59wRyzqdbUpihdLaOjF7hxpxw + Response 200 @@ -654,10 +676,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8iY6XaB5iEAAAmh + x-request-id: FwuQnQ6IcAyZMSkAAAkC + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -669,23 +691,23 @@ + Parameters - + id: `142` - id: 142 + + id: `212` + id: 212 + Request Edit watchlist address -**PUT**  `/api/account/v1/user/watchlist/142` +**PUT**  `/api/account/v1/user/watchlist/212` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGU2NDNjZDYtZWY3NC00ZjNlLWJkM2QtMmRkMzQ3YzViMWYwIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.2C8xUsb-p8dJlgvKFBW8EGIwXDRNkAOG5Mi-1iWogolLpVqmgCkVgS-UknGNb2IfPChRhI9J5AqF_pQ9QVZoHw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTBkNmQ5ZTItNGE2MC00ZDczLWIxZTgtYzRlZDYxYzMwZTk5IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.YRkIi1DrDYXsUBJaAda80uK9zZ5c5q_bMovYS_sVzfZsTWNtVgODi4dHsnwTeMGJb97RU8L12SuiiaEUGB9BNA content-type: multipart/mixed; boundary=plug_conn_test + Body { "notification_settings": { "native": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-721": { @@ -694,14 +716,14 @@ }, "ERC-20": { "outcoming": false, - "incoming": true + "incoming": false } }, "notification_methods": { "email": true }, - "name": "test9", - "address_hash": "0x000000000000000000000000000000000000002d" + "name": "test23", + "address_hash": "0x000000000000000000000000000000000000005c" } + Response 200 @@ -710,16 +732,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9LfJ0ItKUsAABFh + x-request-id: FwuQnQQmuI8HFF0AABlh + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "notification_settings": { "native": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-721": { @@ -728,16 +750,16 @@ }, "ERC-20": { "outcoming": false, - "incoming": true + "incoming": false } }, "notification_methods": { "email": true }, - "name": "test9", - "id": 142, + "name": "test23", + "id": 212, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000002d", + "address_hash": "0x000000000000000000000000000000000000005c", "address_balance": null } ### BlockScoutWeb.Account.Api.V1.UserController create_watchlist [POST /api/account/v1/user/watchlist] @@ -751,7 +773,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTY2M2JlNzMtOTFjMy00ZWRjLWE2YmQtMWJjOGE1MmM4NTk3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.zFABFWiAkeaeXzDL2Oc_DjwxYEq0ZfZCjUemzPIfgU5S3rpw2kZKRhWhpGPAB9NbeX2LEiX71nvPd6Kr1ZqkTw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOTVhOTk1N2ItNjAyMS00MDVhLTk2NTAtYTc5YWIyY2ZkNTllIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.7Oj-gf_a43Lv_7Lw5NWpbsO-pSyIzQXEsuLTnHGyz9OMsaZgmRulXrTezMGjeX1FQ-jdFTFIcNx1_B2hRt1tJQ content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -762,19 +784,19 @@ "incoming": true }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": true }, "ERC-20": { - "outcoming": false, + "outcoming": true, "incoming": false } }, "notification_methods": { - "email": true + "email": false }, - "name": "test0", - "address_hash": "0x0000000000000000000000000000000000000001" + "name": "test16", + "address_hash": "0x0000000000000000000000000000000000000014" } + Response 422 @@ -783,16 +805,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8TH4IeSrmsAAATh + x-request-id: FwuQnPsF_80NBRoAABLB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "errors": { "watchlist_id": [ - "Address already added to the watchlist" + "Address already added to the watch list" ] } } @@ -802,16 +824,16 @@ + Parameters - + id: `139` - id: 139 + + id: `209` + id: 209 + Request Example of error on editing watchlist address -**PUT**  `/api/account/v1/user/watchlist/139` +**PUT**  `/api/account/v1/user/watchlist/209` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTY2M2JlNzMtOTFjMy00ZWRjLWE2YmQtMWJjOGE1MmM4NTk3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.zFABFWiAkeaeXzDL2Oc_DjwxYEq0ZfZCjUemzPIfgU5S3rpw2kZKRhWhpGPAB9NbeX2LEiX71nvPd6Kr1ZqkTw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOTVhOTk1N2ItNjAyMS00MDVhLTk2NTAtYTc5YWIyY2ZkNTllIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.7Oj-gf_a43Lv_7Lw5NWpbsO-pSyIzQXEsuLTnHGyz9OMsaZgmRulXrTezMGjeX1FQ-jdFTFIcNx1_B2hRt1tJQ content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -822,19 +844,19 @@ "incoming": true }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": true }, "ERC-20": { - "outcoming": false, + "outcoming": true, "incoming": false } }, "notification_methods": { - "email": true + "email": false }, - "name": "test0", - "address_hash": "0x0000000000000000000000000000000000000001" + "name": "test16", + "address_hash": "0x0000000000000000000000000000000000000014" } + Response 422 @@ -843,16 +865,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8U3jEKSrmsAAAUh + x-request-id: FwuQnPtn2b0NBRoAABMB + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "errors": { "watchlist_id": [ - "Address already added to the watchlist" + "Address already added to the watch list" ] } } @@ -867,7 +889,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNzFjYmRkNWMtMDBiZC00MjY4LTliNmYtZDc1MDhlOWI2YjcxIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.V0HIqp8ynSybsSfvdHpkywR4rgszPMpUKXrHNz1RfW1QibT-lJDtE0YGB_SWcClQPlTPB8kF2vOXgnuqm2dc8A + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWYyYzYyY2QtMmYwNC00OTU3LTljZDAtMWM5OWNkYzhmYjA2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.6Mgi8a_whFYSD51Z-nkRQOehblhx7HbyPy6n35wxjVANsA7ZL3aiKDdF7p2sNzYkw1dPmAx8LzrZDehVdu_v1g content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -881,15 +903,15 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8yY1najgTYAAAxh + x-request-id: FwuQnQIzqZt_3TEAAAXi + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "name": "test", - "api_key": "ca9398ae-224c-4935-8e51-975c0e646487" + "api_key": "fef20f61-10b0-4a0c-8e95-4866a4889b6c" } @@ -898,7 +920,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZGJiYjZhMDItZTE4YS00YjU4LWFlODItZGZhMTIxZTUyOTZmIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.vcwFRHpmSCegFqYEpJmxc7TS11f8gZgIbDZZj3S9UmXYdOkqs3RC6J6X0tz0C8hVhkz9ttA9wW1R6uwekFkQhA + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDBiODFkZWQtZjY5Yi00MjAxLWI3NmEtYzM4YWFiYzkzYzhmIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.iL8cSQTiKO9VN4jpUIunL0HYIe8W1OjlpH0kJXWPjq1xzLs_9_r6La3Uup_ALfEhq7BEt2s7wr1jaVPko99W7g content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -912,10 +934,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9Ics3lTy1EAABCh + x-request-id: FwuQnQzjbeMxzQ0AAB_B + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -936,7 +958,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZGJiYjZhMDItZTE4YS00YjU4LWFlODItZGZhMTIxZTUyOTZmIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.vcwFRHpmSCegFqYEpJmxc7TS11f8gZgIbDZZj3S9UmXYdOkqs3RC6J6X0tz0C8hVhkz9ttA9wW1R6uwekFkQhA + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDBiODFkZWQtZjY5Yi00MjAxLWI3NmEtYzM4YWFiYzkzYzhmIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.iL8cSQTiKO9VN4jpUIunL0HYIe8W1OjlpH0kJXWPjq1xzLs_9_r6La3Uup_ALfEhq7BEt2s7wr1jaVPko99W7g + Response 200 @@ -944,24 +966,24 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9IonHZTy1EAAAZC + x-request-id: FwuQnQ0avJQxzQ0AAB_h + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ { "name": "test", - "api_key": "3ebadf72-dbbf-4f13-8480-0461f69de56d" + "api_key": "93614ffc-1676-4d57-9a62-7d0b125e489a" }, { "name": "test", - "api_key": "e12f940b-4387-487b-b4c1-fbea90892fd9" + "api_key": "b45de683-41eb-462d-b284-02e6ad3bd5e9" }, { "name": "test", - "api_key": "5aef562b-6849-4e9e-93bd-6ad6c9aef33f" + "api_key": "6e696004-25c1-4950-bb18-4c19ae0c6cc7" } ] ### BlockScoutWeb.Account.Api.V1.UserController update_api_key [PUT /api/account/v1/user/api_keys/{api_key}] @@ -970,16 +992,16 @@ + Parameters - + api_key: `6b315305-56ef-441a-9d2e-ff4e6451c095` - api_key: 6b315305-56ef-441a-9d2e-ff4e6451c095 + + api_key: `cb4cf42c-c366-4c89-99e4-13000f6f3c67` + api_key: cb4cf42c-c366-4c89-99e4-13000f6f3c67 + Request Edit api key -**PUT**  `/api/account/v1/user/api_keys/6b315305-56ef-441a-9d2e-ff4e6451c095` +**PUT**  `/api/account/v1/user/api_keys/cb4cf42c-c366-4c89-99e4-13000f6f3c67` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZjBiNDFjZTItMDQzZS00M2VjLTk5OWUtY2I5ZWU0ZmM1Y2Q0IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.ICMIz3WqHqn1ZhaSrBOp9y4ZyK4rzfArPGlyYcaP4dcKDVkCXE-QIp7bQivHmnfbiCW3JecHllxHanWl23RWwg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWU1NjhhY2ItZGVhYy00YWZhLTkwODUtOGU4OGMxZDFiODdkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.cfYSCi18vPBf4rXf4VI9RbtFaYjZVWhiNKxnNB26_SBl-1uEdtGwYXcvC9FDkGBNk_M2XDehKxFF8EK5egy9hw content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -993,15 +1015,15 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9NExhFvvqoAABHh + x-request-id: FwuQnPdqSzQmvRQAAAPD + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { "name": "test_1", - "api_key": "6b315305-56ef-441a-9d2e-ff4e6451c095" + "api_key": "cb4cf42c-c366-4c89-99e4-13000f6f3c67" } ### BlockScoutWeb.Account.Api.V1.UserController delete_api_key [DELETE /api/account/v1/user/api_keys/{api_key}] @@ -1009,16 +1031,16 @@ + Parameters - + api_key: `2cfe3ea9-0608-4086-9d51-a053166e2fb4` - api_key: 2cfe3ea9-0608-4086-9d51-a053166e2fb4 + + api_key: `0b952302-aab3-4347-9f2d-2de817fef0d3` + api_key: 0b952302-aab3-4347-9f2d-2de817fef0d3 + Request Delete api key -**DELETE**  `/api/account/v1/user/api_keys/2cfe3ea9-0608-4086-9d51-a053166e2fb4` +**DELETE**  `/api/account/v1/user/api_keys/0b952302-aab3-4347-9f2d-2de817fef0d3` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDYxOTg4MTQtOTc4Ny00MTY1LWE2ZjYtMTc5MzI0N2QzMDI5IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.hi7Xo5QAmbXBm-uFt3AgfyB8AzVicdNT1DkOMNVFhFHuLw3RfxP9hslNp97TL7wTR1dMIb8vaf9xjiKAlrnzvQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjI4MDFkYmMtMjZiNi00MTk4LWJkNGEtZWNkMzgyZjZiNDcxIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.sDgN3J5doqMhMePUiIKldbvwPmn9fk4Xt00-t-qYI05Oc06wYctim2r5Gbdzbb4AhAW3iPPnHo_0--fhiV8aUw + Response 200 @@ -1026,10 +1048,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9DOzZvGWf4AAAXC + x-request-id: FwuQnPEXjB3HPBMAABCh + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -1046,13 +1068,13 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODNiY2Q3NDMtNzU5Ni00OGUzLTg3Y2YtZTFmY2E4YWZmNTUzIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.dxOxJcXiSioauyKGh8WQBSuLd3XOpWUOf2M5cBmNQM81i6u9GEpMLCcVJ0So308PWE3Np7GGUCjQEZtb0YaWnw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNWRmM2Y3MmItODM1NS00MjIyLWFmYjgtNTE0MWUxMTM0YmY4IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.t_1KQfANUi8bymIC3rl_GKwpF8pmHFWaV6AZBJrXMartT_hge4aAVE_MHNq133hDq_r24AN2U9bWJmNTj0u01A content-type: multipart/mixed; boundary=plug_conn_test + Body { - "name": "test7", - "contract_address_hash": "0x0000000000000000000000000000000000000016", + "name": "test24", + "contract_address_hash": "0x000000000000000000000000000000000000006a", "abi": [ { "type": "function", @@ -1091,16 +1113,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8119RH5E60AAA0B + x-request-id: FwuQnQo0o9tYelIAAB2B + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "name": "test7", - "id": 309, - "contract_address_hash": "0x0000000000000000000000000000000000000016", + "name": "test24", + "id": 449, + "contract_address_hash": "0x000000000000000000000000000000000000006a", "abi": [ { "type": "function", @@ -1139,13 +1161,13 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODczYzM2NjktY2JlZS00YWFiLTllNTAtZjgyYjAyODJlNDQxIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.p0a8FOIu6VV7QAwtiERZ5WanI42oz8GkyoU3Tz0mz8kQlTpH1mZZgsPWb__epnNm61_rhHaelYLug0OtTvTRag + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMmNkYjIzZWQtNjg5ZS00M2ZiLWJhY2UtMThkNmI1ZjA2MmJhIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.JZLbq5J8ZoqANBHDXX3hkZUOS8fdRZrOUdIq1uULZBe4Mb2gnVPY2ug0O4zLKLxCvIj4t6DXqUfAq9Afsm5_9Q content-type: multipart/mixed; boundary=plug_conn_test + Body { - "name": "test27", - "contract_address_hash": "0x0000000000000000000000000000000000000078", + "name": "test15", + "contract_address_hash": "0x0000000000000000000000000000000000000013", "abi": [ { "type": "function", @@ -1184,10 +1206,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9pawu1W-8kAAAyC + x-request-id: FwuQnPoF3xt_aCMAAAaj + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -1208,7 +1230,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODczYzM2NjktY2JlZS00YWFiLTllNTAtZjgyYjAyODJlNDQxIiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.p0a8FOIu6VV7QAwtiERZ5WanI42oz8GkyoU3Tz0mz8kQlTpH1mZZgsPWb__epnNm61_rhHaelYLug0OtTvTRag + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMmNkYjIzZWQtNjg5ZS00M2ZiLWJhY2UtMThkNmI1ZjA2MmJhIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.JZLbq5J8ZoqANBHDXX3hkZUOS8fdRZrOUdIq1uULZBe4Mb2gnVPY2ug0O4zLKLxCvIj4t6DXqUfAq9Afsm5_9Q + Response 200 @@ -1216,17 +1238,17 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9ptd6pW-8kAAAxj + x-request-id: FwuQnPocnyl_aCMAAAbD + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ { - "name": "test12", - "id": 310, - "contract_address_hash": "0x0000000000000000000000000000000000000069", + "name": "test14", + "id": 447, + "contract_address_hash": "0x0000000000000000000000000000000000000012", "abi": [ { "type": "function", @@ -1260,8 +1282,8 @@ }, { "name": "test13", - "id": 311, - "contract_address_hash": "0x000000000000000000000000000000000000006a", + "id": 446, + "contract_address_hash": "0x0000000000000000000000000000000000000011", "abi": [ { "type": "function", @@ -1294,9 +1316,9 @@ ] }, { - "name": "test14", - "id": 312, - "contract_address_hash": "0x000000000000000000000000000000000000006b", + "name": "test12", + "id": 445, + "contract_address_hash": "0x0000000000000000000000000000000000000010", "abi": [ { "type": "function", @@ -1329,9 +1351,9 @@ ] }, { - "name": "test15", - "id": 313, - "contract_address_hash": "0x000000000000000000000000000000000000006c", + "name": "test11", + "id": 444, + "contract_address_hash": "0x000000000000000000000000000000000000000f", "abi": [ { "type": "function", @@ -1364,9 +1386,9 @@ ] }, { - "name": "test16", - "id": 314, - "contract_address_hash": "0x000000000000000000000000000000000000006d", + "name": "test10", + "id": 443, + "contract_address_hash": "0x000000000000000000000000000000000000000e", "abi": [ { "type": "function", @@ -1399,9 +1421,9 @@ ] }, { - "name": "test17", - "id": 315, - "contract_address_hash": "0x000000000000000000000000000000000000006e", + "name": "test9", + "id": 442, + "contract_address_hash": "0x000000000000000000000000000000000000000d", "abi": [ { "type": "function", @@ -1434,9 +1456,9 @@ ] }, { - "name": "test18", - "id": 316, - "contract_address_hash": "0x000000000000000000000000000000000000006f", + "name": "test8", + "id": 441, + "contract_address_hash": "0x000000000000000000000000000000000000000c", "abi": [ { "type": "function", @@ -1469,9 +1491,9 @@ ] }, { - "name": "test19", - "id": 317, - "contract_address_hash": "0x0000000000000000000000000000000000000070", + "name": "test7", + "id": 440, + "contract_address_hash": "0x000000000000000000000000000000000000000b", "abi": [ { "type": "function", @@ -1504,9 +1526,9 @@ ] }, { - "name": "test20", - "id": 318, - "contract_address_hash": "0x0000000000000000000000000000000000000071", + "name": "test6", + "id": 439, + "contract_address_hash": "0x000000000000000000000000000000000000000a", "abi": [ { "type": "function", @@ -1539,9 +1561,9 @@ ] }, { - "name": "test21", - "id": 319, - "contract_address_hash": "0x0000000000000000000000000000000000000072", + "name": "test5", + "id": 438, + "contract_address_hash": "0x0000000000000000000000000000000000000009", "abi": [ { "type": "function", @@ -1574,9 +1596,9 @@ ] }, { - "name": "test22", - "id": 320, - "contract_address_hash": "0x0000000000000000000000000000000000000073", + "name": "test4", + "id": 437, + "contract_address_hash": "0x0000000000000000000000000000000000000008", "abi": [ { "type": "function", @@ -1609,9 +1631,9 @@ ] }, { - "name": "test23", - "id": 321, - "contract_address_hash": "0x0000000000000000000000000000000000000074", + "name": "test3", + "id": 436, + "contract_address_hash": "0x0000000000000000000000000000000000000007", "abi": [ { "type": "function", @@ -1644,9 +1666,9 @@ ] }, { - "name": "test24", - "id": 322, - "contract_address_hash": "0x0000000000000000000000000000000000000075", + "name": "test2", + "id": 435, + "contract_address_hash": "0x0000000000000000000000000000000000000006", "abi": [ { "type": "function", @@ -1679,9 +1701,9 @@ ] }, { - "name": "test25", - "id": 323, - "contract_address_hash": "0x0000000000000000000000000000000000000076", + "name": "test1", + "id": 434, + "contract_address_hash": "0x0000000000000000000000000000000000000005", "abi": [ { "type": "function", @@ -1714,9 +1736,9 @@ ] }, { - "name": "test26", - "id": 324, - "contract_address_hash": "0x0000000000000000000000000000000000000077", + "name": "test0", + "id": 433, + "contract_address_hash": "0x0000000000000000000000000000000000000004", "abi": [ { "type": "function", @@ -1755,22 +1777,22 @@ + Parameters - + id: `308` - id: 308 + + id: `448` + id: 448 + Request Edit custom abi -**PUT**  `/api/account/v1/user/custom_abis/308` +**PUT**  `/api/account/v1/user/custom_abis/448` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTc2ZWEzNWItMGQ1Ni00MTAzLTg1ODQtMjcyOGRhZjUxYTI4IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.NzbgShjGRIfZ6-HC7lXBJm602CqznDDRgxyTXZa-Kdkx2XTYErC93KBcZKgyZ7lo7u5olkavIEOnoxXc65sOxg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjg4MWVmYjQtOTZlNy00MTU2LTg2YWUtNmVlNDQ2MWZhNzAzIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.zKX_W91W5X7Vvf-YRnk26wCgu8aFTOBkpYcsH5XrQ-5XBMFwH68dWcRtnJD09zlB-FnU6ycG4C9vlFk02KiJrg content-type: multipart/mixed; boundary=plug_conn_test + Body { - "name": "test6", - "contract_address_hash": "0x000000000000000000000000000000000000000a", + "name": "test21", + "contract_address_hash": "0x0000000000000000000000000000000000000056", "abi": [ { "type": "function", @@ -1809,16 +1831,16 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8lVhnTsvpkAAArB + x-request-id: FwuQnQGu3MsFRCAAAAVC + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "name": "test6", - "id": 308, - "contract_address_hash": "0x000000000000000000000000000000000000000a", + "name": "test21", + "id": 448, + "contract_address_hash": "0x0000000000000000000000000000000000000056", "abi": [ { "type": "function", @@ -1856,16 +1878,16 @@ + Parameters - + id: `307` - id: 307 + + id: `450` + id: 450 + Request Delete custom abi -**DELETE**  `/api/account/v1/user/custom_abis/307` +**DELETE**  `/api/account/v1/user/custom_abis/450` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiY2YxODg0ODAtZGQ3My00ZDNmLTg2NDYtOTc2ZTRjMDJkMmE4IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.U23Zp-kENBQofisxQVrVAB9-JpBriWlxXJ9HZi_z9h_SV6psP6LhO0cLfnQsQkNWUOoO1LPQiWqVzP-zpGb7Sw + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2JmOWVlY2EtZDkzMy00YmFkLWIzMDEtYmFkOTBiYzdiNjY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.7t1rm0x4t5HCE1IhRENVWG_Iq1AUuGoHkezenu4jgiDB96rdQbC9TRASZnLDjjPPuH468IRhsCil7iy8pYxe8A + Response 200 @@ -1873,10 +1895,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H8dnChNmonIAAAgB + x-request-id: FwuQnQs0IM3_0WMAAAfC + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -1893,27 +1915,22 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMmY2ZTM4N2QtMmI0ZC00Mjk4LWI5OWQtY2ZiYzMwOWU1NzM0IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.iLsnG2BBUIU3ENtV4GpDU82fThV3gcD-HJL1SGFM7C0n7cM7l09V4Mu6493ZpzjWBBnom8xexPH99kTvo_-aQg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTcyOTA2ZWEtOGI3OS00Zjk3LWIzZmUtMmU3NDk4MDkxYjAzIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.Hq_Fbau0LFELf4Oer6WQXj05jJWRSTedBkAwz3x2HNlFxDzsNtgmmpvWkA9qvr8usmRxye-_jz3tZgD1VElhqg content-type: multipart/mixed; boundary=plug_conn_test + Body { - "website": "website3", - "tags": "Tag4;Tag5", - "is_owner": false, - "full_name": "full name3", - "email": "email3", - "company": "company3", - "addresses_array": [ - "0x0000000000000000000000000000000000000025", - "0x0000000000000000000000000000000000000026", - "0x0000000000000000000000000000000000000027", - "0x0000000000000000000000000000000000000028", - "0x0000000000000000000000000000000000000029", - "0x000000000000000000000000000000000000002a", - "0x000000000000000000000000000000000000002b" + "website": "website11", + "tags": "Tag17;Tag18", + "is_owner": true, + "full_name": "full name11", + "email": "test_user-33@blockscout.com", + "company": "company11", + "addresses": [ + "0x0000000000000000000000000000000000000070", + "0x0000000000000000000000000000000000000071" ], - "additional_comment": "additional_comment3" + "additional_comment": "additional_comment11" } + Response 200 @@ -1922,22 +1939,25 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9JM-GieXwUAABEB + x-request-id: FwuQnQ9l-uQIRYYAAAmi + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "website": "website3", - "tags": "Tag4;Tag5", - "is_owner": false, - "id": 99, - "full_name": "full name3", - "email": "email3", - "company": "company3", - "addresses": "0x0000000000000000000000000000000000000025;0x0000000000000000000000000000000000000026;0x0000000000000000000000000000000000000027;0x0000000000000000000000000000000000000028;0x0000000000000000000000000000000000000029;0x000000000000000000000000000000000000002a;0x000000000000000000000000000000000000002b", - "additional_comment": "additional_comment3" + "website": "website11", + "tags": "Tag17;Tag18", + "is_owner": true, + "id": 180, + "full_name": "full name11", + "email": "test_user-33@blockscout.com", + "company": "company11", + "addresses": [ + "0x0000000000000000000000000000000000000070", + "0x0000000000000000000000000000000000000071" + ], + "additional_comment": "additional_comment11" } ### BlockScoutWeb.Account.Api.V1.UserController public_tags_requests [GET /api/account/v1/user/public_tags] @@ -1950,7 +1970,7 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZlZjQ1MDMtMjk0My00NGJmLTk1MWItMGUxMjY2M2ZlZTg3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.AYEifMqZAXmZINrKt5pNtno7rb7UH32vsADul_Sgslt-kKIiiMiVzdAe7BeCOBMecr1L8j4KMRNl-qi4Deipwg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWZkMTljNWItZjQzNS00MGI0LTllOWQtMTc5OTllNDhmOTdlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.wj5e8pYhIOE_XWoQolj-ghI1R3pzEyKTNudIJDN3zcQFa33wO_slJpJxsZaZq_NChLLslMoBmnCKJthZfhYBIA + Response 200 @@ -1958,122 +1978,193 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9X-t7yrO6UAABRh + x-request-id: FwuQnP3ZDj9rrjAAAAjj + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body [ { - "website": "website4", - "tags": "Tag6;Tag7", - "is_owner": false, - "id": 100, - "full_name": "full name4", - "email": "email4", - "company": "company4", - "addresses": "0x0000000000000000000000000000000000000032;0x0000000000000000000000000000000000000033;0x0000000000000000000000000000000000000034;0x0000000000000000000000000000000000000035;0x0000000000000000000000000000000000000036;0x0000000000000000000000000000000000000037", - "additional_comment": "additional_comment4" - }, - { - "website": "website5", - "tags": "Tag8;Tag9", - "is_owner": false, - "id": 101, - "full_name": "full name5", - "email": "email5", - "company": "company5", - "addresses": "0x0000000000000000000000000000000000000038", - "additional_comment": "additional_comment5" + "website": "website9", + "tags": "Tag14;Tag15", + "is_owner": true, + "id": 178, + "full_name": "full name9", + "email": "test_user-16@blockscout.com", + "company": "company9", + "addresses": [ + "0x0000000000000000000000000000000000000052" + ], + "additional_comment": "additional_comment9" }, { - "website": "website6", - "tags": "Tag10", + "website": "website8", + "tags": "Tag13", "is_owner": false, - "id": 102, - "full_name": "full name6", - "email": "email6", - "company": "company6", - "addresses": "0x0000000000000000000000000000000000000039;0x000000000000000000000000000000000000003a;0x000000000000000000000000000000000000003b;0x000000000000000000000000000000000000003c;0x000000000000000000000000000000000000003d;0x000000000000000000000000000000000000003e;0x000000000000000000000000000000000000003f;0x0000000000000000000000000000000000000040;0x0000000000000000000000000000000000000041;0x0000000000000000000000000000000000000042", - "additional_comment": "additional_comment6" + "id": 177, + "full_name": "full name8", + "email": "test_user-15@blockscout.com", + "company": "company8", + "addresses": [ + "0x0000000000000000000000000000000000000048", + "0x0000000000000000000000000000000000000049", + "0x000000000000000000000000000000000000004a", + "0x000000000000000000000000000000000000004b", + "0x000000000000000000000000000000000000004c", + "0x000000000000000000000000000000000000004d", + "0x000000000000000000000000000000000000004e", + "0x000000000000000000000000000000000000004f", + "0x0000000000000000000000000000000000000050", + "0x0000000000000000000000000000000000000051" + ], + "additional_comment": "additional_comment8" }, { "website": "website7", - "tags": "Tag11", - "is_owner": false, - "id": 103, + "tags": "Tag11;Tag12", + "is_owner": true, + "id": 176, "full_name": "full name7", - "email": "email7", + "email": "test_user-14@blockscout.com", "company": "company7", - "addresses": "0x0000000000000000000000000000000000000043;0x0000000000000000000000000000000000000044;0x0000000000000000000000000000000000000045;0x0000000000000000000000000000000000000046;0x0000000000000000000000000000000000000047;0x0000000000000000000000000000000000000048", + "addresses": [ + "0x000000000000000000000000000000000000003e", + "0x000000000000000000000000000000000000003f", + "0x0000000000000000000000000000000000000040", + "0x0000000000000000000000000000000000000041", + "0x0000000000000000000000000000000000000042", + "0x0000000000000000000000000000000000000043", + "0x0000000000000000000000000000000000000044", + "0x0000000000000000000000000000000000000045", + "0x0000000000000000000000000000000000000046", + "0x0000000000000000000000000000000000000047" + ], "additional_comment": "additional_comment7" }, { - "website": "website8", - "tags": "Tag12;Tag13", + "website": "website6", + "tags": "Tag9;Tag10", "is_owner": false, - "id": 104, - "full_name": "full name8", - "email": "email8", - "company": "company8", - "addresses": "0x0000000000000000000000000000000000000049;0x000000000000000000000000000000000000004a;0x000000000000000000000000000000000000004b;0x000000000000000000000000000000000000004c;0x000000000000000000000000000000000000004d", - "additional_comment": "additional_comment8" + "id": 175, + "full_name": "full name6", + "email": "test_user-13@blockscout.com", + "company": "company6", + "addresses": [ + "0x000000000000000000000000000000000000003a", + "0x000000000000000000000000000000000000003b", + "0x000000000000000000000000000000000000003c", + "0x000000000000000000000000000000000000003d" + ], + "additional_comment": "additional_comment6" }, { - "website": "website9", - "tags": "Tag14", + "website": "website5", + "tags": "Tag8", "is_owner": true, - "id": 105, - "full_name": "full name9", - "email": "email9", - "company": "company9", - "addresses": "0x000000000000000000000000000000000000004e;0x000000000000000000000000000000000000004f;0x0000000000000000000000000000000000000050", - "additional_comment": "additional_comment9" + "id": 174, + "full_name": "full name5", + "email": "test_user-12@blockscout.com", + "company": "company5", + "addresses": [ + "0x0000000000000000000000000000000000000033", + "0x0000000000000000000000000000000000000034", + "0x0000000000000000000000000000000000000035", + "0x0000000000000000000000000000000000000036", + "0x0000000000000000000000000000000000000037", + "0x0000000000000000000000000000000000000038", + "0x0000000000000000000000000000000000000039" + ], + "additional_comment": "additional_comment5" }, { - "website": "website10", - "tags": "Tag15", + "website": "website4", + "tags": "Tag6;Tag7", "is_owner": true, - "id": 106, - "full_name": "full name10", - "email": "email10", - "company": "company10", - "addresses": "0x0000000000000000000000000000000000000051;0x0000000000000000000000000000000000000052", - "additional_comment": "additional_comment10" + "id": 173, + "full_name": "full name4", + "email": "test_user-11@blockscout.com", + "company": "company4", + "addresses": [ + "0x0000000000000000000000000000000000000031", + "0x0000000000000000000000000000000000000032" + ], + "additional_comment": "additional_comment4" }, { - "website": "website11", - "tags": "Tag16", - "is_owner": true, - "id": 107, - "full_name": "full name11", - "email": "email11", - "company": "company11", - "addresses": "0x0000000000000000000000000000000000000053;0x0000000000000000000000000000000000000054;0x0000000000000000000000000000000000000055;0x0000000000000000000000000000000000000056;0x0000000000000000000000000000000000000057;0x0000000000000000000000000000000000000058;0x0000000000000000000000000000000000000059;0x000000000000000000000000000000000000005a;0x000000000000000000000000000000000000005b;0x000000000000000000000000000000000000005c", - "additional_comment": "additional_comment11" + "website": "website3", + "tags": "Tag5", + "is_owner": false, + "id": 172, + "full_name": "full name3", + "email": "test_user-10@blockscout.com", + "company": "company3", + "addresses": [ + "0x0000000000000000000000000000000000000028", + "0x0000000000000000000000000000000000000029", + "0x000000000000000000000000000000000000002a", + "0x000000000000000000000000000000000000002b", + "0x000000000000000000000000000000000000002c", + "0x000000000000000000000000000000000000002d", + "0x000000000000000000000000000000000000002e", + "0x000000000000000000000000000000000000002f", + "0x0000000000000000000000000000000000000030" + ], + "additional_comment": "additional_comment3" }, { - "website": "website12", - "tags": "Tag17;Tag18", + "website": "website2", + "tags": "Tag4", + "is_owner": false, + "id": 171, + "full_name": "full name2", + "email": "test_user-9@blockscout.com", + "company": "company2", + "addresses": [ + "0x0000000000000000000000000000000000000020", + "0x0000000000000000000000000000000000000021", + "0x0000000000000000000000000000000000000022", + "0x0000000000000000000000000000000000000023", + "0x0000000000000000000000000000000000000024", + "0x0000000000000000000000000000000000000025", + "0x0000000000000000000000000000000000000026", + "0x0000000000000000000000000000000000000027" + ], + "additional_comment": "additional_comment2" + }, + { + "website": "website1", + "tags": "Tag2;Tag3", "is_owner": true, - "id": 108, - "full_name": "full name12", - "email": "email12", - "company": "company12", - "addresses": "0x000000000000000000000000000000000000005d;0x000000000000000000000000000000000000005e;0x000000000000000000000000000000000000005f;0x0000000000000000000000000000000000000060", - "additional_comment": "additional_comment12" + "id": 170, + "full_name": "full name1", + "email": "test_user-8@blockscout.com", + "company": "company1", + "addresses": [ + "0x0000000000000000000000000000000000000019", + "0x000000000000000000000000000000000000001a", + "0x000000000000000000000000000000000000001b", + "0x000000000000000000000000000000000000001c", + "0x000000000000000000000000000000000000001d", + "0x000000000000000000000000000000000000001e", + "0x000000000000000000000000000000000000001f" + ], + "additional_comment": "additional_comment1" }, { - "website": "website13", - "tags": "Tag19", - "is_owner": false, - "id": 109, - "full_name": "full name13", - "email": "email13", - "company": "company13", - "addresses": "0x0000000000000000000000000000000000000061;0x0000000000000000000000000000000000000062;0x0000000000000000000000000000000000000063;0x0000000000000000000000000000000000000064;0x0000000000000000000000000000000000000065", - "additional_comment": "additional_comment13" + "website": "website0", + "tags": "Tag0;Tag1", + "is_owner": true, + "id": 169, + "full_name": "full name0", + "email": "test_user-7@blockscout.com", + "company": "company0", + "addresses": [ + "0x0000000000000000000000000000000000000016", + "0x0000000000000000000000000000000000000017", + "0x0000000000000000000000000000000000000018" + ], + "additional_comment": "additional_comment0" } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_public_tags_request [DELETE /api/account/v1/user/public_tags/{id}] @@ -2082,16 +2173,16 @@ + Parameters - + id: `100` - id: 100 + + id: `178` + id: 178 + Request Delete public tags request -**DELETE**  `/api/account/v1/user/public_tags/100` +**DELETE**  `/api/account/v1/user/public_tags/178` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZlZjQ1MDMtMjk0My00NGJmLTk1MWItMGUxMjY2M2ZlZTg3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.AYEifMqZAXmZINrKt5pNtno7rb7UH32vsADul_Sgslt-kKIiiMiVzdAe7BeCOBMecr1L8j4KMRNl-qi4Deipwg + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWZkMTljNWItZjQzNS00MGI0LTllOWQtMTc5OTllNDhmOTdlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.wj5e8pYhIOE_XWoQolj-ghI1R3pzEyKTNudIJDN3zcQFa33wO_slJpJxsZaZq_NChLLslMoBmnCKJthZfhYBIA content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -2105,10 +2196,10 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H9YQm9CrO6UAABSB + x-request-id: FwuQnP3w4p5rrjAAAAkj + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { @@ -2120,30 +2211,35 @@ + Parameters - + id: `98` - id: 98 + + id: `181` + id: 181 + Request Edit request to add a public tag -**PUT**  `/api/account/v1/user/public_tags/98` +**PUT**  `/api/account/v1/user/public_tags/181` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1NTAsImlhdCI6MTY1OTAxMDM1MCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODIxNWFhMjQtZWIzYS00MjhhLTlkZWMtNTQwMjkwZWExM2E3IiwibmJmIjoxNjU5MDEwMzQ5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.xY6RWMzDzBNhZpdrA6-sJ41xWnSM8n_uxmlbWxcBVXdIG6NJJi-_1ZARRmPdtquK0eosX81Q_OvML2NTp684kQ + authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZmRjNDRmOTAtYzViMy00MjJjLTk4MGQtZjE5MWQzMDEzYmUxIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIzIiwidHlwIjoiYWNjZXNzIn0.TxgamYKfzZqUXdVA4RsbFJ4_ozJfQzz4wVRBIyFLgrMGWi-7tZe5Lh3Oe_2LCKuf4Q4uZ9GQM5bD0V5WWk-YZw content-type: multipart/mixed; boundary=plug_conn_test + Body { - "website": "website2", - "tags": "Tag3", - "is_owner": true, - "full_name": "full name2", - "email": "email2", - "company": "company2", - "addresses_array": [ - "0x0000000000000000000000000000000000000015" + "website": "website13", + "tags": "Tag20;Tag21", + "is_owner": false, + "full_name": "full name13", + "email": "test_user-37@blockscout.com", + "company": "company13", + "addresses": [ + "0x0000000000000000000000000000000000000080", + "0x0000000000000000000000000000000000000081", + "0x0000000000000000000000000000000000000082", + "0x0000000000000000000000000000000000000083", + "0x0000000000000000000000000000000000000084", + "0x0000000000000000000000000000000000000085" ], - "additional_comment": "additional_comment2" + "additional_comment": "additional_comment13" } + Response 200 @@ -2152,21 +2248,28 @@ content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwX9H80jCquTUzMAAAKC + x-request-id: FwuQnRGPAcIPFzIAAApC + access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: - access-control-allow-credentials: true + Body { - "website": "website2", - "tags": "Tag3", - "is_owner": true, - "id": 98, - "full_name": "full name2", - "email": "email2", - "company": "company2", - "addresses": "0x0000000000000000000000000000000000000015", - "additional_comment": "additional_comment2" + "website": "website13", + "tags": "Tag20;Tag21", + "is_owner": false, + "id": 181, + "full_name": "full name13", + "email": "test_user-37@blockscout.com", + "company": "company13", + "addresses": [ + "0x0000000000000000000000000000000000000080", + "0x0000000000000000000000000000000000000081", + "0x0000000000000000000000000000000000000082", + "0x0000000000000000000000000000000000000083", + "0x0000000000000000000000000000000000000084", + "0x0000000000000000000000000000000000000085" + ], + "additional_comment": "additional_comment13" } diff --git a/apps/block_scout_web/API.md b/apps/block_scout_web/API.md index 622f1e117f1e..b73ab47e1828 100644 --- a/apps/block_scout_web/API.md +++ b/apps/block_scout_web/API.md @@ -52,6 +52,24 @@ {"auth_token":"..."} ``` +### logout +#### Logout + +##### Request +* __Method:__ GET +* __Path:__ /auth/api/logout +* __Request headers:__ +``` +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjAzYjliYjctMjAzNS00ZTMwLWFmMDYtZjQzZjdhZGY4YTFjIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.P4fttdoki0KFFU9WjeuV1ysYVcdOfjZHpupA5ljWyZfaTaGsNGXr8ENf7jZlKxLy6cSjbsL2k3ZAEv9FdJErmg +``` + +##### Response +* __Status__: 200 +* __Response body:__ +``` +OK +``` + ## BlockScoutWeb.Account.Api.V1.UserController ### info #### Get info about user @@ -61,7 +79,7 @@ * __Path:__ /api/account/v1/user/info * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWNhMTBiMjAtOGNjMy00ZjQzLWFkMTYtZjk3YjM5NTg3NmUwIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.7H-cTTAH-o4SpgqoVFWAT_DwhqGISbgu24T-fivJ6I0nx9OafsNCxNhqK3WunhEV84QRtOir1QFusCbmXzD0hQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjAzYjliYjctMjAzNS00ZTMwLWFmMDYtZjQzZjdhZGY4YTFjIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.P4fttdoki0KFFU9WjeuV1ysYVcdOfjZHpupA5ljWyZfaTaGsNGXr8ENf7jZlKxLy6cSjbsL2k3ZAEv9FdJErmg ``` ##### Response @@ -70,18 +88,18 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD0vQMD5E60AAAei +x-request-id: FwuQpjVVLIQxzQ0AAAjk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "nickname": "test_user10", - "name": "User Test10", - "email": "test_user-10@blockscout.com", - "avatar": "https://example.com/avatar/test_user10" + "nickname": "test_user18", + "name": "User Test18", + "email": "test_user-29@blockscout.com", + "avatar": "https://example.com/avatar/test_user18" } ``` @@ -93,7 +111,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/tags/address * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTQ1YmJiOGQtMTg1Ni00NWRkLWJhMjgtODM1MzIwMWQ3YmE2IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.UXLszHWCt3aN_YuIA5PvweGxQASesXIXn-Htam-7ptXaTgCMxgecigOpYYopG7IFJBKfg61ypzjgKwd5OiXr4A +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjYwY2U1NjUtNmJkYy00YTUzLWFmNTUtNDgzNTAzYmE2ZTliIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.g3dZzR7VoucLcnWZe8_Ww-w3BaxGOMpyOYZBgyoP5y9uHd_zWvFzvmvo-3uD10Hmuy3Z48jcxZypO0CTACQ3tg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -110,16 +128,16 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEAXw_eXFKIAACPh +x-request-id: FwuQpim7VYsHFF0AABlD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "name": "MyName", - "id": 123, + "id": 191, "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b" } ``` @@ -133,7 +151,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/tags/address/0x3e9ac8f16c92bc4f093357933b5befbf1e16987b * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTQ1YmJiOGQtMTg1Ni00NWRkLWJhMjgtODM1MzIwMWQ3YmE2IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.UXLszHWCt3aN_YuIA5PvweGxQASesXIXn-Htam-7ptXaTgCMxgecigOpYYopG7IFJBKfg61ypzjgKwd5OiXr4A +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjYwY2U1NjUtNmJkYy00YTUzLWFmNTUtNDgzNTAzYmE2ZTliIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.g3dZzR7VoucLcnWZe8_Ww-w3BaxGOMpyOYZBgyoP5y9uHd_zWvFzvmvo-3uD10Hmuy3Z48jcxZypO0CTACQ3tg ``` ##### Response @@ -142,10 +160,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEBJLwKXFKIAACQB +x-request-id: FwuQpioOkSkHFF0AAAVh +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -168,17 +186,17 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/tags/address/116 +* __Path:__ /api/account/v1/user/tags/address/195 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjk0ZjIyYjQtYTBkOS00MGNiLThlNTAtYTM2MzI1MDhhMzc4IiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.6_RT4rbm1vwbi9_eUtze3-ZN_EBbmdqycGyOVJ9AJ6PVvIzyRQFlWlRrvhq7YKiZt8ue2ljL8XJyqvBbGplQFQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDVhMTIzNDItOTEzYS00NWNiLWIzMjktMzY3MTRiMTQwODE3IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.p-9LA2uAMy1UKcax83biqshChsDVZBCADgNy677IorSszZ98-tlIQ2ACKao0gR_uhVNZu-wqAxgPJcg22iQpuQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "name1", - "address_hash": "0x0000000000000000000000000000000000000002" + "name": "name3", + "address_hash": "0x0000000000000000000000000000000000000071" } ``` @@ -188,17 +206,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FC8B36iSrmsAAAHk +x-request-id: FwuQpjEYwtEDCiMAAAXB +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "name": "name1", - "id": 116, - "address_hash": "0x0000000000000000000000000000000000000002" + "name": "name3", + "id": 195, + "address_hash": "0x0000000000000000000000000000000000000071" } ``` @@ -210,7 +228,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/tags/address * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNzdiYTcxNWEtNDI1OS00ODAxLWIxOTktZDgwNDM2MWUwNmU1IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.NC-jt9HzTIfusCKVF43c-3aNHfKReziLQIzpICuuBNnqUj6em1VaMnwLttW8FSYxLwxfcF6U9wbx-EhtE7K0pA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZGMyN2RkZjItZTRkMi00ZWEzLWFkZWYtMDIyYjMwY2QxMzUzIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.wWzQx7QIkq0slxN9T67pycERqba5-0KKTxcSjKEy5q4Fi1zNDAYrdQ4UZVXvzU63ec9Y1MMxzLCaOlZ2p8ci4A ``` ##### Response @@ -219,28 +237,28 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDtkAYijgTYAACDB +x-request-id: FwuQphwzPKDHPBMAAA8j +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json [ { - "name": "name0", - "id": 120, - "address_hash": "0x0000000000000000000000000000000000000023" + "name": "name2", + "id": 190, + "address_hash": "0x0000000000000000000000000000000000000003" }, { "name": "name1", - "id": 121, - "address_hash": "0x0000000000000000000000000000000000000024" + "id": 189, + "address_hash": "0x0000000000000000000000000000000000000002" }, { - "name": "name2", - "id": 122, - "address_hash": "0x0000000000000000000000000000000000000025" + "name": "name0", + "id": 188, + "address_hash": "0x0000000000000000000000000000000000000001" } ] ``` @@ -250,10 +268,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/tags/address/117 +* __Path:__ /api/account/v1/user/tags/address/192 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZjViNzE0ZmQtYWFhYS00N2NmLTk4YmUtYzk1MzBhZTA4YTk0IiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.jJdgLf3d71x_VL-lP8eOjfewv71UjT4R7SBp_TFmRb_rxV0GeE37R1B-nDZKvoABHKODctz6kIaS6Koyizv9YQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTBiZjNmY2QtYTdiNi00ZjVmLTg2MTktOWIwZGVmMzY5MGE2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.CJ4QnRrUvkbrO36NOPAqiyZj09iPA6yma7U2P4P8aBlLxWy3bAZUl-3ZKLJmu5gSrCFdPlEDAcDR4o2s3SVyHw ``` ##### Response @@ -262,10 +280,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDJLG3NmonIAAB0B +x-request-id: FwuQpi-vPnoAeg4AAAYC +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -282,13 +300,13 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/tags/transaction * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGI2MjFlYmYtZDY2OC00MWExLWI4YzMtOGUzZWQxZWIxZGU3IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.8oBFdtsSqTeo9zaHHQ8LKeVLnRZi5GFVxSuN_9OY6zlijPftT2qDSN5Qu6cLz5MCm8218caXVBA3MoOmjh81-Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", "name": "MyName" } ``` @@ -299,10 +317,10 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDw_irSTUzMAAAdi +x-request-id: FwuQpiSlZ8MFRCAAAAPi +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -322,13 +340,13 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/tags/transaction * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGI2MjFlYmYtZDY2OC00MWExLWI4YzMtOGUzZWQxZWIxZGU3IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.8oBFdtsSqTeo9zaHHQ8LKeVLnRZi5GFVxSuN_9OY6zlijPftT2qDSN5Qu6cLz5MCm8218caXVBA3MoOmjh81-Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", "name": "MyName" } ``` @@ -339,17 +357,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDxm9yaTUzMAAAeC +x-request-id: FwuQpiTYW2IFRCAAABeD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", "name": "MyName", - "id": 133 + "id": 215 } ``` @@ -359,10 +377,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ GET -* __Path:__ /api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000001 +* __Path:__ /api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000003 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGI2MjFlYmYtZDY2OC00MWExLWI4YzMtOGUzZWQxZWIxZGU3IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.8oBFdtsSqTeo9zaHHQ8LKeVLnRZi5GFVxSuN_9OY6zlijPftT2qDSN5Qu6cLz5MCm8218caXVBA3MoOmjh81-Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ ``` ##### Response @@ -371,10 +389,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDyRX0WTUzMAACDh +x-request-id: FwuQpiTucn4FRCAAAAQC +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -394,17 +412,17 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/tags/transaction/140 +* __Path:__ /api/account/v1/user/tags/transaction/213 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNWJlMjZkYWYtMzcxZi00MTA0LWEwMWItOTJiNjM0ZjA4ZDQxIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.5St_z_24WME_Eu7tpgziqcn1oXAIdJOGEeISmVS5bbYYDQqBRa49-v6Xm9h1fsjCSg8ZbJ4Vi3WEcn84ygCRzA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOThjZGVlYjgtMGI3Yy00M2U2LWI3ZDAtODAzYjAyZmNkZTlmIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.wx0GAbtOBVhAcDksePh2srpuYZV0YEKWJzbcWXXzO_zNck0lHLu_AUQ9pJMeLADfsHD5BBtypA8eRYcAPIANeg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", - "name": "name3" + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", + "name": "name1" } ``` @@ -414,17 +432,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEojjETdulQAAA2i +x-request-id: FwuQph4dlZl_aCMAABFD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", - "name": "name3", - "id": 140 + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", + "name": "name1", + "id": 213 } ``` @@ -436,7 +454,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/tags/transaction * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODZiOTVmZTMtZWYzMC00MWFiLWJkYWQtNDRjZmY0NmYwYTVmIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.SR5s3ma8zaDJjGJqwsJcRGz3iHUBtFz4TuzSJF1k9NL-4ri2XSAIPnidyvUWsmzPe0M6k4xfwgBaaloqDtIwCA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY3YTU5MTctZTkzZS00ZDIwLWJkMjItYzZkZmI1MjcxMGI4IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.EwNpusuNiETjPyX99BCG7kFVw1ILO2h5ma3-F6rXbC1C_r4YtIRH3dX8OxxzoGzVkzdT9ycO8N6QywNV2oKRvg ``` ##### Response @@ -445,28 +463,28 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEkKMJngvGIAACpB +x-request-id: FwuQpjT3AhI31PUAAAhi +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json [ { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000005", - "name": "name0", - "id": 137 + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "name": "name2", + "id": 221 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", "name": "name1", - "id": 138 + "id": 220 }, { "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007", - "name": "name2", - "id": 139 + "name": "name0", + "id": 219 } ] ``` @@ -476,10 +494,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/tags/transaction/134 +* __Path:__ /api/account/v1/user/tags/transaction/216 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTNhZTBjNTMtNWIyNS00MzQ0LTlmZmYtOWE1MzYzMDkxNTFiIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.ma-cNPZuf0Y580wWcgawrYy_rtWp0MmMp4FZGh9jDsTLPIQCcKNOvWpEgU0GbxHs0Lqlv4hFiugwopwKwfaaPA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2JmNmY2NTAtNDFlOS00NzU1LThkM2UtNDYyNTgzMWE0ODAwIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.OApbGu0VIJAb92sk2z5uRryqJfNQUgTZMNYPg3l-fAqFC5Q8Ozf7fzvi7D6UOZYYH_kV7KOplbYSf_f6d6EHww ``` ##### Response @@ -488,10 +506,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEaIlUw09lsAACgB +x-request-id: FwuQpiy51yHVod4AABpD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -501,14 +519,14 @@ access-control-allow-credentials: true ``` ### create_watchlist -#### Add address to watchlist +#### Add address to watch list ##### Request * __Method:__ POST * __Path:__ /api/account/v1/user/watchlist * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZjVmMmEyZjMtYTNlMy00MWVjLWI0ZDItZjIwMmIzMzg3MmE5IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.AEALezStFrFEmQ8i9H6h9li-pbXKcb28NTNXW0bQC2YasdSAuCCVWythzzalZpKqY0Ta7OG7DQGNVGk0O026fw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDkzN2VjYjMtN2NiYi00MGE3LThiMTUtOTI1NGI2NDBlMzA2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.T2XfV2XJ74KVI_ILXC37uTQZi1WlIQfr60fQd7aX1eC-in8ZW2cO0yBSnTMb8vliqVnvq3ChI4XRZoza0CEpnw content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -531,8 +549,8 @@ content-type: multipart/mixed; boundary=plug_conn_test "notification_methods": { "email": false }, - "name": "test24", - "address_hash": "0x0000000000000000000000000000000000000071" + "name": "test22", + "address_hash": "0x000000000000000000000000000000000000007d" } ``` @@ -542,10 +560,10 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEp38eayqccAACph +x-request-id: FwuQpjb3H08IRYYAAApk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -567,10 +585,10 @@ access-control-allow-credentials: true "notification_methods": { "email": false }, - "name": "test24", - "id": 133, + "name": "test22", + "id": 218, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000071", + "address_hash": "0x000000000000000000000000000000000000007d", "address_balance": null } ``` @@ -583,7 +601,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/watchlist * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZjVmMmEyZjMtYTNlMy00MWVjLWI0ZDItZjIwMmIzMzg3MmE5IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.AEALezStFrFEmQ8i9H6h9li-pbXKcb28NTNXW0bQC2YasdSAuCCVWythzzalZpKqY0Ta7OG7DQGNVGk0O026fw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDkzN2VjYjMtN2NiYi00MGE3LThiMTUtOTI1NGI2NDBlMzA2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.T2XfV2XJ74KVI_ILXC37uTQZi1WlIQfr60fQd7aX1eC-in8ZW2cO0yBSnTMb8vliqVnvq3ChI4XRZoza0CEpnw ``` ##### Response @@ -592,10 +610,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEsbBUuyqccAACqh +x-request-id: FwuQpjfSdyoIRYYAAArk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -616,36 +634,36 @@ access-control-allow-credentials: true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test24", - "id": 133, + "name": "test23", + "id": 219, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000071", + "address_hash": "0x000000000000000000000000000000000000007e", "address_balance": null }, { "notification_settings": { "native": { - "outcoming": true, - "incoming": false + "outcoming": false, + "incoming": true }, "ERC-721": { "outcoming": false, "incoming": true }, "ERC-20": { - "outcoming": false, + "outcoming": true, "incoming": true } }, "notification_methods": { - "email": true + "email": false }, - "name": "test25", - "id": 134, + "name": "test22", + "id": 218, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000072", + "address_hash": "0x000000000000000000000000000000000000007d", "address_balance": null } ] @@ -656,10 +674,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/watchlist/136 +* __Path:__ /api/account/v1/user/watchlist/222 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiY2YxNzVjOGUtMzIxYi00NGZkLWE1YTUtYTkzNjUxZDUxNGMyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.Kg9e3VxXE--Ufz_K8CB0oYL-q0fFC48refZlVkD2anbDbok9zmbTA-qYdhsZzDDB_t-gLxp4O_HgX7RQRR12Pw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjE2YTNmZDktYmZmOS00MDc1LTgwMGMtMzIzMGViY2NkNTQyIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.owHZYYTtUZ117ErpxW3xW-qqmfeWCVlli5JbAL1GbRpAKBxsLJ56tcjTv7pbKIq4cM-PzC2bbrw5JuISHhdfOQ ``` ##### Response @@ -668,10 +686,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FE0fElhW-8kAACxB +x-request-id: FwuQpjtUa8rUTWIAAAlB +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -685,10 +703,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/watchlist/132 +* __Path:__ /api/account/v1/user/watchlist/220 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWUwZWM1ZmQtMTNmNS00NGQ3LWI1NzItOGE1ZmZmYjhmMDM4IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.3hV0DtJ1rkeEA3jAeSWVy-bUajntQWht-iPhd4HpIP474qK_fyigl3wvj76Fr30L42MF3jdFWVC0F0uUnISMbQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDE0OWJiNzktZDFlZi00NTIyLThmYTMtMTFmODZmMzBkYmE4IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.yZjVfTRrQ3nuv0eU19VW5swMPO75WdiWZPW2EVrZLcEyXUP0X8oenB-A1haYT_0kMu40K7JZS7XMnR6Fo4wlkA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -696,8 +714,8 @@ content-type: multipart/mixed; boundary=plug_conn_test { "notification_settings": { "native": { - "outcoming": false, - "incoming": true + "outcoming": true, + "incoming": false }, "ERC-721": { "outcoming": true, @@ -705,14 +723,14 @@ content-type: multipart/mixed; boundary=plug_conn_test }, "ERC-20": { "outcoming": false, - "incoming": true + "incoming": false } }, "notification_methods": { "email": false }, - "name": "test23", - "address_hash": "0x000000000000000000000000000000000000005b" + "name": "test25", + "address_hash": "0x0000000000000000000000000000000000000080" } ``` @@ -722,18 +740,18 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEQreO4tKUsAACdh +x-request-id: FwuQpjkDIU6MdJQAAAki +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "notification_settings": { "native": { - "outcoming": false, - "incoming": true + "outcoming": true, + "incoming": false }, "ERC-721": { "outcoming": true, @@ -741,16 +759,16 @@ access-control-allow-credentials: true }, "ERC-20": { "outcoming": false, - "incoming": true + "incoming": false } }, "notification_methods": { "email": false }, - "name": "test23", - "id": 132, + "name": "test25", + "id": 220, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000005b", + "address_hash": "0x0000000000000000000000000000000000000080", "address_balance": null } ``` @@ -763,7 +781,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/watchlist * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiM2NmYmMwNWMtNTRjNS00NWMyLWFmMGYtNWZlMGU3ZTVkNTUyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.YB49bcxmnQXIZLo8PQCa7TyCPJEe7bh2RIXowME3ScFbz6OOJ6UrEBjFtgClTNtKUAfNyLc4w0XJp2T254bacw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZTNiNjE0MDEtZjJlOS00YzVlLTllODMtMzdmNWZkNjJhZDIyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.jgzonm_tqZGmwcImaz114SJkaEVFR-4sjENu3OyUTbjfnxokTHyth6GxgKgyWuakTv0QmwlWLkvI27f6LIcvWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -775,19 +793,19 @@ content-type: multipart/mixed; boundary=plug_conn_test "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-20": { "outcoming": true, - "incoming": true + "incoming": false } }, "notification_methods": { - "email": true + "email": false }, - "name": "test20", - "address_hash": "0x000000000000000000000000000000000000002a" + "name": "test0", + "address_hash": "0x0000000000000000000000000000000000000008" } ``` @@ -797,17 +815,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD8_qd3GWf4AACLh +x-request-id: FwuQph-LHUg_AFwAABND +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "errors": { "watchlist_id": [ - "Address already added to the watchlist" + "Address already added to the watch list" ] } } @@ -818,10 +836,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/watchlist/131 +* __Path:__ /api/account/v1/user/watchlist/217 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiM2NmYmMwNWMtNTRjNS00NWMyLWFmMGYtNWZlMGU3ZTVkNTUyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.YB49bcxmnQXIZLo8PQCa7TyCPJEe7bh2RIXowME3ScFbz6OOJ6UrEBjFtgClTNtKUAfNyLc4w0XJp2T254bacw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZTNiNjE0MDEtZjJlOS00YzVlLTllODMtMzdmNWZkNjJhZDIyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.jgzonm_tqZGmwcImaz114SJkaEVFR-4sjENu3OyUTbjfnxokTHyth6GxgKgyWuakTv0QmwlWLkvI27f6LIcvWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -833,19 +851,19 @@ content-type: multipart/mixed; boundary=plug_conn_test "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-20": { "outcoming": true, - "incoming": true + "incoming": false } }, "notification_methods": { - "email": true + "email": false }, - "name": "test20", - "address_hash": "0x000000000000000000000000000000000000002a" + "name": "test0", + "address_hash": "0x0000000000000000000000000000000000000008" } ``` @@ -855,17 +873,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD-je2nGWf4AACMh +x-request-id: FwuQph_yy5k_AFwAABOD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "errors": { "watchlist_id": [ - "Address already added to the watchlist" + "Address already added to the watch list" ] } } @@ -879,7 +897,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/api_keys * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDU3MmM2OGItNWIwNy00YzY3LThiMGEtNjZiZmVhZjBmYzkxIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.013s29QLhAI8xvvUV7YsFnh-lvXcgqoyD5PGITjaJjipyUv9gpa9BlzokCBP7gabCjNyFIJWEHvOfX-u4Ls-dg +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjM1ZWI1MzEtY2U1My00MGY5LWIwZmEtZDE3NTc3NDA4OWI5IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.v1lMn6bUzn8hrFFv6sDR0xioMWiqDt5q5SluJ8p3jAEdEA18ZAXsOLH6-vDNWr50GhObEB6KoSOX8wmbvTtuOg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -895,16 +913,16 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEM9W5OeXwUAAApC +x-request-id: FwuQphyX8rDQD4QAAATB +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "name": "test", - "api_key": "40e57889-7cbc-4a3e-b8a0-6da06b31fbba" + "api_key": "b8c07804-e992-4de4-ae29-f0d6a6691d12" } ``` @@ -915,7 +933,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/api_keys * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWVlZTYwNzUtYjAxMy00N2M4LWI0YjUtOWU2NThiZDM1Yzg2IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.zVdgxdzf0nTBtu1SVPJI88uWM_7582ezIbX1QSM3pD1bZ1LCB4G3DnCflb_c4KAsuL_6oC9CblVxEZXRN9Yt4Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOWMxYmQ2ZTEtYWZjMi00ODk3LTgwNDktYWE1YWQ4Mjc5MzljIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.NQGehmwQo4_-iivPSEspKQ4mFxkg8RskxjxkBCc_D7FulNFu3dUA2Qg8sLxCK3Oqxu57WO8HpI2qIeBw3H1HWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -931,10 +949,10 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD4o8SlcVs8AACJh +x-request-id: FwuQpjYLyBOZMSkAAAiC +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -955,7 +973,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/api_keys * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWVlZTYwNzUtYjAxMy00N2M4LWI0YjUtOWU2NThiZDM1Yzg2IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.zVdgxdzf0nTBtu1SVPJI88uWM_7582ezIbX1QSM3pD1bZ1LCB4G3DnCflb_c4KAsuL_6oC9CblVxEZXRN9Yt4Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOWMxYmQ2ZTEtYWZjMi00ODk3LTgwNDktYWE1YWQ4Mjc5MzljIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.NQGehmwQo4_-iivPSEspKQ4mFxkg8RskxjxkBCc_D7FulNFu3dUA2Qg8sLxCK3Oqxu57WO8HpI2qIeBw3H1HWA ``` ##### Response @@ -964,25 +982,25 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD448ddcVs8AACKB +x-request-id: FwuQpjY6CbWZMSkAAAgB +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json [ { "name": "test", - "api_key": "00df6506-4849-44e1-bace-1d5d3eb8fea3" + "api_key": "4b8a9016-f6c7-4cf4-8697-5fb1851e16ec" }, { "name": "test", - "api_key": "2e44373a-f986-4ae7-95ae-162b34f7d90b" + "api_key": "0f16c464-b857-41c1-894d-233110158756" }, { "name": "test", - "api_key": "aab962c6-f43f-4b41-b5a9-2363ed03bbde" + "api_key": "12cd8bf6-508a-4311-98d7-09ffa6ee043d" } ] ``` @@ -992,10 +1010,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/api_keys/f0ce17a9-9461-4219-8bcd-e27722425bbb +* __Path:__ /api/account/v1/user/api_keys/f46581bc-cc15-4482-8038-dab72c0e4405 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZjY5MWY4YTEtMGM0Yi00MGVmLWFhMTMtMzEyMmZiMDA4NDQ3IiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.kiuUCaTNIzeCCn5Rh4B4NavQCSeTHIHMSiFDIs5SIWtUMGZkNstH8fb-EJbS6uc6fXOpRaxVWDOOkCKyUL5GrQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTFjZGU3ZjEtMzA4My00ZTQ5LWFmNzEtYmU1YmRiOGNlYjFiIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.1QQjWUyhuw2yEHEk-vEI1NcWQpK0BO3uFQPmLCaMhTuzEsg-HIztelraJIB7FSAN70Bt_FzKUN40TjoNvAQGDQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -1011,16 +1029,16 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FC_XiBww_lsAABuB +x-request-id: FwuQph0kB14mvRQAAA_D +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { "name": "test_1", - "api_key": "f0ce17a9-9461-4219-8bcd-e27722425bbb" + "api_key": "f46581bc-cc15-4482-8038-dab72c0e4405" } ``` @@ -1029,10 +1047,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/api_keys/84c0098b-a0e3-45a9-bbb8-011d8027dcf0 +* __Path:__ /api/account/v1/user/api_keys/50804f9d-d929-4017-a8e0-380facf88d42 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZmRlODcyNDMtZWRmOC00NjIxLThkYWItZjkyN2I5MmY0MGQ5IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.ZjCdVNzT9iCU_Sb6Wi5oKo6Hn7LSEI3lANq68nXTn7v489OgqdAupEL_2eQLTy7HgZaQKqoCMhNJeAwYH_ZM9Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjE1NThjZTgtNmE5NC00ODQyLThmZmEtMDNmYzI3MzY1MDgyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.YowVxGq8eb3dX2UK_7Dxl_Lg9T3HeoTEvOkHvgq520H4NYo-6oU8vfFbUMUkLr3jTfWDJgGidhnOfud44JM2vA ``` ##### Response @@ -1041,10 +1059,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FD2U_S_pPTUAAAhC +x-request-id: FwuQph6_OaQNBRoAAAOC +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -1061,14 +1079,14 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/custom_abis * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTk4YjIzMWMtYzE2MS00YzAwLWE5ZDktYTU2NDcwNzBmODM1IiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.Xu99bTKlKhnG8SOgyFVRsM8HNrxCPZTQkQgSEeBnxGh9Y4k-bKMygbQ86ZYOOSvxLUVPReceMwaYJFq2untC1Q +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODQzZjg1ODEtMmU3Zi00YzQyLTkxMTAtMzFkNjAwNWFiZDdkIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.IQC9TAYZyygTEv-g4AilY6tpZmGUCCAyIQfj4tCdmnrHfajzkpnbO3lctA-3oiRlnNB71ZG3te7JWcfvc7ro0w content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test0", - "contract_address_hash": "0x0000000000000000000000000000000000000006", + "name": "test21", + "contract_address_hash": "0x0000000000000000000000000000000000000074", "abi": [ { "type": "function", @@ -1108,17 +1126,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDOKezeB5iEAAB4B +x-request-id: FwuQpjIzQYD_0WMAABxj +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "name": "test0", - "id": 289, - "contract_address_hash": "0x0000000000000000000000000000000000000006", + "name": "test21", + "id": 468, + "contract_address_hash": "0x0000000000000000000000000000000000000074", "abi": [ { "type": "function", @@ -1159,14 +1177,14 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/custom_abis * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWY4OWIzMmMtNWVlMy00ZTU0LThjOTMtZDNiMDk5MmJmMDRkIiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.k2oQjv-o5qPSDdCT4idXEhI2oBEz6KiYy0pRPiQ0Ma77i2Z2Da3Xr8g2wb3W0vWbG65yvNnuywps4OXatgG2jA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYzdmN2NmOWQtMjEzYi00OGVhLWJlOTEtNWQ2YTI0Yjc1NTdlIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.lZboWExo17mBNR-sGWkbyyZhjLEI7-7GBLwZqI22LT9kIPa3sXXhkUZNfjlhlotS2l_AlXxTpVNZkhDZ_XxdZg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test16", - "contract_address_hash": "0x0000000000000000000000000000000000000016", + "name": "test17", + "contract_address_hash": "0x0000000000000000000000000000000000000065", "abi": [ { "type": "function", @@ -1206,10 +1224,10 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDcwa8LsvpkAAB8h +x-request-id: FwuQpiiglpJ_3TEAAAZk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -1230,7 +1248,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/custom_abis * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDAsImlhdCI6MTY1OTAxMDMwMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWY4OWIzMmMtNWVlMy00ZTU0LThjOTMtZDNiMDk5MmJmMDRkIiwibmJmIjoxNjU5MDEwMjk5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.k2oQjv-o5qPSDdCT4idXEhI2oBEz6KiYy0pRPiQ0Ma77i2Z2Da3Xr8g2wb3W0vWbG65yvNnuywps4OXatgG2jA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYzdmN2NmOWQtMjEzYi00OGVhLWJlOTEtNWQ2YTI0Yjc1NTdlIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.lZboWExo17mBNR-sGWkbyyZhjLEI7-7GBLwZqI22LT9kIPa3sXXhkUZNfjlhlotS2l_AlXxTpVNZkhDZ_XxdZg ``` ##### Response @@ -1239,18 +1257,18 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDdCHYvsvpkAAB9B +x-request-id: FwuQpii331h_3TEAAAaE +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json [ { - "name": "test1", - "id": 290, - "contract_address_hash": "0x0000000000000000000000000000000000000007", + "name": "test16", + "id": 465, + "contract_address_hash": "0x0000000000000000000000000000000000000064", "abi": [ { "type": "function", @@ -1283,9 +1301,9 @@ access-control-allow-credentials: true ] }, { - "name": "test2", - "id": 291, - "contract_address_hash": "0x0000000000000000000000000000000000000008", + "name": "test15", + "id": 464, + "contract_address_hash": "0x0000000000000000000000000000000000000063", "abi": [ { "type": "function", @@ -1318,9 +1336,9 @@ access-control-allow-credentials: true ] }, { - "name": "test3", - "id": 292, - "contract_address_hash": "0x0000000000000000000000000000000000000009", + "name": "test14", + "id": 463, + "contract_address_hash": "0x0000000000000000000000000000000000000062", "abi": [ { "type": "function", @@ -1353,9 +1371,9 @@ access-control-allow-credentials: true ] }, { - "name": "test4", - "id": 293, - "contract_address_hash": "0x000000000000000000000000000000000000000a", + "name": "test13", + "id": 462, + "contract_address_hash": "0x0000000000000000000000000000000000000061", "abi": [ { "type": "function", @@ -1388,9 +1406,9 @@ access-control-allow-credentials: true ] }, { - "name": "test5", - "id": 294, - "contract_address_hash": "0x000000000000000000000000000000000000000b", + "name": "test12", + "id": 461, + "contract_address_hash": "0x0000000000000000000000000000000000000060", "abi": [ { "type": "function", @@ -1423,9 +1441,9 @@ access-control-allow-credentials: true ] }, { - "name": "test6", - "id": 295, - "contract_address_hash": "0x000000000000000000000000000000000000000c", + "name": "test11", + "id": 460, + "contract_address_hash": "0x000000000000000000000000000000000000005f", "abi": [ { "type": "function", @@ -1458,9 +1476,9 @@ access-control-allow-credentials: true ] }, { - "name": "test7", - "id": 296, - "contract_address_hash": "0x000000000000000000000000000000000000000d", + "name": "test10", + "id": 459, + "contract_address_hash": "0x000000000000000000000000000000000000005e", "abi": [ { "type": "function", @@ -1493,9 +1511,9 @@ access-control-allow-credentials: true ] }, { - "name": "test8", - "id": 297, - "contract_address_hash": "0x000000000000000000000000000000000000000e", + "name": "test9", + "id": 458, + "contract_address_hash": "0x000000000000000000000000000000000000005d", "abi": [ { "type": "function", @@ -1528,9 +1546,9 @@ access-control-allow-credentials: true ] }, { - "name": "test9", - "id": 298, - "contract_address_hash": "0x000000000000000000000000000000000000000f", + "name": "test8", + "id": 457, + "contract_address_hash": "0x000000000000000000000000000000000000005c", "abi": [ { "type": "function", @@ -1563,9 +1581,9 @@ access-control-allow-credentials: true ] }, { - "name": "test10", - "id": 299, - "contract_address_hash": "0x0000000000000000000000000000000000000010", + "name": "test7", + "id": 456, + "contract_address_hash": "0x000000000000000000000000000000000000005b", "abi": [ { "type": "function", @@ -1598,9 +1616,9 @@ access-control-allow-credentials: true ] }, { - "name": "test11", - "id": 300, - "contract_address_hash": "0x0000000000000000000000000000000000000011", + "name": "test6", + "id": 455, + "contract_address_hash": "0x000000000000000000000000000000000000005a", "abi": [ { "type": "function", @@ -1633,9 +1651,9 @@ access-control-allow-credentials: true ] }, { - "name": "test12", - "id": 301, - "contract_address_hash": "0x0000000000000000000000000000000000000012", + "name": "test5", + "id": 454, + "contract_address_hash": "0x0000000000000000000000000000000000000059", "abi": [ { "type": "function", @@ -1668,9 +1686,9 @@ access-control-allow-credentials: true ] }, { - "name": "test13", - "id": 302, - "contract_address_hash": "0x0000000000000000000000000000000000000013", + "name": "test4", + "id": 453, + "contract_address_hash": "0x0000000000000000000000000000000000000058", "abi": [ { "type": "function", @@ -1703,9 +1721,9 @@ access-control-allow-credentials: true ] }, { - "name": "test14", - "id": 303, - "contract_address_hash": "0x0000000000000000000000000000000000000014", + "name": "test3", + "id": 452, + "contract_address_hash": "0x0000000000000000000000000000000000000057", "abi": [ { "type": "function", @@ -1738,9 +1756,9 @@ access-control-allow-credentials: true ] }, { - "name": "test15", - "id": 304, - "contract_address_hash": "0x0000000000000000000000000000000000000015", + "name": "test2", + "id": 451, + "contract_address_hash": "0x0000000000000000000000000000000000000056", "abi": [ { "type": "function", @@ -1780,17 +1798,17 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/custom_abis/305 +* __Path:__ /api/account/v1/user/custom_abis/467 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYzQ1YjRjYjMtMmUxYS00MTI2LThkMjgtMjE5OGM3MDg4MzNjIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.DNb34dNnY3Qs91NHvxtKVi_3wl9P8vPXyzFG6VTParQVzNhz4L7w4mJVcxl7dTpk4FqUMllokhM1NYM3fPFW5A +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDU2YTY5NzYtY2U4NS00OWQ2LWI2YTgtNzY1OTUzMDkxMGU5IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.VeRQl9FN6i2NxfT_x0-E8YPGo8gDxDmGEHfjmLPJAa0-s8vRykPNq5C8loESJAFowi0MCIeHottQvR94oK-TVg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test18", - "contract_address_hash": "0x0000000000000000000000000000000000000018", + "name": "test20", + "contract_address_hash": "0x0000000000000000000000000000000000000073", "abi": [ { "type": "function", @@ -1830,17 +1848,17 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDgXjDdlqPkAAB-h +x-request-id: FwuQpjG3_3dYelIAABwD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "name": "test18", - "id": 305, - "contract_address_hash": "0x0000000000000000000000000000000000000018", + "name": "test20", + "id": 467, + "contract_address_hash": "0x0000000000000000000000000000000000000073", "abi": [ { "type": "function", @@ -1879,10 +1897,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/custom_abis/306 +* __Path:__ /api/account/v1/user/custom_abis/466 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTRhYTYxYjItOWRjYi00MWZhLTkwMDQtODJjZjE1MDQ0NmJhIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.NSKNjPFqh3LLrRtBaliyxLCT37RsOnkW6Y__JyXlnZzH033xct94jFoB-BDuIrRGlsz4Infs9HIKTor3J1NbVw +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzE2ZjNhNjAtZTQzYi00MzE1LWE0NzUtY2NlY2VkZTZmYWY4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.sMNyE8SSLXLL9f1Jx6xUfxeuYNDjbOCdoUwmlB1fcEKOrELZGUU_sHnDKKyaL5y1wYyd5PNC0NJ7E1gEPtWUrA ``` ##### Response @@ -1891,10 +1909,10 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDnES_sdOgkAAAXC +x-request-id: FwuQpilcg3W_YHIAAAbk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -1911,26 +1929,22 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/public_tags * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzQ2MmFlNmItOWIwNS00NjkxLTgwNzktZjQ1MTUyZTc5ODEyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIwIiwidHlwIjoiYWNjZXNzIn0.9mwp6vm2_RurBsJSU6puiu2qkMKbVZUMMuLzij9Js3wdoMa2YDk_Pm9ylP-7P6SakVeU9-wvf0XQu32IBrpLqQ +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGEzZDI5ZjMtY2UxOS00Y2U5LWEyMTMtMjlhMDA4MGYzMDJkIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ._znDLvjrXnb4b2J74_RA2olgq8Zj_eWYKq1J3W3ZkdJksaF0fmJnJ_K35vzAsd4mShDGkRUnJbWveyo-R5egXA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "website": "website12", - "tags": "Tag19;Tag20", - "is_owner": false, - "full_name": "full name12", - "email": "email12", - "company": "company12", - "addresses_array": [ - "0x0000000000000000000000000000000000000068", - "0x0000000000000000000000000000000000000069", - "0x000000000000000000000000000000000000006a", - "0x000000000000000000000000000000000000006b", - "0x000000000000000000000000000000000000006c" + "website": "website10", + "tags": "Tag11", + "is_owner": true, + "full_name": "full name10", + "email": "test_user-18@blockscout.com", + "company": "company10", + "addresses": [ + "0x0000000000000000000000000000000000000051" ], - "additional_comment": "additional_comment12" + "additional_comment": "additional_comment10" } ``` @@ -1940,23 +1954,25 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEk6QUkAq20AAAzC +x-request-id: FwuQpiPkYbM3wm8AAAXk +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "website": "website12", - "tags": "Tag19;Tag20", - "is_owner": false, - "id": 95, - "full_name": "full name12", - "email": "email12", - "company": "company12", - "addresses": "0x0000000000000000000000000000000000000068;0x0000000000000000000000000000000000000069;0x000000000000000000000000000000000000006a;0x000000000000000000000000000000000000006b;0x000000000000000000000000000000000000006c", - "additional_comment": "additional_comment12" + "website": "website10", + "tags": "Tag11", + "is_owner": true, + "id": 192, + "full_name": "full name10", + "email": "test_user-18@blockscout.com", + "company": "company10", + "addresses": [ + "0x0000000000000000000000000000000000000051" + ], + "additional_comment": "additional_comment10" } ``` @@ -1968,7 +1984,7 @@ access-control-allow-credentials: true * __Path:__ /api/account/v1/user/public_tags * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGQyMTNmZjUtZjcwMi00MGY1LThlYTAtYmMwMmViNjdkOTgyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.F3xDTfXJLm5BAoKT6KjUE56XPq-taA1R-KMYnf2p9uHgZ2ZcWbPZcJEmaaq8ejdB77t_AbqSothvP1AqrbnNWg +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTJkNGIxNjAtZTNiMC00ZDZhLWI0NWUtNTEyYmI0OTZkZWQ4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.ZBfbt5qBLc1tVkZvatWlCqdiPgZ3nXF23O5hfGvFdj47rHB2ej7gbg6MKLDOLHBAdt7qIqaKGPnQWj1VerQDcA ``` ##### Response @@ -1977,123 +1993,204 @@ authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEG1TdpTy1EAACXh +x-request-id: FwuQpiJB0_ZrrjAAABTD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json [ { - "website": "website2", - "tags": "Tag2;Tag3", + "website": "website9", + "tags": "Tag10", + "is_owner": false, + "id": 191, + "full_name": "full name9", + "email": "test_user-16@blockscout.com", + "company": "company9", + "addresses": [ + "0x0000000000000000000000000000000000000048", + "0x0000000000000000000000000000000000000049", + "0x000000000000000000000000000000000000004a", + "0x000000000000000000000000000000000000004b", + "0x000000000000000000000000000000000000004c", + "0x000000000000000000000000000000000000004d", + "0x000000000000000000000000000000000000004e", + "0x000000000000000000000000000000000000004f", + "0x0000000000000000000000000000000000000050" + ], + "additional_comment": "additional_comment9" + }, + { + "website": "website8", + "tags": "Tag9", "is_owner": true, - "id": 85, - "full_name": "full name2", - "email": "email2", - "company": "company2", - "addresses": "0x000000000000000000000000000000000000002c;0x000000000000000000000000000000000000002d;0x000000000000000000000000000000000000002e;0x000000000000000000000000000000000000002f;0x0000000000000000000000000000000000000030;0x0000000000000000000000000000000000000031;0x0000000000000000000000000000000000000032;0x0000000000000000000000000000000000000033", - "additional_comment": "additional_comment2" + "id": 190, + "full_name": "full name8", + "email": "test_user-15@blockscout.com", + "company": "company8", + "addresses": [ + "0x000000000000000000000000000000000000003f", + "0x0000000000000000000000000000000000000040", + "0x0000000000000000000000000000000000000041", + "0x0000000000000000000000000000000000000042", + "0x0000000000000000000000000000000000000043", + "0x0000000000000000000000000000000000000044", + "0x0000000000000000000000000000000000000045", + "0x0000000000000000000000000000000000000046", + "0x0000000000000000000000000000000000000047" + ], + "additional_comment": "additional_comment8" }, { - "website": "website3", - "tags": "Tag4;Tag5", + "website": "website7", + "tags": "Tag7;Tag8", "is_owner": true, - "id": 86, - "full_name": "full name3", - "email": "email3", - "company": "company3", - "addresses": "0x0000000000000000000000000000000000000034;0x0000000000000000000000000000000000000035", - "additional_comment": "additional_comment3" + "id": 189, + "full_name": "full name7", + "email": "test_user-14@blockscout.com", + "company": "company7", + "addresses": [ + "0x0000000000000000000000000000000000000035", + "0x0000000000000000000000000000000000000036", + "0x0000000000000000000000000000000000000037", + "0x0000000000000000000000000000000000000038", + "0x0000000000000000000000000000000000000039", + "0x000000000000000000000000000000000000003a", + "0x000000000000000000000000000000000000003b", + "0x000000000000000000000000000000000000003c", + "0x000000000000000000000000000000000000003d", + "0x000000000000000000000000000000000000003e" + ], + "additional_comment": "additional_comment7" }, { - "website": "website4", + "website": "website6", "tags": "Tag6", "is_owner": true, - "id": 87, - "full_name": "full name4", - "email": "email4", - "company": "company4", - "addresses": "0x0000000000000000000000000000000000000036;0x0000000000000000000000000000000000000037;0x0000000000000000000000000000000000000038;0x0000000000000000000000000000000000000039;0x000000000000000000000000000000000000003a", - "additional_comment": "additional_comment4" + "id": 188, + "full_name": "full name6", + "email": "test_user-13@blockscout.com", + "company": "company6", + "addresses": [ + "0x000000000000000000000000000000000000002f", + "0x0000000000000000000000000000000000000030", + "0x0000000000000000000000000000000000000031", + "0x0000000000000000000000000000000000000032", + "0x0000000000000000000000000000000000000033", + "0x0000000000000000000000000000000000000034" + ], + "additional_comment": "additional_comment6" }, { "website": "website5", - "tags": "Tag7;Tag8", + "tags": "Tag5", "is_owner": true, - "id": 88, + "id": 187, "full_name": "full name5", - "email": "email5", + "email": "test_user-12@blockscout.com", "company": "company5", - "addresses": "0x000000000000000000000000000000000000003b;0x000000000000000000000000000000000000003c;0x000000000000000000000000000000000000003d", + "addresses": [ + "0x0000000000000000000000000000000000000028", + "0x0000000000000000000000000000000000000029", + "0x000000000000000000000000000000000000002a", + "0x000000000000000000000000000000000000002b", + "0x000000000000000000000000000000000000002c", + "0x000000000000000000000000000000000000002d", + "0x000000000000000000000000000000000000002e" + ], "additional_comment": "additional_comment5" }, { - "website": "website6", - "tags": "Tag9;Tag10", + "website": "website4", + "tags": "Tag4", "is_owner": false, - "id": 89, - "full_name": "full name6", - "email": "email6", - "company": "company6", - "addresses": "0x000000000000000000000000000000000000003e;0x000000000000000000000000000000000000003f;0x0000000000000000000000000000000000000040;0x0000000000000000000000000000000000000041;0x0000000000000000000000000000000000000042;0x0000000000000000000000000000000000000043", - "additional_comment": "additional_comment6" + "id": 186, + "full_name": "full name4", + "email": "test_user-11@blockscout.com", + "company": "company4", + "addresses": [ + "0x0000000000000000000000000000000000000022", + "0x0000000000000000000000000000000000000023", + "0x0000000000000000000000000000000000000024", + "0x0000000000000000000000000000000000000025", + "0x0000000000000000000000000000000000000026", + "0x0000000000000000000000000000000000000027" + ], + "additional_comment": "additional_comment4" }, { - "website": "website7", - "tags": "Tag11", + "website": "website3", + "tags": "Tag3", "is_owner": false, - "id": 90, - "full_name": "full name7", - "email": "email7", - "company": "company7", - "addresses": "0x0000000000000000000000000000000000000044;0x0000000000000000000000000000000000000045;0x0000000000000000000000000000000000000046;0x0000000000000000000000000000000000000047;0x0000000000000000000000000000000000000048;0x0000000000000000000000000000000000000049;0x000000000000000000000000000000000000004a;0x000000000000000000000000000000000000004b", - "additional_comment": "additional_comment7" + "id": 185, + "full_name": "full name3", + "email": "test_user-10@blockscout.com", + "company": "company3", + "addresses": [ + "0x000000000000000000000000000000000000001b", + "0x000000000000000000000000000000000000001c", + "0x000000000000000000000000000000000000001d", + "0x000000000000000000000000000000000000001e", + "0x000000000000000000000000000000000000001f", + "0x0000000000000000000000000000000000000020", + "0x0000000000000000000000000000000000000021" + ], + "additional_comment": "additional_comment3" }, { - "website": "website8", - "tags": "Tag12", + "website": "website2", + "tags": "Tag2", "is_owner": true, - "id": 91, - "full_name": "full name8", - "email": "email8", - "company": "company8", - "addresses": "0x000000000000000000000000000000000000004c", - "additional_comment": "additional_comment8" + "id": 184, + "full_name": "full name2", + "email": "test_user-9@blockscout.com", + "company": "company2", + "addresses": [ + "0x0000000000000000000000000000000000000016", + "0x0000000000000000000000000000000000000017", + "0x0000000000000000000000000000000000000018", + "0x0000000000000000000000000000000000000019", + "0x000000000000000000000000000000000000001a" + ], + "additional_comment": "additional_comment2" }, { - "website": "website9", - "tags": "Tag13;Tag14", + "website": "website1", + "tags": "Tag1", "is_owner": false, - "id": 92, - "full_name": "full name9", - "email": "email9", - "company": "company9", - "addresses": "0x000000000000000000000000000000000000004d;0x000000000000000000000000000000000000004e;0x000000000000000000000000000000000000004f", - "additional_comment": "additional_comment9" + "id": 183, + "full_name": "full name1", + "email": "test_user-8@blockscout.com", + "company": "company1", + "addresses": [ + "0x0000000000000000000000000000000000000010", + "0x0000000000000000000000000000000000000011", + "0x0000000000000000000000000000000000000012", + "0x0000000000000000000000000000000000000013", + "0x0000000000000000000000000000000000000014", + "0x0000000000000000000000000000000000000015" + ], + "additional_comment": "additional_comment1" }, { - "website": "website10", - "tags": "Tag15;Tag16", + "website": "website0", + "tags": "Tag0", "is_owner": true, - "id": 93, - "full_name": "full name10", - "email": "email10", - "company": "company10", - "addresses": "0x0000000000000000000000000000000000000050;0x0000000000000000000000000000000000000051;0x0000000000000000000000000000000000000052", - "additional_comment": "additional_comment10" - }, - { - "website": "website11", - "tags": "Tag17;Tag18", - "is_owner": false, - "id": 94, - "full_name": "full name11", - "email": "email11", - "company": "company11", - "addresses": "0x0000000000000000000000000000000000000053;0x0000000000000000000000000000000000000054;0x0000000000000000000000000000000000000055;0x0000000000000000000000000000000000000056;0x0000000000000000000000000000000000000057;0x0000000000000000000000000000000000000058;0x0000000000000000000000000000000000000059", - "additional_comment": "additional_comment11" + "id": 182, + "full_name": "full name0", + "email": "test_user-7@blockscout.com", + "company": "company0", + "addresses": [ + "0x000000000000000000000000000000000000000a", + "0x000000000000000000000000000000000000000b", + "0x000000000000000000000000000000000000000c", + "0x000000000000000000000000000000000000000d", + "0x000000000000000000000000000000000000000e", + "0x000000000000000000000000000000000000000f" + ], + "additional_comment": "additional_comment0" } ] ``` @@ -2103,10 +2200,10 @@ access-control-allow-credentials: true ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/public_tags/85 +* __Path:__ /api/account/v1/user/public_tags/191 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGQyMTNmZjUtZjcwMi00MGY1LThlYTAtYmMwMmViNjdkOTgyIiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.F3xDTfXJLm5BAoKT6KjUE56XPq-taA1R-KMYnf2p9uHgZ2ZcWbPZcJEmaaq8ejdB77t_AbqSothvP1AqrbnNWg +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTJkNGIxNjAtZTNiMC00ZDZhLWI0NWUtNTEyYmI0OTZkZWQ4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.ZBfbt5qBLc1tVkZvatWlCqdiPgZ3nXF23O5hfGvFdj47rHB2ej7gbg6MKLDOLHBAdt7qIqaKGPnQWj1VerQDcA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -2122,10 +2219,10 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FEHJeHNTy1EAACYB +x-request-id: FwuQpiJiCRRrrjAAABUD +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json @@ -2139,32 +2236,25 @@ access-control-allow-credentials: true ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/public_tags/84 +* __Path:__ /api/account/v1/user/public_tags/194 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjE0Mjk1MDEsImlhdCI6MTY1OTAxMDMwMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjM4MjljNTgtYzRjNC00NDQxLTlmNTYtZmY5YzJlZTU2MDE5IiwibmJmIjoxNjU5MDEwMzAwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.2MJrq9MRPksGIJK2Ol-chZMOy677EHr3Pr7bJ3lKtGbOD4iiV49dqO5KnH1o2sXw3HLH1SEtytYrcNYM_0kYYA +authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzMzOWViOWYtYTE3Ny00MzJlLWE3NjYtMTk4YzIwZjk2ZTMyIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIzIiwidHlwIjoiYWNjZXNzIn0.cv2NCc9KC-ad5u8hDlXeSL1EJpt3E_C1OvoENI_xkjBSnWqBL-M-KXSqqgo_42Od_cVKslI4XGtVeK3fk0eaOA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "website": "website1", - "tags": "Tag1", + "website": "website13", + "tags": "Tag14", "is_owner": false, - "full_name": "full name1", - "email": "email1", - "company": "company1", - "addresses_array": [ - "0x000000000000000000000000000000000000001a", - "0x000000000000000000000000000000000000001b", - "0x000000000000000000000000000000000000001c", - "0x000000000000000000000000000000000000001d", - "0x000000000000000000000000000000000000001e", - "0x000000000000000000000000000000000000001f", - "0x0000000000000000000000000000000000000020", - "0x0000000000000000000000000000000000000021" + "full_name": "full name13", + "email": "test_user-37@blockscout.com", + "company": "company13", + "addresses": [ + "0x0000000000000000000000000000000000000082" ], - "additional_comment": "additional_comment1" + "additional_comment": "additional_comment13" } ``` @@ -2174,23 +2264,25 @@ content-type: multipart/mixed; boundary=plug_conn_test ``` content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwX9FDjgyH50TAgAAASi +x-request-id: FwuQpjnaeEIPFzIAAAiB +access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: -access-control-allow-credentials: true ``` * __Response body:__ ```json { - "website": "website1", - "tags": "Tag1", + "website": "website13", + "tags": "Tag14", "is_owner": false, - "id": 84, - "full_name": "full name1", - "email": "email1", - "company": "company1", - "addresses": "0x000000000000000000000000000000000000001a;0x000000000000000000000000000000000000001b;0x000000000000000000000000000000000000001c;0x000000000000000000000000000000000000001d;0x000000000000000000000000000000000000001e;0x000000000000000000000000000000000000001f;0x0000000000000000000000000000000000000020;0x0000000000000000000000000000000000000021", - "additional_comment": "additional_comment1" + "id": 194, + "full_name": "full name13", + "email": "test_user-37@blockscout.com", + "company": "company13", + "addresses": [ + "0x0000000000000000000000000000000000000082" + ], + "additional_comment": "additional_comment13" } ``` diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index 4ac80fa664e7..63e14cb789d0 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -1,6 +1,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do use BlockScoutWeb, :controller + import Ecto.Query, only: [from: 2] + alias BlockScoutWeb.Guardian alias BlockScoutWeb.Models.UserFromAuth alias Explorer.Account.Api.Key, as: ApiKey @@ -29,7 +31,10 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, - watchlist_with_addresses <- Repo.preload(watchlist, watchlist_addresses: :address) do + watchlist_with_addresses <- + Repo.preload(watchlist, + watchlist_addresses: {from(wa in WatchlistAddress, order_by: [desc: wa.id]), [:address]} + ) do conn |> put_status(200) |> render(:watchlist_addresses, %{ @@ -433,7 +438,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do tags: params["tags"], website: params["website"], additional_comment: params["additional_comment"], - addresses_array: params["addresses_array"], + addresses: params["addresses"], company: params["company"], is_owner: params["is_owner"], identity_id: identity.id @@ -462,7 +467,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do tags: params["tags"], website: params["website"], additional_comment: params["additional_comment"], - addresses_array: params["addresses_array"], + addresses: params["addresses"], company: params["company"], is_owner: params["is_owner"], identity_id: identity.id diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex index c90ff4e38825..b774d57c4408 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex @@ -2,8 +2,9 @@ defmodule BlockScoutWeb.Account.WatchlistController do use BlockScoutWeb, :controller import BlockScoutWeb.Account.AuthController, only: [authenticate!: 1] + import Ecto.Query, only: [from: 2] - alias Explorer.Account.Watchlist + alias Explorer.Account.{Watchlist, WatchlistAddress} alias Explorer.Repo def show(conn, _params) do @@ -19,6 +20,6 @@ defmodule BlockScoutWeb.Account.WatchlistController do defp watchlist_with_addresses(user) do Watchlist |> Repo.get(user.watchlist_id) - |> Repo.preload(watchlist_addresses: :address) + |> Repo.preload(watchlist_addresses: {from(wa in WatchlistAddress, order_by: [desc: wa.id]), [:address]}) end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs index 028039e8a17d..e10353c0c45a 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs @@ -345,7 +345,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do "/api/account/v1/user/watchlist", watchlist_address_map ) - |> doc(description: "Add address to watchlist") + |> doc(description: "Add address to watch list") |> json_response(200) assert post_watchlist_address_response["notification_settings"] == watchlist_address_map["notification_settings"] @@ -376,10 +376,10 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do |> get("/api/account/v1/user/watchlist") |> doc(description: "Get addresses from watchlists") |> json_response(200) - |> Enum.at(0) + |> Enum.at(1) get_watchlist_address_response_1_1 = - conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(1) + conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(0) assert get_watchlist_address_response_1_0 == get_watchlist_address_response @@ -430,10 +430,10 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do |> json_response(200) get_watchlist_address_response_1_0 = - conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(0) + conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(1) get_watchlist_address_response_1_1 = - conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(1) + conn |> get("/api/account/v1/user/watchlist") |> json_response(200) |> Enum.at(0) assert get_watchlist_address_response_1_0 == get_watchlist_address_response @@ -526,7 +526,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do watchlist_address_map ) |> doc(description: "Example of error on creating watchlist address") - |> json_response(422) == %{"errors" => %{"watchlist_id" => ["Address already added to the watchlist"]}} + |> json_response(422) == %{"errors" => %{"watchlist_id" => ["Address already added to the watch list"]}} new_watchlist_address_map = build(:watchlist_address) @@ -544,7 +544,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do watchlist_address_map ) |> doc(description: "Example of error on editing watchlist address") - |> json_response(422) == %{"errors" => %{"watchlist_id" => ["Address already added to the watchlist"]}} + |> json_response(422) == %{"errors" => %{"watchlist_id" => ["Address already added to the watch list"]}} end test "post api key", %{conn: conn} do @@ -770,7 +770,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert post_public_tasg_request_response["tags"] == public_tags_request["tags"] assert post_public_tasg_request_response["website"] == public_tags_request["website"] assert post_public_tasg_request_response["additional_comment"] == public_tags_request["additional_comment"] - assert post_public_tasg_request_response["addresses"] == Enum.join(public_tags_request["addresses_array"], ";") + assert post_public_tasg_request_response["addresses"] == public_tags_request["addresses"] assert post_public_tasg_request_response["company"] == public_tags_request["company"] assert post_public_tasg_request_response["is_owner"] == public_tags_request["is_owner"] assert post_public_tasg_request_response["id"] @@ -792,7 +792,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert post_public_tasg_request_response["tags"] == public_tags_request["tags"] assert post_public_tasg_request_response["website"] == public_tags_request["website"] assert post_public_tasg_request_response["additional_comment"] == public_tags_request["additional_comment"] - assert post_public_tasg_request_response["addresses"] == Enum.join(public_tags_request["addresses_array"], ";") + assert post_public_tasg_request_response["addresses"] == public_tags_request["addresses"] assert post_public_tasg_request_response["company"] == public_tags_request["company"] assert post_public_tasg_request_response["is_owner"] == public_tags_request["is_owner"] assert post_public_tasg_request_response["id"] @@ -806,7 +806,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do public_tags_list = build_list(10, :public_tags_request) final_list = - Enum.map(public_tags_list, fn request -> + public_tags_list + |> Enum.map(fn request -> response = conn |> post( @@ -820,13 +821,14 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert response["tags"] == request["tags"] assert response["website"] == request["website"] assert response["additional_comment"] == request["additional_comment"] - assert response["addresses"] == Enum.join(request["addresses_array"], ";") + assert response["addresses"] == request["addresses"] assert response["company"] == request["company"] assert response["is_owner"] == request["is_owner"] assert response["id"] response end) + |> Enum.reverse() assert conn |> get("/api/account/v1/user/public_tags") @@ -867,7 +869,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert post_public_tasg_request_response["tags"] == public_tags_request["tags"] assert post_public_tasg_request_response["website"] == public_tags_request["website"] assert post_public_tasg_request_response["additional_comment"] == public_tags_request["additional_comment"] - assert post_public_tasg_request_response["addresses"] == Enum.join(public_tags_request["addresses_array"], ";") + assert post_public_tasg_request_response["addresses"] == public_tags_request["addresses"] assert post_public_tasg_request_response["company"] == public_tags_request["company"] assert post_public_tasg_request_response["is_owner"] == public_tags_request["is_owner"] assert post_public_tasg_request_response["id"] @@ -892,7 +894,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert put_public_tasg_request_response["tags"] == new_public_tags_request["tags"] assert put_public_tasg_request_response["website"] == new_public_tags_request["website"] assert put_public_tasg_request_response["additional_comment"] == new_public_tags_request["additional_comment"] - assert put_public_tasg_request_response["addresses"] == Enum.join(new_public_tags_request["addresses_array"], ";") + assert put_public_tasg_request_response["addresses"] == new_public_tags_request["addresses"] assert put_public_tasg_request_response["company"] == new_public_tags_request["company"] assert put_public_tasg_request_response["is_owner"] == new_public_tags_request["is_owner"] assert put_public_tasg_request_response["id"] == post_public_tasg_request_response["id"] diff --git a/apps/block_scout_web/test/test_helper.exs b/apps/block_scout_web/test/test_helper.exs index 15852210423b..9aeb6c8fa784 100644 --- a/apps/block_scout_web/test/test_helper.exs +++ b/apps/block_scout_web/test/test_helper.exs @@ -11,13 +11,13 @@ Application.put_env(:wallaby, :base_url, BlockScoutWeb.Endpoint.url()) {:ok, _} = Application.ensure_all_started(:ex_machina) -Bureaucrat.start( - writer: Bureaucrat.ApiBlueprintWriter, - default_path: "API blueprint.md", - env_var: "DOC" -) +# Bureaucrat.start( +# writer: Bureaucrat.ApiBlueprintWriter, +# default_path: "API blueprint.md", +# env_var: "DOC" +# ) -# Bureaucrat.start() +Bureaucrat.start() ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter, Bureaucrat.Formatter]) ExUnit.start() diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index 32f749133dda..cb2aa2196a9d 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -38,7 +38,7 @@ defmodule Explorer.Account.PublicTagsRequest do timestamps() end - @local_fields [:__meta__, :inserted_at, :updated_at, :addresses_array, :id, :request_id] + @local_fields [:__meta__, :inserted_at, :updated_at, :id, :request_id] def to_map(%__MODULE__{} = request) do association_fields = request.__struct__.__schema__(:associations) @@ -70,7 +70,6 @@ defmodule Explorer.Account.PublicTagsRequest do def changeset_without_constraints(%__MODULE__{} = public_tags_request \\ %__MODULE__{}, attrs \\ %{}) do public_tags_request |> cast(attrs, @attrs ++ @required_attrs) - |> extract_addresses_array() end def create(attrs) do @@ -80,17 +79,6 @@ defmodule Explorer.Account.PublicTagsRequest do |> AirTable.submit() end - defp extract_addresses_array(%Changeset{} = changeset) do - with {:fetch, {_src, addresses}} <- {:fetch, fetch_field(changeset, :addresses)}, - false <- is_nil(addresses), - addresses_array <- String.split(addresses, ";") do - put_change(changeset, :addresses_array, addresses_array) - else - _ -> - changeset - end - end - defp trim_empty_addresses(%{addresses: addresses} = attrs) do filtered_addresses = Enum.filter(addresses, fn addr -> addr != "" end) Map.put(attrs, :addresses, if(filtered_addresses == [], do: [""], else: filtered_addresses)) diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index df667ae3bed1..4d2c0d184f2f 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -114,11 +114,11 @@ defmodule Explorer.Factory do def public_tags_request_factory do %{ "full_name" => sequence("full name"), - "email" => sequence("email"), + "email" => sequence(:email, &"test_user-#{&1}@blockscout.com"), "tags" => Enum.join(Enum.map(1..Enum.random(1..2), fn _ -> sequence("Tag") end), ";"), "website" => sequence("website"), "additional_comment" => sequence("additional_comment"), - "addresses_array" => Enum.map(1..Enum.random(1..10), fn _ -> to_string(build(:address).hash) end), + "addresses" => Enum.map(1..Enum.random(1..10), fn _ -> to_string(build(:address).hash) end), "company" => sequence("company"), "is_owner" => random_bool() } From c2b7deecfa54b0112f78b64f37b268503731d418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 16 Aug 2022 18:01:08 +0300 Subject: [PATCH 345/723] Fix migration --- .../20220811195240_migrate_public_tags_addresses_to_array.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs b/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs index f2d55f05a791..0fa5f0e05062 100644 --- a/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs +++ b/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs @@ -14,7 +14,7 @@ defmodule Explorer.Repo.Migrations.MigratePublicTagsAddressesToArray do BEGIN FOREACH x IN ARRAY $1 LOOP - s := array_append(s, decode(ltrim(x, '0x'), 'hex')); + s := array_append(s, decode(replace(x, '0x', ''), 'hex')); END LOOP; RETURN s; END; From cb2206b35917a4927f5888b5005f5072c7f099b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 17 Aug 2022 14:23:46 +0300 Subject: [PATCH 346/723] Fix public tags request bug --- apps/explorer/lib/explorer/account/public_tags_request.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index cb2aa2196a9d..b5b742d0aeac 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -79,8 +79,8 @@ defmodule Explorer.Account.PublicTagsRequest do |> AirTable.submit() end - defp trim_empty_addresses(%{addresses: addresses} = attrs) do - filtered_addresses = Enum.filter(addresses, fn addr -> addr != "" end) + defp trim_empty_addresses(%{addresses: addresses} = attrs) when is_list(addresses) do + filtered_addresses = Enum.filter(addresses, fn addr -> addr != "" and !is_nil(addr) end) Map.put(attrs, :addresses, if(filtered_addresses == [], do: [""], else: filtered_addresses)) end From cc80d96afab6db9f099aa3acd3bc18ca8278c137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 17 Aug 2022 17:42:59 +0300 Subject: [PATCH 347/723] Fix edit form for public tags request; Add space trimming for tags --- .../controllers/account/public_tags_request_controller.ex | 2 +- apps/explorer/lib/explorer/account/public_tags_request.ex | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/public_tags_request_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/public_tags_request_controller.ex index 58f2233c64fb..a380a2cc3ca9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/public_tags_request_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/public_tags_request_controller.ex @@ -86,7 +86,7 @@ defmodule BlockScoutWeb.Account.PublicTagsRequestController do is_owner: public_tags_request["is_owner"], identity_id: current_user.id }) do - {:error, %Changeset{}} = public_tags_request -> + {:error, %Changeset{} = public_tags_request} -> render(conn, "form.html", method: :update, public_tags_request: public_tags_request) _ -> diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index b5b742d0aeac..31e14ef4b2a3 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -147,10 +147,12 @@ defmodule Explorer.Account.PublicTagsRequest do trimmed_tags <- String.trim(tags), tags_list <- String.split(trimmed_tags, ";"), {:filter_empty, [_ | _] = filtered_tags} <- {:filter_empty, Enum.filter(tags_list, fn tag -> tag != "" end)}, + trimmed_spaces_tags <- Enum.map(filtered_tags, fn tag -> String.trim(tag) end), {:validate, false} <- {:validate, Enum.any?(tags_list, fn tag -> String.length(tag) > @max_tag_length end)}, {:uniqueness, true} <- - {:uniqueness, Enum.count(Enum.uniq_by(filtered_tags, &String.downcase(&1))) == Enum.count(filtered_tags)}, - trimmed_tags_list <- Enum.take(filtered_tags, @max_tags_per_request) do + {:uniqueness, + Enum.count(Enum.uniq_by(trimmed_spaces_tags, &String.downcase(&1))) == Enum.count(trimmed_spaces_tags)}, + trimmed_tags_list <- Enum.take(trimmed_spaces_tags, @max_tags_per_request) do force_change(changeset, :tags, Enum.join(trimmed_tags_list, ";")) else {:uniqueness, false} -> From c2fa5a06d500cd968fbf4859650f2b90fd21bcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 17 Aug 2022 19:42:08 +0300 Subject: [PATCH 348/723] Fix editing public tags request (case with deleting addresses) --- apps/explorer/lib/explorer/account/public_tags_request.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index 31e14ef4b2a3..d62881b2ff51 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -101,13 +101,16 @@ defmodule Explorer.Account.PublicTagsRequest do def public_tags_request_count_constraint(changeset), do: changeset defp public_tags_request_time_interval_uniqueness(%Changeset{changes: %{addresses: addresses}} = request) do + prepared_addresses = + if request.data && request.data.addresses, do: addresses -- request.data.addresses, else: addresses + public_tags_request = request |> fetch_field!(:identity_id) |> public_tags_requests_by_identity_id_query() |> where( [public_tags_request], - fragment("? && ?", public_tags_request.addresses, ^Enum.map(addresses, fn x -> x.bytes end)) + fragment("? && ?", public_tags_request.addresses, ^Enum.map(prepared_addresses, fn x -> x.bytes end)) ) |> limit(1) |> Repo.one() From 7c60afabd0c0fdec6194c96a11f1b43cdbbb883a Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 23 Aug 2022 10:33:16 +0300 Subject: [PATCH 349/723] Move SENDGRID_ and PUBLIC_TAGS_AIRTABLE_ variables to runtime config --- apps/explorer/config/config.exs | 14 -------------- config/runtime.exs | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 4b6986a4c4fb..cc58587a54ad 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -112,20 +112,6 @@ config :spandex_ecto, SpandexEcto.EctoLogger, tracer: Explorer.Tracer, otp_app: :explorer -config :explorer, Explorer.ThirdPartyIntegrations.AirTable, - table_url: System.get_env("PUBLIC_TAGS_AIRTABLE_URL"), - api_key: System.get_env("PUBLIC_TAGS_AIRTABLE_API_KEY") - -config :explorer, Explorer.Mailer, - adapter: Bamboo.SendGridAdapter, - api_key: System.get_env("SENDGRID_API_KEY") - -config :explorer, Explorer.Account, - sendgrid: [ - sender: System.get_env("SENDGRID_SENDER"), - template: System.get_env("SENDGRID_TEMPLATE") - ] - # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{config_env()}.exs" diff --git a/config/runtime.exs b/config/runtime.exs index 6e91163023cb..e439b0a5f091 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -321,6 +321,20 @@ config :explorer, Explorer.SmartContract.RustVerifierInterface, service_url: System.get_env("RUST_VERIFICATION_SERVICE_URL"), enabled: System.get_env("ENABLE_RUST_VERIFICATION_SERVICE") == "true" +config :explorer, Explorer.ThirdPartyIntegrations.AirTable, + table_url: System.get_env("PUBLIC_TAGS_AIRTABLE_URL"), + api_key: System.get_env("PUBLIC_TAGS_AIRTABLE_API_KEY") + +config :explorer, Explorer.Mailer, + adapter: Bamboo.SendGridAdapter, + api_key: System.get_env("SENDGRID_API_KEY") + +config :explorer, Explorer.Account, + sendgrid: [ + sender: System.get_env("SENDGRID_SENDER"), + template: System.get_env("SENDGRID_TEMPLATE") + ] + ############### ### Indexer ### ############### From 5f54ea79c714a1ff1c5611c230cf8548cba36541 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 23 Aug 2022 11:23:15 +0300 Subject: [PATCH 350/723] Update dialyzer cache kery in CI --- .github/workflows/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index cd048c2ff50c..8eb84c5df6d7 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -144,7 +144,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" From d7eef32074da8c86775e76bdf55fa723a6cbcb7d Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Fri, 2 Sep 2022 15:33:36 +0300 Subject: [PATCH 351/723] Migrate account data to separate DB (#67) * Config changes * Separate migrations * Remain to fix preloads * Some changes * All is working, need to fix tests migrations * mix tasks * Fix tests and tune config * Add migration script to migrate account data * Fix after rebase * Add branch to config.yml * Add fix for broken sequence id counter * Add drop dblink * Add envs to makefile and common-bs.env * Fix credo --- .github/workflows/config.yml | 25 ++--- .gitignore | 3 + apps/block_scout_web/config/config.exs | 4 +- .../account/api/v1/tags_controller.ex | 6 +- .../account/api/v1/user_controller.ex | 27 ++++-- .../account/watchlist_controller.ex | 5 +- .../models/get_address_tags.ex | 4 +- .../models/get_transaction_tags.ex | 2 +- .../block_scout_web/models/user_from_auth.ex | 10 +- .../account/watchlist_address/row.html.eex | 4 +- .../views/account/api/v1/user_view.ex | 2 +- .../views/account/watchlist_address_view.ex | 6 +- .../models/user_from_auth_test.exs | 8 +- .../block_scout_web/test/support/conn_case.ex | 2 + apps/block_scout_web/test/test_helper.exs | 1 + apps/explorer/config/config.exs | 2 +- apps/explorer/config/dev.exs | 3 + apps/explorer/config/prod.exs | 5 + apps/explorer/config/test.exs | 10 ++ apps/explorer/lib/explorer/account/api/key.ex | 16 ++-- .../lib/explorer/account/custom_abi.ex | 38 ++++---- .../explorer/lib/explorer/account/identity.ex | 2 + .../lib/explorer/account/notifier/email.ex | 6 +- .../lib/explorer/account/notifier/notify.ex | 6 +- .../explorer/account/public_tags_request.ex | 17 ++-- .../lib/explorer/account/tag_address.ex | 34 +++---- .../lib/explorer/account/tag_transaction.ex | 44 +++++---- .../lib/explorer/account/watchlist.ex | 1 - .../lib/explorer/account/watchlist_address.ex | 45 +++++++-- .../account/watchlist_notification.ex | 31 +------ apps/explorer/lib/explorer/application.ex | 1 + apps/explorer/lib/explorer/chain/address.ex | 6 ++ apps/explorer/lib/explorer/repo.ex | 44 +++++++++ .../third_party_integrations/airtable.ex | 4 +- apps/explorer/lib/release_tasks.ex | 2 +- ...211031164954_create_account_identities.exs | 2 +- ...211105114502_create_account_watchlists.exs | 2 +- ...907_create_account_watchlist_addresses.exs | 4 +- ...create_account_watchlist_notifications.exs | 8 +- ...add_email_and_name_to_account_identity.exs | 2 +- ...212222222_create_account_tag_addresses.exs | 7 +- ...133333_create_account_tag_transactions.exs | 7 +- ...add_subject_to_watchlist_notifications.exs | 2 +- ...07134152_add_api_keys_and_plans_tables.exs | 2 +- .../20220510094118_add_custom_abis_table.exs | 4 +- ...94836_add_account_public_tags_requests.exs | 2 +- ...0620182600_add_account_identity_fields.exs | 2 +- .../20220624142547_add_unique_constraints.exs | 2 +- ...igrate_public_tags_addresses_to_array.exs} | 2 +- .../migrations/20220729075714_guardiandb.exs | 2 +- .../20220901135656_copy_account_data.exs | 92 +++++++++++++++++++ .../explorer/account/notify/email_test.exs | 1 - .../explorer/account/notify/notify_test.exs | 14 +-- apps/explorer/test/support/data_case.ex | 2 + apps/explorer/test/support/factory.ex | 5 +- apps/explorer/test/test_helper.exs | 1 + config/runtime/dev.exs | 28 +++++- config/runtime/prod.exs | 9 ++ docker-compose/envs/common-blockscout.env | 3 + docker/Makefile | 7 +- 60 files changed, 432 insertions(+), 206 deletions(-) rename apps/explorer/priv/{repo => account}/migrations/20211031164954_create_account_identities.exs (73%) rename apps/explorer/priv/{repo => account}/migrations/20211105114502_create_account_watchlists.exs (81%) rename apps/explorer/priv/{repo => account}/migrations/20211105130907_create_account_watchlist_addresses.exs (85%) rename apps/explorer/priv/{repo => account}/migrations/20211127212336_create_account_watchlist_notifications.exs (67%) rename apps/explorer/priv/{repo => account}/migrations/20211205220414_add_email_and_name_to_account_identity.exs (67%) rename apps/explorer/priv/{repo => account}/migrations/20220212222222_create_account_tag_addresses.exs (64%) rename apps/explorer/priv/{repo => account}/migrations/20220313133333_create_account_tag_transactions.exs (64%) rename apps/explorer/priv/{repo => account}/migrations/20220324213333_add_subject_to_watchlist_notifications.exs (64%) rename apps/explorer/priv/{repo => account}/migrations/20220407134152_add_api_keys_and_plans_tables.exs (93%) rename apps/explorer/priv/{repo => account}/migrations/20220510094118_add_custom_abis_table.exs (74%) rename apps/explorer/priv/{repo => account}/migrations/20220606194836_add_account_public_tags_requests.exs (88%) rename apps/explorer/priv/{repo => account}/migrations/20220620182600_add_account_identity_fields.exs (71%) rename apps/explorer/priv/{repo => account}/migrations/20220624142547_add_unique_constraints.exs (81%) rename apps/explorer/priv/{repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs => account/migrations/20220705195240_migrate_public_tags_addresses_to_array.exs} (91%) rename apps/explorer/priv/{repo => account}/migrations/20220729075714_guardiandb.exs (83%) create mode 100644 apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 8eb84c5df6d7..c87ed7e041b8 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,6 +4,7 @@ on: push: branches: - account + - np-separate-account-separate-db env: MIX_ENV: test @@ -37,7 +38,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps- @@ -97,7 +98,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -121,7 +122,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -144,7 +145,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -184,7 +185,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -210,7 +211,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -238,7 +239,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -284,7 +285,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -343,7 +344,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -399,7 +400,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -466,7 +467,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -527,7 +528,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" diff --git a/.gitignore b/.gitignore index a069fb5fd6e2..2f86dc1f3f00 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ /*.ez /logs +# mix dialyzer artifacts +/priv/plts + # Generated on crash by the VM erl_crash.dump diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 2787d532822a..f6e44d7013dd 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -8,7 +8,7 @@ import Config # General application configuration config :block_scout_web, namespace: BlockScoutWeb, - ecto_repos: [Explorer.Repo] + ecto_repos: [Explorer.Repo, Explorer.Repo.Account] config :block_scout_web, admin_panel_enabled: System.get_env("ADMIN_PANEL_ENABLED", "") == "true" @@ -97,7 +97,7 @@ config :hammer, config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web" config :guardian, Guardian.DB, - repo: Explorer.Repo, + repo: Explorer.Repo.Account, schema_name: "guardian_tokens", sweep_interval: 60 diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex index 9f11f75e6d00..529de91d5bb7 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex @@ -17,7 +17,8 @@ defmodule BlockScoutWeb.Account.Api.V1.TagsController do uid = Plug.current_claims(conn)["sub"] with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:address_hash, {:ok, address_hash}} <- {:address_hash, Address.cast(address_hash)} do GetAddressTags.get_address_tags(address_hash, %{id: identity.id, watchlist_id: watchlist.id}) else @@ -57,7 +58,8 @@ defmodule BlockScoutWeb.Account.Api.V1.TagsController do uid = Plug.current_claims(conn)["sub"] with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, false <- is_nil(transaction) do GetTransactionTags.get_transaction_with_addresses_tags(transaction, %{ id: identity.id, diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index 63e14cb789d0..6b3e9098ea0a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -30,11 +30,9 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do uid = Plug.current_claims(conn)["sub"] with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, - watchlist_with_addresses <- - Repo.preload(watchlist, - watchlist_addresses: {from(wa in WatchlistAddress, order_by: [desc: wa.id]), [:address]} - ) do + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, + watchlist_with_addresses <- preload_watchlist_address_fetched_coin_balance(watchlist) do conn |> put_status(200) |> render(:watchlist_addresses, %{ @@ -48,7 +46,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do uid = Plug.current_claims(conn)["sub"] with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {count, _} <- WatchlistAddress.delete(watchlist_address_id, watchlist.id), {:watchlist_delete, true} <- {:watchlist_delete, count > 0} do conn @@ -100,10 +99,11 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do } with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- WatchlistAddress.create(Map.put(watchlist_params, :watchlist_id, watchlist.id)), - watchlist_address_preloaded <- Repo.preload(watchlist_address, :address) do + watchlist_address_preloaded <- WatchlistAddress.preload_address_fetched_coin_balance(watchlist_address) do conn |> put_status(200) |> render(:watchlist_address, %{ @@ -158,10 +158,11 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do } with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, - {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.preload(identity, :watchlists)}, + {:watchlist, %{watchlists: [watchlist | _]}} <- + {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- WatchlistAddress.update(Map.put(watchlist_params, :watchlist_id, watchlist.id)), - watchlist_address_preloaded <- Repo.preload(watchlist_address, :address) do + watchlist_address_preloaded <- WatchlistAddress.preload_address_fetched_coin_balance(watchlist_address) do conn |> put_status(200) |> render(:watchlist_address, %{ @@ -482,4 +483,10 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do defp reject_nil_map_values(map) when is_map(map) do Map.reject(map, fn {_k, v} -> is_nil(v) end) end + + defp preload_watchlist_address_fetched_coin_balance(watchlist) do + watchlist + |> Repo.account_repo().preload(watchlist_addresses: from(wa in WatchlistAddress, order_by: [desc: wa.id])) + |> WatchlistAddress.preload_address_fetched_coin_balance() + end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex index b774d57c4408..f8c548322f44 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/watchlist_controller.ex @@ -19,7 +19,8 @@ defmodule BlockScoutWeb.Account.WatchlistController do defp watchlist_with_addresses(user) do Watchlist - |> Repo.get(user.watchlist_id) - |> Repo.preload(watchlist_addresses: {from(wa in WatchlistAddress, order_by: [desc: wa.id]), [:address]}) + |> Repo.account_repo().get(user.watchlist_id) + |> Repo.account_repo().preload(watchlist_addresses: from(wa in WatchlistAddress, order_by: [desc: wa.id])) + |> WatchlistAddress.preload_address_fetched_coin_balance() end end diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex index ea4b5b32da5f..4a834f3fef9e 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex @@ -54,7 +54,7 @@ defmodule BlockScoutWeb.Models.GetAddressTags do select: %{label: ta.name, display_name: ta.name, address_hash: ta.address_hash} ) - Repo.all(query) + Repo.account_repo().all(query) end def get_personal_tags(_, _), do: [] @@ -68,7 +68,7 @@ defmodule BlockScoutWeb.Models.GetAddressTags do select: %{label: wa.name, display_name: wa.name} ) - Repo.all(query) + Repo.account_repo().all(query) end def get_watchlist_names_on_address(_, _), do: [] diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex index 776622c2b423..bee4eb935422 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex @@ -21,7 +21,7 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do def get_transaction_with_addresses_tags(_, _), do: %{personal_tags: [], watchlist_names: [], personal_tx_tag: nil} def get_transaction_tags(transaction_hash, %{id: identity_id}) do - Repo.get_by(TagTransaction, tx_hash: transaction_hash, identity_id: identity_id) + Repo.account_repo().get_by(TagTransaction, tx_hash: transaction_hash, identity_id: identity_id) end def get_transaction_tags(_, _), do: nil diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index fe45d6fbf007..cc1483b9299e 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -37,7 +37,7 @@ defmodule BlockScoutWeb.Models.UserFromAuth do end defp create_identity(auth) do - with {:ok, %Identity{} = identity} <- Repo.insert(new_identity(auth)), + with {:ok, %Identity{} = identity} <- Repo.account_repo().insert(new_identity(auth)), {:ok, _watchlist} <- add_watchlist(identity) do identity end @@ -46,7 +46,7 @@ defmodule BlockScoutWeb.Models.UserFromAuth do defp update_identity(identity, attrs) do identity |> Identity.changeset(attrs) - |> Repo.update() + |> Repo.account_repo().update() end defp new_identity(auth) do @@ -62,12 +62,12 @@ defmodule BlockScoutWeb.Models.UserFromAuth do defp add_watchlist(identity) do watchlist = Ecto.build_assoc(identity, :watchlists, %{}) - with {:ok, _} <- Repo.insert(watchlist), + with {:ok, _} <- Repo.account_repo().insert(watchlist), do: {:ok, identity} end def find_identity(auth_or_uid) do - Repo.all(query_identity(auth_or_uid)) + Repo.account_repo().all(query_identity(auth_or_uid)) end def query_identity(%Auth{} = auth) do @@ -79,7 +79,7 @@ defmodule BlockScoutWeb.Models.UserFromAuth do end defp basic_info(auth, identity) do - %{watchlists: [watchlist | _]} = Repo.preload(identity, :watchlists) + %{watchlists: [watchlist | _]} = Repo.account_repo().preload(identity, :watchlists) %{ id: identity.id, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex index b8fa97dd5b41..467c15952f0a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/row.html.eex @@ -8,12 +8,12 @@ - - - - +<%= if @address_tag.address_hash do %> + + + + + +<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex index 028d3f74fa77..55151ae0ac34 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/row.html.eex @@ -1,16 +1,18 @@ - - - - - +<%= if @tx_tag.tx_hash do %> + + + + + +<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex index d14d3fe7ea55..d572dec9939a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_labels.html.eex @@ -1,8 +1,10 @@ <%= for personal_tag <- @tags.personal_tags do %> - <%= if personal_tag.label =~ "dark forest" do %> - <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: ["df", "ml-1"] %> - <% else %> - <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: [tag_name_to_label(personal_tag.label), "ml-1"] %> + <%= if personal_tag.address_hash do %> + <%= if personal_tag.label =~ "dark forest" do %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: ["df", "ml-1"] %> + <% else %> + <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tag.display_name, additional_classes: [tag_name_to_label(personal_tag.label), "ml-1"] %> + <% end %> <% end %> <% end %> <%= for watchlist_name <- @tags.watchlist_names do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex index 49def5252143..75b6e2fe201f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex @@ -33,7 +33,7 @@ <%= if method_name do %> <%= render BlockScoutWeb.FormView, "_tag.html", text: method_name, additional_classes: ["method", "ml-1"] %> <% end %> - <%= if tx_tags.personal_tx_tag do %> + <%= if tx_tags.personal_tx_tag && tx_tags.personal_tx_tag.name !== :error do %> <%= render BlockScoutWeb.FormView, "_tag.html", text: tx_tags.personal_tx_tag.name, additional_classes: [tag_name_to_label(tx_tags.personal_tx_tag.name), "ml-1"] %> <% end %> <%= render BlockScoutWeb.AddressView, "_labels.html", tags: tx_tags %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 76ad01c72891..e6661c5e05ef 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -49,7 +49,7 @@
    <%= gettext "Transaction Details" %> <% personal_tx_tag = if assigns[:tx_tags], do: @tx_tags.personal_tx_tag, else: nil %> - <%= if personal_tx_tag do %> + <%= if personal_tx_tag && personal_tx_tag.name !== :error do %> <%= render BlockScoutWeb.FormView, "_tag.html", text: personal_tx_tag.name, additional_classes: [tag_name_to_label(personal_tx_tag.name), "ml-1"] %> <% end %> <%= render BlockScoutWeb.AddressView, "_labels.html", tags: @tx_tags %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 6eb232be8edc..52d6335ae677 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -639,10 +639,10 @@ msgstr "" msgid "Copy API key" msgstr "" -#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 -#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 -#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 -#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:8 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:8 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:11 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:11 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index c8756a1219d2..f8c513ac00f5 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -639,10 +639,10 @@ msgstr "" msgid "Copy API key" msgstr "" -#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 -#: lib/block_scout_web/templates/account/tag_address/row.html.eex:7 -#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 -#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:10 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:8 +#: lib/block_scout_web/templates/account/tag_address/row.html.eex:8 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:11 +#: lib/block_scout_web/templates/account/tag_transaction/row.html.eex:11 #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 #: lib/block_scout_web/templates/address/overview.html.eex:38 #: lib/block_scout_web/templates/address/overview.html.eex:39 diff --git a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex index 20ba211a3ff0..f9ca332c538f 100644 --- a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex @@ -16,6 +16,7 @@ defmodule Explorer.Encrypted.Types.AddressHash do def after_decrypt(nil), do: nil def after_decrypt(""), do: nil + def after_decrypt(:error), do: nil def after_decrypt(value) do {:ok, address_hash} = Explorer.Chain.Hash.Address.cast(value) diff --git a/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex index 5f3e458c023d..7c39a9aeca57 100644 --- a/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex @@ -16,6 +16,7 @@ defmodule Explorer.Encrypted.Types.TransactionHash do def after_decrypt(nil), do: nil def after_decrypt(""), do: nil + def after_decrypt(:error), do: nil def after_decrypt(value) do {:ok, transaction_hash} = Explorer.Chain.Hash.Full.cast(value) From 25369e7e27c44dcf306fec83de8f67283d6a0d86 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 9 Sep 2022 17:37:11 +0300 Subject: [PATCH 378/723] Fix gettext --- apps/block_scout_web/priv/gettext/default.pot | 298 +++++++++++------- .../priv/gettext/en/LC_MESSAGES/default.po | 298 +++++++++++------- 2 files changed, 374 insertions(+), 222 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 52d6335ae677..92fdcb21aeb3 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -138,11 +138,13 @@ msgstr "" msgid "Action" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:417 +#: lib/block_scout_web/templates/transaction/overview.html.eex:425 #, elixir-autogen, elixir-format msgid "Actual gas amount used by the transaction." msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 #: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11 #, elixir-autogen, elixir-format msgid "Add" @@ -181,22 +183,22 @@ msgstr "" msgid "Address" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:211 +#: lib/block_scout_web/templates/transaction/overview.html.eex:217 #, elixir-autogen, elixir-format msgid "Address (external or contract) receiving the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:194 +#: lib/block_scout_web/templates/transaction/overview.html.eex:199 #, elixir-autogen, elixir-format msgid "Address (external or contract) sending the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:167 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:50 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:51 #, elixir-autogen, elixir-format msgid "Address of the token contract" msgstr "" @@ -232,12 +234,12 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:174 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #, elixir-autogen, elixir-format msgid "Amount of" msgstr "" @@ -273,7 +275,8 @@ msgstr "" msgid "Back Home" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:168 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:24 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #, elixir-autogen, elixir-format msgid "Balance" @@ -295,14 +298,14 @@ msgstr "" msgid "Base URL:" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:438 +#: lib/block_scout_web/templates/transaction/overview.html.eex:446 #, elixir-autogen, elixir-format msgid "Binary data included with the transaction. See input / logs below for additional info." msgstr "" #: lib/block_scout_web/templates/address_coin_balance/_coin_balances.html.eex:8 #: lib/block_scout_web/templates/block/overview.html.eex:29 -#: lib/block_scout_web/templates/transaction/overview.html.eex:153 +#: lib/block_scout_web/templates/transaction/overview.html.eex:158 #, elixir-autogen, elixir-format msgid "Block" msgstr "" @@ -349,12 +352,12 @@ msgstr "" msgid "Block not found, please try again later." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:152 +#: lib/block_scout_web/templates/transaction/overview.html.eex:157 #, elixir-autogen, elixir-format msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:275 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -377,7 +380,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:293 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:374 #, elixir-autogen, elixir-format @@ -416,6 +419,7 @@ msgstr "" msgid "Call Code" msgstr "" +#: lib/block_scout_web/templates/account/public_tags_request/form.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:120 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:145 #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:41 @@ -499,12 +503,12 @@ msgstr "" msgid "Confirmed" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:119 +#: lib/block_scout_web/templates/transaction/overview.html.eex:124 #, elixir-autogen, elixir-format msgid "Confirmed by " msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:185 +#: lib/block_scout_web/templates/transaction/overview.html.eex:190 #, elixir-autogen, elixir-format msgid "Confirmed within" msgstr "" @@ -548,8 +552,8 @@ msgstr "" msgid "Constructor Arguments" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:51 -#: lib/block_scout_web/templates/transaction/overview.html.eex:221 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:52 +#: lib/block_scout_web/templates/transaction/overview.html.eex:227 #, elixir-autogen, elixir-format msgid "Contract" msgstr "" @@ -678,10 +682,10 @@ msgid "Copy Deployed ByteCode" msgstr "" #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:14 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:15 -#: lib/block_scout_web/templates/transaction/overview.html.eex:201 -#: lib/block_scout_web/templates/transaction/overview.html.eex:202 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:17 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:18 +#: lib/block_scout_web/templates/transaction/overview.html.eex:207 +#: lib/block_scout_web/templates/transaction/overview.html.eex:208 #, elixir-autogen, elixir-format msgid "Copy From Address" msgstr "" @@ -714,12 +718,12 @@ msgstr "" msgid "Copy Source Code" msgstr "" -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:31 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:32 -#: lib/block_scout_web/templates/transaction/overview.html.eex:227 -#: lib/block_scout_web/templates/transaction/overview.html.eex:228 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:34 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:35 #: lib/block_scout_web/templates/transaction/overview.html.eex:234 #: lib/block_scout_web/templates/transaction/overview.html.eex:235 +#: lib/block_scout_web/templates/transaction/overview.html.eex:242 +#: lib/block_scout_web/templates/transaction/overview.html.eex:243 #, elixir-autogen, elixir-format msgid "Copy To Address" msgstr "" @@ -730,30 +734,30 @@ msgstr "" msgid "Copy Token ID" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:82 +#: lib/block_scout_web/templates/transaction/overview.html.eex:87 #, elixir-autogen, elixir-format msgid "Copy Transaction Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:83 +#: lib/block_scout_web/templates/transaction/overview.html.eex:88 #, elixir-autogen, elixir-format msgid "Copy Txn Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:464 +#: lib/block_scout_web/templates/transaction/overview.html.eex:472 #, elixir-autogen, elixir-format msgid "Copy Txn Hex Input" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:470 +#: lib/block_scout_web/templates/transaction/overview.html.eex:478 #, elixir-autogen, elixir-format msgid "Copy Txn UTF-8 Input" msgstr "" #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 -#: lib/block_scout_web/templates/transaction/overview.html.eex:463 -#: lib/block_scout_web/templates/transaction/overview.html.eex:469 +#: lib/block_scout_web/templates/transaction/overview.html.eex:471 +#: lib/block_scout_web/templates/transaction/overview.html.eex:477 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Copy Value" @@ -790,7 +794,7 @@ msgstr "" msgid "Curl" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:92 +#: lib/block_scout_web/templates/transaction/overview.html.eex:97 #, elixir-autogen, elixir-format msgid "Current transaction state: Success, Failed (Error), or Pending (In Process)" msgstr "" @@ -833,7 +837,7 @@ msgstr "" msgid "Date & time at which block was produced." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:171 +#: lib/block_scout_web/templates/transaction/overview.html.eex:176 #, elixir-autogen, elixir-format msgid "Date & time of transaction inclusion, including length of time for confirmation." msgstr "" @@ -1039,7 +1043,7 @@ msgstr "" msgid "Error" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:9 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:11 #, elixir-autogen, elixir-format msgid "Error in internal transactions" msgstr "" @@ -1078,14 +1082,14 @@ msgstr "" #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 -#: lib/block_scout_web/templates/address/overview.html.eex:181 +#: lib/block_scout_web/templates/address/overview.html.eex:163 #: lib/block_scout_web/templates/block/overview.html.eex:215 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:82 #: lib/block_scout_web/templates/layout/app.html.eex:48 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:43 -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:49 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #: lib/block_scout_web/views/wei_helpers.ex:78 #, elixir-autogen, elixir-format msgid "Ether" @@ -1134,7 +1138,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:265 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1149,15 +1153,15 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:212 -#: lib/block_scout_web/templates/address/overview.html.eex:220 +#: lib/block_scout_web/templates/address/overview.html.eex:194 +#: lib/block_scout_web/templates/address/overview.html.eex:202 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:239 -#: lib/block_scout_web/templates/address/overview.html.eex:247 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:122 +#: lib/block_scout_web/templates/address/overview.html.eex:221 +#: lib/block_scout_web/templates/address/overview.html.eex:229 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #, elixir-autogen, elixir-format msgid "Fetching transfers..." msgstr "" @@ -1180,7 +1184,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:38 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:40 #: lib/block_scout_web/templates/address_transaction/index.html.eex:34 -#: lib/block_scout_web/templates/transaction/overview.html.eex:195 +#: lib/block_scout_web/templates/transaction/overview.html.eex:200 #: lib/block_scout_web/views/address_internal_transaction_view.ex:10 #: lib/block_scout_web/views/address_token_transfer_view.ex:10 #: lib/block_scout_web/views/address_transaction_view.ex:10 @@ -1195,24 +1199,24 @@ msgstr "" #: lib/block_scout_web/templates/block/_tile.html.eex:67 #: lib/block_scout_web/templates/block/overview.html.eex:187 -#: lib/block_scout_web/templates/transaction/overview.html.eex:365 +#: lib/block_scout_web/templates/transaction/overview.html.eex:373 #, elixir-autogen, elixir-format msgid "Gas Limit" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:345 +#: lib/block_scout_web/templates/transaction/overview.html.eex:353 #, elixir-autogen, elixir-format msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:258 +#: lib/block_scout_web/templates/address/overview.html.eex:240 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format msgid "Gas Used" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:418 +#: lib/block_scout_web/templates/transaction/overview.html.eex:426 #, elixir-autogen, elixir-format msgid "Gas Used by Transaction" msgstr "" @@ -1223,7 +1227,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:257 +#: lib/block_scout_web/templates/address/overview.html.eex:239 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1264,8 +1268,8 @@ msgstr "" msgid "Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:446 -#: lib/block_scout_web/templates/transaction/overview.html.eex:450 +#: lib/block_scout_web/templates/transaction/overview.html.eex:454 +#: lib/block_scout_web/templates/transaction/overview.html.eex:458 #, elixir-autogen, elixir-format msgid "Hex (Default)" msgstr "" @@ -1301,17 +1305,17 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:132 #, elixir-autogen, elixir-format msgid "Implementation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:149 +#: lib/block_scout_web/templates/address/overview.html.eex:131 #, elixir-autogen, elixir-format msgid "Implementation address of the proxy contract." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:430 +#: lib/block_scout_web/templates/transaction/overview.html.eex:438 #, elixir-autogen, elixir-format msgid "Index position of Transaction in the block." msgstr "" @@ -1336,7 +1340,7 @@ msgstr "" msgid "Input" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:213 +#: lib/block_scout_web/templates/transaction/overview.html.eex:219 #, elixir-autogen, elixir-format msgid "Interacted With (To)" msgstr "" @@ -1373,7 +1377,7 @@ msgstr "" msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:276 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1409,22 +1413,22 @@ msgstr "" msgid "License ID" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:297 +#: lib/block_scout_web/templates/transaction/overview.html.eex:305 #, elixir-autogen, elixir-format msgid "List of ERC-1155 tokens created in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:281 +#: lib/block_scout_web/templates/transaction/overview.html.eex:289 #, elixir-autogen, elixir-format msgid "List of token burnt in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:264 +#: lib/block_scout_web/templates/transaction/overview.html.eex:272 #, elixir-autogen, elixir-format msgid "List of token minted in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:248 +#: lib/block_scout_web/templates/transaction/overview.html.eex:256 #, elixir-autogen, elixir-format msgid "List of token transferred in the transaction." msgstr "" @@ -1484,12 +1488,12 @@ msgstr "" msgid "Market Cap" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:374 +#: lib/block_scout_web/templates/transaction/overview.html.eex:382 #, elixir-autogen, elixir-format msgid "Max Fee per Gas" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:384 +#: lib/block_scout_web/templates/transaction/overview.html.eex:392 #, elixir-autogen, elixir-format msgid "Max Priority Fee per Gas" msgstr "" @@ -1499,12 +1503,12 @@ msgstr "" msgid "Max of" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:364 +#: lib/block_scout_web/templates/transaction/overview.html.eex:372 #, elixir-autogen, elixir-format msgid "Maximum gas amount approved for the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:373 +#: lib/block_scout_web/templates/transaction/overview.html.eex:381 #, elixir-autogen, elixir-format msgid "Maximum total amount per unit of gas a user is willing to pay for a transaction, including base fee and priority fee." msgstr "" @@ -1658,7 +1662,7 @@ msgid "No" msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:196 -#: lib/block_scout_web/templates/transaction/overview.html.eex:428 +#: lib/block_scout_web/templates/transaction/overview.html.eex:436 #, elixir-autogen, elixir-format msgid "Nonce" msgstr "" @@ -1673,7 +1677,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:292 +#: lib/block_scout_web/templates/address/overview.html.eex:274 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1683,7 +1687,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:203 +#: lib/block_scout_web/templates/address/overview.html.eex:185 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1693,7 +1697,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:230 +#: lib/block_scout_web/templates/address/overview.html.eex:212 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -1761,8 +1765,8 @@ msgid "Parent Hash" msgstr "" #: lib/block_scout_web/templates/layout/_topnav.html.eex:60 -#: lib/block_scout_web/views/transaction_view.ex:348 -#: lib/block_scout_web/views/transaction_view.ex:386 +#: lib/block_scout_web/views/transaction_view.ex:349 +#: lib/block_scout_web/views/transaction_view.ex:387 #, elixir-autogen, elixir-format msgid "Pending" msgstr "" @@ -1778,7 +1782,7 @@ msgstr "" msgid "Play" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:430 +#: lib/block_scout_web/templates/transaction/overview.html.eex:438 #, elixir-autogen, elixir-format msgid "Position" msgstr "" @@ -1811,13 +1815,13 @@ msgstr "" msgid "Price per token on the exchanges" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:344 +#: lib/block_scout_web/templates/transaction/overview.html.eex:352 #, elixir-autogen, elixir-format msgid "Price per unit of gas specified by the sender. Higher gas prices can prioritize transaction inclusion during times of high usage." msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:225 -#: lib/block_scout_web/templates/transaction/overview.html.eex:394 +#: lib/block_scout_web/templates/transaction/overview.html.eex:402 #, elixir-autogen, elixir-format msgid "Priority Fee / Tip" msgstr "" @@ -1871,7 +1875,7 @@ msgstr "" msgid "RPC" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:439 +#: lib/block_scout_web/templates/transaction/overview.html.eex:447 #, elixir-autogen, elixir-format msgid "Raw Input" msgstr "" @@ -1950,12 +1954,12 @@ msgstr "" msgid "Responses" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:93 +#: lib/block_scout_web/templates/transaction/overview.html.eex:98 #, elixir-autogen, elixir-format msgid "Result" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:130 +#: lib/block_scout_web/templates/transaction/overview.html.eex:135 #, elixir-autogen, elixir-format msgid "Revert reason" msgstr "" @@ -2137,7 +2141,7 @@ msgstr "" msgid "Static Call" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:105 +#: lib/block_scout_web/templates/transaction/overview.html.eex:110 #, elixir-autogen, elixir-format msgid "Status" msgstr "" @@ -2214,12 +2218,12 @@ msgstr "" msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:129 +#: lib/block_scout_web/templates/transaction/overview.html.eex:134 #, elixir-autogen, elixir-format msgid "The revert reason of the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:104 +#: lib/block_scout_web/templates/transaction/overview.html.eex:109 #, elixir-autogen, elixir-format msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" @@ -2362,13 +2366,13 @@ msgstr "" msgid "This is useful to allow sending requests to blockscout without having to change anything about the request." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:59 +#: lib/block_scout_web/templates/transaction/overview.html.eex:64 #, elixir-autogen, elixir-format msgid "This transaction is pending confirmation." msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:71 -#: lib/block_scout_web/templates/transaction/overview.html.eex:172 +#: lib/block_scout_web/templates/transaction/overview.html.eex:177 #, elixir-autogen, elixir-format msgid "Timestamp" msgstr "" @@ -2376,7 +2380,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:32 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34 #: lib/block_scout_web/templates/address_transaction/index.html.eex:28 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:221 #: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_token_transfer_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:9 @@ -2480,7 +2484,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:193 +#: lib/block_scout_web/templates/address/overview.html.eex:175 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:73 @@ -2490,22 +2494,22 @@ msgstr "" msgid "Tokens" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:282 +#: lib/block_scout_web/templates/transaction/overview.html.eex:290 #, elixir-autogen, elixir-format msgid "Tokens Burnt" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:298 +#: lib/block_scout_web/templates/transaction/overview.html.eex:306 #, elixir-autogen, elixir-format msgid "Tokens Created" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:265 +#: lib/block_scout_web/templates/transaction/overview.html.eex:273 #, elixir-autogen, elixir-format msgid "Tokens Minted" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:249 +#: lib/block_scout_web/templates/transaction/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Tokens Transferred" msgstr "" @@ -2556,7 +2560,7 @@ msgstr "" msgid "Total supply" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:329 +#: lib/block_scout_web/templates/transaction/overview.html.eex:337 #, elixir-autogen, elixir-format msgid "Total transaction fee." msgstr "" @@ -2584,22 +2588,22 @@ msgstr "" msgid "Transaction %{transaction}, %{subnetwork} %{transaction}" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:404 +#: lib/block_scout_web/templates/transaction/overview.html.eex:412 #, elixir-autogen, elixir-format msgid "Transaction Burnt Fee" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:49 +#: lib/block_scout_web/templates/transaction/overview.html.eex:50 #, elixir-autogen, elixir-format msgid "Transaction Details" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:330 +#: lib/block_scout_web/templates/transaction/overview.html.eex:338 #, elixir-autogen, elixir-format msgid "Transaction Fee" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:75 +#: lib/block_scout_web/templates/transaction/overview.html.eex:80 #, elixir-autogen, elixir-format msgid "Transaction Hash" msgstr "" @@ -2610,31 +2614,31 @@ msgstr "" msgid "Transaction Inputs" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:354 +#: lib/block_scout_web/templates/transaction/overview.html.eex:362 #, elixir-autogen, elixir-format msgid "Transaction Type" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:427 +#: lib/block_scout_web/templates/transaction/overview.html.eex:435 #, elixir-autogen, elixir-format msgid "Transaction number from the sending address. Each transaction sent from an address increments the nonce by 1." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:353 +#: lib/block_scout_web/templates/transaction/overview.html.eex:361 #, elixir-autogen, elixir-format msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:204 -#: lib/block_scout_web/templates/address/overview.html.eex:210 -#: lib/block_scout_web/templates/address/overview.html.eex:218 +#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:200 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/layout/_topnav.html.eex:48 -#: lib/block_scout_web/views/address_view.ex:362 +#: lib/block_scout_web/views/address_view.ex:365 #, elixir-autogen, elixir-format msgid "Transactions" msgstr "" @@ -2649,9 +2653,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:231 -#: lib/block_scout_web/templates/address/overview.html.eex:237 -#: lib/block_scout_web/templates/address/overview.html.eex:245 +#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:219 +#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format @@ -2685,7 +2689,7 @@ msgstr "" msgid "Type of the token standard" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:453 +#: lib/block_scout_web/templates/transaction/overview.html.eex:461 #, elixir-autogen, elixir-format msgid "UTF-8" msgstr "" @@ -2711,17 +2715,17 @@ msgstr "" msgid "Unique Token" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:74 +#: lib/block_scout_web/templates/transaction/overview.html.eex:79 #, elixir-autogen, elixir-format msgid "Unique character string (TxID) assigned to every verified transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:383 +#: lib/block_scout_web/templates/transaction/overview.html.eex:391 #, elixir-autogen, elixir-format msgid "User defined maximum fee (tip) per unit of gas paid to validator for transaction prioritization." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:393 +#: lib/block_scout_web/templates/transaction/overview.html.eex:401 #, elixir-autogen, elixir-format msgid "User-defined tip sent to validator for transaction priority/inclusion." msgstr "" @@ -2756,12 +2760,12 @@ msgstr "" msgid "Validator Name" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:315 +#: lib/block_scout_web/templates/transaction/overview.html.eex:323 #, elixir-autogen, elixir-format msgid "Value" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:314 +#: lib/block_scout_web/templates/transaction/overview.html.eex:322 #, elixir-autogen, elixir-format msgid "Value sent in the native token (and USD) if applicable." msgstr "" @@ -2977,7 +2981,7 @@ msgstr "" msgid "balance of the address" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #, elixir-autogen, elixir-format msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." msgstr "" @@ -2992,7 +2996,7 @@ msgstr "" msgid "button" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:223 +#: lib/block_scout_web/templates/transaction/overview.html.eex:230 #, elixir-autogen, elixir-format msgid "created" msgstr "" @@ -3002,7 +3006,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:167 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" @@ -3210,3 +3214,75 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You don't have transaction tags yet" msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/api_key/form.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/form.html.eex:14 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 +#, elixir-autogen, elixir-format +msgid "API key" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/index.html.eex:7 +#: lib/block_scout_web/templates/account/common/_nav.html.eex:16 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:17 +#, elixir-autogen, elixir-format +msgid "API keys" +msgstr "" + +#: lib/block_scout_web/templates/account/common/_nav.html.eex:10 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:7 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:15 +#, elixir-autogen, elixir-format +msgid "Address Tags" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:25 +#, elixir-autogen, elixir-format +msgid "Back to API keys (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_address/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Back to Address Tags (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:30 +#, elixir-autogen, elixir-format +msgid "Back to Custom ABI (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Back to Transaction Tags (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:30 +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:43 +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:56 +#, elixir-autogen, elixir-format +msgid "Incoming" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:68 +#, elixir-autogen, elixir-format +msgid "Please select notification methods:" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Please select what types of notifications you will receive:" +msgstr "" + +#: lib/block_scout_web/templates/account/common/_nav.html.eex:13 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:7 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:16 +#, elixir-autogen, elixir-format +msgid "Transaction Tags" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Update" +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index f8c513ac00f5..df1c48c61c73 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -138,11 +138,13 @@ msgstr "" msgid "Action" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:417 +#: lib/block_scout_web/templates/transaction/overview.html.eex:425 #, elixir-autogen, elixir-format msgid "Actual gas amount used by the transaction." msgstr "" +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 #: lib/block_scout_web/templates/layout/_add_chain_to_mm.html.eex:11 #, elixir-autogen, elixir-format msgid "Add" @@ -181,22 +183,22 @@ msgstr "" msgid "Address" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:211 +#: lib/block_scout_web/templates/transaction/overview.html.eex:217 #, elixir-autogen, elixir-format msgid "Address (external or contract) receiving the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:194 +#: lib/block_scout_web/templates/transaction/overview.html.eex:199 #, elixir-autogen, elixir-format msgid "Address (external or contract) sending the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:167 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:50 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:51 #, elixir-autogen, elixir-format msgid "Address of the token contract" msgstr "" @@ -232,12 +234,12 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:174 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #, elixir-autogen, elixir-format msgid "Amount of" msgstr "" @@ -273,7 +275,8 @@ msgstr "" msgid "Back Home" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:168 +#: lib/block_scout_web/templates/account/watchlist/show.html.eex:24 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #, elixir-autogen, elixir-format msgid "Balance" @@ -295,14 +298,14 @@ msgstr "" msgid "Base URL:" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:438 +#: lib/block_scout_web/templates/transaction/overview.html.eex:446 #, elixir-autogen, elixir-format msgid "Binary data included with the transaction. See input / logs below for additional info." msgstr "" #: lib/block_scout_web/templates/address_coin_balance/_coin_balances.html.eex:8 #: lib/block_scout_web/templates/block/overview.html.eex:29 -#: lib/block_scout_web/templates/transaction/overview.html.eex:153 +#: lib/block_scout_web/templates/transaction/overview.html.eex:158 #, elixir-autogen, elixir-format msgid "Block" msgstr "" @@ -349,12 +352,12 @@ msgstr "" msgid "Block not found, please try again later." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:152 +#: lib/block_scout_web/templates/transaction/overview.html.eex:157 #, elixir-autogen, elixir-format msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:275 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -377,7 +380,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:293 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:374 #, elixir-autogen, elixir-format @@ -416,6 +419,7 @@ msgstr "" msgid "Call Code" msgstr "" +#: lib/block_scout_web/templates/account/public_tags_request/form.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:120 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:145 #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:41 @@ -499,12 +503,12 @@ msgstr "" msgid "Confirmed" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:119 +#: lib/block_scout_web/templates/transaction/overview.html.eex:124 #, elixir-autogen, elixir-format msgid "Confirmed by " msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:185 +#: lib/block_scout_web/templates/transaction/overview.html.eex:190 #, elixir-autogen, elixir-format msgid "Confirmed within" msgstr "" @@ -548,8 +552,8 @@ msgstr "" msgid "Constructor Arguments" msgstr "" -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:51 -#: lib/block_scout_web/templates/transaction/overview.html.eex:221 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:52 +#: lib/block_scout_web/templates/transaction/overview.html.eex:227 #, elixir-autogen, elixir-format msgid "Contract" msgstr "" @@ -678,10 +682,10 @@ msgid "Copy Deployed ByteCode" msgstr "" #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:7 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:14 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:15 -#: lib/block_scout_web/templates/transaction/overview.html.eex:201 -#: lib/block_scout_web/templates/transaction/overview.html.eex:202 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:17 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:18 +#: lib/block_scout_web/templates/transaction/overview.html.eex:207 +#: lib/block_scout_web/templates/transaction/overview.html.eex:208 #, elixir-autogen, elixir-format msgid "Copy From Address" msgstr "" @@ -714,12 +718,12 @@ msgstr "" msgid "Copy Source Code" msgstr "" -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:31 -#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:32 -#: lib/block_scout_web/templates/transaction/overview.html.eex:227 -#: lib/block_scout_web/templates/transaction/overview.html.eex:228 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:34 +#: lib/block_scout_web/templates/transaction/_total_transfers_from_to.html.eex:35 #: lib/block_scout_web/templates/transaction/overview.html.eex:234 #: lib/block_scout_web/templates/transaction/overview.html.eex:235 +#: lib/block_scout_web/templates/transaction/overview.html.eex:242 +#: lib/block_scout_web/templates/transaction/overview.html.eex:243 #, elixir-autogen, elixir-format msgid "Copy To Address" msgstr "" @@ -730,30 +734,30 @@ msgstr "" msgid "Copy Token ID" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:82 +#: lib/block_scout_web/templates/transaction/overview.html.eex:87 #, elixir-autogen, elixir-format msgid "Copy Transaction Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:83 +#: lib/block_scout_web/templates/transaction/overview.html.eex:88 #, elixir-autogen, elixir-format msgid "Copy Txn Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:464 +#: lib/block_scout_web/templates/transaction/overview.html.eex:472 #, elixir-autogen, elixir-format msgid "Copy Txn Hex Input" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:470 +#: lib/block_scout_web/templates/transaction/overview.html.eex:478 #, elixir-autogen, elixir-format msgid "Copy Txn UTF-8 Input" msgstr "" #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 -#: lib/block_scout_web/templates/transaction/overview.html.eex:463 -#: lib/block_scout_web/templates/transaction/overview.html.eex:469 +#: lib/block_scout_web/templates/transaction/overview.html.eex:471 +#: lib/block_scout_web/templates/transaction/overview.html.eex:477 #: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Copy Value" @@ -790,7 +794,7 @@ msgstr "" msgid "Curl" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:92 +#: lib/block_scout_web/templates/transaction/overview.html.eex:97 #, elixir-autogen, elixir-format msgid "Current transaction state: Success, Failed (Error), or Pending (In Process)" msgstr "" @@ -833,7 +837,7 @@ msgstr "" msgid "Date & time at which block was produced." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:171 +#: lib/block_scout_web/templates/transaction/overview.html.eex:176 #, elixir-autogen, elixir-format msgid "Date & time of transaction inclusion, including length of time for confirmation." msgstr "" @@ -1039,7 +1043,7 @@ msgstr "" msgid "Error" msgstr "" -#: lib/block_scout_web/templates/transaction/_tile.html.eex:9 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:11 #, elixir-autogen, elixir-format msgid "Error in internal transactions" msgstr "" @@ -1078,14 +1082,14 @@ msgstr "" #: lib/block_scout_web/templates/account/watchlist_address/row.html.eex:21 #: lib/block_scout_web/templates/address/_current_coin_balance.html.eex:11 #: lib/block_scout_web/templates/address/index.html.eex:5 -#: lib/block_scout_web/templates/address/overview.html.eex:181 +#: lib/block_scout_web/templates/address/overview.html.eex:163 #: lib/block_scout_web/templates/block/overview.html.eex:215 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:82 #: lib/block_scout_web/templates/layout/app.html.eex:48 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 -#: lib/block_scout_web/templates/transaction/_tile.html.eex:43 -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/_tile.html.eex:49 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #: lib/block_scout_web/views/wei_helpers.ex:78 #, elixir-autogen, elixir-format msgid "Ether" @@ -1134,7 +1138,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:265 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1149,15 +1153,15 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:212 -#: lib/block_scout_web/templates/address/overview.html.eex:220 +#: lib/block_scout_web/templates/address/overview.html.eex:194 +#: lib/block_scout_web/templates/address/overview.html.eex:202 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:239 -#: lib/block_scout_web/templates/address/overview.html.eex:247 -#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:122 +#: lib/block_scout_web/templates/address/overview.html.eex:221 +#: lib/block_scout_web/templates/address/overview.html.eex:229 +#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #, elixir-autogen, elixir-format msgid "Fetching transfers..." msgstr "" @@ -1180,7 +1184,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:38 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:40 #: lib/block_scout_web/templates/address_transaction/index.html.eex:34 -#: lib/block_scout_web/templates/transaction/overview.html.eex:195 +#: lib/block_scout_web/templates/transaction/overview.html.eex:200 #: lib/block_scout_web/views/address_internal_transaction_view.ex:10 #: lib/block_scout_web/views/address_token_transfer_view.ex:10 #: lib/block_scout_web/views/address_transaction_view.ex:10 @@ -1195,24 +1199,24 @@ msgstr "" #: lib/block_scout_web/templates/block/_tile.html.eex:67 #: lib/block_scout_web/templates/block/overview.html.eex:187 -#: lib/block_scout_web/templates/transaction/overview.html.eex:365 +#: lib/block_scout_web/templates/transaction/overview.html.eex:373 #, elixir-autogen, elixir-format msgid "Gas Limit" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:345 +#: lib/block_scout_web/templates/transaction/overview.html.eex:353 #, elixir-autogen, elixir-format msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:258 +#: lib/block_scout_web/templates/address/overview.html.eex:240 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format msgid "Gas Used" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:418 +#: lib/block_scout_web/templates/transaction/overview.html.eex:426 #, elixir-autogen, elixir-format msgid "Gas Used by Transaction" msgstr "" @@ -1223,7 +1227,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:257 +#: lib/block_scout_web/templates/address/overview.html.eex:239 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1264,8 +1268,8 @@ msgstr "" msgid "Hash" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:446 -#: lib/block_scout_web/templates/transaction/overview.html.eex:450 +#: lib/block_scout_web/templates/transaction/overview.html.eex:454 +#: lib/block_scout_web/templates/transaction/overview.html.eex:458 #, elixir-autogen, elixir-format msgid "Hex (Default)" msgstr "" @@ -1301,17 +1305,17 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:132 #, elixir-autogen, elixir-format msgid "Implementation" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:149 +#: lib/block_scout_web/templates/address/overview.html.eex:131 #, elixir-autogen, elixir-format msgid "Implementation address of the proxy contract." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:430 +#: lib/block_scout_web/templates/transaction/overview.html.eex:438 #, elixir-autogen, elixir-format msgid "Index position of Transaction in the block." msgstr "" @@ -1336,7 +1340,7 @@ msgstr "" msgid "Input" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:213 +#: lib/block_scout_web/templates/transaction/overview.html.eex:219 #, elixir-autogen, elixir-format msgid "Interacted With (To)" msgstr "" @@ -1373,7 +1377,7 @@ msgstr "" msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:276 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1409,22 +1413,22 @@ msgstr "" msgid "License ID" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:297 +#: lib/block_scout_web/templates/transaction/overview.html.eex:305 #, elixir-autogen, elixir-format msgid "List of ERC-1155 tokens created in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:281 +#: lib/block_scout_web/templates/transaction/overview.html.eex:289 #, elixir-autogen, elixir-format msgid "List of token burnt in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:264 +#: lib/block_scout_web/templates/transaction/overview.html.eex:272 #, elixir-autogen, elixir-format msgid "List of token minted in the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:248 +#: lib/block_scout_web/templates/transaction/overview.html.eex:256 #, elixir-autogen, elixir-format msgid "List of token transferred in the transaction." msgstr "" @@ -1484,12 +1488,12 @@ msgstr "" msgid "Market Cap" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:374 +#: lib/block_scout_web/templates/transaction/overview.html.eex:382 #, elixir-autogen, elixir-format msgid "Max Fee per Gas" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:384 +#: lib/block_scout_web/templates/transaction/overview.html.eex:392 #, elixir-autogen, elixir-format msgid "Max Priority Fee per Gas" msgstr "" @@ -1499,12 +1503,12 @@ msgstr "" msgid "Max of" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:364 +#: lib/block_scout_web/templates/transaction/overview.html.eex:372 #, elixir-autogen, elixir-format msgid "Maximum gas amount approved for the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:373 +#: lib/block_scout_web/templates/transaction/overview.html.eex:381 #, elixir-autogen, elixir-format msgid "Maximum total amount per unit of gas a user is willing to pay for a transaction, including base fee and priority fee." msgstr "" @@ -1658,7 +1662,7 @@ msgid "No" msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:196 -#: lib/block_scout_web/templates/transaction/overview.html.eex:428 +#: lib/block_scout_web/templates/transaction/overview.html.eex:436 #, elixir-autogen, elixir-format msgid "Nonce" msgstr "" @@ -1673,7 +1677,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:292 +#: lib/block_scout_web/templates/address/overview.html.eex:274 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1683,7 +1687,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:203 +#: lib/block_scout_web/templates/address/overview.html.eex:185 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1693,7 +1697,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:230 +#: lib/block_scout_web/templates/address/overview.html.eex:212 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -1761,8 +1765,8 @@ msgid "Parent Hash" msgstr "" #: lib/block_scout_web/templates/layout/_topnav.html.eex:60 -#: lib/block_scout_web/views/transaction_view.ex:348 -#: lib/block_scout_web/views/transaction_view.ex:386 +#: lib/block_scout_web/views/transaction_view.ex:349 +#: lib/block_scout_web/views/transaction_view.ex:387 #, elixir-autogen, elixir-format msgid "Pending" msgstr "" @@ -1778,7 +1782,7 @@ msgstr "" msgid "Play" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:430 +#: lib/block_scout_web/templates/transaction/overview.html.eex:438 #, elixir-autogen, elixir-format msgid "Position" msgstr "" @@ -1811,13 +1815,13 @@ msgstr "" msgid "Price per token on the exchanges" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:344 +#: lib/block_scout_web/templates/transaction/overview.html.eex:352 #, elixir-autogen, elixir-format msgid "Price per unit of gas specified by the sender. Higher gas prices can prioritize transaction inclusion during times of high usage." msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:225 -#: lib/block_scout_web/templates/transaction/overview.html.eex:394 +#: lib/block_scout_web/templates/transaction/overview.html.eex:402 #, elixir-autogen, elixir-format msgid "Priority Fee / Tip" msgstr "" @@ -1871,7 +1875,7 @@ msgstr "" msgid "RPC" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:439 +#: lib/block_scout_web/templates/transaction/overview.html.eex:447 #, elixir-autogen, elixir-format msgid "Raw Input" msgstr "" @@ -1950,12 +1954,12 @@ msgstr "" msgid "Responses" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:93 +#: lib/block_scout_web/templates/transaction/overview.html.eex:98 #, elixir-autogen, elixir-format msgid "Result" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:130 +#: lib/block_scout_web/templates/transaction/overview.html.eex:135 #, elixir-autogen, elixir-format msgid "Revert reason" msgstr "" @@ -2137,7 +2141,7 @@ msgstr "" msgid "Static Call" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:105 +#: lib/block_scout_web/templates/transaction/overview.html.eex:110 #, elixir-autogen, elixir-format msgid "Status" msgstr "" @@ -2214,12 +2218,12 @@ msgstr "" msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:129 +#: lib/block_scout_web/templates/transaction/overview.html.eex:134 #, elixir-autogen, elixir-format msgid "The revert reason of the transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:104 +#: lib/block_scout_web/templates/transaction/overview.html.eex:109 #, elixir-autogen, elixir-format msgid "The status of the transaction: Confirmed or Unconfirmed." msgstr "" @@ -2362,13 +2366,13 @@ msgstr "" msgid "This is useful to allow sending requests to blockscout without having to change anything about the request." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:59 +#: lib/block_scout_web/templates/transaction/overview.html.eex:64 #, elixir-autogen, elixir-format msgid "This transaction is pending confirmation." msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:71 -#: lib/block_scout_web/templates/transaction/overview.html.eex:172 +#: lib/block_scout_web/templates/transaction/overview.html.eex:177 #, elixir-autogen, elixir-format msgid "Timestamp" msgstr "" @@ -2376,7 +2380,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:32 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34 #: lib/block_scout_web/templates/address_transaction/index.html.eex:28 -#: lib/block_scout_web/templates/transaction/overview.html.eex:215 +#: lib/block_scout_web/templates/transaction/overview.html.eex:221 #: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_token_transfer_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:9 @@ -2480,7 +2484,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:193 +#: lib/block_scout_web/templates/address/overview.html.eex:175 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:73 @@ -2490,22 +2494,22 @@ msgstr "" msgid "Tokens" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:282 +#: lib/block_scout_web/templates/transaction/overview.html.eex:290 #, elixir-autogen, elixir-format msgid "Tokens Burnt" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:298 +#: lib/block_scout_web/templates/transaction/overview.html.eex:306 #, elixir-autogen, elixir-format msgid "Tokens Created" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:265 +#: lib/block_scout_web/templates/transaction/overview.html.eex:273 #, elixir-autogen, elixir-format msgid "Tokens Minted" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:249 +#: lib/block_scout_web/templates/transaction/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Tokens Transferred" msgstr "" @@ -2556,7 +2560,7 @@ msgstr "" msgid "Total supply" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:329 +#: lib/block_scout_web/templates/transaction/overview.html.eex:337 #, elixir-autogen, elixir-format msgid "Total transaction fee." msgstr "" @@ -2584,22 +2588,22 @@ msgstr "" msgid "Transaction %{transaction}, %{subnetwork} %{transaction}" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:404 +#: lib/block_scout_web/templates/transaction/overview.html.eex:412 #, elixir-autogen, elixir-format msgid "Transaction Burnt Fee" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:49 +#: lib/block_scout_web/templates/transaction/overview.html.eex:50 #, elixir-autogen, elixir-format msgid "Transaction Details" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:330 +#: lib/block_scout_web/templates/transaction/overview.html.eex:338 #, elixir-autogen, elixir-format msgid "Transaction Fee" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:75 +#: lib/block_scout_web/templates/transaction/overview.html.eex:80 #, elixir-autogen, elixir-format msgid "Transaction Hash" msgstr "" @@ -2610,31 +2614,31 @@ msgstr "" msgid "Transaction Inputs" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:354 +#: lib/block_scout_web/templates/transaction/overview.html.eex:362 #, elixir-autogen, elixir-format msgid "Transaction Type" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:427 +#: lib/block_scout_web/templates/transaction/overview.html.eex:435 #, elixir-autogen, elixir-format msgid "Transaction number from the sending address. Each transaction sent from an address increments the nonce by 1." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:353 +#: lib/block_scout_web/templates/transaction/overview.html.eex:361 #, elixir-autogen, elixir-format msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:204 -#: lib/block_scout_web/templates/address/overview.html.eex:210 -#: lib/block_scout_web/templates/address/overview.html.eex:218 +#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:200 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/layout/_topnav.html.eex:48 -#: lib/block_scout_web/views/address_view.ex:362 +#: lib/block_scout_web/views/address_view.ex:365 #, elixir-autogen, elixir-format msgid "Transactions" msgstr "" @@ -2649,9 +2653,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:231 -#: lib/block_scout_web/templates/address/overview.html.eex:237 -#: lib/block_scout_web/templates/address/overview.html.eex:245 +#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:219 +#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format @@ -2685,7 +2689,7 @@ msgstr "" msgid "Type of the token standard" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:453 +#: lib/block_scout_web/templates/transaction/overview.html.eex:461 #, elixir-autogen, elixir-format msgid "UTF-8" msgstr "" @@ -2711,17 +2715,17 @@ msgstr "" msgid "Unique Token" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:74 +#: lib/block_scout_web/templates/transaction/overview.html.eex:79 #, elixir-autogen, elixir-format msgid "Unique character string (TxID) assigned to every verified transaction." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:383 +#: lib/block_scout_web/templates/transaction/overview.html.eex:391 #, elixir-autogen, elixir-format msgid "User defined maximum fee (tip) per unit of gas paid to validator for transaction prioritization." msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:393 +#: lib/block_scout_web/templates/transaction/overview.html.eex:401 #, elixir-autogen, elixir-format msgid "User-defined tip sent to validator for transaction priority/inclusion." msgstr "" @@ -2756,12 +2760,12 @@ msgstr "" msgid "Validator Name" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:315 +#: lib/block_scout_web/templates/transaction/overview.html.eex:323 #, elixir-autogen, elixir-format msgid "Value" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:314 +#: lib/block_scout_web/templates/transaction/overview.html.eex:322 #, elixir-autogen, elixir-format msgid "Value sent in the native token (and USD) if applicable." msgstr "" @@ -2977,7 +2981,7 @@ msgstr "" msgid "balance of the address" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:403 +#: lib/block_scout_web/templates/transaction/overview.html.eex:411 #, elixir-autogen, elixir-format msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." msgstr "" @@ -2992,7 +2996,7 @@ msgstr "" msgid "button" msgstr "" -#: lib/block_scout_web/templates/transaction/overview.html.eex:223 +#: lib/block_scout_web/templates/transaction/overview.html.eex:230 #, elixir-autogen, elixir-format msgid "created" msgstr "" @@ -3002,7 +3006,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:167 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" @@ -3210,3 +3214,75 @@ msgstr "" #, elixir-autogen, elixir-format msgid "You don't have transaction tags yet" msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/api_key/form.html.eex:13 +#: lib/block_scout_web/templates/account/api_key/form.html.eex:14 +#: lib/block_scout_web/templates/account/api_key/index.html.eex:29 +#, elixir-autogen, elixir-format, fuzzy +msgid "API key" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/index.html.eex:7 +#: lib/block_scout_web/templates/account/common/_nav.html.eex:16 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:17 +#, elixir-autogen, elixir-format +msgid "API keys" +msgstr "" + +#: lib/block_scout_web/templates/account/common/_nav.html.eex:10 +#: lib/block_scout_web/templates/account/tag_address/index.html.eex:7 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:15 +#, elixir-autogen, elixir-format, fuzzy +msgid "Address Tags" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:25 +#, elixir-autogen, elixir-format +msgid "Back to API keys (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_address/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Back to Address Tags (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:30 +#, elixir-autogen, elixir-format +msgid "Back to Custom ABI (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/tag_transaction/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Back to Transaction Tags (Cancel)" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:30 +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:43 +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:56 +#, elixir-autogen, elixir-format +msgid "Incoming" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:68 +#, elixir-autogen, elixir-format +msgid "Please select notification methods:" +msgstr "" + +#: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:24 +#, elixir-autogen, elixir-format +msgid "Please select what types of notifications you will receive:" +msgstr "" + +#: lib/block_scout_web/templates/account/common/_nav.html.eex:13 +#: lib/block_scout_web/templates/account/tag_transaction/index.html.eex:7 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:16 +#, elixir-autogen, elixir-format, fuzzy +msgid "Transaction Tags" +msgstr "" + +#: lib/block_scout_web/templates/account/api_key/form.html.eex:7 +#: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Update" +msgstr "" From 00ee70f5a909ff081185f4b5d5d863b0f2f34ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 9 Sep 2022 17:51:43 +0300 Subject: [PATCH 379/723] Add redis storage to have possibility to invalidate sessions --- .github/workflows/config.yml | 1 + .../controllers/account/auth_controller.ex | 3 + .../lib/block_scout_web/endpoint.ex | 3 +- .../lib/block_scout_web/plug/redis_cookie.ex | 223 ++++++++++++++++++ apps/explorer/lib/explorer/application.ex | 9 +- apps/explorer/mix.exs | 3 +- config/runtime/dev.exs | 11 + config/runtime/prod.exs | 11 + config/runtime/test.exs | 11 + docker-compose/docker-compose.yml | 6 + docker-compose/envs/common-blockscout.env | 2 + mix.lock | 3 +- 12 files changed, 282 insertions(+), 4 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/plug/redis_cookie.ex diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 7e5d17bcdbdf..4401c8ec0bc5 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,6 +4,7 @@ on: push: branches: - account + - np-add-redis-storage-for-sessions env: MIX_ENV: test diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index e4ad0d07d283..2691ac643a56 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.Account.AuthController do alias BlockScoutWeb.Models.UserFromAuth alias Explorer.Account + alias Plug.CSRFProtection plug(Ueberauth) @@ -34,6 +35,8 @@ defmodule BlockScoutWeb.Account.AuthController do def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do case UserFromAuth.find_or_create(auth) do {:ok, user} -> + CSRFProtection.get_csrf_token() + conn |> put_session(:current_user, user) |> redirect(to: root()) diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index 2d52b192d89a..7b83088c18c7 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -59,9 +59,10 @@ defmodule BlockScoutWeb.Endpoint do # The session will be stored in the cookie and signed, # this means its contents can be read but not tampered with. # Set :encryption_salt if you would also like to encrypt it. + plug( Plug.Session, - store: :cookie, + store: BlockScoutWeb.Plug.RedisCookie, key: "_explorer_key", signing_salt: "iC2ksJHS", same_site: "Lax" diff --git a/apps/block_scout_web/lib/block_scout_web/plug/redis_cookie.ex b/apps/block_scout_web/lib/block_scout_web/plug/redis_cookie.ex new file mode 100644 index 000000000000..ff8d457f090b --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/plug/redis_cookie.ex @@ -0,0 +1,223 @@ +defmodule BlockScoutWeb.Plug.RedisCookie do + @moduledoc """ + Extended version of Plug.Session.COOKIE from https://github.com/elixir-plug/plug/blob/main/lib/plug/session/cookie.ex + Added Redis to have a possibility to invalidate session + """ + + require Logger + @behaviour Plug.Session.Store + + alias Plug.Crypto + alias Plug.Crypto.{KeyGenerator, MessageEncryptor, MessageVerifier} + + @impl true + def init(opts) do + opts + |> build_opts() + |> build_rotating_opts(opts[:rotating_options]) + |> Map.delete(:secret_key_base) + end + + @impl true + def get(conn, raw_cookie, opts) do + opts = Map.put(opts, :secret_key_base, conn.secret_key_base) + + [opts | opts.rotating_options] + |> Enum.find_value(:error, &read_raw_cookie(raw_cookie, &1)) + |> decode(opts.serializer, opts.log) + |> check_in_redis(raw_cookie) + end + + @impl true + def put(conn, _sid, term, opts) do + %{serializer: serializer, key_opts: key_opts, signing_salt: signing_salt} = opts + binary = encode(term, serializer) + + opts + |> case do + %{encryption_salt: nil} -> + MessageVerifier.sign(binary, derive(conn.secret_key_base, signing_salt, key_opts)) + + %{encryption_salt: encryption_salt} -> + MessageEncryptor.encrypt( + binary, + derive(conn.secret_key_base, encryption_salt, key_opts), + derive(conn.secret_key_base, signing_salt, key_opts) + ) + end + |> store_to_redis() + end + + @impl true + def delete(_conn, sid, _opts) do + remove_from_redis(sid) + :ok + end + + defp encode(term, :external_term_format) do + :erlang.term_to_binary(term) + end + + defp encode(term, serializer) do + {:ok, binary} = serializer.encode(term) + binary + end + + defp decode({:ok, binary}, :external_term_format, log) do + {:term, + try do + Crypto.non_executable_binary_to_term(binary) + rescue + e -> + Logger.log( + log, + "Plug.Session could not decode incoming session cookie. Reason: " <> + Exception.message(e) + ) + + %{} + end} + end + + defp decode({:ok, binary}, serializer, _log) do + case serializer.decode(binary) do + {:ok, term} -> {:custom, term} + _ -> {:custom, %{}} + end + end + + defp decode(:error, _serializer, false) do + {nil, %{}} + end + + defp decode(:error, _serializer, log) do + Logger.log( + log, + "Plug.Session could not verify incoming session cookie. " <> + "This may happen when the session settings change or a stale cookie is sent." + ) + + {nil, %{}} + end + + defp prederive(secret_key_base, value, key_opts) + when is_binary(secret_key_base) and is_binary(value) do + {:prederived, derive(secret_key_base, value, Keyword.delete(key_opts, :cache))} + end + + defp prederive(_secret_key_base, value, _key_opts) do + value + end + + defp derive(_secret_key_base, {:prederived, value}, _key_opts) do + value + end + + defp derive(secret_key_base, {module, function, args}, key_opts) do + derive(secret_key_base, apply(module, function, args), key_opts) + end + + defp derive(secret_key_base, key, key_opts) do + secret_key_base + |> validate_secret_key_base() + |> KeyGenerator.generate(key, key_opts) + end + + defp validate_secret_key_base(nil), + do: raise(ArgumentError, "cookie store expects conn.secret_key_base to be set") + + defp validate_secret_key_base(secret_key_base) when byte_size(secret_key_base) < 64, + do: raise(ArgumentError, "cookie store expects conn.secret_key_base to be at least 64 bytes") + + defp validate_secret_key_base(secret_key_base), do: secret_key_base + + defp check_signing_salt(opts) do + case opts[:signing_salt] do + nil -> raise ArgumentError, "cookie store expects :signing_salt as option" + salt -> salt + end + end + + defp check_serializer(serializer) when is_atom(serializer), do: serializer + + defp check_serializer(_), + do: raise(ArgumentError, "cookie store expects :serializer option to be a module") + + defp read_raw_cookie(raw_cookie, opts) do + signing_salt = derive(opts.secret_key_base, opts.signing_salt, opts.key_opts) + + opts + |> case do + %{encryption_salt: nil} -> + MessageVerifier.verify(raw_cookie, signing_salt) + + %{encryption_salt: _} -> + encryption_salt = derive(opts.secret_key_base, opts.encryption_salt, opts.key_opts) + + MessageEncryptor.decrypt(raw_cookie, encryption_salt, signing_salt) + end + |> case do + :error -> nil + result -> result + end + end + + defp build_opts(opts) do + encryption_salt = opts[:encryption_salt] + signing_salt = check_signing_salt(opts) + + iterations = Keyword.get(opts, :key_iterations, 1000) + length = Keyword.get(opts, :key_length, 32) + digest = Keyword.get(opts, :key_digest, :sha256) + log = Keyword.get(opts, :log, :debug) + secret_key_base = Keyword.get(opts, :secret_key_base) + key_opts = [iterations: iterations, length: length, digest: digest, cache: Plug.Keys] + + serializer = check_serializer(opts[:serializer] || :external_term_format) + + %{ + secret_key_base: secret_key_base, + encryption_salt: prederive(secret_key_base, encryption_salt, key_opts), + signing_salt: prederive(secret_key_base, signing_salt, key_opts), + key_opts: key_opts, + serializer: serializer, + log: log + } + end + + defp build_rotating_opts(opts, rotating_opts) when is_list(rotating_opts) do + Map.put(opts, :rotating_options, Enum.map(rotating_opts, &build_opts/1)) + end + + defp build_rotating_opts(opts, _), do: Map.put(opts, :rotating_options, []) + + defp store_to_redis(cookie) do + Redix.command(:redix, ["SET", hash(cookie), 1]) + + cookie + end + + defp remove_from_redis(sid) do + Redix.command(:redix, ["DEL", sid]) + end + + defp check_in_redis({sid, map}, _cookie) when is_nil(sid) or map == %{}, do: {nil, %{}} + + defp check_in_redis({_sid, session}, cookie) do + hash = hash(cookie) + + case Redix.command(:redix, ["GET", hash]) do + {:ok, one} when one in [1, "1"] -> + {hash, session} + + _ -> + {nil, %{}} + end + end + + defp hash(cookie) do + :sha256 + |> :crypto.hash(cookie) + |> Base.encode16() + end +end diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index 8b9f60a966f9..2a646b0728db 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -67,7 +67,8 @@ defmodule Explorer.Application do con_cache_child_spec(RSK.cache_name(), ttl_check_interval: :timer.minutes(1), global_ttl: :timer.minutes(30)), Transactions, Accounts, - Uncles + Uncles, + {Redix, redix_opts()} ] children = base_children ++ configurable_children() @@ -176,4 +177,10 @@ defmodule Explorer.Application do id: {ConCache, name} ) end + + defp redix_opts do + config = Application.get_env(:explorer, Redix) + + [name: :redix, host: config[:host], port: config[:port]] + end end diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 38a98c5dc295..9a44b82d9877 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -114,7 +114,8 @@ defmodule Explorer.Mixfile do {:con_cache, "~> 1.0"}, {:tesla, "~> 1.4.4"}, {:cbor, "~> 1.0"}, - {:cloak_ecto, "~> 1.2.0"} + {:cloak_ecto, "~> 1.2.0"}, + {:redix, "~> 1.1"} ] end diff --git a/config/runtime/dev.exs b/config/runtime/dev.exs index a4d0d5b6a782..491113adb1e3 100644 --- a/config/runtime/dev.exs +++ b/config/runtime/dev.exs @@ -103,6 +103,17 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/dev") +redis_port = + case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do + {port, _} -> port + :error -> nil + nil -> nil + end + +config :explorer, Redix, + host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1", + port: redis_port || 6379 + ############### ### Indexer ### ############### diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 2b15151aab2c..0218804f4f86 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -70,6 +70,17 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/prod") +redis_port = + case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do + {port, _} -> port + :error -> nil + nil -> nil + end + +config :explorer, Redix, + host: System.get_env("ACCOUNT_REDIS_HOST_URL"), + port: redis_port + ############### ### Indexer ### ############### diff --git a/config/runtime/test.exs b/config/runtime/test.exs index 6f604ba05e08..d4a9dda8b582 100644 --- a/config/runtime/test.exs +++ b/config/runtime/test.exs @@ -22,6 +22,17 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/test") +redis_port = + case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do + {port, _} -> port + :error -> nil + nil -> nil + end + +config :explorer, Redix, + host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1", + port: redis_port || 6379 + ############### ### Indexer ### ############### diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 0a57ceb4ca7b..b971fcb22b66 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -1,6 +1,12 @@ version: '3.8' services: + redis: + image: "redis:alpine" + command: redis-server + ports: + - 6379:6379 + db: image: postgres:14 restart: always diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 4a1fdaa820a2..171d39e9e57f 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -138,3 +138,5 @@ RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ # ACCOUNT_SENDGRID_SENDER= # ACCOUNT_SENDGRID_TEMPLATE= ACCOUNT_CLOAK_KEY= +ACCOUNT_REDIS_HOST_URL=http://host.docker.internal +ACCOUNT_REDIS_PORT=6379 \ No newline at end of file diff --git a/mix.lock b/mix.lock index 6dcd12035d02..0a53157e3756 100644 --- a/mix.lock +++ b/mix.lock @@ -16,9 +16,9 @@ "cbor": {:hex, :cbor, "1.0.0", "35d33a26f6420ce3d2d01c0b1463a748b34c537d5609fc40116daf3666700d36", [:mix], [], "hexpm", "cc5e21e0fa5a0330715a3806c67bc294f8b65d07160f751b5bd6058bed1962ac"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "cldr_utils": {:hex, :cldr_utils, "2.19.1", "5a7bcd2f2fd432c548e494e850bba8a9e838f1b10202f682ea1d9809d74eff31", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "fbd10f79363e70f3d893ab21e195f444ca87c2c80120b5911761491da4489620"}, - "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, "cloak": {:hex, :cloak, "1.1.2", "7e0006c2b0b98d976d4f559080fabefd81f0e0a50a3c4b621f85ceeb563e80bb", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "940d5ac4fcd51b252930fd112e319ea5ae6ab540b722f3ca60a85666759b9585"}, "cloak_ecto": {:hex, :cloak_ecto, "1.2.0", "e86a3df3bf0dc8980f70406bcb0af2858bac247d55494d40bc58a152590bd402", [:mix], [{:cloak, "~> 1.1.1", [hex: :cloak, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "8bcc677185c813fe64b786618bd6689b1707b35cd95acaae0834557b15a0c62f"}, + "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, "con_cache": {:hex, :con_cache, "1.0.0", "6405e2bd5d5005334af72939432783562a8c35a196c2e63108fe10bb97b366e6", [:mix], [], "hexpm", "4d1f5cb1a67f3c1a468243dc98d10ac83af7f3e33b7e7c15999dc2c9bc0a551e"}, @@ -120,6 +120,7 @@ "que": {:hex, :que, "0.10.1", "788ed0ec92ed69bdf9cfb29bf41a94ca6355b8d44959bd0669cf706e557ac891", [:mix], [{:ex_utils, "~> 0.1.6", [hex: :ex_utils, repo: "hexpm", optional: false]}, {:memento, "~> 0.3.0", [hex: :memento, repo: "hexpm", optional: false]}], "hexpm", "a737b365253e75dbd24b2d51acc1d851049e87baae08cd0c94e2bc5cd65088d5"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "ratio": {:hex, :ratio, "2.4.2", "c8518f3536d49b1b00d88dd20d49f8b11abb7819638093314a6348139f14f9f9", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:numbers, "~> 5.2.0", [hex: :numbers, repo: "hexpm", optional: false]}], "hexpm", "441ef6f73172a3503de65ccf1769030997b0d533b1039422f1e5e0e0b4cbf89e"}, + "redix": {:hex, :redix, "1.1.5", "6fc460d66a5c2287e83e6d73dddc8d527ff59cb4d4f298b41e03a4db8c3b2bd5", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "679afdd4c14502fe9c11387ff1cdcb33065a1cf511097da1eee407f17c7a418b"}, "remote_ip": {:hex, :remote_ip, "1.0.0", "3d7fb45204a5704443f480cee9515e464997f52c35e0a60b6ece1f81484067ae", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "9e9fcad4e50c43b5234bb6a9629ed6ab223f3ed07147bd35470e4ee5c8caf907"}, "rustler": {:hex, :rustler, "0.24.0", "b8362a2fee1c9d2c7373b0bfdc98f75bbc02864efcec50df173fe6c4f72d4cc4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "2773167fca68a6525822ad977b41368ea3c2af876c42ebaa7c9d6bb69b67f1ce"}, "sobelow": {:hex, :sobelow, "0.11.1", "23438964486f8112b41e743bbfd402da3e5b296fdc9eacab29914b79c48916dd", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9897363a7eff96f4809304a90aad819e2ad5e5d24db547af502885146746a53c"}, From 4a88a10bdaca4096fc3a8d3f43b8fbd3ee90ffb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 9 Sep 2022 20:12:08 +0300 Subject: [PATCH 380/723] Fix tests --- apps/block_scout_web/assets/webpack.config.js | 1 - apps/indexer/config/runtime/test.exs | 2 ++ config/runtime/test.exs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 824a8cbdb18a..6c422fedc384 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -70,7 +70,6 @@ const appJs = 'token-overview': './js/pages/token/overview.js', 'export-csv': './css/export-csv.scss', 'csv-download': './js/lib/csv_download.js', - 'datepicker': './js/lib/datepicker.js', 'dropzone': './js/lib/dropzone.js', 'delete-item-handler': './js/pages/account/delete_item_handler.js', 'public-tags-request-form': './js/lib/public_tags_request_form.js' diff --git a/apps/indexer/config/runtime/test.exs b/apps/indexer/config/runtime/test.exs index b360f5f9b933..476dedd9439c 100644 --- a/apps/indexer/config/runtime/test.exs +++ b/apps/indexer/config/runtime/test.exs @@ -1,3 +1,5 @@ +import Config + variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "parity" diff --git a/config/runtime/test.exs b/config/runtime/test.exs index d4a9dda8b582..9260627d25b3 100644 --- a/config/runtime/test.exs +++ b/config/runtime/test.exs @@ -1,3 +1,5 @@ +import Config + ###################### ### BlockScout Web ### ###################### From e904e725492e3723741f77458b95f012146a9412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 9 Sep 2022 20:25:00 +0300 Subject: [PATCH 381/723] Fix tests --- apps/explorer/test/support/factory.ex | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index f0a2050dc63d..7967d83b8d4f 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -7,8 +7,6 @@ defmodule Explorer.Factory do import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Kernel, except: [+: 2] - alias Comeonin.Bcrypt - alias Explorer.Account.{ Identity, Watchlist, From 17f4946b7a23777b8aab823c17e6139633d9ab38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 11 Sep 2022 23:29:44 +0300 Subject: [PATCH 382/723] Fix docker compose --- apps/explorer/lib/explorer/application.ex | 4 +--- config/runtime/dev.exs | 11 ----------- config/runtime/prod.exs | 11 ----------- config/runtime/test.exs | 11 ----------- docker-compose/docker-compose-no-build-ganache.yml | 5 +++++ docker-compose/docker-compose-no-build-geth.yml | 5 +++++ .../docker-compose-no-build-hardhat-network.yml | 5 +++++ ...cker-compose-no-build-open-ethereum-nethermind.yml | 5 +++++ .../docker-compose-no-rust-verification.yml | 5 +++++ docker-compose/docker-compose.yml | 7 +++---- docker-compose/envs/common-blockscout.env | 4 ++-- 11 files changed, 31 insertions(+), 42 deletions(-) diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index 2a646b0728db..1fd3a6cd2ec9 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -179,8 +179,6 @@ defmodule Explorer.Application do end defp redix_opts do - config = Application.get_env(:explorer, Redix) - - [name: :redix, host: config[:host], port: config[:port]] + {System.get_env("ACCOUNT_REDIS_URL") || "redis://127.0.0.1:6379", [name: :redix]} end end diff --git a/config/runtime/dev.exs b/config/runtime/dev.exs index 491113adb1e3..a4d0d5b6a782 100644 --- a/config/runtime/dev.exs +++ b/config/runtime/dev.exs @@ -103,17 +103,6 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/dev") -redis_port = - case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do - {port, _} -> port - :error -> nil - nil -> nil - end - -config :explorer, Redix, - host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1", - port: redis_port || 6379 - ############### ### Indexer ### ############### diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 0218804f4f86..2b15151aab2c 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -70,17 +70,6 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/prod") -redis_port = - case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do - {port, _} -> port - :error -> nil - nil -> nil - end - -config :explorer, Redix, - host: System.get_env("ACCOUNT_REDIS_HOST_URL"), - port: redis_port - ############### ### Indexer ### ############### diff --git a/config/runtime/test.exs b/config/runtime/test.exs index 9260627d25b3..38cd15e0dfbe 100644 --- a/config/runtime/test.exs +++ b/config/runtime/test.exs @@ -24,17 +24,6 @@ variant = Code.require_file("#{variant}.exs", "apps/explorer/config/test") -redis_port = - case System.get_env("ACCOUNT_REDIS_PORT") && Integer.parse(System.get_env("ACCOUNT_REDIS_PORT")) do - {port, _} -> port - :error -> nil - nil -> nil - end - -config :explorer, Redix, - host: System.get_env("ACCOUNT_REDIS_HOST_URL") || "127.0.0.1", - port: redis_port || 6379 - ############### ### Indexer ### ############### diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index 619e8104b058..62a007a2b0e2 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -1,6 +1,10 @@ version: '3.8' services: + redis_db: + image: 'redis:alpine' + command: redis-server + db: image: postgres:14 restart: always @@ -16,6 +20,7 @@ services: depends_on: - db - smart-contract-verifier + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-geth.yml b/docker-compose/docker-compose-no-build-geth.yml index ec6e64d24856..d4f59f9a4dca 100644 --- a/docker-compose/docker-compose-no-build-geth.yml +++ b/docker-compose/docker-compose-no-build-geth.yml @@ -1,6 +1,10 @@ version: '3.8' services: + redis_db: + image: 'redis:alpine' + command: redis-server + db: image: postgres:14 restart: always @@ -18,6 +22,7 @@ services: depends_on: - db - smart-contract-verifier + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-hardhat-network.yml b/docker-compose/docker-compose-no-build-hardhat-network.yml index 9a74d44f1008..aaab30fd1ed2 100644 --- a/docker-compose/docker-compose-no-build-hardhat-network.yml +++ b/docker-compose/docker-compose-no-build-hardhat-network.yml @@ -1,6 +1,10 @@ version: '3.8' services: + redis_db: + image: 'redis:alpine' + command: redis-server + db: image: postgres:14 restart: always @@ -16,6 +20,7 @@ services: depends_on: - db - smart-contract-verifier + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml index 9a272acb5732..cde891f1ada1 100644 --- a/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml +++ b/docker-compose/docker-compose-no-build-open-ethereum-nethermind.yml @@ -1,6 +1,10 @@ version: '3.8' services: + redis_db: + image: 'redis:alpine' + command: redis-server + db: image: postgres:14 restart: always @@ -18,6 +22,7 @@ services: depends_on: - db - smart-contract-verifier + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} restart: always container_name: 'blockscout' diff --git a/docker-compose/docker-compose-no-rust-verification.yml b/docker-compose/docker-compose-no-rust-verification.yml index 74c3b7764260..2f809bcfe295 100644 --- a/docker-compose/docker-compose-no-rust-verification.yml +++ b/docker-compose/docker-compose-no-rust-verification.yml @@ -1,6 +1,10 @@ version: '3.8' services: + redis_db: + image: 'redis:alpine' + command: redis-server + db: image: postgres:14 restart: always @@ -15,6 +19,7 @@ services: blockscout: depends_on: - db + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index b971fcb22b66..e9043545f3e3 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -1,11 +1,9 @@ version: '3.8' services: - redis: - image: "redis:alpine" + redis_db: + image: 'redis:alpine' command: redis-server - ports: - - 6379:6379 db: image: postgres:14 @@ -22,6 +20,7 @@ services: depends_on: - db - smart-contract-verifier + - redis_db image: blockscout/blockscout:${DOCKER_TAG:-latest} build: context: .. diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 171d39e9e57f..419103c577ab 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -138,5 +138,5 @@ RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ # ACCOUNT_SENDGRID_SENDER= # ACCOUNT_SENDGRID_TEMPLATE= ACCOUNT_CLOAK_KEY= -ACCOUNT_REDIS_HOST_URL=http://host.docker.internal -ACCOUNT_REDIS_PORT=6379 \ No newline at end of file +ACCOUNT_ENABLED=false +ACCOUNT_REDIS_URL=redis://redis_db:6379 \ No newline at end of file From d7c79dec40e5b20d863245f9eb5f0c9899e9814a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 12 Sep 2022 11:41:37 +0300 Subject: [PATCH 383/723] Fix tests --- .github/workflows/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 4401c8ec0bc5..8c8d2bd57af7 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -494,6 +494,10 @@ jobs: runs-on: ubuntu-latest needs: build-and-cache services: + redis_db: + image: 'redis:alpine' + command: redis-server + postgres: image: postgres env: @@ -573,3 +577,4 @@ jobs: ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" CHAIN_ID: "77" ADMIN_PANEL_ENABLED: "true" + ACCOUNT_ENABLED: "true" From 87f8c73f3cec29e0025e5620e907292743460fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 12 Sep 2022 11:46:12 +0300 Subject: [PATCH 384/723] Fix tests --- .github/workflows/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 8c8d2bd57af7..e07f194dd3e8 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -496,7 +496,8 @@ jobs: services: redis_db: image: 'redis:alpine' - command: redis-server + ports: + - 6379:6379 postgres: image: postgres @@ -578,3 +579,4 @@ jobs: CHAIN_ID: "77" ADMIN_PANEL_ENABLED: "true" ACCOUNT_ENABLED: "true" + ACCOUNT_REDIS_URL: "redis://localhost:6379" From a172b17eeca97e64d57a595695bbf485c41d7894 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 11:53:27 +0300 Subject: [PATCH 385/723] Add ACCOUNT_ENABLED, ACCOUNT_REDIS_URL to Makefile --- docker/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/Makefile b/docker/Makefile index 5678caa01fcb..a46600e0f520 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -469,6 +469,12 @@ endif ifdef RUST_VERIFICATION_SERVICE_URL BLOCKSCOUT_CONTAINER_PARAMS += -e 'RUST_VERIFICATION_SERVICE_URL=$(RUST_VERIFICATION_SERVICE_URL)' endif +ifdef ACCOUNT_ENABLED + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_ENABLED=$(ACCOUNT_ENABLED)' +endif +ifdef ACCOUNT_REDIS_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_REDIS_URL=$(ACCOUNT_REDIS_URL)' +endif ifdef ACCOUNT_AUTH0_DOMAIN BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_DOMAIN=$(ACCOUNT_AUTH0_DOMAIN)' endif From b4a3748de439e888b11eb6fb16eff888ec0321a2 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 19:09:48 +0300 Subject: [PATCH 386/723] ACCOUNT_DATABASE_URL from DATABASE_URL if not provided --- config/runtime/prod.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 2b15151aab2c..0e4e58f81a60 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -49,7 +49,11 @@ config :explorer, Explorer.Repo.Replica1, pool_size: pool_size_api, ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true") -database_account_url = System.get_env("ACCOUNT_DATABASE_URL") +database_account_url = + if System.get_env("ACCOUNT_DATABASE_URL"), + do: System.get_env("ACCOUNT_DATABASE_URL"), + else: System.get_env("DATABASE_URL") + pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "50")) # Configures Account database From 838073b243a6c349815db5d73df5b7ee734d3949 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 19:11:32 +0300 Subject: [PATCH 387/723] Change branches trigger in .github/workflows/config.yml --- .github/workflows/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index e07f194dd3e8..d12f8d60179e 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,7 +4,6 @@ on: push: branches: - account - - np-add-redis-storage-for-sessions env: MIX_ENV: test From 2b972226b97d54042e7aad1ad22d8f7be83f4af5 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 19:19:58 +0300 Subject: [PATCH 388/723] Update .git workflow --- .github/workflows/config.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index d12f8d60179e..9da495261d09 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -3,7 +3,10 @@ name: Blockscout on: push: branches: - - account + - master + pull_request: + branches: + - master env: MIX_ENV: test @@ -37,7 +40,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps- @@ -97,7 +100,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -121,7 +124,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -144,7 +147,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -184,7 +187,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -210,7 +213,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -238,7 +241,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -284,7 +287,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -343,7 +346,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -399,7 +402,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -466,7 +469,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -532,7 +535,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_12-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" From 74b9daa4052fce6716a1da35cbff0edb29ee676c Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 19:21:18 +0300 Subject: [PATCH 389/723] Finalize Account functionality PR --- .github/workflows/config.yml | 2 +- CHANGELOG.md | 2 ++ apps/block_scout_web/mix.exs | 2 +- apps/explorer/mix.exs | 2 +- config/runtime/dev.exs | 19 ++++++------------- docker-compose/envs/common-blockscout.env | 2 +- docker/Dockerfile | 2 +- docker/Makefile | 9 +++------ 8 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 9da495261d09..3cbac5697887 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -156,7 +156,7 @@ jobs: id: dialyzer-cache with: path: priv/plts - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_15-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_14-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2dac2b90f8..9c9ab72b711e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Current ### Features + +- [#6092](https://github.com/blockscout/blockscout/pull/6092) - Blockscout Account functionality - [#6073](https://github.com/blockscout/blockscout/pull/6073) - Add vyper support for rust verifier microservice integration ### Fixes diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index ff58199c7565..459eca37d70e 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -104,7 +104,7 @@ defmodule BlockScoutWeb.Mixfile do {:plug_cowboy, "~> 2.2"}, # Waiting for the Pretty Print to be implemented at the Jason lib # https://github.com/michalmuskala/jason/issues/15 - # {:poison, "~> 5.0.0"}, + {:poison, "~> 4.0.1"}, {:postgrex, ">= 0.0.0"}, # For compatibility with `prometheus_process_collector`, which hasn't been updated yet {:prometheus, "~> 4.0", override: true}, diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 9a44b82d9877..b9217ddd0ad2 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -90,7 +90,7 @@ defmodule Explorer.Mixfile do {:mock, "~> 0.3.0", only: [:test], runtime: false}, {:mox, "~> 1.0", only: [:test]}, {:phoenix_html, "== 3.0.4"}, - {:poison, "~> 4.0.0"}, + {:poison, "~> 4.0.1"}, {:nimble_csv, "~> 1.1"}, {:postgrex, ">= 0.0.0"}, # For compatibility with `prometheus_process_collector`, which hasn't been updated yet diff --git a/config/runtime/dev.exs b/config/runtime/dev.exs index a4d0d5b6a782..8de612decbd0 100644 --- a/config/runtime/dev.exs +++ b/config/runtime/dev.exs @@ -46,11 +46,10 @@ database_api_url = do: System.get_env("DATABASE_READ_ONLY_API_URL"), else: System.get_env("DATABASE_URL") -# pool_size = -# if System.get_env("DATABASE_READ_ONLY_API_URL"), -# do: String.to_integer(System.get_env("POOL_SIZE", "40")), -# else: String.to_integer(System.get_env("POOL_SIZE", "50")) -pool_size = String.to_integer(System.get_env("POOL_SIZE", "30")) +pool_size = + if System.get_env("DATABASE_READ_ONLY_API_URL"), + do: String.to_integer(System.get_env("POOL_SIZE", "30")), + else: String.to_integer(System.get_env("POOL_SIZE", "40")) # Configure your database config :explorer, Explorer.Repo, @@ -62,10 +61,7 @@ config :explorer, Explorer.Repo, database_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: database hostname_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: hostname -pool_size_api = - if System.get_env("DATABASE_READ_ONLY_API_URL"), - do: String.to_integer(System.get_env("POOL_SIZE_API", "10")), - else: String.to_integer(System.get_env("POOL_SIZE_API", "10")) +pool_size_api = String.to_integer(System.get_env("POOL_SIZE_API", "10")) # Configure API database config :explorer, Explorer.Repo.Replica1, @@ -76,10 +72,7 @@ config :explorer, Explorer.Repo.Replica1, database_account_url = System.get_env("ACCOUNT_DATABASE_URL") || System.get_env("DATABASE_URL") -pool_size_account = - if System.get_env("ACCOUNT_DATABASE_URL"), - do: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")), - else: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) +pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) database_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: database hostname_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: hostname diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 419103c577ab..6b157a2011eb 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -19,8 +19,8 @@ BLOCKSCOUT_PROTOCOL= # SECRET_KEY_BASE= # CHECK_ORIGIN= PORT=4000 -# COIN= COIN_NAME= +# COIN= # METADATA_CONTRACT= # VALIDATORS_CONTRACT= # KEYS_MANAGER_CONTRACT= diff --git a/docker/Dockerfile b/docker/Dockerfile index 7c2f68a62e86..b0a6f0591b82 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,7 +43,7 @@ ADD apps/explorer/mix.exs ./apps/explorer/ ADD apps/ethereum_jsonrpc/mix.exs ./apps/ethereum_jsonrpc/ ADD apps/indexer/mix.exs ./apps/indexer/ -RUN HEX_HTTP_TIMEOUT=3600 mix do deps.get, local.rebar --force, deps.compile +RUN mix do deps.get, local.rebar --force, deps.compile ADD . . diff --git a/docker/Makefile b/docker/Makefile index a46600e0f520..2ef104427c05 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -67,9 +67,6 @@ endif ifdef COIN BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN=$(COIN)' endif -ifdef COIN_NAME - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)' -endif ifdef METADATA_CONTRACT BLOCKSCOUT_CONTAINER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)' endif @@ -370,9 +367,6 @@ endif ifdef API_RATE_LIMIT_WHITELISTED_IPS BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_WHITELISTED_IPS=$(API_RATE_LIMIT_WHITELISTED_IPS)' endif -ifdef COIN_NAME - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)' -endif ifdef INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER=$(INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER)' endif @@ -475,6 +469,9 @@ endif ifdef ACCOUNT_REDIS_URL BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_REDIS_URL=$(ACCOUNT_REDIS_URL)' endif +ifdef COIN_NAME + BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)' +endif ifdef ACCOUNT_AUTH0_DOMAIN BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_DOMAIN=$(ACCOUNT_AUTH0_DOMAIN)' endif From 2ac1fde80ec597297c2bce797a61a38bba99258e Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Mon, 12 Sep 2022 22:24:59 +0400 Subject: [PATCH 390/723] Fix token instance fetcher for ERC-1155 --- apps/explorer/lib/explorer/chain.ex | 16 ++++++--- apps/explorer/test/explorer/chain_test.exs | 33 +++++++++++++++++-- .../lib/indexer/fetcher/token_instance.ex | 17 ++++++++-- 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 7b0c65c2632c..4c11d67ba9b5 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4555,16 +4555,22 @@ defmodule Explorer.Chain do on: token.contract_address_hash == token_transfer.token_contract_address_hash, left_join: instance in Instance, on: - token_transfer.token_id == instance.token_id and - token_transfer.token_contract_address_hash == instance.token_contract_address_hash, - where: is_nil(instance.token_id) and not is_nil(token_transfer.token_id), - select: %{contract_address_hash: token_transfer.token_contract_address_hash, token_id: token_transfer.token_id} + token_transfer.token_contract_address_hash == instance.token_contract_address_hash and + (token_transfer.token_id == instance.token_id or + fragment("? @> ARRAY[?::decimal]", token_transfer.token_ids, instance.token_id)), + where: + is_nil(instance.token_id) and (not is_nil(token_transfer.token_id) or not is_nil(token_transfer.token_ids)), + select: %{ + contract_address_hash: token_transfer.token_contract_address_hash, + token_id: token_transfer.token_id, + token_ids: token_transfer.token_ids + } ) distinct_query = from( q in subquery(query), - distinct: [q.contract_address_hash, q.token_id] + distinct: [q.contract_address_hash, q.token_id, q.token_ids] ) Repo.stream_reduce(distinct_query, initial, reducer) diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index b64bf7ce41a9..822ac4d672ec 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -4802,7 +4802,7 @@ defmodule Explorer.ChainTest do end describe "stream_unfetched_token_instances/2" do - test "reduces wuth given reducer and accumulator" do + test "reduces with given reducer and accumulator for ERC-721 token" do token_contract_address = insert(:contract_address) token = insert(:token, contract_address: token_contract_address, type: "ERC-721") @@ -4827,7 +4827,33 @@ defmodule Explorer.ChainTest do assert result.contract_address_hash == token_transfer.token_contract_address_hash end - test "does not fetch token transfers without token id" do + test "reduces with given reducer and accumulator for ERC-1155 token" do + token_contract_address = insert(:contract_address) + token = insert(:token, contract_address: token_contract_address, type: "ERC-1155") + + transaction = + :transaction + |> insert() + |> with_block(insert(:block, number: 1)) + + token_transfer = + insert( + :token_transfer, + block_number: 1000, + to_address: build(:address), + transaction: transaction, + token_contract_address: token_contract_address, + token: token, + token_id: nil, + token_ids: [11] + ) + + assert {:ok, [result]} = Chain.stream_unfetched_token_instances([], &[&1 | &2]) + assert result.token_ids == token_transfer.token_ids + assert result.contract_address_hash == token_transfer.token_contract_address_hash + end + + test "does not fetch token transfers without token id or token_ids" do token_contract_address = insert(:contract_address) token = insert(:token, contract_address: token_contract_address, type: "ERC-721") @@ -4843,7 +4869,8 @@ defmodule Explorer.ChainTest do transaction: transaction, token_contract_address: token_contract_address, token: token, - token_id: nil + token_id: nil, + token_ids: nil ) assert {:ok, []} = Chain.stream_unfetched_token_instances([], &[&1 | &2]) diff --git a/apps/indexer/lib/indexer/fetcher/token_instance.ex b/apps/indexer/lib/indexer/fetcher/token_instance.ex index 15d653f31b4e..2a5bbf598f9a 100644 --- a/apps/indexer/lib/indexer/fetcher/token_instance.ex +++ b/apps/indexer/lib/indexer/fetcher/token_instance.ex @@ -50,7 +50,20 @@ defmodule Indexer.Fetcher.TokenInstance do end @impl BufferedTask - def run([%{contract_address_hash: token_contract_address_hash, token_id: token_id}], _json_rpc_named_arguments) do + def run([%{contract_address_hash: hash, token_id: token_id, token_ids: token_ids}], _json_rpc_named_arguments) do + all_token_ids = + cond do + is_nil(token_id) -> token_ids + is_nil(token_ids) -> [token_id] + true -> [token_id] ++ token_ids + end + + Enum.each(all_token_ids, &fetch_instance(hash, &1)) + + :ok + end + + defp fetch_instance(token_contract_address_hash, token_id) do case InstanceMetadataRetriever.fetch_metadata(to_string(token_contract_address_hash), Decimal.to_integer(token_id)) do {:ok, %{metadata: metadata}} -> params = %{ @@ -82,8 +95,6 @@ defmodule Indexer.Fetcher.TokenInstance do :ok end - - :ok end @doc """ From 4afcbceea727bb4acf2816356c7da17cf676a1a2 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Mon, 12 Sep 2022 22:31:43 +0400 Subject: [PATCH 391/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2dac2b90f8..538cd86510c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` - [#6013](https://github.com/blockscout/blockscout/pull/6013) - Fix ERC-1155 tokens fetching - [#6043](https://github.com/blockscout/blockscout/pull/6043) - Fix token instance fetching +- [#6093](https://github.com/blockscout/blockscout/pull/6093) - Fix Indexer.Fetcher.TokenInstance for ERC-1155 tokens ### Chore From 7539eef10dee2618e00e176ead166db51b982e35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:58:19 +0000 Subject: [PATCH 392/723] Bump jest-environment-jsdom in /apps/block_scout_web/assets Bumps [jest-environment-jsdom](https://github.com/facebook/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.0.2 to 29.0.3. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.3/packages/jest-environment-jsdom) --- updated-dependencies: - dependency-name: jest-environment-jsdom dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 162 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 6a60deb9ecf3..8aee2bff5150 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -80,7 +80,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.2", - "jest-environment-jsdom": "^29.0.2", + "jest-environment-jsdom": "^29.0.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", @@ -2638,15 +2638,15 @@ } }, "node_modules/@jest/environment": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.2.tgz", - "integrity": "sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", + "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", - "jest-mock": "^29.0.2" + "jest-mock": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2678,17 +2678,17 @@ } }, "node_modules/@jest/fake-timers": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.2.tgz", - "integrity": "sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", + "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.2", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2" + "jest-message-util": "^29.0.3", + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3005,9 +3005,9 @@ } }, "node_modules/@jest/types": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.2.tgz", - "integrity": "sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", + "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -10906,18 +10906,18 @@ } }, "node_modules/jest-environment-jsdom": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.2.tgz", - "integrity": "sha512-hWqC9FQI5yT04lTd4VJnzT5QObxq0xrSrqpGkqsYfxPeJYjyhriI7W2oJC5HZ1UbhnvA+8GS1nzgPsstvRpdVw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz", + "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2", + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3", "jsdom": "^20.0.0" }, "engines": { @@ -11112,18 +11112,18 @@ } }, "node_modules/jest-message-util": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.2.tgz", - "integrity": "sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", + "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -11202,12 +11202,12 @@ } }, "node_modules/jest-mock": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.2.tgz", - "integrity": "sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", + "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*" }, "engines": { @@ -11708,12 +11708,12 @@ } }, "node_modules/jest-util": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.2.tgz", - "integrity": "sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", + "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -14863,9 +14863,9 @@ } }, "node_modules/pretty-format": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.2.tgz", - "integrity": "sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", + "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -20471,15 +20471,15 @@ } }, "@jest/environment": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.2.tgz", - "integrity": "sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", + "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", "dev": true, "requires": { - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", - "jest-mock": "^29.0.2" + "jest-mock": "^29.0.3" } }, "@jest/expect": { @@ -20502,17 +20502,17 @@ } }, "@jest/fake-timers": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.2.tgz", - "integrity": "sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", + "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.0.2", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2" + "jest-message-util": "^29.0.3", + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3" } }, "@jest/globals": { @@ -20752,9 +20752,9 @@ } }, "@jest/types": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.2.tgz", - "integrity": "sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", + "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", @@ -26951,18 +26951,18 @@ } }, "jest-environment-jsdom": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.2.tgz", - "integrity": "sha512-hWqC9FQI5yT04lTd4VJnzT5QObxq0xrSrqpGkqsYfxPeJYjyhriI7W2oJC5HZ1UbhnvA+8GS1nzgPsstvRpdVw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz", + "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==", "dev": true, "requires": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2", + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3", "jsdom": "^20.0.0" } }, @@ -27108,18 +27108,18 @@ } }, "jest-message-util": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.2.tgz", - "integrity": "sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", + "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -27176,12 +27176,12 @@ } }, "jest-mock": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.2.tgz", - "integrity": "sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", + "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*" } }, @@ -27562,12 +27562,12 @@ } }, "jest-util": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.2.tgz", - "integrity": "sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", + "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -29966,9 +29966,9 @@ "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==" }, "pretty-format": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.2.tgz", - "integrity": "sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", + "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0f93de3e58e5..6666f6362668 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -92,7 +92,7 @@ "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", "jest": "^29.0.2", - "jest-environment-jsdom": "^29.0.2", + "jest-environment-jsdom": "^29.0.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", "postcss-loader": "^7.0.1", From 865d1067f311922bab360289c1854e29437343fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:58:35 +0000 Subject: [PATCH 393/723] Bump exvcr from 0.13.3 to 0.13.4 Bumps [exvcr](https://github.com/parroty/exvcr) from 0.13.3 to 0.13.4. - [Release notes](https://github.com/parroty/exvcr/releases) - [Changelog](https://github.com/parroty/exvcr/blob/master/CHANGELOG.md) - [Commits](https://github.com/parroty/exvcr/compare/v0.13.3...v0.13.4) --- updated-dependencies: - dependency-name: exvcr dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 0a53157e3756..599ec3cb1965 100644 --- a/mix.lock +++ b/mix.lock @@ -56,7 +56,7 @@ "ex_utils": {:hex, :ex_utils, "0.1.7", "2c133e0bcdc49a858cf8dacf893308ebc05bc5fba501dc3d2935e65365ec0bf3", [:mix], [], "hexpm", "66d4fe75285948f2d1e69c2a5ddd651c398c813574f8d36a9eef11dc20356ef6"}, "exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], [], "hexpm", "1222419f706e01bfa1095aec9acf6421367dcfab798a6f67c54cf784733cd6b5"}, "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "32e95820a97cffea67830e91514a2ad53b888850442d6d395f53a1ac60c82e07"}, - "exvcr": {:hex, :exvcr, "0.13.3", "fcd5f54ea0ebd41db7fe16701f3c67871d1b51c3c104ab88f11135a173d47134", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:finch, "~> 0.8", [hex: :finch, repo: "hexpm", optional: true]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "db61057447388b7adc4443a55047d11d09acc75eeb5548507c775a8402e02689"}, + "exvcr": {:hex, :exvcr, "0.13.4", "68efca5ae04a909b29a9e137338a7033642898033c7a938a5faec545bfc5a38e", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:finch, "~> 0.8", [hex: :finch, repo: "hexpm", optional: true]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "42920a59bdeef34001f8c2305a57d68b29d8a2e7aa1877bb35a75034b9f9904a"}, "file_info": {:hex, :file_info, "0.0.4", "2e0e77f211e833f38ead22cb29ce53761d457d80b3ffe0ffe0eb93880b0963b2", [:mix], [{:mimetype_parser, "~> 0.1.2", [hex: :mimetype_parser, repo: "hexpm", optional: false]}], "hexpm", "50e7ad01c2c8b9339010675fe4dc4a113b8d6ca7eddce24d1d74fd0e762781a5"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "floki": {:hex, :floki, "0.33.1", "f20f1eb471e726342b45ccb68edb9486729e7df94da403936ea94a794f072781", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "461035fd125f13fdf30f243c85a0b1e50afbec876cbf1ceefe6fddd2e6d712c6"}, From 3bf3c9eda47659cd4d06c4e984128565840eb14d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:58:49 +0000 Subject: [PATCH 394/723] Bump autoprefixer from 10.4.8 to 10.4.9 in /apps/block_scout_web/assets Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.8 to 10.4.9. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.8...10.4.9) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 30 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 6a60deb9ecf3..27de201fd310 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -68,7 +68,7 @@ "devDependencies": { "@babel/core": "^7.19.0", "@babel/preset-env": "^7.19.0", - "autoprefixer": "^10.4.8", + "autoprefixer": "^10.4.9", "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", @@ -4441,9 +4441,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "node_modules/autoprefixer": { - "version": "10.4.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz", - "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==", + "version": "10.4.9", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.9.tgz", + "integrity": "sha512-Uu67eduPEmOeA0vyJby5ghu1AAELCCNSsLAjK+lz6kYzNM5sqnBO36MqfsjhPjQF/BaJM5U/UuFYyl7PavY/wQ==", "dev": true, "funding": [ { @@ -4457,7 +4457,7 @@ ], "dependencies": { "browserslist": "^4.21.3", - "caniuse-lite": "^1.0.30001373", + "caniuse-lite": "^1.0.30001394", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -5340,9 +5340,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001374", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz", - "integrity": "sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw==", + "version": "1.0.30001397", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz", + "integrity": "sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA==", "funding": [ { "type": "opencollective", @@ -21999,13 +21999,13 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "autoprefixer": { - "version": "10.4.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz", - "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==", + "version": "10.4.9", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.9.tgz", + "integrity": "sha512-Uu67eduPEmOeA0vyJby5ghu1AAELCCNSsLAjK+lz6kYzNM5sqnBO36MqfsjhPjQF/BaJM5U/UuFYyl7PavY/wQ==", "dev": true, "requires": { "browserslist": "^4.21.3", - "caniuse-lite": "^1.0.30001373", + "caniuse-lite": "^1.0.30001394", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -22674,9 +22674,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001374", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz", - "integrity": "sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw==" + "version": "1.0.30001397", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz", + "integrity": "sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA==" }, "caseless": { "version": "0.12.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0f93de3e58e5..0719a966ecdd 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -80,7 +80,7 @@ "devDependencies": { "@babel/core": "^7.19.0", "@babel/preset-env": "^7.19.0", - "autoprefixer": "^10.4.8", + "autoprefixer": "^10.4.9", "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", From f41d506bd04e4691aa2dedeebaa19a056a7cb53b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:59:07 +0000 Subject: [PATCH 395/723] Bump ex_json_schema from 0.9.1 to 0.9.2 Bumps [ex_json_schema](https://github.com/jonasschmidt/ex_json_schema) from 0.9.1 to 0.9.2. - [Release notes](https://github.com/jonasschmidt/ex_json_schema/releases) - [Commits](https://github.com/jonasschmidt/ex_json_schema/commits/v0.9.2) --- updated-dependencies: - dependency-name: ex_json_schema dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 0a53157e3756..6b0d2d8b3047 100644 --- a/mix.lock +++ b/mix.lock @@ -49,7 +49,7 @@ "ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.27.2", "d1400a0502fb66ab3abcce3d10d5d11efcfc786eafe1c442ea2ddf834670d743", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:digital_token, "~> 0.3 or ~> 1.0", [hex: :digital_token, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.28", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.13", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "f682f46193e1793a3a98cc636314e9bea483da0925eb47935a39c4feef79e364"}, "ex_cldr_units": {:hex, :ex_cldr_units, "3.13.3", "886dbeb22c739ffbf574098cc889aa5fc0df9d27abb3412d700da051826fdb05", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr_lists, "~> 2.10", [hex: :ex_cldr_lists, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.26", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:ratio, "~> 2.4", [hex: :ratio, repo: "hexpm", optional: false]}], "hexpm", "2177d8070c5572b0e1e40271783c191c60f5075051ed95b488ec3b2bc157b23c"}, "ex_doc": {:hex, :ex_doc, "0.28.5", "3e52a6d2130ce74d096859e477b97080c156d0926701c13870a4e1f752363279", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d2c4b07133113e9aa3e9ba27efb9088ba900e9e51caa383919676afdf09ab181"}, - "ex_json_schema": {:hex, :ex_json_schema, "0.9.1", "1de550a267198aa833f4ad043b97241f2b0a3671bb5869581efef0f165b58694", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "7041222de29d33308cef68ec81da9025d141951197bd9bb6e49dc945d195cd69"}, + "ex_json_schema": {:hex, :ex_json_schema, "0.9.2", "c9a42e04e70cd70eb11a8903a22e8ec344df16edef4cb8e6ec84ed0caffc9f0f", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "4854329cb352b6c01c4c4b8dbfb3be14dc5bea19ea13e0eafade4ff22ba55224"}, "ex_keccak": {:hex, :ex_keccak, "0.4.0", "4eb8620c8a20a546e2d297b5ce3de150a90db0fdc4ba1dd88c854ace9ee47603", [:mix], [{:rustler, "~> 0.24", [hex: :rustler, repo: "hexpm", optional: false]}], "hexpm", "209ec5591d3cf79f9bdcdedf39c3d7a1fb208321e2b6de2660801117ae386f10"}, "ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"}, "ex_rlp": {:hex, :ex_rlp, "0.5.4", "a517a68381305a6270b46a7e30484ed7aabb761da4b66c9bb396dd07ae969443", [:mix], [], "hexpm", "3a9dc788822ab84a832dff472574a09786fb1711beded29f9f3a8e7d23f7ca04"}, From 975c4e5ab95783df3b1ba736f2be890bead87775 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:59:55 +0000 Subject: [PATCH 396/723] Bump ueberauth from 0.10.1 to 0.10.2 Bumps [ueberauth](https://github.com/ueberauth/ueberauth) from 0.10.1 to 0.10.2. - [Release notes](https://github.com/ueberauth/ueberauth/releases) - [Changelog](https://github.com/ueberauth/ueberauth/blob/master/CHANGELOG.md) - [Commits](https://github.com/ueberauth/ueberauth/compare/v0.10.1...v0.10.2) --- updated-dependencies: - dependency-name: ueberauth dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 0a53157e3756..e5e727a7f9d5 100644 --- a/mix.lock +++ b/mix.lock @@ -105,7 +105,7 @@ "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.1", "ba04e489ef03763bf28a17eb2eaddc2c20c6d217e2150a61e3298b0f4c2012b5", [:mix], [], "hexpm", "81367c6d1eea5878ad726be80808eb5a787a23dee699f96e72b1109c57cdd8d9"}, "plug": {:hex, :plug, "1.13.6", "187beb6b67c6cec50503e940f0434ea4692b19384d47e5fdfd701e93cadb4cc2", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "02b9c6b9955bce92c829f31d6284bf53c591ca63c4fb9ff81dfd0418667a34ff"}, "plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.3", "8f77d13aeb32bfd9e654cb68f0af517b371fb34c56c9f2b58fe3df1235c1251a", [:mix], [], "hexpm", "b5672099c6ad5c202c45f5a403f21a3411247f164e4a8fab056e5cd8a290f4a2"}, "poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm", "ba8836feea4b394bb718a161fc59a288fe0109b5006d6bdf97b6badfcf6f0f25"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "postgrex": {:hex, :postgrex, "0.15.13", "7794e697481799aee8982688c261901de493eb64451feee6ea58207d7266d54a", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "3ffb76e1a97cfefe5c6a95632a27ffb67f28871c9741fb585f9d1c3cd2af70f1"}, @@ -135,7 +135,7 @@ "timex": {:hex, :timex, "3.7.9", "790cdfc4acfce434e442f98c02ea6d84d0239073bfd668968f82ac63e9a6788d", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "64691582e5bb87130f721fc709acfb70f24405833998fabf35be968984860ce1"}, "toml": {:hex, :toml, "0.6.2", "38f445df384a17e5d382befe30e3489112a48d3ba4c459e543f748c2f25dd4d1", [:mix], [], "hexpm", "d013e45126d74c0c26a38d31f5e8e9b83ea19fc752470feb9a86071ca5a672fa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, - "ueberauth": {:hex, :ueberauth, "0.10.1", "6706b410ee6bd9d67eac983ed9dc7fdc1f06b18677d7b8ba71d5725e07cc8826", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bb715b562395c4cc26b2d8e637c6bb0eb8c67d50c0ea543c0f78f06b7e8efdb1"}, + "ueberauth": {:hex, :ueberauth, "0.10.2", "6e3b17d48c1cb7d5b2bca1255e908d49edf6150c622e5210ab3306acb84929aa", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "dfb7a5af57ed396341317b987815beace548f7deb33e760663546953b3f71c9d"}, "ueberauth_auth0": {:hex, :ueberauth_auth0, "2.0.0", "f3919834f1f473b39e423f2e90dfc1801929d319634e6649d9e198f4ccd46f3e", [:mix], [{:oauth2, "~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.7", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "7b7b8fd7f2f7314ab910e9327452e5c904296f0dbba227d02b445f25a334a012"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "wallaby": {:hex, :wallaby, "0.30.1", "81342a34080867ab359aca23de4d1d8c6bbdeb35d8ce2a8c42e42b758d539963", [:mix], [{:ecto_sql, ">= 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}, {:httpoison, "~> 0.12 or ~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_ecto, ">= 3.0.0", [hex: :phoenix_ecto, repo: "hexpm", optional: true]}, {:web_driver_client, "~> 0.2.0", [hex: :web_driver_client, repo: "hexpm", optional: false]}], "hexpm", "457251df6a94ff80816524136edbce6400cb1ee979586c90224ff634e9543d78"}, From cc5bf048a4bd293b42572e461f7f420d3782e15c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 19:59:58 +0000 Subject: [PATCH 397/723] Bump eslint from 8.23.0 to 8.23.1 in /apps/block_scout_web/assets Bumps [eslint](https://github.com/eslint/eslint) from 8.23.0 to 8.23.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.23.0...v8.23.1) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 46 ++++++++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 6a60deb9ecf3..5386e5948bed 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -73,7 +73,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.23.0", + "eslint": "^8.23.1", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -1808,9 +1808,9 @@ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "node_modules/@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -7137,12 +7137,12 @@ } }, "node_modules/eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "version": "8.23.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz", + "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.1", + "@eslint/eslintrc": "^1.3.2", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", @@ -7161,7 +7161,6 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -7170,6 +7169,7 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -12041,6 +12041,12 @@ "node": ">=12" } }, + "node_modules/js-sdsl": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", + "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==", + "dev": true + }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -19938,9 +19944,9 @@ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", + "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -24059,12 +24065,12 @@ } }, "eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "version": "8.23.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz", + "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.1", + "@eslint/eslintrc": "^1.3.2", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", @@ -24083,7 +24089,6 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -24092,6 +24097,7 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -27810,6 +27816,12 @@ "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==" }, + "js-sdsl": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", + "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==", + "dev": true + }, "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0f93de3e58e5..302003c88d9a 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -85,7 +85,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.23.0", + "eslint": "^8.23.1", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", From 25d80b4479d72c3ce191f17e9df709d18675b237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 12 Sep 2022 22:41:31 +0300 Subject: [PATCH 398/723] Fix inconsistent behaviour of getsourcecode method --- CHANGELOG.md | 2 ++ .../api/rpc/contract_controller.ex | 7 ++---- .../views/api/rpc/contract_view.ex | 22 +++---------------- .../api/rpc/contract_controller_test.exs | 15 +------------ 4 files changed, 8 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c9ab72b711e..72e991bd3606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ ### Fixes +- [#6094](https://github.com/blockscout/blockscout/pull/6094) - Fix inconsistent behaviour of `getsourcecode` method + ### Chore ## 4.1.8-beta diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/contract_controller.ex index d1e132b15e24..4411c28ba22a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/contract_controller.ex @@ -7,7 +7,7 @@ defmodule BlockScoutWeb.API.RPC.ContractController do alias BlockScoutWeb.API.RPC.Helpers alias Explorer.Chain alias Explorer.Chain.Events.Publisher, as: EventsPublisher - alias Explorer.Chain.{Hash, SmartContract} + alias Explorer.Chain.{Address, Hash, SmartContract} alias Explorer.Chain.SmartContract.VerificationStatus alias Explorer.Etherscan.Contracts alias Explorer.SmartContract.Helper @@ -404,7 +404,7 @@ defmodule BlockScoutWeb.API.RPC.ContractController do address = Contracts.address_hash_to_address_with_source_code(address_hash) render(conn, :getsourcecode, %{ - contract: address + contract: address || %Address{hash: address_hash, smart_contract: nil} }) else {:address_param, :error} -> @@ -412,9 +412,6 @@ defmodule BlockScoutWeb.API.RPC.ContractController do {:format, :error} -> render(conn, :error, error: @invalid_address) - - {:contract, :not_found} -> - render(conn, :getsourcecode, %{contract: nil, address_hash: nil}) end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex index e0e9d43ec012..ace6af7517b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.API.RPC.ContractView do alias BlockScoutWeb.AddressView alias BlockScoutWeb.API.RPC.RPCView + alias Ecto.Association.NotLoaded alias Explorer.Chain alias Explorer.Chain.{Address, DecompiledSmartContract, SmartContract} @@ -34,25 +35,6 @@ defmodule BlockScoutWeb.API.RPC.ContractView do RPCView.render("show.json", data: result) end - defp prepare_source_code_contract(nil) do - %{ - "Address" => "", - "SourceCode" => "", - "ABI" => "Contract source code not verified", - "ContractName" => "", - "CompilerVersion" => "", - "DecompiledSourceCode" => "", - "DecompilerVersion" => decompiler_version(nil), - "OptimizationUsed" => "", - "OptimizationRuns" => "", - "EVMVersion" => "", - "ConstructorArguments" => "", - "ExternalLibraries" => "", - "FileName" => "", - "IsProxy" => "false" - } - end - defp prepare_source_code_contract(address) do decompiled_smart_contract = latest_decompiled_smart_contract(address.decompiled_smart_contracts) contract = address.smart_contract || %{} @@ -220,6 +202,8 @@ defmodule BlockScoutWeb.API.RPC.ContractView do } end + defp latest_decompiled_smart_contract(%NotLoaded{}), do: nil + defp latest_decompiled_smart_contract([]), do: nil defp latest_decompiled_smart_contract(contracts) do diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/contract_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/contract_controller_test.exs index 4f56efb7f00d..6f0c4f6fb088 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/contract_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/contract_controller_test.exs @@ -396,20 +396,7 @@ defmodule BlockScoutWeb.API.RPC.ContractControllerTest do expected_result = [ %{ - "Address" => "", - "SourceCode" => "", - "ABI" => "Contract source code not verified", - "ContractName" => "", - "CompilerVersion" => "", - "OptimizationUsed" => "", - "DecompiledSourceCode" => "", - "DecompilerVersion" => "", - "ConstructorArguments" => "", - "EVMVersion" => "", - "ExternalLibraries" => "", - "OptimizationRuns" => "", - "FileName" => "", - "IsProxy" => "false" + "Address" => "0x8bf38d4764929064f2d4d3a56520a76ab3df415b" } ] From f01073dfbe0f6453e56eb9f6609a8abb9d35c8cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:31:57 +0000 Subject: [PATCH 399/723] Bump jest from 29.0.2 to 29.0.3 in /apps/block_scout_web/assets Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.0.2 to 29.0.3. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.0.3/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 914 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 458 insertions(+), 458 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 8aee2bff5150..330082cffccc 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -79,7 +79,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.2", + "jest": "^29.0.3", "jest-environment-jsdom": "^29.0.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", @@ -2434,16 +2434,16 @@ } }, "node_modules/@jest/console": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.2.tgz", - "integrity": "sha512-Fv02ijyhF4D/Wb3DvZO3iBJQz5DnzpJEIDBDbvje8Em099N889tNMUnBw7SalmSuOI+NflNG40RA1iK71kImPw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", + "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", "slash": "^3.0.0" }, "engines": { @@ -2521,16 +2521,16 @@ } }, "node_modules/@jest/core": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.2.tgz", - "integrity": "sha512-imP5M6cdpHEOkmcuFYZuM5cTG1DAF7ZlVNCq1+F7kbqme2Jcl+Kh4M78hihM76DJHNkurbv4UVOnejGxBKEmww==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", + "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", "dev": true, "dependencies": { - "@jest/console": "^29.0.2", - "@jest/reporters": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/reporters": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -2538,20 +2538,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.2", - "jest-haste-map": "^29.0.2", - "jest-message-util": "^29.0.2", + "jest-config": "^29.0.3", + "jest-haste-map": "^29.0.3", + "jest-message-util": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-resolve-dependencies": "^29.0.2", - "jest-runner": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", - "jest-watcher": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-resolve-dependencies": "^29.0.3", + "jest-runner": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", + "jest-watcher": "^29.0.3", "micromatch": "^4.0.4", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -2653,22 +2653,22 @@ } }, "node_modules/@jest/expect": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.2.tgz", - "integrity": "sha512-y/3geZ92p2/zovBm/F+ZjXUJ3thvT9IRzD6igqaWskFE2aR0idD+N/p5Lj/ZautEox/9RwEc6nqergebeh72uQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", + "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", "dev": true, "dependencies": { - "expect": "^29.0.2", - "jest-snapshot": "^29.0.2" + "expect": "^29.0.3", + "jest-snapshot": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.2.tgz", - "integrity": "sha512-+wcQF9khXKvAEi8VwROnCWWmHfsJYCZAs5dmuMlJBKk57S6ZN2/FQMIlo01F29fJyT8kV/xblE7g3vkIdTLOjw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", + "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0" @@ -2695,31 +2695,31 @@ } }, "node_modules/@jest/globals": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.2.tgz", - "integrity": "sha512-4hcooSNJCVXuTu07/VJwCWW6HTnjLtQdqlcGisK6JST7z2ixa8emw4SkYsOk7j36WRc2ZUEydlUePnOIOTCNXg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", + "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.2", - "@jest/expect": "^29.0.2", - "@jest/types": "^29.0.2", - "jest-mock": "^29.0.2" + "@jest/environment": "^29.0.3", + "@jest/expect": "^29.0.3", + "@jest/types": "^29.0.3", + "jest-mock": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.2.tgz", - "integrity": "sha512-Kr41qejRQHHkCgWHC9YwSe7D5xivqP4XML+PvgwsnRFaykKdNflDUb4+xLXySOU+O/bPkVdFpGzUpVNSJChCrw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", + "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -2732,9 +2732,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", + "jest-worker": "^29.0.3", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -2812,9 +2812,9 @@ } }, "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "dependencies": { "@types/node": "*", @@ -2879,13 +2879,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.2.tgz", - "integrity": "sha512-b5rDc0lLL6Kx73LyCx6370k9uZ8o5UKdCpMS6Za3ke7H9y8PtAU305y6TeghpBmf2In8p/qqi3GpftgzijSsNw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", + "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", "dev": true, "dependencies": { - "@jest/console": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/types": "^29.0.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -2894,14 +2894,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.2.tgz", - "integrity": "sha512-fsyZqHBlXNMv5ZqjQwCuYa2pskXCO0DVxh5aaVCuAtwzHuYEGrhordyEncBLQNuCGQSYgElrEEmS+7wwFnnMKw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", + "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.2", + "@jest/test-result": "^29.0.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "slash": "^3.0.0" }, "engines": { @@ -2909,22 +2909,22 @@ } }, "node_modules/@jest/transform": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.2.tgz", - "integrity": "sha512-lajVQx2AnsR+Pa17q2zR7eikz2PkPs1+g/qPbZkqQATeS/s6eT55H+yHcsLfuI/0YQ/4VSBepSu3bOX+44q0aA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", + "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.2", + "jest-util": "^29.0.3", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -4498,12 +4498,12 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/babel-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.2.tgz", - "integrity": "sha512-yTu4/WSi/HzarjQtrJSwV+/0maoNt+iP0DmpvFJdv9yY+5BuNle8TbheHzzcSWj5gIHfuhpbLYHWRDYhWKyeKQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", + "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", "dev": true, "dependencies": { - "@jest/transform": "^29.0.2", + "@jest/transform": "^29.0.3", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.0.2", @@ -8434,16 +8434,16 @@ } }, "node_modules/expect": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.2.tgz", - "integrity": "sha512-JeJlAiLKn4aApT4pzUXBVxl3NaZidWIOdg//smaIlP9ZMBDkHZGFd9ubphUZP9pUyDEo7bC6M0IIZR51o75qQw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", + "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.0.2", + "@jest/expect-utils": "^29.0.3", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2" + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10365,15 +10365,15 @@ } }, "node_modules/jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.2.tgz", - "integrity": "sha512-enziNbNUmXTcTaTP/Uq5rV91r0Yqy2UKzLUIabxMpGm9YHz8qpbJhiRnNVNvm6vzWfzt/0o97NEHH8/3udoClA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", + "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", "dev": true, "dependencies": { - "@jest/core": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/core": "^29.0.3", + "@jest/types": "^29.0.3", "import-local": "^3.0.2", - "jest-cli": "^29.0.2" + "jest-cli": "^29.0.3" }, "bin": { "jest": "bin/jest.js" @@ -10404,28 +10404,28 @@ } }, "node_modules/jest-circus": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.2.tgz", - "integrity": "sha512-YTPEsoE1P1X0bcyDQi3QIkpt2Wl9om9k2DQRuLFdS5x8VvAKSdYAVJufgvudhnKgM8WHvvAzhBE+1DRQB8x1CQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", + "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.2", - "@jest/expect": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/expect": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.2", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", + "jest-each": "^29.0.3", + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", "p-limit": "^3.1.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -10504,21 +10504,21 @@ } }, "node_modules/jest-cli": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.2.tgz", - "integrity": "sha512-tlf8b+4KcUbBGr25cywIi3+rbZ4+G+SiG8SvY552m9sRZbXPafdmQRyeVE/C/R8K+TiBAMrTIUmV2SlStRJ40g==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", + "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", "dev": true, "dependencies": { - "@jest/core": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/core": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-config": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -10608,31 +10608,31 @@ } }, "node_modules/jest-config": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.2.tgz", - "integrity": "sha512-RU4gzeUNZAFktYVzDGimDxeYoaiTnH100jkYYZgldqFamaZukF0IqmFx8+QrzVeEWccYg10EEJT3ox1Dq5b74w==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", + "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.2", - "@jest/types": "^29.0.2", - "babel-jest": "^29.0.2", + "@jest/test-sequencer": "^29.0.3", + "@jest/types": "^29.0.3", + "babel-jest": "^29.0.3", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.2", - "jest-environment-node": "^29.0.2", + "jest-circus": "^29.0.3", + "jest-environment-node": "^29.0.3", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-runner": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-runner": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -10723,15 +10723,15 @@ } }, "node_modules/jest-diff": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.2.tgz", - "integrity": "sha512-b9l9970sa1rMXH1owp2Woprmy42qIwwll/htsw4Gf7+WuSp5bZxNhkKHDuCGKL+HoHn1KhcC+tNEeAPYBkD2Jg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", + "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", "dev": true, "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10820,16 +10820,16 @@ } }, "node_modules/jest-each": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.2.tgz", - "integrity": "sha512-+sA9YjrJl35iCg0W0VCrgCVj+wGhDrrKQ+YAqJ/DHBC4gcDFAeePtRRhpJnX9gvOZ63G7gt52pwp2PesuSEx0Q==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", + "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.2", - "pretty-format": "^29.0.2" + "jest-util": "^29.0.3", + "pretty-format": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10925,17 +10925,17 @@ } }, "node_modules/jest-environment-node": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.2.tgz", - "integrity": "sha512-4Fv8GXVCToRlMzDO94gvA8iOzKxQ7rhAbs8L+j8GPyTxGuUiYkV+63LecGeVdVhsL2KXih1sKnoqmH6tp89J7Q==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", + "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2" + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -10951,20 +10951,20 @@ } }, "node_modules/jest-haste-map": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.2.tgz", - "integrity": "sha512-SOorh2ysQ0fe8gsF4gaUDhoMIWAvi2hXOkwThEO48qT3JqA8GLAUieQcIvdSEd6M0scRDe1PVmKc5tXR3Z0U0A==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", + "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-util": "^29.0.3", + "jest-worker": "^29.0.3", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -10985,9 +10985,9 @@ } }, "node_modules/jest-haste-map/node_modules/jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "dependencies": { "@types/node": "*", @@ -11014,28 +11014,28 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.2.tgz", - "integrity": "sha512-5f0493qDeAxjUldkBSQg5D1cLadRgZVyWpTQvfJeQwQUpHQInE21AyVHVv64M7P2Ue8Z5EZ4BAcoDS/dSPPgMw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", + "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", "dev": true, "dependencies": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.2.tgz", - "integrity": "sha512-s62YkHFBfAx0JLA2QX1BlnCRFwHRobwAv2KP1+YhjzF6ZCbCVrf1sG8UJyn62ZUsDaQKpoo86XMTjkUyO5aWmQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", + "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.0.2", + "jest-diff": "^29.0.3", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11241,17 +11241,17 @@ } }, "node_modules/jest-resolve": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.2.tgz", - "integrity": "sha512-V3uLjSA+EHxLtjIDKTBXnY71hyx+8lusCqPXvqzkFO1uCGvVpjBfuOyp+KOLBNSuY61kM2jhepiMwt4eiJS+Vw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", + "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -11261,13 +11261,13 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.2.tgz", - "integrity": "sha512-fSAu6eIG7wtGdnPJUkVVdILGzYAP9Dj/4+zvC8BrGe8msaUMJ9JeygU0Hf9+Uor6/icbuuzQn5See1uajLnAqg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", + "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", "dev": true, "dependencies": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.2" + "jest-snapshot": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11344,30 +11344,30 @@ } }, "node_modules/jest-runner": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.2.tgz", - "integrity": "sha512-+D82iPZejI8t+SfduOO1deahC/QgLFf8aJBO++Znz3l2ETtOMdM7K4ATsGWzCFnTGio5yHaRifg1Su5Ybza5Nw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", + "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", "dev": true, "dependencies": { - "@jest/console": "^29.0.2", - "@jest/environment": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/environment": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.2", - "jest-haste-map": "^29.0.2", - "jest-leak-detector": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-resolve": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-util": "^29.0.2", - "jest-watcher": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-environment-node": "^29.0.3", + "jest-haste-map": "^29.0.3", + "jest-leak-detector": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-resolve": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-util": "^29.0.3", + "jest-watcher": "^29.0.3", + "jest-worker": "^29.0.3", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -11434,9 +11434,9 @@ } }, "node_modules/jest-runner/node_modules/jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "dependencies": { "@types/node": "*", @@ -11485,31 +11485,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.2.tgz", - "integrity": "sha512-DO6F81LX4okOgjJLkLySv10E5YcV5NHUbY1ZqAUtofxdQE+q4hjH0P2gNsY8x3z3sqgw7O/+919SU4r18Fcuig==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", + "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/globals": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/globals": "^29.0.3", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-mock": "^29.0.2", + "jest-haste-map": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-mock": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -11588,9 +11588,9 @@ } }, "node_modules/jest-snapshot": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.2.tgz", - "integrity": "sha512-26C4PzGKaX5gkoKg8UzYGVy2HPVcTaROSkf0gwnHu3lGeTB7bAIJBovvVPZoiJ20IximJELQs/r8WSDRCuGX2A==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", + "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -11599,23 +11599,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/expect-utils": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.2", + "expect": "^29.0.3", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.2", + "jest-diff": "^29.0.3", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.2", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", + "jest-haste-map": "^29.0.3", + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "semver": "^7.3.5" }, "engines": { @@ -11795,17 +11795,17 @@ } }, "node_modules/jest-validate": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.2.tgz", - "integrity": "sha512-AeRKm7cEucSy7tr54r3LhiGIXYvOILUwBM1S7jQkKs6YelwAlWKsmZGVrQR7uwsd31rBTnR5NQkODi1Z+6TKIQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", + "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -11894,18 +11894,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.2.tgz", - "integrity": "sha512-ds2bV0oyUdYoyrUTv4Ga5uptz4cEvmmP/JzqDyzZZanvrIn8ipxg5l3SDOAIiyuAx1VdHd2FBzeXPFO5KPH8vQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", + "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.2", + "jest-util": "^29.0.3", "string-length": "^4.0.1" }, "engines": { @@ -20319,16 +20319,16 @@ "dev": true }, "@jest/console": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.2.tgz", - "integrity": "sha512-Fv02ijyhF4D/Wb3DvZO3iBJQz5DnzpJEIDBDbvje8Em099N889tNMUnBw7SalmSuOI+NflNG40RA1iK71kImPw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", + "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", "slash": "^3.0.0" }, "dependencies": { @@ -20384,16 +20384,16 @@ } }, "@jest/core": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.2.tgz", - "integrity": "sha512-imP5M6cdpHEOkmcuFYZuM5cTG1DAF7ZlVNCq1+F7kbqme2Jcl+Kh4M78hihM76DJHNkurbv4UVOnejGxBKEmww==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", + "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", "dev": true, "requires": { - "@jest/console": "^29.0.2", - "@jest/reporters": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/reporters": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -20401,20 +20401,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.2", - "jest-haste-map": "^29.0.2", - "jest-message-util": "^29.0.2", + "jest-config": "^29.0.3", + "jest-haste-map": "^29.0.3", + "jest-message-util": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-resolve-dependencies": "^29.0.2", - "jest-runner": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", - "jest-watcher": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-resolve-dependencies": "^29.0.3", + "jest-runner": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", + "jest-watcher": "^29.0.3", "micromatch": "^4.0.4", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -20483,19 +20483,19 @@ } }, "@jest/expect": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.2.tgz", - "integrity": "sha512-y/3geZ92p2/zovBm/F+ZjXUJ3thvT9IRzD6igqaWskFE2aR0idD+N/p5Lj/ZautEox/9RwEc6nqergebeh72uQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", + "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", "dev": true, "requires": { - "expect": "^29.0.2", - "jest-snapshot": "^29.0.2" + "expect": "^29.0.3", + "jest-snapshot": "^29.0.3" } }, "@jest/expect-utils": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.2.tgz", - "integrity": "sha512-+wcQF9khXKvAEi8VwROnCWWmHfsJYCZAs5dmuMlJBKk57S6ZN2/FQMIlo01F29fJyT8kV/xblE7g3vkIdTLOjw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", + "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", "dev": true, "requires": { "jest-get-type": "^29.0.0" @@ -20516,28 +20516,28 @@ } }, "@jest/globals": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.2.tgz", - "integrity": "sha512-4hcooSNJCVXuTu07/VJwCWW6HTnjLtQdqlcGisK6JST7z2ixa8emw4SkYsOk7j36WRc2ZUEydlUePnOIOTCNXg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", + "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", "dev": true, "requires": { - "@jest/environment": "^29.0.2", - "@jest/expect": "^29.0.2", - "@jest/types": "^29.0.2", - "jest-mock": "^29.0.2" + "@jest/environment": "^29.0.3", + "@jest/expect": "^29.0.3", + "@jest/types": "^29.0.3", + "jest-mock": "^29.0.3" } }, "@jest/reporters": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.2.tgz", - "integrity": "sha512-Kr41qejRQHHkCgWHC9YwSe7D5xivqP4XML+PvgwsnRFaykKdNflDUb4+xLXySOU+O/bPkVdFpGzUpVNSJChCrw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", + "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -20550,9 +20550,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", + "jest-worker": "^29.0.3", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -20601,9 +20601,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "requires": { "@types/node": "*", @@ -20654,46 +20654,46 @@ } }, "@jest/test-result": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.2.tgz", - "integrity": "sha512-b5rDc0lLL6Kx73LyCx6370k9uZ8o5UKdCpMS6Za3ke7H9y8PtAU305y6TeghpBmf2In8p/qqi3GpftgzijSsNw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", + "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", "dev": true, "requires": { - "@jest/console": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/types": "^29.0.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.2.tgz", - "integrity": "sha512-fsyZqHBlXNMv5ZqjQwCuYa2pskXCO0DVxh5aaVCuAtwzHuYEGrhordyEncBLQNuCGQSYgElrEEmS+7wwFnnMKw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", + "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", "dev": true, "requires": { - "@jest/test-result": "^29.0.2", + "@jest/test-result": "^29.0.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.2.tgz", - "integrity": "sha512-lajVQx2AnsR+Pa17q2zR7eikz2PkPs1+g/qPbZkqQATeS/s6eT55H+yHcsLfuI/0YQ/4VSBepSu3bOX+44q0aA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", + "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.2", + "jest-util": "^29.0.3", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -22028,12 +22028,12 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "babel-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.2.tgz", - "integrity": "sha512-yTu4/WSi/HzarjQtrJSwV+/0maoNt+iP0DmpvFJdv9yY+5BuNle8TbheHzzcSWj5gIHfuhpbLYHWRDYhWKyeKQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", + "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", "dev": true, "requires": { - "@jest/transform": "^29.0.2", + "@jest/transform": "^29.0.3", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.0.2", @@ -25126,16 +25126,16 @@ "dev": true }, "expect": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.2.tgz", - "integrity": "sha512-JeJlAiLKn4aApT4pzUXBVxl3NaZidWIOdg//smaIlP9ZMBDkHZGFd9ubphUZP9pUyDEo7bC6M0IIZR51o75qQw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", + "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", "dev": true, "requires": { - "@jest/expect-utils": "^29.0.2", + "@jest/expect-utils": "^29.0.3", "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2" + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3" } }, "express": { @@ -26563,15 +26563,15 @@ } }, "jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.2.tgz", - "integrity": "sha512-enziNbNUmXTcTaTP/Uq5rV91r0Yqy2UKzLUIabxMpGm9YHz8qpbJhiRnNVNvm6vzWfzt/0o97NEHH8/3udoClA==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", + "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", "dev": true, "requires": { - "@jest/core": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/core": "^29.0.3", + "@jest/types": "^29.0.3", "import-local": "^3.0.2", - "jest-cli": "^29.0.2" + "jest-cli": "^29.0.3" } }, "jest-changed-files": { @@ -26585,28 +26585,28 @@ } }, "jest-circus": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.2.tgz", - "integrity": "sha512-YTPEsoE1P1X0bcyDQi3QIkpt2Wl9om9k2DQRuLFdS5x8VvAKSdYAVJufgvudhnKgM8WHvvAzhBE+1DRQB8x1CQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", + "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", "dev": true, "requires": { - "@jest/environment": "^29.0.2", - "@jest/expect": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/expect": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.2", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", + "jest-each": "^29.0.3", + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", "p-limit": "^3.1.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -26663,21 +26663,21 @@ } }, "jest-cli": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.2.tgz", - "integrity": "sha512-tlf8b+4KcUbBGr25cywIi3+rbZ4+G+SiG8SvY552m9sRZbXPafdmQRyeVE/C/R8K+TiBAMrTIUmV2SlStRJ40g==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", + "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", "dev": true, "requires": { - "@jest/core": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/core": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-config": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -26734,31 +26734,31 @@ } }, "jest-config": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.2.tgz", - "integrity": "sha512-RU4gzeUNZAFktYVzDGimDxeYoaiTnH100jkYYZgldqFamaZukF0IqmFx8+QrzVeEWccYg10EEJT3ox1Dq5b74w==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", + "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.2", - "@jest/types": "^29.0.2", - "babel-jest": "^29.0.2", + "@jest/test-sequencer": "^29.0.3", + "@jest/types": "^29.0.3", + "babel-jest": "^29.0.3", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.2", - "jest-environment-node": "^29.0.2", + "jest-circus": "^29.0.3", + "jest-environment-node": "^29.0.3", "jest-get-type": "^29.0.0", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-runner": "^29.0.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-runner": "^29.0.3", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -26815,15 +26815,15 @@ } }, "jest-diff": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.2.tgz", - "integrity": "sha512-b9l9970sa1rMXH1owp2Woprmy42qIwwll/htsw4Gf7+WuSp5bZxNhkKHDuCGKL+HoHn1KhcC+tNEeAPYBkD2Jg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", + "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^29.0.0", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "dependencies": { "ansi-styles": { @@ -26887,16 +26887,16 @@ } }, "jest-each": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.2.tgz", - "integrity": "sha512-+sA9YjrJl35iCg0W0VCrgCVj+wGhDrrKQ+YAqJ/DHBC4gcDFAeePtRRhpJnX9gvOZ63G7gt52pwp2PesuSEx0Q==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", + "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", - "jest-util": "^29.0.2", - "pretty-format": "^29.0.2" + "jest-util": "^29.0.3", + "pretty-format": "^29.0.3" }, "dependencies": { "ansi-styles": { @@ -26967,17 +26967,17 @@ } }, "jest-environment-node": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.2.tgz", - "integrity": "sha512-4Fv8GXVCToRlMzDO94gvA8iOzKxQ7rhAbs8L+j8GPyTxGuUiYkV+63LecGeVdVhsL2KXih1sKnoqmH6tp89J7Q==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", + "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", "dev": true, "requires": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", - "jest-mock": "^29.0.2", - "jest-util": "^29.0.2" + "jest-mock": "^29.0.3", + "jest-util": "^29.0.3" } }, "jest-get-type": { @@ -26987,12 +26987,12 @@ "dev": true }, "jest-haste-map": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.2.tgz", - "integrity": "sha512-SOorh2ysQ0fe8gsF4gaUDhoMIWAvi2hXOkwThEO48qT3JqA8GLAUieQcIvdSEd6M0scRDe1PVmKc5tXR3Z0U0A==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", + "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", @@ -27000,8 +27000,8 @@ "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-util": "^29.0.3", + "jest-worker": "^29.0.3", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -27013,9 +27013,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "requires": { "@types/node": "*", @@ -27035,25 +27035,25 @@ } }, "jest-leak-detector": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.2.tgz", - "integrity": "sha512-5f0493qDeAxjUldkBSQg5D1cLadRgZVyWpTQvfJeQwQUpHQInE21AyVHVv64M7P2Ue8Z5EZ4BAcoDS/dSPPgMw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", + "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", "dev": true, "requires": { "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" } }, "jest-matcher-utils": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.2.tgz", - "integrity": "sha512-s62YkHFBfAx0JLA2QX1BlnCRFwHRobwAv2KP1+YhjzF6ZCbCVrf1sG8UJyn62ZUsDaQKpoo86XMTjkUyO5aWmQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", + "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.0.2", + "jest-diff": "^29.0.3", "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "dependencies": { "ansi-styles": { @@ -27199,17 +27199,17 @@ "dev": true }, "jest-resolve": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.2.tgz", - "integrity": "sha512-V3uLjSA+EHxLtjIDKTBXnY71hyx+8lusCqPXvqzkFO1uCGvVpjBfuOyp+KOLBNSuY61kM2jhepiMwt4eiJS+Vw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", + "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", + "jest-haste-map": "^29.0.3", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.2", - "jest-validate": "^29.0.2", + "jest-util": "^29.0.3", + "jest-validate": "^29.0.3", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -27267,40 +27267,40 @@ } }, "jest-resolve-dependencies": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.2.tgz", - "integrity": "sha512-fSAu6eIG7wtGdnPJUkVVdILGzYAP9Dj/4+zvC8BrGe8msaUMJ9JeygU0Hf9+Uor6/icbuuzQn5See1uajLnAqg==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", + "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", "dev": true, "requires": { "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.2" + "jest-snapshot": "^29.0.3" } }, "jest-runner": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.2.tgz", - "integrity": "sha512-+D82iPZejI8t+SfduOO1deahC/QgLFf8aJBO++Znz3l2ETtOMdM7K4ATsGWzCFnTGio5yHaRifg1Su5Ybza5Nw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", + "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", "dev": true, "requires": { - "@jest/console": "^29.0.2", - "@jest/environment": "^29.0.2", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/console": "^29.0.3", + "@jest/environment": "^29.0.3", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.2", - "jest-haste-map": "^29.0.2", - "jest-leak-detector": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-resolve": "^29.0.2", - "jest-runtime": "^29.0.2", - "jest-util": "^29.0.2", - "jest-watcher": "^29.0.2", - "jest-worker": "^29.0.2", + "jest-environment-node": "^29.0.3", + "jest-haste-map": "^29.0.3", + "jest-leak-detector": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-resolve": "^29.0.3", + "jest-runtime": "^29.0.3", + "jest-util": "^29.0.3", + "jest-watcher": "^29.0.3", + "jest-worker": "^29.0.3", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -27346,9 +27346,9 @@ "dev": true }, "jest-worker": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.2.tgz", - "integrity": "sha512-EyvBlYcvd2pg28yg5A3OODQnqK9LI1kitnGUZUG5/NYIeaRgewtYBKB5wlr7oXj8zPCkzev7EmnTCsrXK7V+Xw==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", + "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", "dev": true, "requires": { "@types/node": "*", @@ -27389,31 +27389,31 @@ } }, "jest-runtime": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.2.tgz", - "integrity": "sha512-DO6F81LX4okOgjJLkLySv10E5YcV5NHUbY1ZqAUtofxdQE+q4hjH0P2gNsY8x3z3sqgw7O/+919SU4r18Fcuig==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", + "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", "dev": true, "requires": { - "@jest/environment": "^29.0.2", - "@jest/fake-timers": "^29.0.2", - "@jest/globals": "^29.0.2", + "@jest/environment": "^29.0.3", + "@jest/fake-timers": "^29.0.3", + "@jest/globals": "^29.0.3", "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/test-result": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-mock": "^29.0.2", + "jest-haste-map": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-mock": "^29.0.3", "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.2", - "jest-snapshot": "^29.0.2", - "jest-util": "^29.0.2", + "jest-resolve": "^29.0.3", + "jest-snapshot": "^29.0.3", + "jest-util": "^29.0.3", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -27470,9 +27470,9 @@ } }, "jest-snapshot": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.2.tgz", - "integrity": "sha512-26C4PzGKaX5gkoKg8UzYGVy2HPVcTaROSkf0gwnHu3lGeTB7bAIJBovvVPZoiJ20IximJELQs/r8WSDRCuGX2A==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", + "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -27481,23 +27481,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.2", - "@jest/transform": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/expect-utils": "^29.0.3", + "@jest/transform": "^29.0.3", + "@jest/types": "^29.0.3", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.2", + "expect": "^29.0.3", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.2", + "jest-diff": "^29.0.3", "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.2", - "jest-matcher-utils": "^29.0.2", - "jest-message-util": "^29.0.2", - "jest-util": "^29.0.2", + "jest-haste-map": "^29.0.3", + "jest-matcher-utils": "^29.0.3", + "jest-message-util": "^29.0.3", + "jest-util": "^29.0.3", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.2", + "pretty-format": "^29.0.3", "semver": "^7.3.5" }, "dependencies": { @@ -27627,17 +27627,17 @@ } }, "jest-validate": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.2.tgz", - "integrity": "sha512-AeRKm7cEucSy7tr54r3LhiGIXYvOILUwBM1S7jQkKs6YelwAlWKsmZGVrQR7uwsd31rBTnR5NQkODi1Z+6TKIQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", + "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", "dev": true, "requires": { - "@jest/types": "^29.0.2", + "@jest/types": "^29.0.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.0.0", "leven": "^3.1.0", - "pretty-format": "^29.0.2" + "pretty-format": "^29.0.3" }, "dependencies": { "ansi-styles": { @@ -27698,18 +27698,18 @@ } }, "jest-watcher": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.2.tgz", - "integrity": "sha512-ds2bV0oyUdYoyrUTv4Ga5uptz4cEvmmP/JzqDyzZZanvrIn8ipxg5l3SDOAIiyuAx1VdHd2FBzeXPFO5KPH8vQ==", + "version": "29.0.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", + "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", "dev": true, "requires": { - "@jest/test-result": "^29.0.2", - "@jest/types": "^29.0.2", + "@jest/test-result": "^29.0.3", + "@jest/types": "^29.0.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^29.0.2", + "jest-util": "^29.0.3", "string-length": "^4.0.1" }, "dependencies": { diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6666f6362668..218d86d1412a 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -91,7 +91,7 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.1", "file-loader": "^6.2.0", - "jest": "^29.0.2", + "jest": "^29.0.3", "jest-environment-jsdom": "^29.0.3", "mini-css-extract-plugin": "^2.6.1", "postcss": "^8.4.16", From b5f45a08a2c0cc547b92516dcaa3389efd28d9e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 08:35:29 +0000 Subject: [PATCH 400/723] Bump css-minimizer-webpack-plugin in /apps/block_scout_web/assets Bumps [css-minimizer-webpack-plugin](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/releases) - [Changelog](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/css-minimizer-webpack-plugin/compare/v4.0.0...v4.1.0) --- updated-dependencies: - dependency-name: css-minimizer-webpack-plugin dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 17 ++++++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 546cdbacbe8b..d03f22947dfd 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -72,7 +72,7 @@ "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", - "css-minimizer-webpack-plugin": "^4.0.0", + "css-minimizer-webpack-plugin": "^4.1.0", "eslint": "^8.23.1", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", @@ -6107,9 +6107,9 @@ } }, "node_modules/css-minimizer-webpack-plugin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.0.0.tgz", - "integrity": "sha512-7ZXXRzRHvofv3Uac5Y+RkWRNo0ZMlcg8e9/OtrqUYmwDWJo+qs67GvdeFrXLsFb7czKNwjQhPkM0avlIYl+1nA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.1.0.tgz", + "integrity": "sha512-Zd+yz4nta4GXi3pMqF6skO8kjzuCUbr62z8SLMGZZtxWxTGTLopOiabPGNDEyjHCRhnhdA1EfHmqLa2Oekjtng==", "dev": true, "dependencies": { "cssnano": "^5.1.8", @@ -6141,6 +6141,9 @@ }, "esbuild": { "optional": true + }, + "lightningcss": { + "optional": true } } }, @@ -23274,9 +23277,9 @@ } }, "css-minimizer-webpack-plugin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.0.0.tgz", - "integrity": "sha512-7ZXXRzRHvofv3Uac5Y+RkWRNo0ZMlcg8e9/OtrqUYmwDWJo+qs67GvdeFrXLsFb7czKNwjQhPkM0avlIYl+1nA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.1.0.tgz", + "integrity": "sha512-Zd+yz4nta4GXi3pMqF6skO8kjzuCUbr62z8SLMGZZtxWxTGTLopOiabPGNDEyjHCRhnhdA1EfHmqLa2Oekjtng==", "dev": true, "requires": { "cssnano": "^5.1.8", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 46daf109a839..50f5f949558d 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -84,7 +84,7 @@ "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", - "css-minimizer-webpack-plugin": "^4.0.0", + "css-minimizer-webpack-plugin": "^4.1.0", "eslint": "^8.23.1", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", From 4deb9c8a0de4f40106237046a47f8ba2dd49626c Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 13 Sep 2022 13:32:26 +0300 Subject: [PATCH 401/723] Trigger release CI for production-optimism-bedrock-goerli-stg branch --- .../workflows/publish-docker-image-release.yml | 1 + CHANGELOG.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/publish-docker-image-release.yml b/.github/workflows/publish-docker-image-release.yml index e6f24999bf0a..c8907279dd8a 100644 --- a/.github/workflows/publish-docker-image-release.yml +++ b/.github/workflows/publish-docker-image-release.yml @@ -76,6 +76,7 @@ jobs: production-harmony-mainnet-shard-0-stg production-lukso-stg production-optimism-goerli-stg + production-optimism-bedrock-goerli-stg production-optimism-mainnet-stg production-optimism-stg production-rsk-stg diff --git a/CHANGELOG.md b/CHANGELOG.md index 72e991bd3606..989c7960aae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,24 @@ ### Chore +- [#6053](https://github.com/blockscout/blockscout/pull/6053) - Bump jest-environment-jsdom from 29.0.1 to 29.0.2 in /apps/block_scout_web/assets +- [#6055](https://github.com/blockscout/blockscout/pull/6055) - Bump @babel/core from 7.18.13 to 7.19.0 in /apps/block_scout_web/assets +- [#6054](https://github.com/blockscout/blockscout/pull/6054) - Bump jest from 29.0.1 to 29.0.2 in /apps/block_scout_web/assets +- [#6056](https://github.com/blockscout/blockscout/pull/6056) - Bump @babel/preset-env from 7.18.10 to 7.19.0 in /apps/block_scout_web/assets +- [#6061](https://github.com/blockscout/blockscout/pull/6061) - Discord badge and updated permalink +- [#6064](https://github.com/blockscout/blockscout/pull/6064) - Bump sweetalert2 from 11.4.29 to 11.4.31 in /apps/block_scout_web/assets +- [#6075](https://github.com/blockscout/blockscout/pull/6075) - Bump sweetalert2 from 11.4.31 to 11.4.32 in /apps/block_scout_web/assets +- [#6082](https://github.com/blockscout/blockscout/pull/6082) - Bump core-js from 3.25.0 to 3.25.1 in /apps/block_scout_web/assets +- [#6083](https://github.com/blockscout/blockscout/pull/6083) - Bump sass from 1.54.8 to 1.54.9 in /apps/block_scout_web/assets +- [#6095](https://github.com/blockscout/blockscout/pull/6095) - Bump jest-environment-jsdom from 29.0.2 to 29.0.3 in /apps/block_scout_web/assets +- [#6096](https://github.com/blockscout/blockscout/pull/6096) - Bump exvcr from 0.13.3 to 0.13.4 +- [#6101](https://github.com/blockscout/blockscout/pull/6101) - Bump ueberauth from 0.10.1 to 0.10.2 +- [#6102](https://github.com/blockscout/blockscout/pull/6102) - Bump eslint from 8.23.0 to 8.23.1 in /apps/block_scout_web/assets +- [#6098](https://github.com/blockscout/blockscout/pull/6098) - Bump ex_json_schema from 0.9.1 to 0.9.2 +- [#6097](https://github.com/blockscout/blockscout/pull/6097) - Bump autoprefixer from 10.4.8 to 10.4.9 in /apps/block_scout_web/assets +- [#6099](https://github.com/blockscout/blockscout/pull/6099) - Bump jest from 29.0.2 to 29.0.3 in /apps/block_scout_web/assets +- [#6103](https://github.com/blockscout/blockscout/pull/6103) - Bump css-minimizer-webpack-plugin from 4.0.0 to 4.1.0 in /apps/block_scout_web/assets + ## 4.1.8-beta ### Features From ee414cc1dd58a7989299734e89ba8c75289d5ce4 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Tue, 13 Sep 2022 15:20:37 +0400 Subject: [PATCH 402/723] Fix token instance async_fetch --- apps/indexer/lib/indexer/fetcher/token_instance.ex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/indexer/lib/indexer/fetcher/token_instance.ex b/apps/indexer/lib/indexer/fetcher/token_instance.ex index 2a5bbf598f9a..ea2193727ad4 100644 --- a/apps/indexer/lib/indexer/fetcher/token_instance.ex +++ b/apps/indexer/lib/indexer/fetcher/token_instance.ex @@ -103,9 +103,13 @@ defmodule Indexer.Fetcher.TokenInstance do def async_fetch(token_transfers) when is_list(token_transfers) do data = token_transfers - |> Enum.reject(fn token_transfer -> is_nil(token_transfer.token_id) end) + |> Enum.reject(fn token_transfer -> is_nil(token_transfer.token_id) and is_nil(token_transfer.token_ids) end) |> Enum.map(fn token_transfer -> - %{contract_address_hash: token_transfer.token_contract_address_hash, token_id: token_transfer.token_id} + %{ + contract_address_hash: token_transfer.token_contract_address_hash, + token_id: token_transfer.token_id, + token_ids: token_transfer.token_ids + } end) |> Enum.uniq() From faa4bbcd6f4681b70ffdf4d5fc8a619c1056e055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 13 Sep 2022 15:06:00 +0300 Subject: [PATCH 403/723] Add tags to fallback render of coin balance history --- CHANGELOG.md | 1 + .../controllers/address_coin_balance_controller.ex | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 989c7960aae5..c0b6876553fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes - [#6094](https://github.com/blockscout/blockscout/pull/6094) - Fix inconsistent behaviour of `getsourcecode` method +- [#6106](https://github.com/blockscout/blockscout/pull/6106) - Fix 500 response on `/coin-balance` for empty address ### Chore diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex index bde343dd126e..6f8f2202456f 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex @@ -104,7 +104,8 @@ defmodule BlockScoutWeb.AddressCoinBalanceController do coin_balance_status: nil, exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}), - current_path: Controller.current_full_path(conn) + current_path: Controller.current_full_path(conn), + tags: get_address_tags(address_hash, current_user(conn)) ) _ -> From 4a20934665dae9f2a8cfd39e521f030684bbb75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 13 Sep 2022 16:21:15 +0300 Subject: [PATCH 404/723] Invalidate dialyzer cache --- .github/workflows/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 3cbac5697887..9da495261d09 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -156,7 +156,7 @@ jobs: id: dialyzer-cache with: path: priv/plts - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" From 83454bbe9481bdb460c37533098b15616c9c85ac Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Tue, 13 Sep 2022 16:46:27 +0300 Subject: [PATCH 405/723] Add preload for :created_contract_address (#6105) Co-authored-by: Victor Baranov --- CHANGELOG.md | 1 + .../lib/block_scout_web/channels/address_channel.ex | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7265e8d70b9..0739ab2bb30c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes - [#6094](https://github.com/blockscout/blockscout/pull/6094) - Fix inconsistent behaviour of `getsourcecode` method +- [#6105](https://github.com/blockscout/blockscout/pull/6105) - Fix some token transfers broadcasting - [#6106](https://github.com/blockscout/blockscout/pull/6106) - Fix 500 response on `/coin-balance` for empty address ### Chore diff --git a/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex b/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex index 00eb13bf5f66..2a2816d8be1d 100644 --- a/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex +++ b/apps/block_scout_web/lib/block_scout_web/channels/address_channel.ex @@ -201,7 +201,13 @@ defmodule BlockScoutWeb.AddressChannel do transaction = Transaction |> Repo.get_by(hash: token_transfer.transaction_hash) - |> Repo.preload([:from_address, :to_address, :block, token_transfers: [:from_address, :to_address, :token]]) + |> Repo.preload([ + :from_address, + :to_address, + :block, + :created_contract_address, + token_transfers: [:from_address, :to_address, :token] + ]) rendered = View.render_to_string( From 559480a43c2c2467c3b43c4a986288d52bdc72e7 Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Tue, 13 Sep 2022 20:19:41 +0300 Subject: [PATCH 406/723] Improve fetching media type for NFT (#6091) * Improve fetching media type for NFT * Remove duplicated dependency * Fix changelog --- CHANGELOG.md | 1 + .../instance/overview/_details.html.eex | 2 +- .../tokens/inventory/_token.html.eex | 2 +- .../views/tokens/instance/overview_view.ex | 30 +- apps/block_scout_web/mix.exs | 3 +- apps/block_scout_web/priv/gettext/default.pot | 404 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 404 +++++++++--------- 7 files changed, 424 insertions(+), 422 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0739ab2bb30c..11876594442b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixes +- [#6091](https://github.com/blockscout/blockscout/pull/6091) - Improve fetching media type for NFT - [#6094](https://github.com/blockscout/blockscout/pull/6094) - Fix inconsistent behaviour of `getsourcecode` method - [#6105](https://github.com/blockscout/blockscout/pull/6105) - Fix some token transfers broadcasting - [#6106](https://github.com/blockscout/blockscout/pull/6106) - Fix 500 response on `/coin-balance` for empty address diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex index 7b387b828272..bb2b4d71ca21 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex @@ -62,7 +62,7 @@
    <%= if media_type(media_src(@token_instance.instance, true)) == "video" do %> -
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex index d0c1adf6367f..9b3f6a70f764 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_token_balances.html.eex @@ -47,7 +47,7 @@ placeholder: gettext("Search tokens") ) %> - <%= if Enum.any?(@token_balances, fn {token_balance, _} -> token_balance.token.type == "ERC-721" end) do %> + <%= if Enum.any?(@token_balances, fn {_token_balance, token} -> token.type == "ERC-721" end) do %> <%= render( "_tokens.html", conn: @conn, @@ -56,7 +56,7 @@ ) %> <% end %> - <%= if Enum.any?(@token_balances, fn {token_balance, _} -> token_balance.token.type == "ERC-1155" end) do %> + <%= if Enum.any?(@token_balances, fn {_token_balance, token} -> token.type == "ERC-1155" end) do %> <%= render( "_tokens.html", conn: @conn, @@ -65,7 +65,7 @@ ) %> <% end %> - <%= if Enum.any?(@token_balances, fn {token_balance, _} -> token_balance.token.type == "ERC-20" end) do %> + <%= if Enum.any?(@token_balances, fn {_token_balance, token} -> token.type == "ERC-20" end) do %> <%= render( "_tokens.html", conn: @conn, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex index 753460e78fa5..ceaf90505ae2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_balance/_tokens.html.eex @@ -7,13 +7,13 @@
    <% path = cond do - token_balance.token_type == "ERC-721" && !is_nil(token_balance.token_id) -> token_instance_path(@conn, :show, token_balance.token.contract_address_hash, to_string(token_balance.token_id)) - token_balance.token_type == "ERC-1155" && !is_nil(token_balance.token_id) -> token_instance_path(@conn, :show, token_balance.token.contract_address_hash, to_string(token_balance.token_id)) - true -> token_path(@conn, :show, to_string(token_balance.token.contract_address_hash)) + token_balance.token_type == "ERC-721" && !is_nil(token_balance.token_id) -> token_instance_path(@conn, :show, token.contract_address_hash, to_string(token_balance.token_id)) + token_balance.token_type == "ERC-1155" && !is_nil(token_balance.token_id) -> token_instance_path(@conn, :show, token.contract_address_hash, to_string(token_balance.token_id)) + true -> token_path(@conn, :show, to_string(token.contract_address_hash)) end %> <%= link( @@ -34,16 +34,16 @@ <% end %>

    "><%= token_name(token) %>

    - <%= if token_balance.token.usd_value do %> + <%= if token.usd_value do %>

    - +

    <% end %>
    @@ -52,7 +52,7 @@ <%= if token_balance.token_type == "ERC-721" && !is_nil(token_balance.token_id) do %> 1 <% else %> - <%= format_according_to_decimals(token_balance.value, token_balance.token.decimals) %> <%= token_symbol(token_balance.token) %> + <%= format_according_to_decimals(token_balance.value, token.decimals) %> <%= token_symbol(token) %> <% end %> <%= if (token_balance.token_type == "ERC-721" && !is_nil(token_balance.token_id)) or token_balance.token_type == "ERC-1155" do %> <%= " TokenID " <> to_string(token_balance.token_id) %> diff --git a/apps/block_scout_web/lib/block_scout_web/views/abi_encoded_value_view.ex b/apps/block_scout_web/lib/block_scout_web/views/abi_encoded_value_view.ex index 0f09ce2302fc..77f4fa3e0599 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/abi_encoded_value_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/abi_encoded_value_view.ex @@ -27,6 +27,19 @@ defmodule BlockScoutWeb.ABIEncodedValueView do :error end + def value_json(type, value) do + decoded_type = FunctionSelector.decode_type(type) + + do_value_json(decoded_type, value) + rescue + exception -> + Logger.warn(fn -> + ["Error determining value json for #{inspect(type)}: ", Exception.format(:error, exception)] + end) + + nil + end + def copy_text(type, value) do decoded_type = FunctionSelector.decode_type(type) @@ -145,5 +158,56 @@ defmodule BlockScoutWeb.ABIEncodedValueView do defp base_value_html(_, value, _no_links), do: HTML.html_escape(value) + defp do_value_json({:bytes, _}, value) do + do_value_json(:bytes, value) + end + + defp do_value_json({:array, type, _}, value) do + do_value_json({:array, type}, value) + end + + defp do_value_json({:array, type}, value) do + values = + Enum.map(value, fn inner_value -> + do_value_json(type, inner_value) + end) + + values + end + + defp do_value_json({:tuple, types}, values) do + values_list = + values + |> Tuple.to_list() + |> Enum.with_index() + |> Enum.map(fn {value, i} -> + do_value_json(Enum.at(types, i), value) + end) + + values_list + end + + defp do_value_json(type, value) do + base_value_json(type, value) + end + + defp base_value_json(_, {:dynamic, value}) do + hex(value) + end + + defp base_value_json(:address, value) do + hex(value) + end + + defp base_value_json(:address_text, value) do + hex(value) + end + + defp base_value_json(:bytes, value) do + hex(value) + end + + defp base_value_json(_, value), do: value + defp hex(value), do: "0x" <> Base.encode16(value, case: :lower) end diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_token_balance_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_token_balance_view.ex index 47d6525b0489..d070ddf2fd72 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_token_balance_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_token_balance_view.ex @@ -11,7 +11,7 @@ defmodule BlockScoutWeb.AddressTokenBalanceView do end def filter_by_type(token_balances, type) do - Enum.filter(token_balances, fn {token_balance, _} -> token_balance.token.type == type end) + Enum.filter(token_balances, fn {_token_balance, token} -> token.type == type end) end @doc """ @@ -30,15 +30,23 @@ defmodule BlockScoutWeb.AddressTokenBalanceView do def sort_by_usd_value_and_name(token_balances) do token_balances |> Enum.sort(fn {token_balance1, token1}, {token_balance2, token2} -> - usd_value1 = token_balance1.token.usd_value - usd_value2 = token_balance2.token.usd_value + usd_value1 = token1.usd_value + usd_value2 = token2.usd_value token_name1 = token1.name token_name2 = token2.name sort_by_name = sort_2_tokens_by_name(token_name1, token_name2) - sort_2_tokens_by_value_desc_and_name(token_balance1, token_balance2, usd_value1, usd_value2, sort_by_name) + sort_2_tokens_by_value_desc_and_name( + token_balance1, + token_balance2, + usd_value1, + usd_value2, + sort_by_name, + token1, + token2 + ) end) end @@ -58,9 +66,17 @@ defmodule BlockScoutWeb.AddressTokenBalanceView do end end - defp sort_2_tokens_by_value_desc_and_name(token_balance1, token_balance2, usd_value1, usd_value2, sort_by_name) + defp sort_2_tokens_by_value_desc_and_name( + token_balance1, + token_balance2, + usd_value1, + usd_value2, + sort_by_name, + token1, + token2 + ) when not is_nil(usd_value1) and not is_nil(usd_value2) do - case Decimal.compare(Chain.balance_in_usd(token_balance1), Chain.balance_in_usd(token_balance2)) do + case Decimal.compare(Chain.balance_in_usd(token_balance1, token1), Chain.balance_in_usd(token_balance2, token2)) do :gt -> true @@ -72,17 +88,41 @@ defmodule BlockScoutWeb.AddressTokenBalanceView do end end - defp sort_2_tokens_by_value_desc_and_name(_token_balance1, _token_balance2, usd_value1, usd_value2, _sort_by_name) + defp sort_2_tokens_by_value_desc_and_name( + _token_balance1, + _token_balance2, + usd_value1, + usd_value2, + _sort_by_name, + _token1, + _token2 + ) when not is_nil(usd_value1) and is_nil(usd_value2) do true end - defp sort_2_tokens_by_value_desc_and_name(_token_balance1, _token_balance2, usd_value1, usd_value2, _sort_by_name) + defp sort_2_tokens_by_value_desc_and_name( + _token_balance1, + _token_balance2, + usd_value1, + usd_value2, + _sort_by_name, + _token1, + _token2 + ) when is_nil(usd_value1) and not is_nil(usd_value2) do false end - defp sort_2_tokens_by_value_desc_and_name(_token_balance1, _token_balance2, usd_value1, usd_value2, sort_by_name) + defp sort_2_tokens_by_value_desc_and_name( + _token_balance1, + _token_balance2, + usd_value1, + usd_value2, + sort_by_name, + _token1, + _token2 + ) when is_nil(usd_value1) and is_nil(usd_value2) do sort_by_name end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex new file mode 100644 index 000000000000..54511abc0027 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex @@ -0,0 +1,59 @@ +defmodule BlockScoutWeb.API.V2.AddressView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView} + alias BlockScoutWeb.API.V2.Helper + + def render("message.json", assigns) do + ApiView.render("message.json", assigns) + end + + def render("address.json", %{address: address, conn: conn}) do + prepare_address(address, conn) + end + + def render("token_balances.json", %{token_balances: token_balances}) do + Enum.map(token_balances, &prepare_token_balance/1) + end + + def render("coin_balance.json", %{coin_balance: coin_balance}) do + prepare_coin_balance_history_entry(coin_balance) + end + + def render("coin_balances.json", %{coin_balances: coin_balances, next_page_params: next_page_params}) do + %{"items" => Enum.map(coin_balances, &prepare_coin_balance_history_entry/1), "next_page_params" => next_page_params} + end + + def render("coin_balances_by_day.json", %{coin_balances_by_day: coin_balances_by_day}) do + Enum.map(coin_balances_by_day, &prepare_coin_balance_history_by_day_entry/1) + end + + def prepare_address(address, conn \\ nil) do + Helper.address_with_info(conn, address, address.hash) + end + + def prepare_token_balance({token_balance, token}) do + %{ + "value" => token_balance.value, + "token" => TokenView.render("token.json", %{token: token}), + "token_id" => token_balance.token_id + } + end + + def prepare_coin_balance_history_entry(coin_balance) do + %{ + "transaction_hash" => coin_balance.transaction_hash, + "block_number" => coin_balance.block_number, + "delta" => coin_balance.delta, + "value" => coin_balance.value, + "block_timestamp" => coin_balance.block_timestamp + } + end + + def prepare_coin_balance_history_by_day_entry(coin_balance_by_day) do + %{ + "date" => coin_balance_by_day.date, + "value" => coin_balance_by_day.value + } + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_v2.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_v2.ex new file mode 100644 index 000000000000..6bd12a410332 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_v2.ex @@ -0,0 +1,9 @@ +defmodule BlockScoutWeb.API.V2 do + @moduledoc """ + API V2 context + """ + + def enabled? do + Application.get_env(:block_scout_web, __MODULE__)[:enabled] + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_view.ex new file mode 100644 index 000000000000..1fde984d4a41 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/api_view.ex @@ -0,0 +1,7 @@ +defmodule BlockScoutWeb.API.V2.ApiView do + def render("message.json", %{message: message}) do + %{ + "message" => message + } + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/block_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/block_view.ex new file mode 100644 index 000000000000..bddcddf08993 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/block_view.ex @@ -0,0 +1,106 @@ +defmodule BlockScoutWeb.API.V2.BlockView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.BlockView + alias BlockScoutWeb.API.V2.{ApiView, Helper} + alias Explorer.Chain + alias Explorer.Chain.Block + alias Explorer.Counters.BlockPriorityFeeCounter + + def render("message.json", assigns) do + ApiView.render("message.json", assigns) + end + + def render("blocks.json", %{blocks: blocks, next_page_params: next_page_params}) do + %{"items" => Enum.map(blocks, &prepare_block(&1, nil)), "next_page_params" => next_page_params} + end + + def render("blocks.json", %{blocks: blocks}) do + Enum.map(blocks, &prepare_block(&1, nil)) + end + + def render("block.json", %{block: block, conn: conn}) do + prepare_block(block, conn, true) + end + + def render("block.json", %{block: block, socket: _socket}) do + # single_block? set to true in order to prevent heavy fetching of reward type + prepare_block(block, nil, false) + end + + def prepare_block(block, conn, single_block? \\ false) do + burned_fee = Chain.burned_fees(block.transactions, block.base_fee_per_gas) + priority_fee = block.base_fee_per_gas && BlockPriorityFeeCounter.fetch(block.hash) + + tx_fees = Chain.txn_fees(block.transactions) + + %{ + "height" => block.number, + "timestamp" => block.timestamp, + "tx_count" => count_transactions(block), + "miner" => Helper.address_with_info(conn, block.miner, block.miner_hash), + "size" => block.size, + "hash" => block.hash, + "parent_hash" => block.parent_hash, + "difficulty" => block.difficulty, + "total_difficulty" => block.total_difficulty, + "gas_used" => block.gas_used, + "gas_limit" => block.gas_limit, + "nonce" => block.nonce, + "base_fee_per_gas" => block.base_fee_per_gas, + "burnt_fees" => burned_fee, + "priority_fee" => priority_fee, + "extra_data" => "TODO", + "uncles_hashes" => prepare_uncles(block.uncle_relations), + "state_root" => "TODO", + "rewards" => prepare_rewards(block.rewards, block, single_block?), + "gas_target_percentage" => gas_target(block), + "gas_used_percentage" => gas_used_percentage(block), + "burnt_fees_percentage" => burnt_fees_percentage(burned_fee, tx_fees), + "type" => block |> BlockView.block_type() |> String.downcase(), + "tx_fees" => tx_fees + } + end + + def prepare_rewards(rewards, block, single_block?) do + Enum.map(rewards, &prepare_reward(&1, block, single_block?)) + end + + def prepare_reward(reward, block, single_block?) do + %{ + "reward" => reward.reward, + "type" => if(single_block?, do: BlockView.block_reward_text(reward, block.miner.hash), else: reward.address_type) + } + end + + def prepare_uncles(uncles_relations) when is_list(uncles_relations) do + Enum.map(uncles_relations, &prepare_uncle/1) + end + + def prepare_uncles(_), do: [] + + def prepare_uncle(uncle_relation) do + %{"hash" => uncle_relation.uncle_hash} + end + + def gas_target(block) do + elasticity_multiplier = 2 + ratio = Decimal.div(block.gas_used, Decimal.div(block.gas_limit, elasticity_multiplier)) + ratio |> Decimal.sub(1) |> Decimal.mult(100) |> Decimal.to_float() + end + + def gas_used_percentage(block) do + block.gas_used |> Decimal.div(block.gas_limit) |> Decimal.mult(100) |> Decimal.to_float() + end + + def burnt_fees_percentage(_, %Decimal{coef: 0}), do: nil + + def burnt_fees_percentage(burnt_fees, tx_fees) when not is_nil(tx_fees) and not is_nil(burnt_fees) do + burnt_fees.value |> Decimal.div(tx_fees) |> Decimal.mult(100) |> Decimal.to_float() + end + + def burnt_fees_percentage(_, _), do: nil + + def count_transactions(%Block{transactions: txs}) when is_list(txs), do: Enum.count(txs) + def count_transactions(_), do: nil +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/config_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/config_view.ex new file mode 100644 index 000000000000..be0d9da2c786 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/config_view.ex @@ -0,0 +1,7 @@ +defmodule BlockScoutWeb.API.V2.ConfigView do + def render("json_rpc_url.json", %{url: url}) do + %{ + "json_rpc_url" => url + } + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/helper.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/helper.ex new file mode 100644 index 000000000000..57f914bc0ce1 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/helper.ex @@ -0,0 +1,108 @@ +defmodule BlockScoutWeb.API.V2.Helper do + @moduledoc """ + API V2 helper + """ + + alias Ecto.Association.NotLoaded + alias Explorer.Chain.Address + alias Explorer.Chain.Transaction.History.TransactionStats + + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] + import BlockScoutWeb.Models.GetAddressTags, only: [get_address_tags: 2, get_tags_on_address: 1] + + def address_with_info(conn, address, address_hash) do + %{ + personal_tags: private_tags, + watchlist_names: watchlist_names + } = get_address_tags(address_hash, current_user(conn)) + + public_tags = get_tags_on_address(address_hash) + + Map.merge(address_with_info(address, address_hash), %{ + "private_tags" => private_tags, + "watchlist_names" => watchlist_names, + "public_tags" => public_tags + }) + end + + def address_with_info(%Address{} = address, _address_hash) do + %{ + "hash" => to_string(address), + "is_contract" => is_smart_contract(address), + "name" => address_name(address), + "implementation_name" => implementation_name(address), + "is_verified" => is_verified(address) + } + end + + def address_with_info(%NotLoaded{}, address_hash) do + address_with_info(nil, address_hash) + end + + def address_with_info(nil, address_hash) do + %{"hash" => address_hash, "is_contract" => false, "name" => nil, "implementation_name" => nil, "is_verified" => nil} + end + + def address_name(%Address{names: [_ | _] = address_names}) do + case Enum.find(address_names, &(&1.primary == true)) do + nil -> + %Address.Name{name: name} = Enum.at(address_names, 0) + name + + %Address.Name{name: name} -> + name + end + end + + def address_name(_), do: nil + + def implementation_name(%Address{smart_contract: %{implementation_name: implementation_name}}), + do: implementation_name + + def implementation_name(_), do: nil + + def is_smart_contract(%Address{contract_code: nil}), do: false + def is_smart_contract(%Address{contract_code: _}), do: true + def is_smart_contract(%NotLoaded{}), do: nil + def is_smart_contract(_), do: false + + def is_verified(%Address{smart_contract: nil}), do: false + def is_verified(%Address{smart_contract: %NotLoaded{}}), do: nil + def is_verified(%Address{smart_contract: _}), do: true + + def market_cap(:standard, %{available_supply: available_supply, usd_value: usd_value}) + when is_nil(available_supply) or is_nil(usd_value) do + Decimal.new(0) + end + + def market_cap(:standard, %{available_supply: available_supply, usd_value: usd_value}) do + Decimal.mult(available_supply, usd_value) + end + + def market_cap(:standard, exchange_rate) do + exchange_rate.market_cap_usd + end + + def market_cap(module, exchange_rate) do + module.market_cap(exchange_rate) + end + + def get_transaction_stats do + stats_scale = date_range(1) + transaction_stats = TransactionStats.by_date_range(stats_scale.earliest, stats_scale.latest) + + # Need datapoint for legend if none currently available. + if Enum.empty?(transaction_stats) do + [%{number_of_transactions: 0, gas_used: 0}] + else + transaction_stats + end + end + + def date_range(num_days) do + today = Date.utc_today() + latest = Date.add(today, -1) + x_days_back = Date.add(latest, -1 * (num_days - 1)) + %{earliest: x_days_back, latest: latest} + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/search_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/search_view.ex new file mode 100644 index 000000000000..434a6542b4e0 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/search_view.ex @@ -0,0 +1,53 @@ +defmodule BlockScoutWeb.API.V2.SearchView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.Endpoint + + def render("search_results.json", %{search_results: search_results, next_page_params: next_page_params}) do + %{"items" => Enum.map(search_results, &prepare_search_result/1), "next_page_params" => next_page_params} + end + + def prepare_search_result(%{type: "token"} = search_result) do + %{ + "type" => search_result.type, + "name" => search_result.name, + "symbol" => search_result.symbol, + "address" => search_result.address_hash, + "token_url" => token_path(Endpoint, :show, search_result.address_hash), + "address_url" => address_path(Endpoint, :show, search_result.address_hash) + } + end + + def prepare_search_result(%{type: address_or_contract} = search_result) + when address_or_contract in ["address", "contract"] do + %{ + "type" => search_result.type, + "name" => search_result.name, + "address" => search_result.address_hash, + "url" => address_path(Endpoint, :show, search_result.address_hash) + } + end + + def prepare_search_result(%{type: "block"} = search_result) do + block_hash = hash_to_string(search_result.block_hash) + + %{ + "type" => search_result.type, + "block_number" => search_result.block_number, + "block_hash" => block_hash, + "url" => block_path(Endpoint, :show, block_hash) + } + end + + def prepare_search_result(%{type: "transaction"} = search_result) do + tx_hash = hash_to_string(search_result.tx_hash) + + %{ + "type" => search_result.type, + "tx_hash" => tx_hash, + "url" => transaction_path(Endpoint, :show, tx_hash) + } + end + + defp hash_to_string(hash), do: "0x" <> Base.encode16(hash, case: :lower) +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex new file mode 100644 index 000000000000..e0bdae9c989f --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex @@ -0,0 +1,13 @@ +defmodule BlockScoutWeb.API.V2.TokenView do + def render("token.json", %{token: token}) do + %{ + "address" => token.contract_address_hash, + "symbol" => token.symbol, + "name" => token.name, + "decimals" => token.decimals, + "type" => token.type, + "holders" => to_string(token.holder_count), + "exchange_rate" => token.usd_value && to_string(token.usd_value) + } + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex new file mode 100644 index 000000000000..8b6c48f5b840 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex @@ -0,0 +1,447 @@ +defmodule BlockScoutWeb.API.V2.TransactionView do + use BlockScoutWeb, :view + + alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView} + alias BlockScoutWeb.{ABIEncodedValueView, TransactionView} + alias BlockScoutWeb.Models.GetTransactionTags + alias BlockScoutWeb.Tokens.Helpers + alias Ecto.Association.NotLoaded + alias Explorer.ExchangeRates.Token, as: TokenRate + alias Explorer.{Chain, Market} + alias Explorer.Chain.{Address, Block, InternalTransaction, Log, Token, Transaction, Wei} + alias Explorer.Chain.Block.Reward + alias Explorer.Counters.AverageBlockTime + alias Timex.Duration + + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] + + def render("message.json", assigns) do + ApiView.render("message.json", assigns) + end + + def render("transactions.json", %{transactions: transactions, conn: conn}) do + Enum.map(transactions, &prepare_transaction(&1, conn, false)) + end + + def render("transactions.json", %{transactions: transactions, next_page_params: next_page_params, conn: conn}) do + %{"items" => Enum.map(transactions, &prepare_transaction(&1, conn, false)), "next_page_params" => next_page_params} + end + + def render("transaction.json", %{transaction: transaction, conn: conn}) do + prepare_transaction(transaction, conn, true) + end + + def render("raw_trace.json", %{internal_transactions: internal_transactions}) do + InternalTransaction.internal_transactions_to_raw(internal_transactions) + end + + def render("decoded_log_input.json", %{method_id: method_id, text: text, mapping: mapping}) do + %{"method_id" => method_id, "method_call" => text, "parameters" => prepare_log_mapping(mapping)} + end + + def render("decoded_input.json", %{method_id: method_id, text: text, mapping: mapping, error?: _error}) do + %{"method_id" => method_id, "method_call" => text, "parameters" => prepare_method_mapping(mapping)} + end + + def render("revert_reason.json", %{raw: raw, decoded: decoded}) do + %{"raw" => raw, "decoded" => decoded} + end + + def render("token_transfers.json", %{token_transfers: token_transfers, next_page_params: next_page_params, conn: conn}) do + %{"items" => Enum.map(token_transfers, &prepare_token_transfer(&1, conn)), "next_page_params" => next_page_params} + end + + def render("token_transfers.json", %{token_transfers: token_transfers, conn: conn}) do + Enum.map(token_transfers, &prepare_token_transfer(&1, conn)) + end + + def render("token_transfer.json", %{token_transfer: token_transfer, conn: conn}) do + prepare_token_transfer(token_transfer, conn) + end + + def render("internal_transactions.json", %{ + internal_transactions: internal_transactions, + next_page_params: next_page_params, + conn: conn + }) do + %{ + "items" => Enum.map(internal_transactions, &prepare_internal_transaction(&1, conn)), + "next_page_params" => next_page_params + } + end + + def render("logs.json", %{logs: logs, next_page_params: next_page_params, tx_hash: tx_hash}) do + %{"items" => Enum.map(logs, fn log -> prepare_log(log, tx_hash) end), "next_page_params" => next_page_params} + end + + def render("logs.json", %{logs: logs, next_page_params: next_page_params}) do + %{ + "items" => Enum.map(logs, fn log -> prepare_log(log, log.transaction) end), + "next_page_params" => next_page_params + } + end + + def prepare_token_transfer(token_transfer, conn) do + %{ + "tx_hash" => token_transfer.transaction_hash, + "from" => Helper.address_with_info(conn, token_transfer.from_address, token_transfer.from_address_hash), + "to" => Helper.address_with_info(conn, token_transfer.to_address, token_transfer.to_address_hash), + "total" => prepare_token_transfer_total(token_transfer), + "token" => TokenView.render("token.json", %{token: Market.add_price(token_transfer.token)}), + "type" => Chain.get_token_transfer_type(token_transfer) + } + end + + def prepare_token_transfer_total(token_transfer) do + case Helpers.token_transfer_amount_for_api(token_transfer) do + {:ok, :erc721_instance} -> + %{"token_id" => token_transfer.token_id} + + {:ok, :erc1155_instance, value, decimals} -> + %{"token_id" => token_transfer.token_id, "value" => value, "decimals" => decimals} + + {:ok, :erc1155_instance, values, token_ids, decimals} -> + Enum.map(Enum.zip(values, token_ids), fn {value, token_id} -> + %{"value" => value, "token_id" => token_id, "decimals" => decimals} + end) + + {:ok, value, decimals} -> + %{"value" => value, "decimals" => decimals} + + _ -> + nil + end + end + + def prepare_internal_transaction(internal_transaction, conn) do + %{ + "error" => internal_transaction.error, + "success" => is_nil(internal_transaction.error), + "type" => internal_transaction.call_type, + "transaction_hash" => internal_transaction.transaction_hash, + "from" => + Helper.address_with_info( + conn, + internal_transaction.from_address, + internal_transaction.from_address_hash + ), + "to" => Helper.address_with_info(conn, internal_transaction.to_address, internal_transaction.to_address_hash), + "created_contract" => + Helper.address_with_info( + conn, + internal_transaction.created_contract_address, + internal_transaction.created_contract_address_hash + ), + "value" => internal_transaction.value, + "block" => internal_transaction.block_number, + "timestamp" => internal_transaction.transaction.block.timestamp, + "index" => internal_transaction.index, + "gas_limit" => internal_transaction.gas + } + end + + def prepare_log(log, transaction_or_hash) do + decoded = decode_log(log, transaction_or_hash) + + %{ + "address" => Helper.address_with_info(log.address, log.address_hash), + "topics" => [ + log.first_topic, + log.second_topic, + log.third_topic, + log.fourth_topic + ], + "data" => log.data, + "index" => log.index, + "decoded" => decoded, + "smart_contract" => smart_contract_info(transaction_or_hash) + } + end + + defp smart_contract_info(%Transaction{} = tx), do: Helper.address_with_info(tx.to_address, tx.to_address_hash) + defp smart_contract_info(_), do: nil + + defp decode_log(log, %Transaction{} = tx) do + case log |> Log.decode(tx) |> format_decoded_log_input() do + {:ok, method_id, text, mapping} -> + render(__MODULE__, "decoded_log_input.json", method_id: method_id, text: text, mapping: mapping) + + _ -> + nil + end + end + + defp decode_log(log, transaction_hash), do: decode_log(log, %Transaction{hash: transaction_hash}) + + defp prepare_transaction({%Reward{} = emission_reward, %Reward{} = validator_reward}, conn, _single_tx?) do + %{ + "emission_reward" => emission_reward.reward, + "block_hash" => validator_reward.block_hash, + "from" => Helper.address_with_info(conn, emission_reward.address, emission_reward.address_hash), + "to" => Helper.address_with_info(conn, validator_reward.address, validator_reward.address_hash), + "types" => [:reward] + } + end + + defp prepare_transaction(%Transaction{} = transaction, conn, single_tx?) do + base_fee_per_gas = transaction.block && transaction.block.base_fee_per_gas + max_priority_fee_per_gas = transaction.max_priority_fee_per_gas + max_fee_per_gas = transaction.max_fee_per_gas + + priority_fee_per_gas = priority_fee_per_gas(max_priority_fee_per_gas, base_fee_per_gas, max_fee_per_gas) + + burned_fee = burned_fee(transaction, max_fee_per_gas, base_fee_per_gas) + + status = transaction |> Chain.transaction_to_status() |> format_status() + + revert_reason = revert_reason(status, transaction) + + decoded_input = transaction |> Transaction.decoded_input_data() |> format_decoded_input() + decoded_input_data = decoded_input(decoded_input) + + %{ + "hash" => transaction.hash, + "result" => status, + "status" => transaction.status, + "block" => transaction.block_number, + "timestamp" => transaction.block && transaction.block.timestamp, + "from" => Helper.address_with_info(conn, transaction.from_address, transaction.from_address_hash), + "to" => Helper.address_with_info(conn, transaction.to_address, transaction.to_address_hash), + "created_contract" => + Helper.address_with_info(conn, transaction.created_contract_address, transaction.created_contract_address_hash), + "confirmations" => + transaction.block |> Chain.confirmations(block_height: Chain.block_height()) |> format_confirmations(), + "confirmation_duration" => processing_time_duration(transaction), + "value" => transaction.value, + "fee" => transaction |> Chain.fee(:wei) |> format_fee(), + "gas_price" => transaction.gas_price, + "type" => transaction.type, + "gas_used" => transaction.gas_used, + "gas_limit" => transaction.gas, + "max_fee_per_gas" => transaction.max_fee_per_gas, + "max_priority_fee_per_gas" => transaction.max_priority_fee_per_gas, + "base_fee_per_gas" => base_fee_per_gas, + "priority_fee" => priority_fee_per_gas && Wei.mult(priority_fee_per_gas, transaction.gas_used), + "tx_burnt_fee" => burned_fee, + "nonce" => transaction.nonce, + "position" => transaction.index, + "revert_reason" => revert_reason, + "raw_input" => transaction.input, + "decoded_input" => decoded_input_data, + "token_transfers" => token_transfers(transaction.token_transfers, conn, single_tx?), + "token_transfers_overflow" => token_transfers_overflow(transaction.token_transfers, single_tx?), + "exchange_rate" => (Market.get_exchange_rate(Explorer.coin()) || TokenRate.null()).usd_value, + "method" => method_name(transaction, decoded_input), + "tx_types" => tx_types(transaction), + "tx_tag" => GetTransactionTags.get_transaction_tags(transaction.hash, current_user(conn)) + } + end + + def token_transfers(_, _conn, false), do: nil + def token_transfers(%NotLoaded{}, _conn, _), do: nil + + def token_transfers(token_transfers, conn, _) do + render("token_transfers.json", %{ + token_transfers: Enum.take(token_transfers, Chain.get_token_transfers_per_transaction_preview_count()), + conn: conn + }) + end + + def token_transfers_overflow(_, false), do: nil + def token_transfers_overflow(%NotLoaded{}, _), do: false + + def token_transfers_overflow(token_transfers, _), + do: Enum.count(token_transfers) > Chain.get_token_transfers_per_transaction_preview_count() + + defp priority_fee_per_gas(max_priority_fee_per_gas, base_fee_per_gas, max_fee_per_gas) do + if is_nil(max_priority_fee_per_gas) or is_nil(base_fee_per_gas), + do: nil, + else: + Enum.min_by([max_priority_fee_per_gas, Wei.sub(max_fee_per_gas, base_fee_per_gas)], fn x -> + Wei.to(x, :wei) + end) + end + + defp burned_fee(transaction, max_fee_per_gas, base_fee_per_gas) do + if !is_nil(max_fee_per_gas) and !is_nil(transaction.gas_used) and !is_nil(base_fee_per_gas) do + if Decimal.compare(max_fee_per_gas.value, 0) == :eq do + %Wei{value: Decimal.new(0)} + else + Wei.mult(base_fee_per_gas, transaction.gas_used) + end + else + nil + end + end + + defp revert_reason(status, transaction) do + if is_binary(status) && status |> String.downcase() |> String.contains?("reverted") do + case TransactionView.transaction_revert_reason(transaction) do + {:error, _contract_not_verified, candidates} when candidates != [] -> + {:ok, method_id, text, mapping} = Enum.at(candidates, 0) + render(__MODULE__, "decoded_input.json", method_id: method_id, text: text, mapping: mapping, error?: true) + + {:ok, method_id, text, mapping} -> + render(__MODULE__, "decoded_input.json", method_id: method_id, text: text, mapping: mapping, error?: true) + + _ -> + hex = TransactionView.get_pure_transaction_revert_reason(transaction) + utf8 = TransactionView.decoded_revert_reason(transaction) + render(__MODULE__, "revert_reason.json", raw: hex, decoded: utf8) + end + end + end + + defp decoded_input(decoded_input) do + case decoded_input do + {:ok, method_id, text, mapping} -> + render(__MODULE__, "decoded_input.json", method_id: method_id, text: text, mapping: mapping, error?: false) + + _ -> + nil + end + end + + def prepare_method_mapping(mapping) do + Enum.map(mapping, fn {name, type, value} -> + %{"name" => name, "type" => type, "value" => ABIEncodedValueView.value_json(type, value)} + end) + end + + def prepare_log_mapping(mapping) do + Enum.map(mapping, fn {name, type, indexed?, value} -> + %{"name" => name, "type" => type, "indexed" => indexed?, "value" => ABIEncodedValueView.value_json(type, value)} + end) + end + + defp format_status({:error, reason}), do: reason + defp format_status(status), do: status + + defp format_decoded_input({:error, _, []}), do: nil + defp format_decoded_input({:error, _, candidates}), do: Enum.at(candidates, 0) + defp format_decoded_input({:ok, _identifier, _text, _mapping} = decoded), do: decoded + defp format_decoded_input(_), do: nil + + defp format_decoded_log_input({:error, :could_not_decode}), do: nil + defp format_decoded_log_input({:error, :no_matching_function}), do: nil + defp format_decoded_log_input({:ok, _method_id, _text, _mapping} = decoded), do: decoded + defp format_decoded_log_input({:error, _, candidates}), do: Enum.at(candidates, 0) + + def format_confirmations({:ok, confirmations}), do: confirmations + def format_confirmations(_), do: 0 + + def format_fee({type, value}), do: %{"type" => type, "value" => value} + + def processing_time_duration(%Transaction{block: nil}) do + [] + end + + def processing_time_duration(%Transaction{earliest_processing_start: nil}) do + avg_time = AverageBlockTime.average_block_time() + + if avg_time == {:error, :disabled} do + [] + else + [ + 0, + avg_time + |> Duration.to_milliseconds() + ] + end + end + + def processing_time_duration(%Transaction{ + block: %Block{timestamp: end_time}, + earliest_processing_start: earliest_processing_start, + inserted_at: inserted_at + }) do + long_interval = abs(diff(earliest_processing_start, end_time)) + short_interval = abs(diff(inserted_at, end_time)) + merge_intervals(short_interval, long_interval) + end + + def merge_intervals(short, long) when short == long, do: [short] + + def merge_intervals(short, long) do + [short, long] + end + + def diff(left, right) do + left + |> Timex.diff(right, :milliseconds) + end + + defp method_name(_, {:ok, _method_id, text, _mapping}) do + Transaction.parse_method_name(text, false) + end + + defp method_name(%Transaction{to_address: to_address, input: %{bytes: <>}}, _) do + if Helper.is_smart_contract(to_address) do + "0x" <> Base.encode16(method_id, case: :lower) + else + nil + end + end + + defp method_name(_, _) do + nil + end + + defp tx_types(tx, types \\ [], stage \\ :token_transfer) + + defp tx_types(%Transaction{token_transfers: token_transfers} = tx, types, :token_transfer) do + types = + if !is_nil(token_transfers) && token_transfers != [] && !match?(%NotLoaded{}, token_transfers) do + [:token_transfer | types] + else + types + end + + tx_types(tx, types, :token_creation) + end + + defp tx_types(%Transaction{created_contract_address: created_contract_address} = tx, types, :token_creation) do + types = + if match?(%Address{}, created_contract_address) && match?(%Token{}, created_contract_address.token) do + [:token_creation | types] + else + types + end + + tx_types(tx, types, :contract_creation) + end + + defp tx_types( + %Transaction{created_contract_address_hash: created_contract_address_hash} = tx, + types, + :contract_creation + ) do + types = + if is_nil(created_contract_address_hash) do + types + else + [:contract_creation | types] + end + + tx_types(tx, types, :contract_call) + end + + defp tx_types(%Transaction{to_address: to_address} = tx, types, :contract_call) do + types = + if Helper.is_smart_contract(to_address) do + [:contract_call | types] + else + types + end + + tx_types(tx, types, :coin_transfer) + end + + defp tx_types(%Transaction{value: value}, types, :coin_transfer) do + if Decimal.compare(value.value, 0) == :gt do + [:coin_transfer | types] + else + types + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/block_view.ex b/apps/block_scout_web/lib/block_scout_web/views/block_view.ex index 78a22e76700b..7fdabe4b5ef9 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/block_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/block_view.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.BlockView do import Math.Enum, only: [mean: 1] + alias Ecto.Association.NotLoaded alias Explorer.Chain alias Explorer.Chain.{Block, Wei} alias Explorer.Chain.Block.Reward @@ -23,6 +24,7 @@ defmodule BlockScoutWeb.BlockView do "#{average} #{unit_text}" end + def block_type(%Block{consensus: false, nephews: %NotLoaded{}}), do: "Reorg" def block_type(%Block{consensus: false, nephews: []}), do: "Reorg" def block_type(%Block{consensus: false}), do: "Uncle" def block_type(_block), do: "Block" diff --git a/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex b/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex index ff5a737bfb68..43d66a29266d 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/chain_view.ex @@ -3,27 +3,11 @@ defmodule BlockScoutWeb.ChainView do require Decimal import Number.Currency, only: [number_to_currency: 2] + import BlockScoutWeb.API.V2.Helper, only: [market_cap: 2] alias BlockScoutWeb.LayoutView alias Explorer.Chain.Cache.GasPriceOracle - defp market_cap(:standard, %{available_supply: available_supply, usd_value: usd_value}) - when is_nil(available_supply) or is_nil(usd_value) do - Decimal.new(0) - end - - defp market_cap(:standard, %{available_supply: available_supply, usd_value: usd_value}) do - Decimal.mult(available_supply, usd_value) - end - - defp market_cap(:standard, exchange_rate) do - exchange_rate.market_cap_usd - end - - defp market_cap(module, exchange_rate) do - module.market_cap(exchange_rate) - end - def format_usd_value(nil), do: "" def format_usd_value(value) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/search_view.ex b/apps/block_scout_web/lib/block_scout_web/views/search_view.ex index 4cab5f1f544d..51bf1b856dea 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/search_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/search_view.ex @@ -16,52 +16,4 @@ defmodule BlockScoutWeb.SearchView do |> Regex.replace(safe_result, "\\g{0}", global: true) |> raw() end - - def render("search_results.json", %{search_results: search_results, next_page_params: next_page_params}) do - %{"items" => Enum.map(search_results, &prepare_search_result/1), "next_page_params" => next_page_params} - end - - def prepare_search_result(%{type: "token"} = search_result) do - %{ - "type" => search_result.type, - "name" => search_result.name, - "symbol" => search_result.symbol, - "address" => search_result.address_hash, - "token_url" => token_path(BlockScoutWeb.Endpoint, :show, search_result.address_hash), - "address_url" => address_path(BlockScoutWeb.Endpoint, :show, search_result.address_hash) - } - end - - def prepare_search_result(%{type: address_or_contract} = search_result) - when address_or_contract in ["address", "contract"] do - %{ - "type" => search_result.type, - "name" => search_result.name, - "address" => search_result.address_hash, - "url" => address_path(BlockScoutWeb.Endpoint, :show, search_result.address_hash) - } - end - - def prepare_search_result(%{type: "block"} = search_result) do - block_hash = hash_to_string(search_result.block_hash) - - %{ - "type" => search_result.type, - "block_number" => search_result.block_number, - "block_hash" => block_hash, - "url" => block_path(BlockScoutWeb.Endpoint, :show, block_hash) - } - end - - def prepare_search_result(%{type: "transaction"} = search_result) do - tx_hash = hash_to_string(search_result.tx_hash) - - %{ - "type" => search_result.type, - "tx_hash" => tx_hash, - "url" => transaction_path(BlockScoutWeb.Endpoint, :show, tx_hash) - } - end - - defp hash_to_string(hash), do: "0x" <> Base.encode16(hash, case: :lower) end diff --git a/apps/block_scout_web/lib/block_scout_web/views/tokens/helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/tokens/helpers.ex index 7b8d3276d63a..40d5f4e16ea8 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/tokens/helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/tokens/helpers.ex @@ -52,6 +52,56 @@ defmodule BlockScoutWeb.Tokens.Helpers do nil end + def token_transfer_amount_for_api(%{ + token: token, + amount: amount, + amounts: amounts, + token_id: token_id, + token_ids: token_ids + }) do + do_token_transfer_amount_for_api(token, amount, amounts, token_id, token_ids) + end + + def token_transfer_amount_for_api(%{token: token, amount: amount, token_id: token_id}) do + do_token_transfer_amount_for_api(token, amount, nil, token_id, nil) + end + + defp do_token_transfer_amount_for_api(%Token{type: "ERC-20"}, nil, nil, _token_id, _token_ids) do + {:ok, nil} + end + + defp do_token_transfer_amount_for_api( + %Token{type: "ERC-20", decimals: decimals}, + amount, + _amounts, + _token_id, + _token_ids + ) do + {:ok, amount, decimals} + end + + defp do_token_transfer_amount_for_api(%Token{type: "ERC-721"}, _amount, _amounts, _token_id, _token_ids) do + {:ok, :erc721_instance} + end + + defp do_token_transfer_amount_for_api( + %Token{type: "ERC-1155", decimals: decimals}, + amount, + amounts, + _token_id, + token_ids + ) do + if amount do + {:ok, :erc1155_instance, amount, decimals} + else + {:ok, :erc1155_instance, amounts, token_ids, decimals} + end + end + + defp do_token_transfer_amount_for_api(_token, _amount, _amounts, _token_id, _token_ids) do + nil + end + @doc """ Returns the token's symbol. diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 662e1cee4665..213db8e5773c 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -512,7 +512,7 @@ msgstr "" msgid "Chat (#blockscout)" msgstr "" -#: lib/block_scout_web/views/block_view.ex:63 +#: lib/block_scout_web/views/block_view.ex:65 #, elixir-autogen, elixir-format msgid "Chore Reward" msgstr "" @@ -1105,7 +1105,7 @@ msgstr "" msgid "Emission Contract" msgstr "" -#: lib/block_scout_web/views/block_view.ex:71 +#: lib/block_scout_web/views/block_view.ex:73 #, elixir-autogen, elixir-format msgid "Emission Reward" msgstr "" @@ -1323,7 +1323,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:21 #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:22 #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:38 -#: lib/block_scout_web/views/block_view.ex:21 +#: lib/block_scout_web/views/block_view.ex:22 #: lib/block_scout_web/views/wei_helpers.ex:77 #, elixir-autogen, elixir-format msgid "Gwei" @@ -1596,8 +1596,8 @@ msgstr "" msgid "Miner" msgstr "" -#: lib/block_scout_web/views/block_view.ex:61 -#: lib/block_scout_web/views/block_view.ex:66 +#: lib/block_scout_web/views/block_view.ex:63 +#: lib/block_scout_web/views/block_view.ex:68 #, elixir-autogen, elixir-format msgid "Miner Reward" msgstr "" @@ -2823,7 +2823,7 @@ msgstr "" msgid "UTF-8" msgstr "" -#: lib/block_scout_web/views/block_view.ex:75 +#: lib/block_scout_web/views/block_view.ex:77 #, elixir-autogen, elixir-format msgid "Uncle Reward" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 12435bfd93b7..83ed5290b320 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -512,7 +512,7 @@ msgstr "" msgid "Chat (#blockscout)" msgstr "" -#: lib/block_scout_web/views/block_view.ex:63 +#: lib/block_scout_web/views/block_view.ex:65 #, elixir-autogen, elixir-format msgid "Chore Reward" msgstr "" @@ -1105,7 +1105,7 @@ msgstr "" msgid "Emission Contract" msgstr "" -#: lib/block_scout_web/views/block_view.ex:71 +#: lib/block_scout_web/views/block_view.ex:73 #, elixir-autogen, elixir-format msgid "Emission Reward" msgstr "" @@ -1323,7 +1323,7 @@ msgstr "" #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:21 #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:22 #: lib/block_scout_web/templates/chain/gas_price_oracle_legend_item.html.eex:38 -#: lib/block_scout_web/views/block_view.ex:21 +#: lib/block_scout_web/views/block_view.ex:22 #: lib/block_scout_web/views/wei_helpers.ex:77 #, elixir-autogen, elixir-format msgid "Gwei" @@ -1596,8 +1596,8 @@ msgstr "" msgid "Miner" msgstr "" -#: lib/block_scout_web/views/block_view.ex:61 -#: lib/block_scout_web/views/block_view.ex:66 +#: lib/block_scout_web/views/block_view.ex:63 +#: lib/block_scout_web/views/block_view.ex:68 #, elixir-autogen, elixir-format msgid "Miner Reward" msgstr "" @@ -2823,7 +2823,7 @@ msgstr "" msgid "UTF-8" msgstr "" -#: lib/block_scout_web/views/block_view.ex:75 +#: lib/block_scout_web/views/block_view.ex:77 #, elixir-autogen, elixir-format msgid "Uncle Reward" msgstr "" diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_chain_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_chain_test.exs index 3a14474c2cab..5216623e7188 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_chain_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_chain_test.exs @@ -133,7 +133,7 @@ defmodule BlockScoutWeb.ViewingChainTest do transaction = :transaction |> insert(to_address: contract_token_address) - |> with_block(block) + |> with_block(block, status: :ok) insert_list( 3, diff --git a/apps/block_scout_web/test/block_scout_web/views/address_token_balance_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/address_token_balance_view_test.exs index cd57a45f95af..1ac75c92b400 100644 --- a/apps/block_scout_web/test/block_scout_web/views/address_token_balance_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/address_token_balance_view_test.exs @@ -20,9 +20,11 @@ defmodule BlockScoutWeb.AddressTokenBalanceViewTest do token_balance_a = build(:token_balance, token: build(:token, type: "ERC-20")) token_balance_b = build(:token_balance, token: build(:token, type: "ERC-721")) - token_balances = [{token_balance_a, %{}}, {token_balance_b, %{}}] + token_balances = [{token_balance_a, token_balance_a.token}, {token_balance_b, token_balance_b.token}] - assert AddressTokenBalanceView.filter_by_type(token_balances, "ERC-20") == [{token_balance_a, %{}}] + assert AddressTokenBalanceView.filter_by_type(token_balances, "ERC-20") == [ + {token_balance_a, token_balance_a.token} + ] end end diff --git a/apps/block_scout_web/test/block_scout_web/views/block_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/block_view_test.exs index 5336dc9ff7fc..eea5baf28420 100644 --- a/apps/block_scout_web/test/block_scout_web/views/block_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/block_view_test.exs @@ -34,8 +34,9 @@ defmodule BlockScoutWeb.BlockViewTest do test "returns Uncle" do uncle = insert(:block, consensus: false) insert(:block_second_degree_relation, uncle_hash: uncle.hash) + preloaded = Repo.preload(uncle, :nephews) - assert BlockView.block_type(uncle) == "Uncle" + assert BlockView.block_type(preloaded) == "Uncle" end end diff --git a/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.exs b/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.exs index 8b6096658ac0..335844236ea0 100644 --- a/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.exs +++ b/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.exs @@ -8,7 +8,7 @@ alias Explorer.Chain.Block Benchee.run( %{ "Explorer.Chain.recent_collated_transactions" => fn _ -> - Chain.recent_collated_transactions() + Chain.recent_collated_transactions(true) end }, inputs: %{ diff --git a/apps/explorer/config/dev.exs b/apps/explorer/config/dev.exs index 1ccfb34b6d61..821c11c17a6d 100644 --- a/apps/explorer/config/dev.exs +++ b/apps/explorer/config/dev.exs @@ -1,7 +1,9 @@ import Config # Configure your database -config :explorer, Explorer.Repo, timeout: :timer.seconds(80) +config :explorer, Explorer.Repo, + timeout: :timer.seconds(80), + migration_lock: nil # Configure API database config :explorer, Explorer.Repo.Replica1, timeout: :timer.seconds(80) diff --git a/apps/explorer/config/prod.exs b/apps/explorer/config/prod.exs index 2d389e59d6f1..43be5c0e9146 100644 --- a/apps/explorer/config/prod.exs +++ b/apps/explorer/config/prod.exs @@ -3,7 +3,8 @@ import Config # Configures the database config :explorer, Explorer.Repo, prepare: :unnamed, - timeout: :timer.seconds(60) + timeout: :timer.seconds(60), + migration_lock: nil # Configures API the database config :explorer, Explorer.Repo.Replica1, diff --git a/apps/explorer/config/test.exs b/apps/explorer/config/test.exs index 1b3b160791e4..e9174824ce04 100644 --- a/apps/explorer/config/test.exs +++ b/apps/explorer/config/test.exs @@ -11,7 +11,8 @@ config :explorer, Explorer.Repo, # Default of `5_000` was too low for `BlockFetcher` test ownership_timeout: :timer.minutes(7), timeout: :timer.seconds(60), - queue_target: 1000 + queue_target: 1000, + migration_lock: nil # Configure API database config :explorer, Explorer.Repo.Replica1, diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 26163c92e5d5..2839b2355960 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -153,3 +153,9 @@ defmodule Explorer.Account.TagTransaction do def get_max_tags_count, do: @max_tag_transaction_per_account end + +defimpl Jason.Encoder, for: Explorer.Account.TagTransaction do + def encode(tx_tag, opts) do + Jason.Encode.string(tx_tag.name, opts) + end +end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 3629b1c19b69..693ac4b37f89 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -5,8 +5,11 @@ defmodule Explorer.Chain do import Ecto.Query, only: [ + dynamic: 1, + dynamic: 2, from: 2, join: 4, + join: 5, limit: 2, lock: 2, offset: 2, @@ -81,6 +84,23 @@ defmodule Explorer.Chain do @default_paging_options %PagingOptions{page_size: 50} + @token_transfers_per_transaction_preview 10 + @token_transfers_neccessity_by_association %{ + [from_address: :smart_contract] => :optional, + [to_address: :smart_contract] => :optional, + [from_address: :names] => :optional, + [to_address: :names] => :optional, + token: :required + } + + @method_name_to_id_map %{ + "approve" => "095ea7b3", + "transfer" => "a9059cbb", + "multicall" => "5ae401dc", + "mint" => "40c10f19", + "commit" => "f14fcbc8" + } + @max_incoming_transactions_count 10_000 @revert_msg_prefix_1 "Revert: " @@ -656,9 +676,7 @@ defmodule Explorer.Chain do end def where_block_number_in_period(base_query, from_block, to_block) when is_nil(from_block) and is_nil(to_block) do - from(q in base_query, - where: 1 - ) + base_query end def where_block_number_in_period(base_query, from_block, to_block) do @@ -768,19 +786,40 @@ defmodule Explorer.Chain do end end - @uncle_reward_coef 1 / 32 - def block_reward_by_parts(block, transactions) do - %{hash: block_hash, number: block_number} = block - base_fee_per_gas = Map.get(block, :base_fee_per_gas) + def txn_fees(transactions) do + Enum.reduce(transactions, Decimal.new(0), fn %{gas_used: gas_used, gas_price: gas_price}, acc -> + gas_used + |> Decimal.new() + |> Decimal.mult(gas_price_to_decimal(gas_price)) + |> Decimal.add(acc) + end) + end - txn_fees = - Enum.reduce(transactions, Decimal.new(0), fn %{gas_used: gas_used, gas_price: gas_price}, acc -> + defp gas_price_to_decimal(%Wei{} = wei), do: wei.value + defp gas_price_to_decimal(gas_price), do: Decimal.new(gas_price) + + def burned_fees(transactions, base_fee_per_gas) do + burned_fee_counter = + transactions + |> Enum.reduce(Decimal.new(0), fn %{gas_used: gas_used}, acc -> gas_used |> Decimal.new() - |> Decimal.mult(Decimal.new(gas_price)) |> Decimal.add(acc) end) + base_fee_per_gas && Wei.mult(base_fee_per_gas_to_wei(base_fee_per_gas), burned_fee_counter) + end + + defp base_fee_per_gas_to_wei(%Wei{} = wei), do: wei + defp base_fee_per_gas_to_wei(base_fee_per_gas), do: %Wei{value: Decimal.new(base_fee_per_gas)} + + @uncle_reward_coef 1 / 32 + def block_reward_by_parts(block, transactions) do + %{hash: block_hash, number: block_number} = block + base_fee_per_gas = Map.get(block, :base_fee_per_gas) + + txn_fees = txn_fees(transactions) + static_reward = Repo.one( from( @@ -790,17 +829,9 @@ defmodule Explorer.Chain do ) ) || %Wei{value: Decimal.new(0)} - burned_fee_counter = - transactions - |> Enum.reduce(Decimal.new(0), fn %{gas_used: gas_used}, acc -> - gas_used - |> Decimal.new() - |> Decimal.add(acc) - end) - has_uncles? = is_list(block.uncles) and not Enum.empty?(block.uncles) - burned_fees = base_fee_per_gas && Wei.mult(%Wei{value: Decimal.new(base_fee_per_gas)}, burned_fee_counter) + burned_fees = burned_fees(transactions, base_fee_per_gas) uncle_reward = (has_uncles? && Wei.mult(static_reward, Decimal.from_float(@uncle_reward_coef))) || nil %{ @@ -861,8 +892,10 @@ defmodule Explorer.Chain do `:key` (a tuple of the lowest/oldest `{index}`) and. Results will be the transactions older than the `index` that are passed. """ - @spec block_to_transactions(Hash.Full.t(), [paging_options | necessity_by_association_option]) :: [Transaction.t()] - def block_to_transactions(block_hash, options \\ []) when is_list(options) do + @spec block_to_transactions(Hash.Full.t(), [paging_options | necessity_by_association_option], true | false) :: [ + Transaction.t() + ] + def block_to_transactions(block_hash, options \\ [], old_ui? \\ true) when is_list(options) do necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) options @@ -871,8 +904,12 @@ defmodule Explorer.Chain do |> join(:inner, [transaction], block in assoc(transaction, :block)) |> where([_, block], block.hash == ^block_hash) |> join_associations(necessity_by_association) - |> preload([{:token_transfers, [:token, :from_address, :to_address]}]) + |> (&if(old_ui?, do: preload(&1, [{:token_transfers, [:token, :from_address, :to_address]}]), else: &1)).() |> Repo.all() + |> (&if(old_ui?, + do: &1, + else: Enum.map(&1, fn tx -> preload_token_transfers(tx, @token_transfers_neccessity_by_association) end) + )).() end @doc """ @@ -1031,8 +1068,8 @@ defmodule Explorer.Chain do iex> Explorer.Chain.confirmations(block, block_height: 0) {:ok, 1} """ - @spec confirmations(Block.t(), [{:block_height, block_height()}]) :: - {:ok, non_neg_integer()} | {:error, :non_consensus} + @spec confirmations(Block.t() | nil, [{:block_height, block_height()}]) :: + {:ok, non_neg_integer()} | {:error, :non_consensus | :pending} def confirmations(%Block{consensus: true, number: number}, named_arguments) when is_list(named_arguments) do max_consensus_block_number = Keyword.fetch!(named_arguments, :block_height) @@ -1042,6 +1079,8 @@ defmodule Explorer.Chain do def confirmations(%Block{consensus: false}, _), do: {:error, :non_consensus} + def confirmations(nil, _), do: {:error, :pending} + @doc """ Creates an address. @@ -2019,6 +2058,41 @@ defmodule Explorer.Chain do end end + # preload_to_detect_tt?: we don't need to preload more than one token transfer in case the tx inside the list (we dont't show any token transfers on tx tile in new UI) + def preload_token_transfers( + %Transaction{hash: tx_hash, block_hash: block_hash} = transaction, + necessity_by_association, + preload_to_detect_tt? \\ true + ) do + token_transfers = + TokenTransfer + |> (&if(is_nil(block_hash), + do: where(&1, [token_transfer], token_transfer.transaction_hash == ^tx_hash), + else: + where( + &1, + [token_transfer], + token_transfer.transaction_hash == ^tx_hash and token_transfer.block_hash == ^block_hash + ) + )).() + |> limit(^if(preload_to_detect_tt?, do: 1, else: @token_transfers_per_transaction_preview + 1)) + |> order_by([token_transfer], asc: token_transfer.log_index) + |> join_associations(necessity_by_association) + |> Repo.all() + + %Transaction{transaction | token_transfers: token_transfers} + end + + def get_token_transfers_per_transaction_preview_count, do: @token_transfers_per_transaction_preview + + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + @doc """ Converts list of `t:Explorer.Chain.Transaction.t/0` `hashes` to the list of `t:Explorer.Chain.Transaction.t/0`s for those `hashes`. @@ -2504,6 +2578,15 @@ defmodule Explorer.Chain do @doc """ Return the balance in usd corresponding to this token. Return nil if the usd_value of the token is not present. """ + def balance_in_usd(_token_balance, %{usd_value: nil}) do + nil + end + + def balance_in_usd(token_balance, %{usd_value: usd_value, decimals: decimals}) do + tokens = CurrencyHelpers.divide_decimals(token_balance.value, decimals) + Decimal.mult(tokens, usd_value) + end + def balance_in_usd(%{token: %{usd_value: nil}}) do nil end @@ -3171,7 +3254,7 @@ defmodule Explorer.Chain do iex> newest_first_transactions = 50 |> insert_list(:transaction) |> with_block() |> Enum.reverse() iex> oldest_seen = Enum.at(newest_first_transactions, 9) iex> paging_options = %Explorer.PagingOptions{page_size: 10, key: {oldest_seen.block_number, oldest_seen.index}} - iex> recent_collated_transactions = Explorer.Chain.recent_collated_transactions(paging_options: paging_options) + iex> recent_collated_transactions = Explorer.Chain.recent_collated_transactions(true, paging_options: paging_options) iex> length(recent_collated_transactions) 10 iex> hd(recent_collated_transactions).hash == Enum.at(newest_first_transactions, 10).hash @@ -3187,26 +3270,17 @@ defmodule Explorer.Chain do the `block_number` and `index` that are passed. """ - @spec recent_collated_transactions([paging_options | necessity_by_association_option]) :: [Transaction.t()] - def recent_collated_transactions(options \\ []) when is_list(options) do + @spec recent_collated_transactions(true | false, [paging_options | necessity_by_association_option], [String.t()], [ + :atom + ]) :: [ + Transaction.t() + ] + def recent_collated_transactions(old_ui?, options \\ [], method_id_filter \\ [], type_filter \\ []) + when is_list(options) do necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) paging_options = Keyword.get(options, :paging_options, @default_paging_options) - if is_nil(paging_options.key) do - paging_options.page_size - |> Transactions.take_enough() - |> case do - nil -> - transactions = fetch_recent_collated_transactions(paging_options, necessity_by_association) - Transactions.update(transactions) - transactions - - transactions -> - transactions - end - else - fetch_recent_collated_transactions(paging_options, necessity_by_association) - end + fetch_recent_collated_transactions(old_ui?, paging_options, necessity_by_association, method_id_filter, type_filter) end # RAP - random access pagination @@ -3264,13 +3338,26 @@ defmodule Explorer.Chain do |> Repo.aggregate(:count, :hash) end - def fetch_recent_collated_transactions(paging_options, necessity_by_association) do + def fetch_recent_collated_transactions( + old_ui?, + paging_options, + necessity_by_association, + method_id_filter, + type_filter + ) do paging_options |> fetch_transactions() |> where([transaction], not is_nil(transaction.block_number) and not is_nil(transaction.index)) + |> apply_filter_by_method_id_to_transactions(method_id_filter) + |> apply_filter_by_tx_type_to_transactions(type_filter) |> join_associations(necessity_by_association) - |> preload([{:token_transfers, [:token, :from_address, :to_address]}]) + |> (&if(old_ui?, do: preload(&1, [{:token_transfers, [:token, :from_address, :to_address]}]), else: &1)).() + |> debug("result collated query") |> Repo.all() + |> (&if(old_ui?, + do: &1, + else: Enum.map(&1, fn tx -> preload_token_transfers(tx, @token_transfers_neccessity_by_association) end) + )).() end @doc """ @@ -3297,8 +3384,11 @@ defmodule Explorer.Chain do Results will be the transactions older than the `inserted_at` and `hash` that are passed. """ - @spec recent_pending_transactions([paging_options | necessity_by_association_option]) :: [Transaction.t()] - def recent_pending_transactions(options \\ []) when is_list(options) do + @spec recent_pending_transactions([paging_options | necessity_by_association_option], true | false, [String.t()], [ + :atom + ]) :: [Transaction.t()] + def recent_pending_transactions(options \\ [], old_ui? \\ true, method_id_filter \\ [], type_filter \\ []) + when is_list(options) do necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) paging_options = Keyword.get(options, :paging_options, @default_paging_options) @@ -3306,10 +3396,17 @@ defmodule Explorer.Chain do |> page_pending_transaction(paging_options) |> limit(^paging_options.page_size) |> pending_transactions_query() + |> apply_filter_by_method_id_to_transactions(method_id_filter) + |> apply_filter_by_tx_type_to_transactions(type_filter) |> order_by([transaction], desc: transaction.inserted_at, desc: transaction.hash) |> join_associations(necessity_by_association) - |> preload([{:token_transfers, [:token, :from_address, :to_address]}]) + |> (&if(old_ui?, do: preload(&1, [{:token_transfers, [:token, :from_address, :to_address]}]), else: &1)).() + |> debug("result pendging query") |> Repo.all() + |> (&if(old_ui?, + do: &1, + else: Enum.map(&1, fn tx -> preload_token_transfers(tx, @token_transfers_neccessity_by_association) end) + )).() end def pending_transactions_query(query) do @@ -4334,6 +4431,16 @@ defmodule Explorer.Chain do end end + defp join_association(query, association, necessity) do + case necessity do + :optional -> + preload(query, ^association) + + :required -> + from(q in query, inner_join: a in assoc(q, ^association), preload: [{^association, a}]) + end + end + defp join_associations(query, necessity_by_association) when is_map(necessity_by_association) do Enum.reduce(necessity_by_association, query, fn {association, join}, acc_query -> join_association(acc_query, association, join) @@ -5040,8 +5147,8 @@ defmodule Explorer.Chain do Repo.one(query) end - @spec address_to_balances_by_day(Hash.Address.t()) :: [balance_by_day] - def address_to_balances_by_day(address_hash) do + @spec address_to_balances_by_day(Hash.Address.t(), true | false) :: [balance_by_day] + def address_to_balances_by_day(address_hash, api? \\ false) do latest_block_timestamp = address_hash |> CoinBalance.last_coin_balance_timestamp() @@ -5052,7 +5159,7 @@ defmodule Explorer.Chain do |> Repo.all() |> Enum.sort_by(fn %{date: d} -> {d.year, d.month, d.day} end) |> replace_last_value(latest_block_timestamp) - |> normalize_balances_by_day() + |> normalize_balances_by_day(api?) end # https://github.com/blockscout/blockscout/issues/2658 @@ -5062,12 +5169,12 @@ defmodule Explorer.Chain do defp replace_last_value(items, _), do: items - defp normalize_balances_by_day(balances_by_day) do + defp normalize_balances_by_day(balances_by_day, api?) do result = balances_by_day |> Enum.filter(fn day -> day.value end) - |> Enum.map(fn day -> Map.update!(day, :date, &to_string(&1)) end) - |> Enum.map(fn day -> Map.update!(day, :value, &Wei.to(&1, :ether)) end) + |> (&if(api?, do: &1, else: Enum.map(&1, fn day -> Map.update!(day, :date, fn x -> to_string(x) end) end))).() + |> (&if(api?, do: &1, else: Enum.map(&1, fn day -> Map.update!(day, :value, fn x -> Wei.to(x, :ether) end) end))).() today = Date.to_string(NaiveDateTime.utc_now()) @@ -6241,4 +6348,127 @@ defmodule Explorer.Chain do |> to_string() |> String.downcase() end + + def recent_transactions(options, [:pending | _], method_id_filter, type_filter_options) do + recent_pending_transactions(options, false, method_id_filter, type_filter_options) + end + + def recent_transactions(options, _, method_id_filter, type_filter_options) do + recent_collated_transactions(false, options, method_id_filter, type_filter_options) + end + + def apply_filter_by_method_id_to_transactions(query, filter) when is_list(filter) do + method_ids = Enum.flat_map(filter, &map_name_or_method_id_to_method_id/1) + + if method_ids != [] do + query + |> where([tx], fragment("SUBSTRING(? FOR 4)", tx.input) in ^method_ids) + else + query + end + end + + def apply_filter_by_method_id_to_transactions(query, filter), + do: apply_filter_by_method_id_to_transactions(query, [filter]) + + defp map_name_or_method_id_to_method_id(string) when is_binary(string) do + if id = @method_name_to_id_map[string] do + decode_method_id(id) + else + trimmed = + string + |> String.replace("0x", "", global: false) + + decode_method_id(trimmed) + end + end + + defp decode_method_id(method_id) when is_binary(method_id) do + case String.length(method_id) == 8 && Base.decode16(method_id, case: :mixed) do + {:ok, bytes} -> + [bytes] + + _ -> + [] + end + end + + def apply_filter_by_tx_type_to_transactions(query, [_ | _] = filter) do + {dynamic, modified_query} = apply_filter_by_tx_type_to_transactions_inner(filter, query) + + modified_query + |> where(^dynamic) + end + + def apply_filter_by_tx_type_to_transactions(query, _filter), do: query + + def apply_filter_by_tx_type_to_transactions_inner(dynamic \\ dynamic(false), filter, query) + + def apply_filter_by_tx_type_to_transactions_inner(dynamic, [type | remain], query) do + case type do + :contract_call -> + dynamic + |> filter_contract_call_dynamic() + |> apply_filter_by_tx_type_to_transactions_inner( + remain, + join(query, :inner, [tx], address in assoc(tx, :to_address), as: :to_address) + ) + + :contract_creation -> + dynamic + |> filter_contract_creation_dynamic() + |> apply_filter_by_tx_type_to_transactions_inner(remain, query) + + :coin_transfer -> + dynamic + |> filter_transaction_dynamic() + |> apply_filter_by_tx_type_to_transactions_inner(remain, query) + + :token_transfer -> + dynamic + |> filter_token_transfer_dynamic() + |> apply_filter_by_tx_type_to_transactions_inner(remain, query) + + :token_creation -> + dynamic + |> filter_token_creation_dynamic() + |> apply_filter_by_tx_type_to_transactions_inner( + remain, + join(query, :inner, [tx], token in Token, + on: token.contract_address_hash == tx.created_contract_address_hash, + as: :created_token + ) + ) + end + end + + def apply_filter_by_tx_type_to_transactions_inner(dynamic_query, _, query), do: {dynamic_query, query} + + def filter_contract_creation_dynamic(dynamic) do + dynamic([tx], ^dynamic or is_nil(tx.to_address_hash)) + end + + def filter_transaction_dynamic(dynamic) do + dynamic([tx], ^dynamic or tx.value > ^0) + end + + def filter_contract_call_dynamic(dynamic) do + dynamic([tx, to_address: to_address], ^dynamic or not is_nil(to_address.contract_code)) + end + + def filter_token_transfer_dynamic(dynamic) do + # TokenTransfer.__struct__.__meta__.source + dynamic( + [tx], + ^dynamic or + fragment( + "NOT (SELECT transaction_hash FROM token_transfers WHERE transaction_hash = ? LIMIT 1) IS NULL", + tx.hash + ) + ) + end + + def filter_token_creation_dynamic(dynamic) do + dynamic([tx, created_token: created_token], ^dynamic or (is_nil(tx.to_address_hash) and not is_nil(created_token))) + end end diff --git a/apps/explorer/lib/explorer/chain/address/current_token_balance.ex b/apps/explorer/lib/explorer/chain/address/current_token_balance.ex index 03513580baf6..4cf3fbd813d0 100644 --- a/apps/explorer/lib/explorer/chain/address/current_token_balance.ex +++ b/apps/explorer/lib/explorer/chain/address/current_token_balance.ex @@ -165,7 +165,6 @@ defmodule Explorer.Chain.Address.CurrentTokenBalance do where: ctb.value > 0, left_join: t in Token, on: ctb.token_contract_address_hash == t.contract_address_hash, - preload: :token, select: {ctb, t}, order_by: [desc: ctb.value, asc: t.type, asc: t.name] ) diff --git a/apps/explorer/lib/explorer/chain/transaction.ex b/apps/explorer/lib/explorer/chain/transaction.ex index 88696c91c3aa..be55eba91d76 100644 --- a/apps/explorer/lib/explorer/chain/transaction.ex +++ b/apps/explorer/lib/explorer/chain/transaction.ex @@ -9,6 +9,7 @@ defmodule Explorer.Chain.Transaction do alias ABI.FunctionSelector + alias Ecto.Association.NotLoaded alias Ecto.Changeset alias Explorer.{Chain, Repo} @@ -464,6 +465,18 @@ defmodule Explorer.Chain.Transaction do def decoded_input_data(%__MODULE__{input: %{bytes: bytes}}) when bytes in [nil, <<>>], do: {:error, :no_input_data} def decoded_input_data(%__MODULE__{to_address: %{contract_code: nil}}), do: {:error, :not_a_contract_call} + def decoded_input_data(%__MODULE__{ + to_address: %{smart_contract: %NotLoaded{}}, + input: input, + hash: hash + }) do + decoded_input_data(%__MODULE__{ + to_address: %{smart_contract: nil}, + input: input, + hash: hash + }) + end + def decoded_input_data(%__MODULE__{ to_address: %{smart_contract: nil}, input: %{bytes: <> = data}, @@ -499,7 +512,7 @@ defmodule Explorer.Chain.Transaction do hash: hash }) do case do_decoded_input_data(data, abi, address_hash, hash) do - # In some cases transactions use methods of some unpredictadle contracts, so we can try to look up for method in a whole DB + # In some cases transactions use methods of some unpredictable contracts, so we can try to look up for method in a whole DB {:error, :could_not_decode} -> case decoded_input_data(%__MODULE__{ to_address: %{smart_contract: nil}, @@ -558,14 +571,16 @@ defmodule Explorer.Chain.Transaction do def get_method_name(_), do: "Transfer" - defp parse_method_name(method_desc) do + def parse_method_name(method_desc, need_upcase \\ true) do method_desc |> String.split("(") |> Enum.at(0) - |> upcase_first + |> upcase_first(need_upcase) end - defp upcase_first(<>), do: String.upcase(<>) <> rest + defp upcase_first(string, false), do: string + + defp upcase_first(<>, true), do: String.upcase(<>) <> rest defp function_call(name, mapping) do text = diff --git a/apps/explorer/lib/explorer/chain/wei.ex b/apps/explorer/lib/explorer/chain/wei.ex index 8fa3a69b22bb..533174ba4524 100644 --- a/apps/explorer/lib/explorer/chain/wei.ex +++ b/apps/explorer/lib/explorer/chain/wei.ex @@ -268,7 +268,8 @@ defimpl Inspect, for: Explorer.Chain.Wei do end defimpl Jason.Encoder, for: Explorer.Chain.Wei do - def encode(wei, _) do - Decimal.to_string(wei.value) + def encode(wei, opts) do + # changed since it's needed to return wei value (which is big number) as string + Jason.Encode.struct(wei.value, opts) end end diff --git a/apps/explorer/lib/explorer/counters/address_tokens_usd_sum.ex b/apps/explorer/lib/explorer/counters/address_tokens_usd_sum.ex index d3f74204a304..12dfb1e0cbea 100644 --- a/apps/explorer/lib/explorer/counters/address_tokens_usd_sum.ex +++ b/apps/explorer/lib/explorer/counters/address_tokens_usd_sum.ex @@ -53,9 +53,9 @@ defmodule Explorer.Counters.AddressTokenUsdSum do @spec address_tokens_usd_sum([{Address.CurrentTokenBalance, Explorer.Chain.Token}]) :: Decimal.t() defp address_tokens_usd_sum(token_balances) do token_balances - |> Enum.reduce(Decimal.new(0), fn {token_balance, _}, acc -> - if token_balance.value && token_balance.token.usd_value do - Decimal.add(acc, Chain.balance_in_usd(token_balance)) + |> Enum.reduce(Decimal.new(0), fn {token_balance, token}, acc -> + if token_balance.value && token.usd_value do + Decimal.add(acc, Chain.balance_in_usd(token_balance, token)) else acc end diff --git a/apps/explorer/lib/explorer/market/market.ex b/apps/explorer/lib/explorer/market/market.ex index 01a815cf8c8d..150adb1a738c 100644 --- a/apps/explorer/lib/explorer/market/market.ex +++ b/apps/explorer/lib/explorer/market/market.ex @@ -76,7 +76,7 @@ defmodule Explorer.Market do Enum.map(tokens, fn item -> case item do {token_balance, token} -> - {add_price(token_balance), token} + {token_balance, add_price(token)} token_balance -> add_price(token_balance) diff --git a/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs b/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs new file mode 100644 index 000000000000..24244fd249a7 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs @@ -0,0 +1,15 @@ +defmodule Explorer.Repo.Migrations.AddMethodIdIndex do + use Ecto.Migration + + @disable_ddl_transaction true + + def up do + execute(""" + CREATE INDEX CONCURRENTLY method_id ON public.transactions USING btree (substring(input for 4)); + """) + end + + def down do + execute("DROP INDEX method_id") + end +end diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index c5d5f0a4fd1a..a98e31597a06 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -3829,12 +3829,12 @@ defmodule Explorer.ChainTest do describe "recent_collated_transactions/1" do test "with no collated transactions it returns an empty list" do - assert [] == Explorer.Chain.recent_collated_transactions() + assert [] == Explorer.Chain.recent_collated_transactions(true) end test "it excludes pending transactions" do insert(:transaction) - assert [] == Explorer.Chain.recent_collated_transactions() + assert [] == Explorer.Chain.recent_collated_transactions(true) end test "returns a list of recent collated transactions" do @@ -3846,7 +3846,7 @@ defmodule Explorer.ChainTest do oldest_seen = Enum.at(newest_first_transactions, 9) paging_options = %Explorer.PagingOptions{page_size: 10, key: {oldest_seen.block_number, oldest_seen.index}} - recent_collated_transactions = Explorer.Chain.recent_collated_transactions(paging_options: paging_options) + recent_collated_transactions = Explorer.Chain.recent_collated_transactions(true, paging_options: paging_options) assert length(recent_collated_transactions) == 10 assert hd(recent_collated_transactions).hash == Enum.at(newest_first_transactions, 10).hash @@ -3868,10 +3868,11 @@ defmodule Explorer.ChainTest do to_address: address, transaction: transaction, token_contract_address: token_contract_address, - token: token + token: token, + block: transaction.block ) - fetched_transaction = List.first(Explorer.Chain.recent_collated_transactions()) + fetched_transaction = List.first(Explorer.Chain.recent_collated_transactions(true)) assert fetched_transaction.hash == transaction.hash assert length(fetched_transaction.token_transfers) == 2 end diff --git a/config/runtime.exs b/config/runtime.exs index a8a17e2e5743..f649937b3dbc 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -170,6 +170,8 @@ config :block_scout_web, BlockScoutWeb.Chain.Address.CoinBalance, # days coin_balance_history_days: System.get_env("COIN_BALANCE_HISTORY_DAYS", "10") +config :block_scout_web, BlockScoutWeb.API.V2, enabled: System.get_env("API_V2_ENABLED") == "true" + ######################## ### Ethereum JSONRPC ### ######################## From ecf3c98967777be8d82d612807af31ff94697a54 Mon Sep 17 00:00:00 2001 From: sl1depengwyn <53992153+sl1depengwyn@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:47:18 +0300 Subject: [PATCH 545/723] Add transaction state changes feature (#5944) * Show balance changes in transaction page Refactor Add scrolling Fix displaying txs with errors Fix nikitosings review Update gettext Fix tests after accounts merge Fix after accounts merge * Fix review issues - Fix displaying same entries (i.e. when sender or receiver of tx is a miner of this tx itself) - Sort entries to group it by address Co-authored-by: Viktor Baranov --- CHANGELOG.md | 1 + .../assets/js/pages/transaction.js | 3 +- .../transaction_state_controller.ex | 464 ++++++++++++++++++ .../templates/layout/app.html.eex | 4 +- .../templates/transaction/_tabs.html.eex | 6 + .../transaction_state/_metatags.html.eex | 1 + .../transaction_state/_state_change.html.eex | 67 +++ .../transaction_state/_token_balance.html.eex | 1 + .../transaction_state/index.html.eex | 51 ++ .../views/transaction_state_view.ex | 48 ++ .../block_scout_web/views/transaction_view.ex | 3 +- .../lib/block_scout_web/web_router.ex | 5 + apps/block_scout_web/priv/gettext/default.pot | 48 +- .../priv/gettext/en/LC_MESSAGES/default.po | 48 +- .../transaction_state_controller_test.exs | 187 +++++++ apps/explorer/lib/explorer/chain.ex | 8 + .../explorer/chain/address/token_balance.ex | 17 +- .../chain/address/token_balance_test.exs | 43 ++ 18 files changed, 997 insertions(+), 8 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_metatags.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_state_change.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_token_balance.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/transaction_state/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/transaction_state_view.ex create mode 100644 apps/block_scout_web/test/block_scout_web/controllers/transaction_state_controller_test.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index bafd075d0a64..be6c7081e0af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -130,6 +130,7 @@ - [#5968](https://github.com/blockscout/blockscout/pull/5968) - Add call type in the response of txlistinternal API method - [#5860](https://github.com/blockscout/blockscout/pull/5860) - Integrate rust verifier micro-service ([blockscout-rs/verifier](https://github.com/blockscout/blockscout-rs/tree/main/verification)) - [#6001](https://github.com/blockscout/blockscout/pull/6001) - Add ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES env var that filters requests and query node only if the block quantity is "latest" +- [#5944](https://github.com/blockscout/blockscout/pull/5944) - Add tab with state changes to transaction page ### Fixes diff --git a/apps/block_scout_web/assets/js/pages/transaction.js b/apps/block_scout_web/assets/js/pages/transaction.js index 0c82341909d6..373ef05e62b7 100644 --- a/apps/block_scout_web/assets/js/pages/transaction.js +++ b/apps/block_scout_web/assets/js/pages/transaction.js @@ -57,7 +57,8 @@ if ($transactionDetailsPage.length) { pathParts.includes('token-transfers') || pathParts.includes('logs') || pathParts.includes('token-transfers') || - pathParts.includes('raw-trace') + pathParts.includes('raw-trace') || + pathParts.includes('state') if (shouldScroll) { document.getElementById('transaction-tabs').scrollIntoView() } diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex new file mode 100644 index 000000000000..14b07de0409d --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex @@ -0,0 +1,464 @@ +defmodule BlockScoutWeb.TransactionStateController do + use BlockScoutWeb, :controller + + alias BlockScoutWeb.{ + AccessHelpers, + Controller, + TransactionController, + TransactionStateView + } + + alias Explorer.{Chain, Chain.Wei, Market, PagingOptions} + alias Explorer.ExchangeRates.Token + alias Phoenix.View + alias Indexer.Fetcher.{CoinBalance, TokenBalance} + + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] + import BlockScoutWeb.Models.GetAddressTags, only: [get_address_tags: 2] + import BlockScoutWeb.Models.GetTransactionTags, only: [get_transaction_with_addresses_tags: 2] + {:ok, burn_address_hash} = Chain.string_to_address_hash("0x0000000000000000000000000000000000000000") + + @burn_address_hash burn_address_hash + + def index(conn, %{"transaction_id" => transaction_hash_string, "type" => "JSON"} = params) do + with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), + :ok <- Chain.check_transaction_exists(transaction_hash), + {:ok, transaction} <- + Chain.hash_to_transaction( + transaction_hash, + necessity_by_association: %{ + [block: :miner] => :required, + from_address: :required, + to_address: :optional + } + ), + {:ok, false} <- + AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- + AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do + full_options = [ + necessity_by_association: %{ + [from_address: :smart_contract] => :optional, + [to_address: :smart_contract] => :optional, + [from_address: :names] => :optional, + [to_address: :names] => :optional, + from_address: :required, + to_address: :required, + token: :required + }, + # we need to consider all token transfers in block to show whole state change of transaction + paging_options: %PagingOptions{key: nil, page_size: nil} + ] + + token_transfers = Chain.transaction_to_token_transfers(transaction_hash, full_options) + + block = transaction.block + + block_txs = + Chain.block_to_transactions(block.hash, + necessity_by_association: %{}, + paging_options: %PagingOptions{key: nil, page_size: nil} + ) + + {from_before, to_before, miner_before} = coin_balances_before(transaction, block_txs) + + from_hash = transaction.from_address_hash + to_hash = transaction.to_address_hash + miner_hash = block.miner_hash + + from = transaction.from_address + from_after = do_update_coin_balance_from_tx(from_hash, transaction, from_before, block) + + from_coin_entry = + if from_hash not in [to_hash, miner_hash] do + View.render_to_string( + TransactionStateView, + "_state_change.html", + coin_or_token_transfers: :coin, + address: from, + burn_address_hash: @burn_address_hash, + balance_before: from_before, + balance_after: from_after, + balance_diff: Wei.sub(from_after, from_before), + conn: conn + ) + end + + to = transaction.to_address + to_after = do_update_coin_balance_from_tx(to_hash, transaction, to_before, block) + + to_coin_entry = + if to_hash != miner_hash do + View.render_to_string( + TransactionStateView, + "_state_change.html", + coin_or_token_transfers: :coin, + address: to, + burn_address_hash: @burn_address_hash, + balance_before: to_before, + balance_after: to_after, + balance_diff: Wei.sub(to_after, to_before), + conn: conn + ) + end + + miner = block.miner + miner_after = do_update_coin_balance_from_tx(miner_hash, transaction, miner_before, block) + + miner_entry = + View.render_to_string( + TransactionStateView, + "_state_change.html", + coin_or_token_transfers: :coin, + address: miner, + burn_address_hash: @burn_address_hash, + balance_before: miner_before, + balance_after: miner_after, + balance_diff: Wei.sub(miner_after, miner_before), + miner: true, + conn: conn + ) + + token_balances_before = token_balances_before(token_transfers, transaction, block_txs) + + token_balances_after = + do_update_token_balances_from_token_transfers( + token_transfers, + token_balances_before, + :include_transfers + ) + + items = + for {address, balances} <- token_balances_after, + {token_hash, {balance, transfers}} <- balances do + balance_before = token_balances_before[address][token_hash] + + View.render_to_string( + TransactionStateView, + "_state_change.html", + coin_or_token_transfers: transfers, + address: address, + burn_address_hash: @burn_address_hash, + balance_before: balance_before, + balance_after: balance, + balance_diff: Decimal.sub(balance, balance_before), + conn: conn + ) + end + + json(conn, %{items: Enum.sort([from_coin_entry, to_coin_entry, miner_entry | items])}) + else + {:restricted_access, _} -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + + :error -> + TransactionController.set_invalid_view(conn, transaction_hash_string) + + {:error, :not_found} -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + + :not_found -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + end + end + + def index(conn, %{"transaction_id" => transaction_hash_string} = params) do + with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), + {:ok, transaction} <- + Chain.hash_to_transaction( + transaction_hash, + necessity_by_association: %{ + :block => :optional, + [created_contract_address: :names] => :optional, + [from_address: :names] => :optional, + [to_address: :names] => :optional, + [to_address: :smart_contract] => :optional, + :token_transfers => :optional + } + ), + {:ok, false} <- + AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- + AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do + render( + conn, + "index.html", + exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), + block_height: Chain.block_height(), + current_path: Controller.current_full_path(conn), + show_token_transfers: Chain.transaction_has_token_transfers?(transaction_hash), + transaction: transaction, + from_tags: get_address_tags(transaction.from_address_hash, current_user(conn)), + to_tags: get_address_tags(transaction.to_address_hash, current_user(conn)), + tx_tags: + get_transaction_with_addresses_tags( + transaction, + current_user(conn) + ), + current_user: current_user(conn) + ) + else + :not_found -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + + :error -> + TransactionController.set_invalid_view(conn, transaction_hash_string) + + {:error, :not_found} -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + + {:restricted_access, _} -> + TransactionController.set_not_found_view(conn, transaction_hash_string) + end + end + + def coin_balance(address_hash, _block_number) when is_nil(address_hash) do + %Wei{value: Decimal.new(0)} + end + + def coin_balance(address_hash, block_number) do + case Chain.get_coin_balance(address_hash, block_number) do + %{value: val} when not is_nil(val) -> + val + + _ -> + json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) + CoinBalance.run([{address_hash.bytes, block_number}], json_rpc_named_arguments) + # after CoinBalance.run balance is fetched and imported, so we can call coin_balance again + coin_balance(address_hash, block_number) + end + end + + def coin_balances_before(tx, block_txs) do + block = tx.block + + from_before = coin_balance(tx.from_address_hash, block.number - 1) + to_before = coin_balance(tx.to_address_hash, block.number - 1) + miner_before = coin_balance(block.miner_hash, block.number - 1) + + block_txs + |> Enum.reduce_while( + {from_before, to_before, miner_before}, + fn block_tx, {block_from, block_to, block_miner} = state -> + if block_tx.index < tx.index do + {:cont, + {do_update_coin_balance_from_tx(tx.from_address_hash, block_tx, block_from, block), + do_update_coin_balance_from_tx(tx.to_address_hash, block_tx, block_to, block), + do_update_coin_balance_from_tx(tx.block.miner_hash, block_tx, block_miner, block)}} + else + # txs ordered by index ascending, so we can halt after facing index greater or equal than index of our tx + {:halt, state} + end + end + ) + end + + defp do_update_coin_balance_from_tx(address_hash, tx, balance, block) do + from = tx.from_address_hash + to = tx.to_address_hash + miner = block.miner_hash + + balance + |> (&if(address_hash == from, do: Wei.sub(&1, from_loss(tx)), else: &1)).() + |> (&if(address_hash == to, do: Wei.sum(&1, to_profit(tx)), else: &1)).() + |> (&if(address_hash == miner, do: Wei.sum(&1, miner_profit(tx, block)), else: &1)).() + end + + def token_balance(@burn_address_hash, _token_transfer, _block_number) do + Decimal.new(0) + end + + def token_balance(address_hash, token_transfer, block_number) do + token = token_transfer.token + token_contract_address_hash = token.contract_address_hash + + case Chain.get_token_balance(address_hash, token_contract_address_hash, block_number) do + %{value: val} when not is_nil(val) -> + val + + # we haven't fetched this balance yet + _ -> + json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) + + token_id_int = + case token_transfer.token_id do + %Decimal{} -> Decimal.to_integer(token_transfer.token_id) + id_int when is_integer(id_int) -> id_int + _ -> token_transfer.token_id + end + + TokenBalance.run( + [ + {address_hash.bytes, token_contract_address_hash.bytes, block_number, token.type, token_id_int, 0} + ], + json_rpc_named_arguments + ) + + # after TokenBalance.run balance is fetched and imported, so we can call token_balance again + token_balance(address_hash, token_transfer, block_number) + end + end + + def token_balances_before(token_transfers, tx, block_txs) do + balances_before = + token_transfers + |> Enum.reduce(%{}, fn transfer, balances_map -> + from = transfer.from_address + to = transfer.to_address + token_hash = transfer.token_contract_address_hash + prev_block = transfer.block_number - 1 + + balances_with_from = + case balances_map do + # from address already in the map + %{^from => %{^token_hash => _}} -> + balances_map + + # we need to add from address into the map + _ -> + put_in( + balances_map, + Enum.map([from, token_hash], &Access.key(&1, %{})), + token_balance(from.hash, transfer, prev_block) + ) + end + + case balances_with_from do + # to address already in the map + %{^to => %{^token_hash => _}} -> + balances_with_from + + # we need to add to address into the map + _ -> + put_in( + balances_with_from, + Enum.map([to, token_hash], &Access.key(&1, %{})), + token_balance(to.hash, transfer, prev_block) + ) + end + end) + + block_txs + |> Enum.reduce_while( + balances_before, + fn block_tx, state -> + if block_tx.index < tx.index do + {:cont, do_update_token_balances_from_token_transfers(block_tx.token_transfers, state)} + else + # txs ordered by index ascending, so we can halt after facing index greater or equal than index of our tx + {:halt, state} + end + end + ) + end + + defp do_update_token_balances_from_token_transfers( + token_transfers, + balances_map, + include_transfers \\ :no + ) do + Enum.reduce( + token_transfers, + balances_map, + &token_transfers_balances_reducer(&1, &2, include_transfers) + ) + end + + defp token_transfers_balances_reducer(transfer, state_balances_map, include_transfers) do + from = transfer.from_address + to = transfer.to_address + token = transfer.token_contract_address_hash + + balances_map_from_included = + case state_balances_map do + # from address is needed to be updated in our map + %{^from => %{^token => val}} -> + put_in( + state_balances_map, + Enum.map([from, token], &Access.key(&1, %{})), + do_update_balance(val, :from, transfer, include_transfers) + ) + + # we are not interested in this address + _ -> + state_balances_map + end + + case balances_map_from_included do + # to address is needed to be updated in our map + %{^to => %{^token => val}} -> + put_in( + balances_map_from_included, + Enum.map([to, token], &Access.key(&1, %{})), + do_update_balance(val, :to, transfer, include_transfers) + ) + + # we are not interested in this address + _ -> + balances_map_from_included + end + end + + # point of this function is to include all transfers for frontend if option :include_transfer is passed + defp do_update_balance(old_val, type, transfer, include_transfers) do + transfer_amount = if is_nil(transfer.amount), do: 1, else: transfer.amount + + case {include_transfers, old_val, type} do + {:include_transfers, {val, transfers}, :from} -> + {Decimal.sub(val, transfer_amount), [{type, transfer} | transfers]} + + {:include_transfers, {val, transfers}, :to} -> + {Decimal.add(val, transfer_amount), [{type, transfer} | transfers]} + + {:include_transfers, val, :from} -> + {Decimal.sub(val, transfer_amount), [{type, transfer}]} + + {:include_transfers, val, :to} -> + {Decimal.add(val, transfer_amount), [{type, transfer}]} + + {_, val, :from} -> + Decimal.sub(val, transfer_amount) + + {_, val, :to} -> + Decimal.add(val, transfer_amount) + end + end + + def from_loss(tx) do + {_, fee} = Chain.fee(tx, :wei) + + if error?(tx) do + %Wei{value: fee} + else + Wei.sum(tx.value, %Wei{value: fee}) + end + end + + def to_profit(tx) do + if error?(tx) do + %Wei{value: 0} + else + tx.value + end + end + + def miner_profit(tx, block) do + base_fee_per_gas = block.base_fee_per_gas || %Wei{value: Decimal.new(0)} + max_priority_fee_per_gas = tx.max_priority_fee_per_gas || tx.gas_price + max_fee_per_gas = tx.max_fee_per_gas || tx.gas_price + + priority_fee_per_gas = + Enum.min_by([max_priority_fee_per_gas, Wei.sub(max_fee_per_gas, base_fee_per_gas)], fn x -> + Wei.to(x, :wei) + end) + + Wei.mult(priority_fee_per_gas, tx.gas_used) + end + + defp error?(tx) do + case Chain.transaction_to_status(tx) do + {:error, _} -> true + _ -> false + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index 4859c2042f14..94a7ae7d86f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -104,7 +104,8 @@ @view_module == Elixir.BlockScoutWeb.TransactionInternalTransactionView || @view_module == Elixir.BlockScoutWeb.TransactionLogView || @view_module == Elixir.BlockScoutWeb.TransactionRawTraceView || - @view_module == Elixir.BlockScoutWeb.TransactionTokenTransferView + @view_module == Elixir.BlockScoutWeb.TransactionTokenTransferView || + @view_module == Elixir.BlockScoutWeb.TransactionStateView ) -> %> <% to_address = @transaction && @transaction.to_address && "0x" <> Base.encode16(@transaction.to_address.hash.bytes, case: :lower) %> <% {:ok, created_from_address} = if @transaction.to_address_hash, do: Chain.hash_to_address(@transaction.to_address_hash), else: {:ok, nil} %> @@ -245,6 +246,7 @@ @view_module != Elixir.BlockScoutWeb.TransactionLogView && @view_module != Elixir.BlockScoutWeb.TransactionRawTraceView && @view_module != Elixir.BlockScoutWeb.TransactionTokenTransferView && + @view_module != Elixir.BlockScoutWeb.TransactionStateView && @view_module != Elixir.BlockScoutWeb.AddressTransactionView && @view_module != Elixir.BlockScoutWeb.AddressTokenTransferView && @view_module != Elixir.BlockScoutWeb.AddressTokenView && diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tabs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tabs.html.eex index 284498494291..c99a8f1036bf 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tabs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tabs.html.eex @@ -25,4 +25,10 @@ class: "card-tab #{tab_status("raw-trace", @conn.request_path)}", to: AccessHelpers.get_path(@conn, :transaction_raw_trace_path, :index, @transaction) ) %> + <%= link( + gettext("State changes"), + class: "card-tab #{tab_status("state", @conn.request_path)}", + to: AccessHelpers.get_path(@conn, :transaction_state_path, :index, @transaction) + ) + %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_metatags.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_metatags.html.eex new file mode 100644 index 000000000000..85c3d6675f4a --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_metatags.html.eex @@ -0,0 +1 @@ +<%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_state_change.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_state_change.html.eex new file mode 100644 index 000000000000..180d51d9d04d --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_state_change.html.eex @@ -0,0 +1,67 @@ + +<% coin_or_transfer = if @coin_or_token_transfers == :coin, do: :coin, else: elem(List.first(@coin_or_token_transfers), 1)%> +<%= if coin_or_transfer != :coin and coin_or_transfer.token.type != "ERC-20" or has_diff?(@balance_diff) do %> + + <%= if @address.hash == @burn_address_hash do %> + + + + + <% else %> + <%= if Map.get(assigns, :miner) do %> + + + <% else %> + + + <% end %> + <%= if not_negative?(@balance_before) and not_negative?(@balance_after) do %> + + + <% else %> + + + <% end %> + <% end %> + + +<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_token_balance.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_token_balance.html.eex new file mode 100644 index 000000000000..6803a22d4087 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/_token_balance.html.eex @@ -0,0 +1 @@ +<%= format_according_to_decimals(@balance, @transfer.token.decimals) %><%= " " %><%= render BlockScoutWeb.TransactionView, "_link_to_token_symbol.html", transfer: @transfer %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/index.html.eex new file mode 100644 index 000000000000..c62dbb18bdf5 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_state/index.html.eex @@ -0,0 +1,51 @@ +
    + <%= render BlockScoutWeb.TransactionView, "overview.html", assigns %> +
    + <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %> +
    +

    <%= gettext "State changes" %>

    + + <%= cond do %> + <% Chain.transaction_to_status(@transaction) == :pending -> %> +
    + <%= gettext "The changes from this transaction have not yet happened since the transaction is still pending." %> +
    + <% not has_state_changes?(@transaction) -> %> +
    + <%= gettext "This transaction hasn't changed state." %> +
    + <% true -> %> +
    +
    +
    NameAddressBalanceActions<%= gettext "Name" %><%= gettext "Address" %><%= gettext "Balance" %><%= gettext "Actions" %>
    - <%= link("Edit", to: watchlist_address_path(@conn, :edit, @watchlist_address.id)) %> + <%= link(gettext("Edit"), to: watchlist_address_path(@conn, :edit, @watchlist_address.id)) %>
    - <%= balance_ether(@watchlist_address.address) %> + <%= balance_ether(@watchlist_address.fetched_coin_balance) %>
    ( watchlist.id, "address_hash" => watchlist.address_hash, "name" => watchlist.name, - "address_balance" => if(watchlist.address.fetched_coin_balance, do: watchlist.address.fetched_coin_balance.value), + "address_balance" => if(watchlist.fetched_coin_balance, do: watchlist.fetched_coin_balance.value), "exchange_rate" => exchange_rate.usd_value, "notification_settings" => %{ "native" => %{ diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex index 0605862572be..f3f538399e33 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/watchlist_address_view.ex @@ -3,11 +3,9 @@ defmodule BlockScoutWeb.Account.WatchlistAddressView do import BlockScoutWeb.AddressView, only: [trimmed_hash: 1] import BlockScoutWeb.WeiHelpers, only: [format_wei_value: 2] - alias Explorer.Chain.Address + def balance_ether(nil), do: "" - def balance_ether(%Address{fetched_coin_balance: nil}), do: "" - - def balance_ether(%Address{fetched_coin_balance: balance}) do + def balance_ether(balance) do format_wei_value(balance, :ether) end end diff --git a/apps/block_scout_web/test/block_scout_web/models/user_from_auth_test.exs b/apps/block_scout_web/test/block_scout_web/models/user_from_auth_test.exs index d1d99501a39a..2d13f116009e 100644 --- a/apps/block_scout_web/test/block_scout_web/models/user_from_auth_test.exs +++ b/apps/block_scout_web/test/block_scout_web/models/user_from_auth_test.exs @@ -37,13 +37,13 @@ defmodule UserFromAuthTest do email: "john@blockscout.com", name: "John Snow", uid: "github|666666" - } = Identity |> first |> Repo.one() + } = Identity |> first |> Repo.account_repo().one() %{ id: watchlist_id, identity_id: ^identity_id, name: "default" - } = Watchlist |> first |> Repo.one() + } = Watchlist |> first |> Repo.account_repo().one() assert {:ok, %{ @@ -84,13 +84,13 @@ defmodule UserFromAuthTest do email: "john@blockscout.com", name: "John Snow", uid: "google-oauth2|666666" - } = Identity |> first |> Repo.one() + } = Identity |> first |> Repo.account_repo().one() %{ id: watchlist_id, identity_id: ^identity_id, name: "default" - } = Watchlist |> first |> Repo.one() + } = Watchlist |> first |> Repo.account_repo().one() assert {:ok, %{ diff --git a/apps/block_scout_web/test/support/conn_case.ex b/apps/block_scout_web/test/support/conn_case.ex index 787709ccb774..5ae6216f0c01 100644 --- a/apps/block_scout_web/test/support/conn_case.ex +++ b/apps/block_scout_web/test/support/conn_case.ex @@ -37,9 +37,11 @@ defmodule BlockScoutWeb.ConnCase do @dialyzer {:nowarn_function, __ex_unit_setup_0: 1} setup tags do :ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo) + :ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo.Account) unless tags[:async] do Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, {:shared, self()}) + Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo.Account, {:shared, self()}) end Supervisor.terminate_child(Explorer.Supervisor, Explorer.Chain.Cache.Transactions.child_id()) diff --git a/apps/block_scout_web/test/test_helper.exs b/apps/block_scout_web/test/test_helper.exs index 9aeb6c8fa784..11c846c47cd9 100644 --- a/apps/block_scout_web/test/test_helper.exs +++ b/apps/block_scout_web/test/test_helper.exs @@ -25,6 +25,7 @@ ExUnit.start() Mox.defmock(Explorer.ExchangeRates.Source.TestSource, for: Explorer.ExchangeRates.Source) Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, :manual) +Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo.Account, :manual) Absinthe.Test.prime(BlockScoutWeb.Schema) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index cc58587a54ad..c58d3bfd3741 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -7,7 +7,7 @@ import Config # General application configuration config :explorer, - ecto_repos: [Explorer.Repo], + ecto_repos: [Explorer.Repo, Explorer.Repo.Account], token_functions_reader_max_retries: 3 config :explorer, Explorer.Counters.AverageBlockTime, diff --git a/apps/explorer/config/dev.exs b/apps/explorer/config/dev.exs index 7d7bd024a703..1ccfb34b6d61 100644 --- a/apps/explorer/config/dev.exs +++ b/apps/explorer/config/dev.exs @@ -6,6 +6,9 @@ config :explorer, Explorer.Repo, timeout: :timer.seconds(80) # Configure API database config :explorer, Explorer.Repo.Replica1, timeout: :timer.seconds(80) +# Configure Account database +config :explorer, Explorer.Repo.Account, timeout: :timer.seconds(80) + config :explorer, Explorer.Tracer, env: "dev", disabled?: true config :logger, :explorer, diff --git a/apps/explorer/config/prod.exs b/apps/explorer/config/prod.exs index 8b42271e33b4..2d389e59d6f1 100644 --- a/apps/explorer/config/prod.exs +++ b/apps/explorer/config/prod.exs @@ -10,6 +10,11 @@ config :explorer, Explorer.Repo.Replica1, prepare: :unnamed, timeout: :timer.seconds(60) +# Configures Account database +config :explorer, Explorer.Repo.Account, + prepare: :unnamed, + timeout: :timer.seconds(60) + config :explorer, Explorer.Tracer, env: "production", disabled?: true config :logger, :explorer, diff --git a/apps/explorer/config/test.exs b/apps/explorer/config/test.exs index 3c7fc40fecd9..1b3b160791e4 100644 --- a/apps/explorer/config/test.exs +++ b/apps/explorer/config/test.exs @@ -23,6 +23,16 @@ config :explorer, Explorer.Repo.Replica1, timeout: :timer.seconds(60), queue_target: 1000 +# Configure API database +config :explorer, Explorer.Repo.Account, + database: "explorer_test_account", + hostname: "localhost", + pool: Ecto.Adapters.SQL.Sandbox, + # Default of `5_000` was too low for `BlockFetcher` test + ownership_timeout: :timer.minutes(1), + timeout: :timer.seconds(60), + queue_target: 1000 + config :logger, :explorer, level: :warn, path: Path.absname("logs/test/explorer.log") diff --git a/apps/explorer/lib/explorer/account/api/key.ex b/apps/explorer/lib/explorer/account/api/key.ex index ef24979034d2..ab80d41ec234 100644 --- a/apps/explorer/lib/explorer/account/api/key.ex +++ b/apps/explorer/lib/explorer/account/api/key.ex @@ -41,14 +41,14 @@ defmodule Explorer.Account.Api.Key do def create(attrs) do %__MODULE__{} |> changeset(Map.put(attrs, :value, generate_api_key())) - |> Repo.insert() + |> Repo.account_repo().insert() end def api_key_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = api_key) do if identity_id |> api_keys_by_identity_id_query() |> limit(@max_key_per_account) - |> Repo.aggregate(:count, :value) >= @max_key_per_account do + |> Repo.account_repo().aggregate(:count, :value) >= @max_key_per_account do api_key |> add_error(:name, "Max #{@max_key_per_account} keys per account") else @@ -81,7 +81,7 @@ defmodule Explorer.Account.Api.Key do def get_api_key_by_value_and_identity_id(value, identity_id) when not is_nil(value) and not is_nil(identity_id) do value |> api_key_by_value_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_api_key_by_value_and_identity_id(_, _), do: nil @@ -89,7 +89,7 @@ defmodule Explorer.Account.Api.Key do def update(%{value: api_key_value, identity_id: identity_id} = attrs) do with api_key <- get_api_key_by_value_and_identity_id(api_key_value, identity_id), false <- is_nil(api_key) do - api_key |> changeset(attrs) |> Repo.update() + api_key |> changeset(attrs) |> Repo.account_repo().update() else true -> {:error, %{reason: :item_not_found}} @@ -99,7 +99,7 @@ defmodule Explorer.Account.Api.Key do def delete(api_key_value, identity_id) when not is_nil(api_key_value) and not is_nil(identity_id) do api_key_value |> api_key_by_value_and_identity_id_query(identity_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete(_, _), do: nil @@ -107,7 +107,7 @@ defmodule Explorer.Account.Api.Key do def get_api_keys_by_identity_id(id) when not is_nil(id) do id |> api_keys_by_identity_id_query() - |> Repo.all() + |> Repo.account_repo().all() end def get_api_keys_by_identity_id(_), do: nil @@ -116,8 +116,8 @@ defmodule Explorer.Account.Api.Key do if match?({:ok, _casted_api_key}, UUID.cast(api_key_value)) do __MODULE__ |> where([api_key], api_key.value == ^api_key_value) - |> Repo.one() - |> Repo.preload(identity: :plan) + |> Repo.account_repo().one() + |> Repo.account_repo().preload(identity: :plan) else nil end diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index e18e809ae3a7..4be56dd007ca 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -8,7 +8,7 @@ defmodule Explorer.Account.CustomABI do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Hash} + alias Explorer.Chain.Hash import Ecto.Changeset @@ -19,8 +19,9 @@ defmodule Explorer.Account.CustomABI do field(:abi, {:array, :map}) field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) + field(:address_hash, Hash.Address, null: false) + belongs_to(:identity, Identity) - belongs_to(:address, Address, foreign_key: :address_hash, references: :hash, type: Hash.Address) timestamps() end @@ -34,7 +35,6 @@ defmodule Explorer.Account.CustomABI do |> validate_custom_abi() |> check_smart_contract_address() |> foreign_key_constraint(:identity_id, message: "User not found") - |> foreign_key_constraint(:address_hash, message: "Address not found") |> unique_constraint([:identity_id, :address_hash], message: "Custom ABI for this address has already been added before" ) @@ -48,23 +48,23 @@ defmodule Explorer.Account.CustomABI do end defp check_smart_contract_address(%Changeset{changes: %{address_hash: address_hash}} = custom_abi) do - if Chain.is_address_hash_is_smart_contract?(address_hash) do - custom_abi - else - add_error(custom_abi, :address_hash, "Address is not a smart contract") - end + check_smart_contract_address_inner(custom_abi, address_hash) end defp check_smart_contract_address(%Changeset{data: %{address_hash: address_hash}} = custom_abi) do + check_smart_contract_address_inner(custom_abi, address_hash) + end + + defp check_smart_contract_address(custom_abi), do: custom_abi + + defp check_smart_contract_address_inner(changeset, address_hash) do if Chain.is_address_hash_is_smart_contract?(address_hash) do - custom_abi + changeset else - add_error(custom_abi, :address_hash, "Address is not a smart contract") + add_error(changeset, :address_hash, "Address is not a smart contract") end end - defp check_smart_contract_address(custom_abi), do: custom_abi - defp validate_custom_abi(%Changeset{changes: %{given_abi: given_abi, abi_validating_error: error}} = custom_abi) do custom_abi |> add_error(:abi, error) @@ -130,7 +130,7 @@ defmodule Explorer.Account.CustomABI do if identity_id |> custom_abis_by_identity_id_query() |> limit(@max_abis_per_account) - |> Repo.aggregate(:count, :id) >= @max_abis_per_account do + |> Repo.account_repo().aggregate(:count, :id) >= @max_abis_per_account do add_error(custom_abi, :name, "Max #{@max_abis_per_account} ABIs per account") else custom_abi @@ -142,7 +142,7 @@ defmodule Explorer.Account.CustomABI do def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> Repo.insert() + |> Repo.account_repo().insert() end def custom_abis_by_identity_id_query(id) when not is_nil(id) do @@ -173,7 +173,7 @@ defmodule Explorer.Account.CustomABI do when not is_nil(identity_id) and not is_nil(address_hash) do address_hash |> custom_abi_by_identity_id_and_address_hash_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_custom_abi_by_identity_id_and_address_hash(_, _), do: nil @@ -181,7 +181,7 @@ defmodule Explorer.Account.CustomABI do def get_custom_abi_by_id_and_identity_id(id, identity_id) when not is_nil(id) and not is_nil(identity_id) do id |> custom_abi_by_id_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_custom_abi_by_id_and_identity_id(_, _), do: nil @@ -189,7 +189,7 @@ defmodule Explorer.Account.CustomABI do def get_custom_abis_by_identity_id(id) when not is_nil(id) do id |> custom_abis_by_identity_id_query() - |> Repo.all() + |> Repo.account_repo().all() end def get_custom_abis_by_identity_id(_), do: nil @@ -197,7 +197,7 @@ defmodule Explorer.Account.CustomABI do def delete(id, identity_id) when not is_nil(id) and not is_nil(identity_id) do id |> custom_abi_by_id_and_identity_id_query(identity_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete(_, _), do: nil @@ -207,7 +207,7 @@ defmodule Explorer.Account.CustomABI do false <- is_nil(custom_abi) do custom_abi |> changeset(attrs) - |> Repo.update() + |> Repo.account_repo().update() else true -> {:error, %{reason: :item_not_found}} diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 3c3953345966..49e75cc6a0f4 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -16,8 +16,10 @@ defmodule Explorer.Account.Identity do field(:name, :string) field(:nickname, :string) field(:avatar, :string) + has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) + belongs_to(:plan, Plan) timestamps() diff --git a/apps/explorer/lib/explorer/account/notifier/email.ex b/apps/explorer/lib/explorer/account/notifier/email.ex index 03d4f51b9473..35555e316914 100644 --- a/apps/explorer/lib/explorer/account/notifier/email.ex +++ b/apps/explorer/lib/explorer/account/notifier/email.ex @@ -85,9 +85,9 @@ defmodule Explorer.Account.Notifier.Email do do: name defp address_hash_string(%WatchlistNotification{ - watchlist_address: %WatchlistAddress{address: address} + watchlist_address: %WatchlistAddress{address_hash: address_hash} }), - do: hash_string(address.hash) + do: hash_string(address_hash) defp hash_string(hash) do "0x" <> Base.encode16(hash.bytes, case: :lower) @@ -114,7 +114,7 @@ defmodule Explorer.Account.Notifier.Email do end defp preload(notification) do - Repo.preload(notification, watchlist_address: [:address, watchlist: :identity]) + Repo.account_repo().preload(notification, watchlist_address: [watchlist: :identity]) end defp address_url(address_hash) do diff --git a/apps/explorer/lib/explorer/account/notifier/notify.ex b/apps/explorer/lib/explorer/account/notifier/notify.ex index 86a37ea3464e..b935442baa79 100644 --- a/apps/explorer/lib/explorer/account/notifier/notify.ex +++ b/apps/explorer/lib/explorer/account/notifier/notify.ex @@ -64,7 +64,7 @@ defmodule Explorer.Account.Notifier.Notify do ) do notification |> query_notification(address) - |> Repo.all() + |> Repo.account_repo().all() |> case do [] -> save_and_send_notification(notification, address) _ -> :ok @@ -91,7 +91,7 @@ defmodule Explorer.Account.Notifier.Notify do end defp save_and_send_notification(%WatchlistNotification{} = notification, %WatchlistAddress{} = address) do - Repo.insert(notification) + Repo.account_repo().insert(notification) email = Email.compose(notification, address) @@ -143,6 +143,6 @@ defmodule Explorer.Account.Notifier.Notify do defp find_watchlists_addresses(%Explorer.Chain.Hash{} = address_hash) do query = from(wa in WatchlistAddress, where: wa.address_hash == ^address_hash) - Repo.all(query) + Repo.account_repo().all(query) end end diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index d62881b2ff51..273d7b5b1881 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -75,7 +75,7 @@ defmodule Explorer.Account.PublicTagsRequest do def create(attrs) do %__MODULE__{} |> changeset(Map.put(attrs, :request_type, "add")) - |> Repo.insert() + |> Repo.account_repo().insert() |> AirTable.submit() end @@ -90,7 +90,7 @@ defmodule Explorer.Account.PublicTagsRequest do if identity_id |> public_tags_requests_by_identity_id_query() |> limit(@max_public_tags_request_per_account) - |> Repo.aggregate(:count, :id) >= @max_public_tags_request_per_account do + |> Repo.account_repo().aggregate(:count, :id) >= @max_public_tags_request_per_account do request |> add_error(:tags, "Max #{@max_public_tags_request_per_account} public tags requests per account") else @@ -113,7 +113,7 @@ defmodule Explorer.Account.PublicTagsRequest do fragment("? && ?", public_tags_request.addresses, ^Enum.map(prepared_addresses, fn x -> x.bytes end)) ) |> limit(1) - |> Repo.one() + |> Repo.account_repo().one() now = DateTime.utc_now() @@ -192,7 +192,7 @@ defmodule Explorer.Account.PublicTagsRequest do def public_tags_request_by_id_and_identity_id_query(_, _), do: nil def get_public_tags_request_by_id_and_identity_id(id, identity_id) when not is_nil(id) and not is_nil(identity_id) do - id |> public_tags_request_by_id_and_identity_id_query(identity_id) |> Repo.one() + id |> public_tags_request_by_id_and_identity_id_query(identity_id) |> Repo.account_repo().one() end def get_public_tags_request_by_id_and_identity_id(_, _), do: nil @@ -200,7 +200,7 @@ defmodule Explorer.Account.PublicTagsRequest do def get_public_tags_requests_by_identity_id(id) when not is_nil(id) do id |> public_tags_requests_by_identity_id_query() - |> Repo.all() + |> Repo.account_repo().all() end def get_public_tags_requests_by_identity_id(_), do: nil @@ -208,7 +208,7 @@ defmodule Explorer.Account.PublicTagsRequest do def delete_public_tags_request(identity_id, id) when not is_nil(id) and not is_nil(identity_id) do id |> public_tags_request_by_id_and_identity_id_query(identity_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete_public_tags_request(_, _), do: nil @@ -216,7 +216,8 @@ defmodule Explorer.Account.PublicTagsRequest do def update(%{id: id, identity_id: identity_id} = attrs) do with public_tags_request <- get_public_tags_request_by_id_and_identity_id(id, identity_id), false <- is_nil(public_tags_request), - {:ok, changeset} <- public_tags_request |> changeset(Map.put(attrs, :request_type, "edit")) |> Repo.update() do + {:ok, changeset} <- + public_tags_request |> changeset(Map.put(attrs, :request_type, "edit")) |> Repo.account_repo().update() do AirTable.submit({:ok, changeset}) else true -> @@ -233,7 +234,7 @@ defmodule Explorer.Account.PublicTagsRequest do {:ok, changeset} <- public_tags_request |> changeset_without_constraints(%{request_type: "delete", remove_reason: remove_reason}) - |> Repo.update() do + |> Repo.account_repo().update() do case AirTable.submit({:ok, changeset}) do {:error, changeset} -> changeset diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index 6a3bd89c2b41..49c2bcb63fd8 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -16,14 +16,9 @@ defmodule Explorer.Account.TagAddress do schema "account_tag_addresses" do field(:name, :string) + field(:address_hash, Hash.Address, null: false) belongs_to(:identity, Identity) - belongs_to(:address, Address, - foreign_key: :address_hash, - references: :hash, - type: Hash.Address - ) - timestamps() end @@ -42,30 +37,37 @@ defmodule Explorer.Account.TagAddress do |> validate_length(:name, min: 1, max: 35) |> unique_constraint([:identity_id, :address_hash], message: "Address tag already exists") |> check_existance_or_create_address() - |> foreign_key_constraint(:address_hash, message: "") |> tag_address_count_constraint() end def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> Repo.insert() + |> Repo.account_repo().insert() end defp check_existance_or_create_address(%Changeset{changes: %{address_hash: address_hash}, valid?: true} = changeset) do + check_existance_or_create_address_inner(changeset, address_hash) + end + + defp check_existance_or_create_address(%Changeset{data: %{address_hash: address_hash}, valid?: true} = changeset) do + check_existance_or_create_address_inner(changeset, address_hash) + end + + defp check_existance_or_create_address(changeset), do: changeset + + defp check_existance_or_create_address_inner(changeset, address_hash) do with {:ok, hash} <- Hash.Address.cast(address_hash), {:ok, %Address{}} <- Chain.find_or_insert_address_from_hash(hash, []) do changeset end end - defp check_existance_or_create_address(changeset), do: changeset - def tag_address_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = tag_address) do if identity_id |> tags_address_by_identity_id_query() |> limit(@max_tag_address_per_account) - |> Repo.aggregate(:count, :id) >= @max_tag_address_per_account do + |> Repo.account_repo().aggregate(:count, :id) >= @max_tag_address_per_account do tag_address |> add_error(:name, "Max #{@max_tag_address_per_account} tags per account") else @@ -86,7 +88,7 @@ defmodule Explorer.Account.TagAddress do def get_tags_address_by_identity_id(id) when not is_nil(id) do id |> tags_address_by_identity_id_query() - |> Repo.all() + |> Repo.account_repo().all() end def get_tags_address_by_identity_id(_), do: nil @@ -103,7 +105,7 @@ defmodule Explorer.Account.TagAddress do when not is_nil(address_hash) and not is_nil(identity_id) do address_hash |> tag_address_by_address_hash_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_tag_address_by_address_hash_and_identity_id(_, _), do: nil @@ -120,7 +122,7 @@ defmodule Explorer.Account.TagAddress do when not is_nil(tag_id) and not is_nil(identity_id) do tag_id |> tag_address_by_id_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_tag_address_by_id_and_identity_id_query(_, _), do: nil @@ -128,7 +130,7 @@ defmodule Explorer.Account.TagAddress do def delete(tag_id, identity_id) when not is_nil(tag_id) and not is_nil(identity_id) do tag_id |> tag_address_by_id_and_identity_id_query(identity_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete(_, _), do: nil @@ -136,7 +138,7 @@ defmodule Explorer.Account.TagAddress do def update(%{id: tag_id, identity_id: identity_id} = attrs) do with tag <- get_tag_address_by_id_and_identity_id_query(tag_id, identity_id), false <- is_nil(tag) do - tag |> changeset(attrs) |> Repo.update() + tag |> changeset(attrs) |> Repo.account_repo().update() else true -> {:error, %{reason: :item_not_found}} diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index b8d6d405386b..4a2a87c1607f 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -9,20 +9,16 @@ defmodule Explorer.Account.TagTransaction do alias Ecto.Changeset alias Explorer.Account.Identity - alias Explorer.Chain.{Hash, Transaction} - alias Explorer.Repo + alias Explorer.{Chain, Repo} + alias Explorer.Chain.Hash @max_tag_transaction_per_account 15 schema "account_tag_transactions" do field(:name, :string) - belongs_to(:identity, Identity) + field(:tx_hash, Hash.Full, null: false) - belongs_to(:transaction, Transaction, - foreign_key: :tx_hash, - references: :hash, - type: Hash.Full - ) + belongs_to(:identity, Identity) timestamps() end @@ -41,21 +37,37 @@ defmodule Explorer.Account.TagTransaction do |> validate_required(@attrs, message: "Required") |> validate_length(:name, min: 1, max: 35) |> unique_constraint([:identity_id, :tx_hash], message: "Transaction tag already exists") - |> foreign_key_constraint(:tx_hash, message: "Transaction does not exist") |> tag_transaction_count_constraint() + |> check_transaction_existance() end def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> Repo.insert() + |> Repo.account_repo().insert() + end + + defp check_transaction_existance(%Changeset{changes: %{tx_hash: tx_hash}} = changeset) do + check_transaction_existance_inner(changeset, tx_hash) + end + + defp check_transaction_existance(%Changeset{data: %{tx_hash: tx_hash}} = changeset) do + check_transaction_existance_inner(changeset, tx_hash) + end + + defp check_transaction_existance_inner(changeset, tx_hash) do + if match?({:ok, _}, Chain.hash_to_transaction(tx_hash)) do + changeset + else + add_error(changeset, :tx_hash, "Transaction does not exist") + end end def tag_transaction_count_constraint(%Changeset{changes: %{identity_id: identity_id}} = tag_transaction) do if identity_id |> tags_transaction_by_identity_id_query() |> limit(@max_tag_transaction_per_account) - |> Repo.aggregate(:count, :id) >= @max_tag_transaction_per_account do + |> Repo.account_repo().aggregate(:count, :id) >= @max_tag_transaction_per_account do tag_transaction |> add_error(:name, "Max #{@max_tag_transaction_per_account} tags per account") else @@ -76,7 +88,7 @@ defmodule Explorer.Account.TagTransaction do def get_tags_transaction_by_identity_id(id) when not is_nil(id) do id |> tags_transaction_by_identity_id_query() - |> Repo.all() + |> Repo.account_repo().all() end def get_tags_transaction_by_identity_id(_), do: nil @@ -93,7 +105,7 @@ defmodule Explorer.Account.TagTransaction do when not is_nil(address_hash) and not is_nil(identity_id) do address_hash |> tag_transaction_by_address_hash_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_tag_transaction_by_address_hash_and_identity_id(_, _), do: nil @@ -110,7 +122,7 @@ defmodule Explorer.Account.TagTransaction do when not is_nil(tag_id) and not is_nil(identity_id) do tag_id |> tag_transaction_by_id_and_identity_id_query(identity_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_tag_transaction_by_id_and_identity_id_query(_, _), do: nil @@ -118,7 +130,7 @@ defmodule Explorer.Account.TagTransaction do def delete(tag_id, identity_id) when not is_nil(tag_id) and not is_nil(identity_id) do tag_id |> tag_transaction_by_id_and_identity_id_query(identity_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete(_, _), do: nil @@ -126,7 +138,7 @@ defmodule Explorer.Account.TagTransaction do def update(%{id: tag_id, identity_id: identity_id} = attrs) do with tag <- get_tag_transaction_by_id_and_identity_id_query(tag_id, identity_id), false <- is_nil(tag) do - tag |> changeset(attrs) |> Repo.update() + tag |> changeset(attrs) |> Repo.account_repo().update() else true -> {:error, %{reason: :item_not_found}} diff --git a/apps/explorer/lib/explorer/account/watchlist.ex b/apps/explorer/lib/explorer/account/watchlist.ex index 8fe02ae43a48..cd6998b83f77 100644 --- a/apps/explorer/lib/explorer/account/watchlist.ex +++ b/apps/explorer/lib/explorer/account/watchlist.ex @@ -14,7 +14,6 @@ defmodule Explorer.Account.Watchlist do field(:name, :string) belongs_to(:identity, Identity) has_many(:watchlist_addresses, WatchlistAddress) - has_many(:addresses, through: [:watchlist_addresses, :address]) timestamps() end diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index 65abb8b69e63..e65084a4f9d0 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -11,13 +11,14 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.Account.Notifier.ForbiddenAddress alias Explorer.Account.Watchlist alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Hash} + alias Explorer.Chain.{Address, Hash, Wei} @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do field(:name, :string) - belongs_to(:address, Address, foreign_key: :address_hash, references: :hash, type: Hash.Address) + field(:address_hash, Hash.Address, null: false) + belongs_to(:watchlist, Watchlist) field(:watch_coin_input, :boolean, default: true) @@ -33,6 +34,8 @@ defmodule Explorer.Account.WatchlistAddress do field(:notify_feed, :boolean) field(:notify_inapp, :boolean) + field(:fetched_coin_balance, Wei, virtual: true) + timestamps() end @@ -51,21 +54,20 @@ defmodule Explorer.Account.WatchlistAddress do |> validate_required([:name, :address_hash, :watchlist_id], message: "Required") |> unique_constraint([:watchlist_id, :address_hash], message: "Address already added to the watch list") |> check_address() - |> foreign_key_constraint(:address_hash, message: "") |> watchlist_address_count_constraint() end def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> Repo.insert() + |> Repo.account_repo().insert() end def watchlist_address_count_constraint(%Changeset{changes: %{watchlist_id: watchlist_id}} = watchlist_address) do if watchlist_id |> watchlist_addresses_by_watchlist_id_query() |> limit(@max_watchlist_addresses_per_account) - |> Repo.aggregate(:count, :id) >= @max_watchlist_addresses_per_account do + |> Repo.account_repo().aggregate(:count, :id) >= @max_watchlist_addresses_per_account do watchlist_address |> add_error(:name, "Max #{@max_watchlist_addresses_per_account} watch list addresses per account") else @@ -76,6 +78,16 @@ defmodule Explorer.Account.WatchlistAddress do def watchlist_address_count_constraint(changeset), do: changeset defp check_address(%Changeset{changes: %{address_hash: address_hash}, valid?: true} = changeset) do + check_address_inner(changeset, address_hash) + end + + defp check_address(%Changeset{data: %{address_hash: address_hash}, valid?: true} = changeset) do + check_address_inner(changeset, address_hash) + end + + defp check_address(changeset), do: changeset + + defp check_address_inner(changeset, address_hash) do with {:ok, address_hash} <- ForbiddenAddress.check(address_hash), {:ok, %Address{}} <- Chain.find_or_insert_address_from_hash(address_hash, []) do changeset @@ -88,8 +100,6 @@ defmodule Explorer.Account.WatchlistAddress do end end - defp check_address(changeset), do: changeset - def watchlist_addresses_by_watchlist_id_query(watchlist_id) when not is_nil(watchlist_id) do __MODULE__ |> where([wl_address], wl_address.watchlist_id == ^watchlist_id) @@ -109,7 +119,7 @@ defmodule Explorer.Account.WatchlistAddress do when not is_nil(watchlist_address_id) and not is_nil(watchlist_id) do watchlist_address_id |> watchlist_address_by_id_and_watchlist_id_query(watchlist_id) - |> Repo.one() + |> Repo.account_repo().one() end def get_watchlist_address_by_id_and_watchlist_id(_, _), do: nil @@ -118,7 +128,7 @@ defmodule Explorer.Account.WatchlistAddress do when not is_nil(watchlist_address_id) and not is_nil(watchlist_id) do watchlist_address_id |> watchlist_address_by_id_and_watchlist_id_query(watchlist_id) - |> Repo.delete_all() + |> Repo.account_repo().delete_all() end def delete(_, _), do: nil @@ -128,7 +138,7 @@ defmodule Explorer.Account.WatchlistAddress do false <- is_nil(watchlist_address) do watchlist_address |> changeset(attrs) - |> Repo.update() + |> Repo.account_repo().update() else true -> {:error, %{reason: :item_not_found}} @@ -136,4 +146,19 @@ defmodule Explorer.Account.WatchlistAddress do end def get_max_watchlist_addresses_count, do: @max_watchlist_addresses_per_account + + def preload_address_fetched_coin_balance(%Watchlist{watchlist_addresses: watchlist_addresses} = watchlist) do + w_addresses = + Enum.map(watchlist_addresses, fn wa -> + preload_address_fetched_coin_balance(wa) + end) + + %Watchlist{watchlist | watchlist_addresses: w_addresses} + end + + def preload_address_fetched_coin_balance(%__MODULE__{address_hash: address_hash} = watchlist_address) do + %__MODULE__{watchlist_address | fetched_coin_balance: address_hash |> Address.fetched_coin_balance() |> Repo.one()} + end + + def preload_address_fetched_coin_balance(watchlist), do: watchlist end diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index a5731a4f2a89..7de98721db87 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -9,12 +9,7 @@ defmodule Explorer.Account.WatchlistNotification do import Ecto.Changeset alias Explorer.Account.WatchlistAddress - - alias Explorer.Chain.{ - Address, - Hash, - Transaction - } + alias Explorer.Chain.Hash schema "account_watchlist_notifications" do field(:amount, :decimal) @@ -29,27 +24,9 @@ defmodule Explorer.Account.WatchlistNotification do belongs_to(:watchlist_address, WatchlistAddress) - belongs_to( - :from_address, - Address, - foreign_key: :from_address_hash, - references: :hash, - type: Hash.Address - ) - - belongs_to( - :to_address, - Address, - foreign_key: :to_address_hash, - references: :hash, - type: Hash.Address - ) - - belongs_to(:transaction, Transaction, - foreign_key: :transaction_hash, - references: :hash, - type: Hash.Full - ) + field(:from_address_hash, Hash.Address) + field(:to_address_hash, Hash.Address) + field(:transaction_hash, Hash.Full) timestamps() end diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index c42370c0e5e0..eea99e8573c9 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -43,6 +43,7 @@ defmodule Explorer.Application do base_children = [ Explorer.Repo, Explorer.Repo.Replica1, + Explorer.Repo.Account, Supervisor.child_spec({SpandexDatadog.ApiServer, datadog_opts()}, id: SpandexDatadog.ApiServer), Supervisor.child_spec({Task.Supervisor, name: Explorer.HistoryTaskSupervisor}, id: Explorer.HistoryTaskSupervisor), Supervisor.child_spec({Task.Supervisor, name: Explorer.MarketTaskSupervisor}, id: Explorer.MarketTaskSupervisor), diff --git a/apps/explorer/lib/explorer/chain/address.ex b/apps/explorer/lib/explorer/chain/address.ex index 1a71d3e224ce..163dd66f8d55 100644 --- a/apps/explorer/lib/explorer/chain/address.ex +++ b/apps/explorer/lib/explorer/chain/address.ex @@ -259,6 +259,12 @@ defmodule Explorer.Chain.Address do ) end + def fetched_coin_balance(address_hash) when not is_nil(address_hash) do + Address + |> where([address], address.hash == ^address_hash) + |> select([address], address.fetched_coin_balance) + end + defimpl String.Chars do @doc """ Uses `hash` as string representation, formatting it according to the eip-55 specification diff --git a/apps/explorer/lib/explorer/repo.ex b/apps/explorer/lib/explorer/repo.ex index 14a48d9d335b..c64db8b97d21 100644 --- a/apps/explorer/lib/explorer/repo.ex +++ b/apps/explorer/lib/explorer/repo.ex @@ -128,10 +128,54 @@ defmodule Explorer.Repo do def replica, do: Explorer.Repo.Replica1 end + def account_repo, do: Explorer.Repo.Account + defmodule Replica1 do use Ecto.Repo, otp_app: :explorer, adapter: Ecto.Adapters.Postgres, read_only: true + + def init(_, opts) do + db_url = Application.get_env(:explorer, Explorer.Repo.Replica1)[:url] + repo_conf = Application.get_env(:explorer, Explorer.Repo.Replica1) + + merged = + %{url: db_url} + |> ConfigHelper.get_db_config() + |> Keyword.merge(repo_conf, fn + _key, v1, nil -> v1 + _key, nil, v2 -> v2 + _, _, v2 -> v2 + end) + + Application.put_env(:explorer, Explorer.Repo.Replica1, merged) + + {:ok, Keyword.put(opts, :url, db_url)} + end + end + + defmodule Account do + use Ecto.Repo, + otp_app: :explorer, + adapter: Ecto.Adapters.Postgres + + def init(_, opts) do + db_url = Application.get_env(:explorer, Explorer.Repo.Account)[:url] + repo_conf = Application.get_env(:explorer, Explorer.Repo.Account) + + merged = + %{url: db_url} + |> ConfigHelper.get_db_config() + |> Keyword.merge(repo_conf, fn + _key, v1, nil -> v1 + _key, nil, v2 -> v2 + _, _, v2 -> v2 + end) + + Application.put_env(:explorer, Explorer.Repo.Account, merged) + + {:ok, Keyword.put(opts, :url, db_url)} + end end end diff --git a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex index 93137f3bc729..cd7e1e0f8842 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex @@ -12,7 +12,7 @@ defmodule Explorer.ThirdPartyIntegrations.AirTable do if Mix.env() == :test do new_request |> PublicTagsRequest.changeset(%{request_id: "123"}) - |> Repo.update() + |> Repo.account_repo().update() input else @@ -33,7 +33,7 @@ defmodule Explorer.ThirdPartyIntegrations.AirTable do new_request |> PublicTagsRequest.changeset(%{request_id: request_id}) - |> Repo.update() + |> Repo.account_repo().update() input diff --git a/apps/explorer/lib/release_tasks.ex b/apps/explorer/lib/release_tasks.ex index 8d5a1b486c7a..1fcdc7fca8c3 100644 --- a/apps/explorer/lib/release_tasks.ex +++ b/apps/explorer/lib/release_tasks.ex @@ -14,7 +14,7 @@ defmodule Explorer.ReleaseTasks do :ecto_sql ] - @repos Application.compile_env(:blockscout, :ecto_repos, [Explorer.Repo]) + @repos Application.compile_env(:blockscout, :ecto_repos, [Explorer.Repo, Explorer.Repo.Account]) def create_and_migrate do start_services() diff --git a/apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs b/apps/explorer/priv/account/migrations/20211031164954_create_account_identities.exs similarity index 73% rename from apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs rename to apps/explorer/priv/account/migrations/20211031164954_create_account_identities.exs index 1da855996ac0..fb571247f0b4 100644 --- a/apps/explorer/priv/repo/migrations/20211031164954_create_account_identities.exs +++ b/apps/explorer/priv/account/migrations/20211031164954_create_account_identities.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.CreateAccountIdentities do +defmodule Explorer.Repo.Account.Migrations.CreateAccountIdentities do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs b/apps/explorer/priv/account/migrations/20211105114502_create_account_watchlists.exs similarity index 81% rename from apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs rename to apps/explorer/priv/account/migrations/20211105114502_create_account_watchlists.exs index 58924200fea5..2e7c93f3cc97 100644 --- a/apps/explorer/priv/repo/migrations/20211105114502_create_account_watchlists.exs +++ b/apps/explorer/priv/account/migrations/20211105114502_create_account_watchlists.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.CreateAccountWatchlists do +defmodule Explorer.Repo.Account.Migrations.CreateAccountWatchlists do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs b/apps/explorer/priv/account/migrations/20211105130907_create_account_watchlist_addresses.exs similarity index 85% rename from apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs rename to apps/explorer/priv/account/migrations/20211105130907_create_account_watchlist_addresses.exs index 98f0aa9ac161..ef51c1850e5e 100644 --- a/apps/explorer/priv/repo/migrations/20211105130907_create_account_watchlist_addresses.exs +++ b/apps/explorer/priv/account/migrations/20211105130907_create_account_watchlist_addresses.exs @@ -1,10 +1,10 @@ -defmodule Explorer.Repo.Migrations.CreateAccountWatchlistAddresses do +defmodule Explorer.Repo.Account.Migrations.CreateAccountWatchlistAddresses do use Ecto.Migration def change do create table(:account_watchlist_addresses) do add(:name, :string) - add(:address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + add(:address_hash, :bytea, null: false) add(:watchlist_id, references(:account_watchlists, on_delete: :delete_all)) add(:watch_coin_input, :boolean, default: true) add(:watch_coin_output, :boolean, default: true) diff --git a/apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs b/apps/explorer/priv/account/migrations/20211127212336_create_account_watchlist_notifications.exs similarity index 67% rename from apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs rename to apps/explorer/priv/account/migrations/20211127212336_create_account_watchlist_notifications.exs index 8310df5dfcf9..7d4af566fe46 100644 --- a/apps/explorer/priv/repo/migrations/20211127212336_create_account_watchlist_notifications.exs +++ b/apps/explorer/priv/account/migrations/20211127212336_create_account_watchlist_notifications.exs @@ -1,15 +1,15 @@ -defmodule Explorer.Repo.Migrations.CreateAccountWatchlistNotifications do +defmodule Explorer.Repo.Account.Migrations.CreateAccountWatchlistNotifications do use Ecto.Migration def change do create table(:account_watchlist_notifications) do add(:watchlist_address_id, references(:account_watchlist_addresses, on_delete: :delete_all)) - add(:transaction_hash, references(:transactions, column: :hash, type: :bytea, on_delete: :delete_all)) + add(:transaction_hash, :bytea) - add(:from_address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + add(:from_address_hash, :bytea) - add(:to_address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all)) + add(:to_address_hash, :bytea) add(:direction, :string) add(:name, :string) diff --git a/apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs b/apps/explorer/priv/account/migrations/20211205220414_add_email_and_name_to_account_identity.exs similarity index 67% rename from apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs rename to apps/explorer/priv/account/migrations/20211205220414_add_email_and_name_to_account_identity.exs index bf87606d6c4b..0633e0dbaeac 100644 --- a/apps/explorer/priv/repo/migrations/20211205220414_add_email_and_name_to_account_identity.exs +++ b/apps/explorer/priv/account/migrations/20211205220414_add_email_and_name_to_account_identity.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddEmailToAccountIdentity do +defmodule Explorer.Repo.Account.Migrations.AddEmailToAccountIdentity do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs b/apps/explorer/priv/account/migrations/20220212222222_create_account_tag_addresses.exs similarity index 64% rename from apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs rename to apps/explorer/priv/account/migrations/20220212222222_create_account_tag_addresses.exs index 0a306516ff30..df0074041ee9 100644 --- a/apps/explorer/priv/repo/migrations/20220212222222_create_account_tag_addresses.exs +++ b/apps/explorer/priv/account/migrations/20220212222222_create_account_tag_addresses.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.CreateAccountTagAddresses do +defmodule Explorer.Repo.Account.Migrations.CreateAccountTagAddresses do use Ecto.Migration def change do @@ -6,10 +6,7 @@ defmodule Explorer.Repo.Migrations.CreateAccountTagAddresses do add(:name, :string) add(:identity_id, references(:account_identities, on_delete: :delete_all)) - add( - :address_hash, - references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all) - ) + add(:address_hash, :bytea, null: false) timestamps() end diff --git a/apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs b/apps/explorer/priv/account/migrations/20220313133333_create_account_tag_transactions.exs similarity index 64% rename from apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs rename to apps/explorer/priv/account/migrations/20220313133333_create_account_tag_transactions.exs index 49facab8c09f..ba6fa338b984 100644 --- a/apps/explorer/priv/repo/migrations/20220313133333_create_account_tag_transactions.exs +++ b/apps/explorer/priv/account/migrations/20220313133333_create_account_tag_transactions.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.CreateAccountTagTransactions do +defmodule Explorer.Repo.Account.Migrations.CreateAccountTagTransactions do use Ecto.Migration def change do @@ -6,10 +6,7 @@ defmodule Explorer.Repo.Migrations.CreateAccountTagTransactions do add(:name, :string) add(:identity_id, references(:account_identities, on_delete: :delete_all)) - add( - :tx_hash, - references(:transactions, column: :hash, type: :bytea, on_delete: :delete_all) - ) + add(:tx_hash, :bytea, null: false) timestamps() end diff --git a/apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs b/apps/explorer/priv/account/migrations/20220324213333_add_subject_to_watchlist_notifications.exs similarity index 64% rename from apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs rename to apps/explorer/priv/account/migrations/20220324213333_add_subject_to_watchlist_notifications.exs index 7f644aaf87ac..6ff8a359ba4d 100644 --- a/apps/explorer/priv/repo/migrations/20220324213333_add_subject_to_watchlist_notifications.exs +++ b/apps/explorer/priv/account/migrations/20220324213333_add_subject_to_watchlist_notifications.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddSubjectToWatchlistNotifications do +defmodule Explorer.Repo.Account.Migrations.AddSubjectToWatchlistNotifications do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs b/apps/explorer/priv/account/migrations/20220407134152_add_api_keys_and_plans_tables.exs similarity index 93% rename from apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs rename to apps/explorer/priv/account/migrations/20220407134152_add_api_keys_and_plans_tables.exs index 245a077c4316..11f23ffd6126 100644 --- a/apps/explorer/priv/repo/migrations/20220407134152_add_api_keys_and_plans_tables.exs +++ b/apps/explorer/priv/account/migrations/20220407134152_add_api_keys_and_plans_tables.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddApiKeysAndPlansTables do +defmodule Explorer.Repo.Account.Migrations.AddApiKeysAndPlansTables do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220510094118_add_custom_abis_table.exs b/apps/explorer/priv/account/migrations/20220510094118_add_custom_abis_table.exs similarity index 74% rename from apps/explorer/priv/repo/migrations/20220510094118_add_custom_abis_table.exs rename to apps/explorer/priv/account/migrations/20220510094118_add_custom_abis_table.exs index a08b1cf365a6..a248c79458bf 100644 --- a/apps/explorer/priv/repo/migrations/20220510094118_add_custom_abis_table.exs +++ b/apps/explorer/priv/account/migrations/20220510094118_add_custom_abis_table.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddCustomAbisTable do +defmodule Explorer.Repo.Account.Migrations.AddCustomAbisTable do use Ecto.Migration def change do @@ -6,7 +6,7 @@ defmodule Explorer.Repo.Migrations.AddCustomAbisTable do add(:id, :serial, null: false, primary_key: true) add(:identity_id, references(:account_identities, column: :id, on_delete: :delete_all), null: false) add(:name, :string, null: false) - add(:address_hash, references(:addresses, column: :hash, type: :bytea, on_delete: :delete_all), null: false) + add(:address_hash, :bytea, null: false) add(:abi, :jsonb, null: false) timestamps() diff --git a/apps/explorer/priv/repo/migrations/20220606194836_add_account_public_tags_requests.exs b/apps/explorer/priv/account/migrations/20220606194836_add_account_public_tags_requests.exs similarity index 88% rename from apps/explorer/priv/repo/migrations/20220606194836_add_account_public_tags_requests.exs rename to apps/explorer/priv/account/migrations/20220606194836_add_account_public_tags_requests.exs index f1d95e9d0176..dd0a9896b0ca 100644 --- a/apps/explorer/priv/repo/migrations/20220606194836_add_account_public_tags_requests.exs +++ b/apps/explorer/priv/account/migrations/20220606194836_add_account_public_tags_requests.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddAccountPublicTagsRequests do +defmodule Explorer.Repo.Account.Migrations.AddAccountPublicTagsRequests do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220620182600_add_account_identity_fields.exs b/apps/explorer/priv/account/migrations/20220620182600_add_account_identity_fields.exs similarity index 71% rename from apps/explorer/priv/repo/migrations/20220620182600_add_account_identity_fields.exs rename to apps/explorer/priv/account/migrations/20220620182600_add_account_identity_fields.exs index 2966c9dc5902..1c7b13535f3c 100644 --- a/apps/explorer/priv/repo/migrations/20220620182600_add_account_identity_fields.exs +++ b/apps/explorer/priv/account/migrations/20220620182600_add_account_identity_fields.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddAccountIdentityFields do +defmodule Explorer.Repo.Account.Migrations.AddAccountIdentityFields do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220624142547_add_unique_constraints.exs b/apps/explorer/priv/account/migrations/20220624142547_add_unique_constraints.exs similarity index 81% rename from apps/explorer/priv/repo/migrations/20220624142547_add_unique_constraints.exs rename to apps/explorer/priv/account/migrations/20220624142547_add_unique_constraints.exs index a67b5dadbd32..53293983d4a6 100644 --- a/apps/explorer/priv/repo/migrations/20220624142547_add_unique_constraints.exs +++ b/apps/explorer/priv/account/migrations/20220624142547_add_unique_constraints.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.AddUniqueConstraints do +defmodule Explorer.Repo.Account.Migrations.AddUniqueConstraints do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs b/apps/explorer/priv/account/migrations/20220705195240_migrate_public_tags_addresses_to_array.exs similarity index 91% rename from apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs rename to apps/explorer/priv/account/migrations/20220705195240_migrate_public_tags_addresses_to_array.exs index 0fa5f0e05062..1282e2166c15 100644 --- a/apps/explorer/priv/repo/migrations/20220811195240_migrate_public_tags_addresses_to_array.exs +++ b/apps/explorer/priv/account/migrations/20220705195240_migrate_public_tags_addresses_to_array.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.MigratePublicTagsAddressesToArray do +defmodule Explorer.Repo.Account.Migrations.MigratePublicTagsAddressesToArray do use Ecto.Migration def change do diff --git a/apps/explorer/priv/repo/migrations/20220729075714_guardiandb.exs b/apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs similarity index 83% rename from apps/explorer/priv/repo/migrations/20220729075714_guardiandb.exs rename to apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs index 21c3f9aead42..fc058ff73bd8 100644 --- a/apps/explorer/priv/repo/migrations/20220729075714_guardiandb.exs +++ b/apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs @@ -1,4 +1,4 @@ -defmodule Explorer.Repo.Migrations.CreateGuardianDBTokensTable do +defmodule Explorer.Repo.Account.Migrations.CreateGuardianDBTokensTable do use Ecto.Migration def change do diff --git a/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs b/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs new file mode 100644 index 000000000000..2824c366073a --- /dev/null +++ b/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs @@ -0,0 +1,92 @@ +defmodule Explorer.Repo.Account.Migrations.CopyAccountData do + use Ecto.Migration + + def change do + execute("CREATE EXTENSION dblink;") + execute("SELECT dblink_connect('db_to_copy_from', '#{System.get_env("DATABASE_URL")}');") + + execute( + "INSERT INTO account_identities + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_identities') + row(id bigint, uid character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, email character varying(255), name character varying(255), plan_id bigint, nickname character varying(255), avatar text);" + ) + + # execute("INSERT INTO account_api_plans + # SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_api_plans') + # row(id integer, max_req_per_second smallint, name character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);") + + execute( + "INSERT INTO account_api_keys + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_api_keys') + row(identity_id bigint, name character varying(255), value uuid, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_custom_abis + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_custom_abis') + row(id integer, identity_id bigint, name character varying(255), address_hash bytea, abi jsonb, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_public_tags_requests + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_public_tags_requests') + row(id integer, identity_id bigint, full_name character varying(255), email character varying(255), company character varying(255), website character varying(255), tags character varying(255), description text, additional_comment character varying(255), request_type character varying(255), is_owner boolean, remove_reason text, request_id character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, addresses bytea[]);" + ) + + execute( + "INSERT INTO account_tag_addresses + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_tag_addresses') + row(id integer, name character varying(255), identity_id bigint, address_hash bytea, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_tag_transactions + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_tag_transactions') + row(id integer, name character varying(255), identity_id bigint, tx_hash bytea, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_watchlists + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlists') + row(id bigint, name character varying(255), identity_id bigint, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_watchlist_addresses + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlist_addresses') + row(id bigint, name character varying(255), address_hash bytea, watchlist_id bigint, watch_coin_input boolean, watch_coin_output boolean, watch_erc_20_input boolean, watch_erc_20_output boolean, watch_erc_721_input boolean, watch_erc_721_output boolean, watch_erc_1155_input boolean, watch_erc_1155_output boolean, notify_email boolean, notify_epns boolean, notify_feed boolean, notify_inapp boolean, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute( + "INSERT INTO account_watchlist_notifications + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlist_notifications') + row(id bigint, watchlist_address_id bigint, transaction_hash bytea, from_address_hash bytea, to_address_hash bytea, direction character varying(255), name character varying(255), type character varying(255), method character varying(255), block_number integer, amount numeric, tx_fee numeric, viewed_at timestamp without time zone, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, subject character varying(255));" + ) + + execute( + "INSERT INTO guardian_tokens + SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM guardian_tokens') + row(jti character varying(255), aud character varying(255), typ character varying(255), iss character varying(255), sub character varying(255), exp bigint, jwt text, claims jsonb, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" + ) + + execute("SELECT dblink_disconnect('db_to_copy_from');") + execute("DROP EXTENSION dblink;") + + # update sequence id counter + execute("SELECT setval('account_identities_id_seq', (SELECT MAX(id) FROM account_identities)+1);") + execute("SELECT setval('account_custom_abis_id_seq', (SELECT MAX(id) FROM account_custom_abis)+1);") + + execute( + "SELECT setval('account_public_tags_requests_id_seq', (SELECT MAX(id) FROM account_public_tags_requests)+1);" + ) + + execute("SELECT setval('account_tag_addresses_id_seq', (SELECT MAX(id) FROM account_tag_addresses)+1);") + execute("SELECT setval('account_tag_transactions_id_seq', (SELECT MAX(id) FROM account_tag_transactions)+1);") + execute("SELECT setval('account_watchlists_id_seq', (SELECT MAX(id) FROM account_watchlists)+1);") + execute("SELECT setval('account_watchlist_addresses_id_seq', (SELECT MAX(id) FROM account_watchlist_addresses)+1);") + + execute( + "SELECT setval('account_watchlist_notifications_id_seq', (SELECT MAX(id) FROM account_watchlist_notifications)+1);" + ) + end +end diff --git a/apps/explorer/test/explorer/account/notify/email_test.exs b/apps/explorer/test/explorer/account/notify/email_test.exs index aff4baf42e1c..34e5a57ad6d9 100644 --- a/apps/explorer/test/explorer/account/notify/email_test.exs +++ b/apps/explorer/test/explorer/account/notify/email_test.exs @@ -60,7 +60,6 @@ defmodule Explorer.Account.Notify.EmailTest do watchlist_address = %WatchlistAddress{ name: "wallet", watchlist: watchlist, - address: to_address, address_hash: to_hash, watch_coin_input: true, watch_coin_output: true, diff --git a/apps/explorer/test/explorer/account/notify/notify_test.exs b/apps/explorer/test/explorer/account/notify/notify_test.exs index 1f97769a1636..4d169f04d6b7 100644 --- a/apps/explorer/test/explorer/account/notify/notify_test.exs +++ b/apps/explorer/test/explorer/account/notify/notify_test.exs @@ -46,7 +46,7 @@ defmodule Explorer.Account.Notify.NotifyTest do wn = WatchlistNotification |> first - |> Repo.one() + |> Repo.account_repo().one() assert notify == [[:ok]] @@ -55,11 +55,11 @@ defmodule Explorer.Account.Notify.NotifyTest do test "when address apears in watchlist" do wa = - %WatchlistAddress{ - address: address - } = insert(:account_watchlist_address) + %WatchlistAddress{address_hash: address_hash} = + build(:account_watchlist_address) + |> Repo.account_repo().insert!() - _watchlist_address = Repo.preload(wa, :address, watchlist: :identity) + _watchlist_address = Repo.preload(wa, watchlist: :identity) tx = %Transaction{ @@ -67,7 +67,7 @@ defmodule Explorer.Account.Notify.NotifyTest do to_address: _to_address, block_number: _block_number, hash: _tx_hash - } = with_block(insert(:transaction, to_address: address)) + } = with_block(insert(:transaction, to_address: %Chain.Address{hash: address_hash})) {_, fee} = Chain.fee(tx, :gwei) amount = Wei.to(tx.value, :ether) @@ -76,7 +76,7 @@ defmodule Explorer.Account.Notify.NotifyTest do wn = WatchlistNotification |> first - |> Repo.one() + |> Repo.account_repo().one() assert notify == [[:ok]] diff --git a/apps/explorer/test/support/data_case.ex b/apps/explorer/test/support/data_case.ex index e12dd24a82d6..da18760983cc 100644 --- a/apps/explorer/test/support/data_case.ex +++ b/apps/explorer/test/support/data_case.ex @@ -34,9 +34,11 @@ defmodule Explorer.DataCase do ExVCR.Config.cassette_library_dir("test/support/fixture/vcr_cassettes") :ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo) + :ok = Ecto.Adapters.SQL.Sandbox.checkout(Explorer.Repo.Account) unless tags[:async] do Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, {:shared, self()}) + Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo.Account, {:shared, self()}) end Supervisor.terminate_child(Explorer.Supervisor, Explorer.Chain.Cache.BlockNumber.child_id()) diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index 4d2c0d184f2f..12d0d7301f31 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -126,7 +126,6 @@ defmodule Explorer.Factory do def account_watchlist_factory do %Watchlist{ - name: "default", identity: build(:account_identity) } end @@ -140,10 +139,12 @@ defmodule Explorer.Factory do end def account_watchlist_address_factory do + hash = build(:address).hash + %WatchlistAddress{ name: "wallet", watchlist: build(:account_watchlist), - address: build(:address), + address_hash: hash, watch_coin_input: true, watch_coin_output: true, watch_erc_20_input: true, diff --git a/apps/explorer/test/test_helper.exs b/apps/explorer/test/test_helper.exs index 50847130f8ba..418ea17ea08a 100644 --- a/apps/explorer/test/test_helper.exs +++ b/apps/explorer/test/test_helper.exs @@ -12,6 +12,7 @@ ExUnit.start() {:ok, _} = Application.ensure_all_started(:ex_machina) Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo, :auto) +Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo.Account, :auto) Mox.defmock(Explorer.ExchangeRates.Source.TestSource, for: Explorer.ExchangeRates.Source) Mox.defmock(Explorer.KnownTokens.Source.TestSource, for: Explorer.KnownTokens.Source) diff --git a/config/runtime/dev.exs b/config/runtime/dev.exs index e7348f1e5ddf..3c69ee9c1a03 100644 --- a/config/runtime/dev.exs +++ b/config/runtime/dev.exs @@ -46,10 +46,11 @@ database_api_url = do: System.get_env("DATABASE_READ_ONLY_API_URL"), else: System.get_env("DATABASE_URL") -pool_size = - if System.get_env("DATABASE_READ_ONLY_API_URL"), - do: String.to_integer(System.get_env("POOL_SIZE", "40")), - else: String.to_integer(System.get_env("POOL_SIZE", "50")) +# pool_size = +# if System.get_env("DATABASE_READ_ONLY_API_URL"), +# do: String.to_integer(System.get_env("POOL_SIZE", "40")), +# else: String.to_integer(System.get_env("POOL_SIZE", "50")) +pool_size = String.to_integer(System.get_env("POOL_SIZE", "30")) # Configure your database config :explorer, Explorer.Repo, @@ -63,7 +64,7 @@ hostname_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: h pool_size_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), - do: String.to_integer(System.get_env("POOL_SIZE_API", "50")), + do: String.to_integer(System.get_env("POOL_SIZE_API", "10")), else: String.to_integer(System.get_env("POOL_SIZE_API", "10")) # Configure API database @@ -73,6 +74,23 @@ config :explorer, Explorer.Repo.Replica1, url: database_api_url, pool_size: pool_size_api +database_account_url = System.get_env("DATABASE_ACCOUNT_URL") || System.get_env("DATABASE_URL") + +pool_size_account = + if System.get_env("DATABASE_ACCOUNT_URL"), + do: String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "10")), + else: String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "10")) + +database_account = if System.get_env("DATABASE_ACCOUNT_URL"), do: nil, else: database +hostname_account = if System.get_env("DATABASE_ACCOUNT_URL"), do: nil, else: hostname + +# Configure Account database +config :explorer, Explorer.Repo.Account, + database: database_account, + hostname: hostname_account, + url: database_account_url, + pool_size: pool_size_account + variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "ganache" diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 8a5c8f24cda1..43f07fde4264 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -49,6 +49,15 @@ config :explorer, Explorer.Repo.Replica1, pool_size: pool_size_api, ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true") +database_account_url = System.get_env("DATABASE_ACCOUNT_URL") +pool_size_account = String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "50")) + +# Configures Account database +config :explorer, Explorer.Repo.Account, + url: database_account_url, + pool_size: pool_size_account, + ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true") + variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "parity" diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index cd2a3ffdb0cf..babd98a2f9ff 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -124,3 +124,6 @@ API_RATE_LIMIT_STATIC_API_KEY= FETCH_REWARDS_WAY=trace_block ENABLE_RUST_VERIFICATION_SERVICE=true RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ +# DATABASE_READ_ONLY_API_URL= +# DATABASE_ACCOUNT_URL= +# POOL_SIZE_ACCOUNT= diff --git a/docker/Makefile b/docker/Makefile index 9a5533f1bfc9..ada9d2dc4079 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -502,7 +502,12 @@ endif ifdef RUST_VERIFICATION_SERVICE_URL BLOCKSCOUT_CONTAINER_PARAMS += -e 'RUST_VERIFICATION_SERVICE_URL=$(RUST_VERIFICATION_SERVICE_URL)' endif - +ifdef DATABASE_ACCOUNT_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATABASE_ACCOUNT_URL=$(DATABASE_ACCOUNT_URL)' +endif +ifdef POOL_SIZE_ACCOUNT + BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_ACCOUNT=$(POOL_SIZE_ACCOUNT)' +endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From 4e9e7acd0d9d9ec2eaf26817d5a2be2fa6ca9431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 6 Jul 2022 20:58:23 +0300 Subject: [PATCH 352/723] Add encryption, need to add _hash fields to search, and think about automatization of migration proccess --- .../models/get_transaction_tags.ex | 10 ++- .../block_scout_web/models/user_from_auth.ex | 10 ++- apps/explorer/lib/encrypt.ex | 81 +++++++++++++++++++ .../lib/explorer/account/custom_abi.ex | 8 +- .../explorer/lib/explorer/account/identity.ex | 22 +++-- .../lib/explorer/account/tag_address.ex | 14 ++-- .../lib/explorer/account/tag_transaction.ex | 13 +-- .../lib/explorer/account/watchlist_address.ex | 9 ++- .../account/watchlist_notification.ex | 23 ++++-- apps/explorer/lib/explorer/application.ex | 1 + .../lib/explorer/encrypted/address_hash.ex | 3 + .../explorer/lib/explorer/encrypted/binary.ex | 3 + .../explorer/encrypted/transaction_hash.ex | 3 + .../explorer/encrypted/types/address_hash.ex | 26 ++++++ .../encrypted/types/transaction_hash.ex | 26 ++++++ apps/explorer/lib/explorer/vault.ex | 17 ++++ apps/explorer/mix.exs | 3 +- .../20220706114430_encrypt_account_data.exs | 45 +++++++++++ ...220706153506_remove_unencrypted_fields.exs | 70 ++++++++++++++++ mix.lock | 2 + 20 files changed, 361 insertions(+), 28 deletions(-) create mode 100644 apps/explorer/lib/encrypt.ex create mode 100644 apps/explorer/lib/explorer/encrypted/address_hash.ex create mode 100644 apps/explorer/lib/explorer/encrypted/binary.ex create mode 100644 apps/explorer/lib/explorer/encrypted/transaction_hash.ex create mode 100644 apps/explorer/lib/explorer/encrypted/types/address_hash.ex create mode 100644 apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex create mode 100644 apps/explorer/lib/explorer/vault.ex create mode 100644 apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs create mode 100644 apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex index bee4eb935422..d3ac7cd03fc2 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex @@ -21,7 +21,7 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do def get_transaction_with_addresses_tags(_, _), do: %{personal_tags: [], watchlist_names: [], personal_tx_tag: nil} def get_transaction_tags(transaction_hash, %{id: identity_id}) do - Repo.account_repo().get_by(TagTransaction, tx_hash: transaction_hash, identity_id: identity_id) + Repo.account_repo().get_by(TagTransaction, tx_hash: transaction_hash, identity_id: identity_id) |> debug("2434") end def get_transaction_tags(_, _), do: nil @@ -38,4 +38,12 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do watchlist_names: Enum.dedup(from_tags.watchlist_names ++ to_tags.watchlist_names) } end + + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end end diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index cc1483b9299e..83baaf088915 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -66,8 +66,16 @@ defmodule BlockScoutWeb.Models.UserFromAuth do do: {:ok, identity} end + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + def find_identity(auth_or_uid) do - Repo.account_repo().all(query_identity(auth_or_uid)) + Repo.account_repo().all(query_identity(auth_or_uid)) |> debug("identity") end def query_identity(%Auth{} = auth) do diff --git a/apps/explorer/lib/encrypt.ex b/apps/explorer/lib/encrypt.ex new file mode 100644 index 000000000000..64d8b29f462f --- /dev/null +++ b/apps/explorer/lib/encrypt.ex @@ -0,0 +1,81 @@ +defmodule Mix.Tasks.Encrypt do + @moduledoc "The encrypt mix task: `mix help encrypt`" + use Mix.Task + + @shortdoc "Encrypt" + def run(_) do + Mix.Task.run("app.start") + + Explorer.Account.Identity + |> Explorer.Repo.Account.all() + |> Enum.map(fn identity -> + identity + |> Ecto.Changeset.change(%{ + encrypted_uid: identity.uid, + encrypted_email: identity.email, + encrypted_name: identity.name, + encrypted_nickname: identity.nickname, + encrypted_avatar: identity.avatar + }) + |> Explorer.Repo.Account.update!() + end) + + Explorer.Account.TagAddress + |> Explorer.Repo.Account.all() + |> Enum.map(fn element -> + element + |> Ecto.Changeset.change(%{ + encrypted_name: element.name, + encrypted_address_hash: element.address_hash + }) + |> Explorer.Repo.Account.update!() + end) + + Explorer.Account.TagTransaction + |> Explorer.Repo.Account.all() + |> Enum.map(fn element -> + element + |> Ecto.Changeset.change(%{ + encrypted_name: element.name, + encrypted_tx_hash: element.tx_hash + }) + |> Explorer.Repo.Account.update!() + end) + + Explorer.Account.CustomABI + |> Explorer.Repo.Account.all() + |> Enum.map(fn element -> + element + |> Ecto.Changeset.change(%{ + encrypted_name: element.name, + encrypted_address_hash: element.address_hash + }) + |> Explorer.Repo.Account.update!() + end) + + Explorer.Account.WatchlistAddress + |> Explorer.Repo.Account.all() + |> Enum.map(fn element -> + element + |> Ecto.Changeset.change(%{ + encrypted_name: element.name, + encrypted_address_hash: element.address_hash + }) + |> Explorer.Repo.Account.update!() + end) + + Explorer.Account.WatchlistNotification + |> Explorer.Repo.Account.all() + |> Enum.map(fn element -> + element + |> Ecto.Changeset.change(%{ + encrypted_name: element.name, + encrypted_from_address_hash: element.from_address_hash, + encrypted_to_address_hash: element.to_address_hash, + encrypted_transaction_hash: element.transaction_hash, + encrypted_subject: element.subject + }) + |> Explorer.Repo.Account.update!() + end) + end +end diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index 4be56dd007ca..4a9705a5e151 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -15,11 +15,15 @@ defmodule Explorer.Account.CustomABI do @max_abis_per_account 15 schema "account_custom_abis" do - field(:name, :string) field(:abi, {:array, :map}) field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) - field(:address_hash, Hash.Address, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 49e75cc6a0f4..0348fec4a0d8 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -11,11 +11,23 @@ defmodule Explorer.Account.Identity do alias Explorer.Account.{TagAddress, Watchlist} schema "account_identities" do - field(:uid, :string) - field(:email, :string) - field(:name, :string) - field(:nickname, :string) - field(:avatar, :string) + # field(:uid, :string) + # field(:email, :string) + # field(:name, :string) + # field(:nickname, :string) + # field(:avatar, :string) + + # field(:encrypted_uid, Explorer.Encrypted.Binary) + # field(:encrypted_email, Explorer.Encrypted.Binary) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_nickname, Explorer.Encrypted.Binary) + # field(:encrypted_avatar, Explorer.Encrypted.Binary) + + field(:uid, Explorer.Encrypted.Binary) + field(:email, Explorer.Encrypted.Binary) + field(:name, Explorer.Encrypted.Binary) + field(:nickname, Explorer.Encrypted.Binary) + field(:avatar, Explorer.Encrypted.Binary) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index 49c2bcb63fd8..02c388798446 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -15,8 +15,14 @@ defmodule Explorer.Account.TagAddress do @max_tag_address_per_account 15 schema "account_tag_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + belongs_to(:identity, Identity) timestamps() @@ -50,10 +56,6 @@ defmodule Explorer.Account.TagAddress do check_existance_or_create_address_inner(changeset, address_hash) end - defp check_existance_or_create_address(%Changeset{data: %{address_hash: address_hash}, valid?: true} = changeset) do - check_existance_or_create_address_inner(changeset, address_hash) - end - defp check_existance_or_create_address(changeset), do: changeset defp check_existance_or_create_address_inner(changeset, address_hash) do diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 4a2a87c1607f..10cba8747970 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -15,8 +15,13 @@ defmodule Explorer.Account.TagTransaction do @max_tag_transaction_per_account 15 schema "account_tag_transactions" do - field(:name, :string) - field(:tx_hash, Hash.Full, null: false) + # field(:name, :string) + # field(:tx_hash, Hash.Full, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) + + field(:name, Explorer.Encrypted.Binary) + field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) belongs_to(:identity, Identity) @@ -51,9 +56,7 @@ defmodule Explorer.Account.TagTransaction do check_transaction_existance_inner(changeset, tx_hash) end - defp check_transaction_existance(%Changeset{data: %{tx_hash: tx_hash}} = changeset) do - check_transaction_existance_inner(changeset, tx_hash) - end + defp check_transaction_existance(changeset), do: changeset defp check_transaction_existance_inner(changeset, tx_hash) do if match?({:ok, _}, Chain.hash_to_transaction(tx_hash)) do diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index e65084a4f9d0..f793add2f5cb 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -16,8 +16,13 @@ defmodule Explorer.Account.WatchlistAddress do @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:watchlist, Watchlist) diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index 7de98721db87..101893abd6aa 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -16,17 +16,30 @@ defmodule Explorer.Account.WatchlistNotification do field(:block_number, :integer) field(:direction, :string) field(:method, :string) - field(:name, :string) - field(:subject, :string) + # field(:name, :string) + # field(:subject, :string) field(:tx_fee, :decimal) field(:type, :string) field(:viewed_at, :integer) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_subject, Explorer.Encrypted.Binary) + + field(:name, Explorer.Encrypted.Binary) + field(:subject, Explorer.Encrypted.Binary) belongs_to(:watchlist_address, WatchlistAddress) - field(:from_address_hash, Hash.Address) - field(:to_address_hash, Hash.Address) - field(:transaction_hash, Hash.Full) + # field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) + # field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) + # field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) + + # field(:from_address_hash, Hash.Address) + # field(:to_address_hash, Hash.Address) + # field(:transaction_hash, Hash.Full) + + field(:from_address_hash, Explorer.Encrypted.AddressHash) + field(:to_address_hash, Explorer.Encrypted.AddressHash) + field(:transaction_hash, Explorer.Encrypted.TransactionHash) timestamps() end diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index eea99e8573c9..8b9f60a966f9 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -44,6 +44,7 @@ defmodule Explorer.Application do Explorer.Repo, Explorer.Repo.Replica1, Explorer.Repo.Account, + Explorer.Vault, Supervisor.child_spec({SpandexDatadog.ApiServer, datadog_opts()}, id: SpandexDatadog.ApiServer), Supervisor.child_spec({Task.Supervisor, name: Explorer.HistoryTaskSupervisor}, id: Explorer.HistoryTaskSupervisor), Supervisor.child_spec({Task.Supervisor, name: Explorer.MarketTaskSupervisor}, id: Explorer.MarketTaskSupervisor), diff --git a/apps/explorer/lib/explorer/encrypted/address_hash.ex b/apps/explorer/lib/explorer/encrypted/address_hash.ex new file mode 100644 index 000000000000..ad8e88dd0a3b --- /dev/null +++ b/apps/explorer/lib/explorer/encrypted/address_hash.ex @@ -0,0 +1,3 @@ +defmodule Explorer.Encrypted.AddressHash do + use Explorer.Encrypted.Types.AddressHash, vault: Explorer.Vault +end diff --git a/apps/explorer/lib/explorer/encrypted/binary.ex b/apps/explorer/lib/explorer/encrypted/binary.ex new file mode 100644 index 000000000000..ca28d9205bc8 --- /dev/null +++ b/apps/explorer/lib/explorer/encrypted/binary.ex @@ -0,0 +1,3 @@ +defmodule Explorer.Encrypted.Binary do + use Cloak.Ecto.Binary, vault: Explorer.Vault +end diff --git a/apps/explorer/lib/explorer/encrypted/transaction_hash.ex b/apps/explorer/lib/explorer/encrypted/transaction_hash.ex new file mode 100644 index 000000000000..a563f464e67a --- /dev/null +++ b/apps/explorer/lib/explorer/encrypted/transaction_hash.ex @@ -0,0 +1,3 @@ +defmodule Explorer.Encrypted.TransactionHash do + use Explorer.Encrypted.Types.TransactionHash, vault: Explorer.Vault +end diff --git a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex new file mode 100644 index 000000000000..20ba211a3ff0 --- /dev/null +++ b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex @@ -0,0 +1,26 @@ +defmodule Explorer.Encrypted.Types.AddressHash do + @moduledoc """ + An `Ecto.Type` to encrypt address_hash fields. + """ + + @doc false + defmacro __using__(opts) do + opts = Keyword.merge(opts, vault: Keyword.fetch!(opts, :vault)) + + quote do + use Cloak.Ecto.Type, unquote(opts) + + def cast(value) do + Explorer.Chain.Hash.Address.cast(value) + end + + def after_decrypt(nil), do: nil + def after_decrypt(""), do: nil + + def after_decrypt(value) do + {:ok, address_hash} = Explorer.Chain.Hash.Address.cast(value) + address_hash + end + end + end +end diff --git a/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex new file mode 100644 index 000000000000..2d9ad53b1d2d --- /dev/null +++ b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex @@ -0,0 +1,26 @@ +defmodule Explorer.Encrypted.Types.TransactionHash do + @moduledoc """ + An `Ecto.Type` to encrypt address_hash fields. + """ + + @doc false + defmacro __using__(opts) do + opts = Keyword.merge(opts, vault: Keyword.fetch!(opts, :vault)) + + quote do + use Cloak.Ecto.Type, unquote(opts) + + def cast(value) do + Explorer.Chain.Hash.Full.cast(value) + end + + def after_decrypt(nil), do: nil + def after_decrypt(""), do: nil + + def after_decrypt(value) do + {:ok, address_hash} = Explorer.Chain.Hash.Full.cast(value) + address_hash + end + end + end +end diff --git a/apps/explorer/lib/explorer/vault.ex b/apps/explorer/lib/explorer/vault.ex new file mode 100644 index 000000000000..c388bc99c843 --- /dev/null +++ b/apps/explorer/lib/explorer/vault.ex @@ -0,0 +1,17 @@ +defmodule Explorer.Vault do + use Cloak.Vault, otp_app: :my_app + + @impl GenServer + def init(config) do + config = + Keyword.put(config, :ciphers, default: {Cloak.Ciphers.AES.GCM, tag: "AES.GCM.V1", key: decode_env!("CLOAK_KEY")}) + + {:ok, config} + end + + defp decode_env!(var) do + var + |> System.get_env() + |> Base.decode64!() + end +end diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 00a19548823a..38a98c5dc295 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -113,7 +113,8 @@ defmodule Explorer.Mixfile do {:timex, "~> 3.7.1"}, {:con_cache, "~> 1.0"}, {:tesla, "~> 1.4.4"}, - {:cbor, "~> 1.0"} + {:cbor, "~> 1.0"}, + {:cloak_ecto, "~> 1.2.0"} ] end diff --git a/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs new file mode 100644 index 000000000000..be4ff499672f --- /dev/null +++ b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs @@ -0,0 +1,45 @@ +defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do + use Ecto.Migration + + def change do + alter table(:account_identities) do + add(:encrypted_uid, :binary) + add(:encrypted_email, :binary) + add(:encrypted_name, :binary) + add(:encrypted_nickname, :binary, null: true) + add(:encrypted_avatar, :binary, null: true) + end + + # alter table(:account_watchlists) do + # add(:encrypted_name, :binary) + # end + + alter table(:account_custom_abis) do + add(:encrypted_address_hash, :binary) + add(:encrypted_name, :binary) + end + + alter table(:account_tag_addresses) do + add(:encrypted_name, :binary) + add(:encrypted_address_hash, :binary) + end + + alter table(:account_tag_transactions) do + add(:encrypted_name, :binary) + add(:encrypted_tx_hash, :binary) + end + + alter table(:account_watchlist_addresses) do + add(:encrypted_name, :binary) + add(:encrypted_address_hash, :binary) + end + + alter table(:account_watchlist_notifications) do + add(:encrypted_name, :binary) + add(:encrypted_subject, :binary, null: true) + add(:encrypted_from_address_hash, :binary) + add(:encrypted_to_address_hash, :binary) + add(:encrypted_transaction_hash, :binary) + end + end +end diff --git a/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs b/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs new file mode 100644 index 000000000000..0660e095210a --- /dev/null +++ b/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs @@ -0,0 +1,70 @@ +defmodule Explorer.Repo.Account.Migrations.RemoveUnencryptedFields do + use Ecto.Migration + + def change do + alter table(:account_identities) do + remove(:uid) + remove(:email) + remove(:name) + remove(:nickname) + remove(:avatar) + end + + rename(table(:account_identities), :encrypted_uid, to: :uid) + rename(table(:account_identities), :encrypted_email, to: :email) + rename(table(:account_identities), :encrypted_name, to: :name) + rename(table(:account_identities), :encrypted_nickname, to: :nickname) + rename(table(:account_identities), :encrypted_avatar, to: :avatar) + + # alter table(:account_watchlists) do + # remove(:name) + # end + # rename(table(:account_watchlists), :encrypted_name, to: :name) + + alter table(:account_custom_abis) do + remove(:address_hash) + remove(:name) + end + + rename(table(:account_custom_abis), :encrypted_address_hash, to: :address_hash) + rename(table(:account_custom_abis), :encrypted_name, to: :name) + + alter table(:account_tag_addresses) do + remove(:address_hash) + remove(:name) + end + + rename(table(:account_tag_addresses), :encrypted_address_hash, to: :address_hash) + rename(table(:account_tag_addresses), :encrypted_name, to: :name) + + alter table(:account_tag_transactions) do + remove(:tx_hash) + remove(:name) + end + + rename(table(:account_tag_transactions), :encrypted_tx_hash, to: :tx_hash) + rename(table(:account_tag_transactions), :encrypted_name, to: :name) + + alter table(:account_watchlist_addresses) do + remove(:address_hash) + remove(:name) + end + + rename(table(:account_watchlist_addresses), :encrypted_address_hash, to: :address_hash) + rename(table(:account_watchlist_addresses), :encrypted_name, to: :name) + + alter table(:account_watchlist_notifications) do + remove(:to_address_hash) + remove(:from_address_hash) + remove(:transaction_hash) + remove(:subject) + remove(:name) + end + + rename(table(:account_watchlist_notifications), :encrypted_name, to: :name) + rename(table(:account_watchlist_notifications), :encrypted_subject, to: :subject) + rename(table(:account_watchlist_notifications), :encrypted_from_address_hash, to: :from_address_hash) + rename(table(:account_watchlist_notifications), :encrypted_to_address_hash, to: :to_address_hash) + rename(table(:account_watchlist_notifications), :encrypted_transaction_hash, to: :transaction_hash) + end +end diff --git a/mix.lock b/mix.lock index 010487f68679..e2b158158d29 100644 --- a/mix.lock +++ b/mix.lock @@ -17,6 +17,8 @@ "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "cldr_utils": {:hex, :cldr_utils, "2.19.1", "5a7bcd2f2fd432c548e494e850bba8a9e838f1b10202f682ea1d9809d74eff31", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:decimal, "~> 1.9 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "fbd10f79363e70f3d893ab21e195f444ca87c2c80120b5911761491da4489620"}, "coerce": {:hex, :coerce, "1.0.1", "211c27386315dc2894ac11bc1f413a0e38505d808153367bd5c6e75a4003d096", [:mix], [], "hexpm", "b44a691700f7a1a15b4b7e2ff1fa30bebd669929ac8aa43cffe9e2f8bf051cf1"}, + "cloak": {:hex, :cloak, "1.1.2", "7e0006c2b0b98d976d4f559080fabefd81f0e0a50a3c4b621f85ceeb563e80bb", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "940d5ac4fcd51b252930fd112e319ea5ae6ab540b722f3ca60a85666759b9585"}, + "cloak_ecto": {:hex, :cloak_ecto, "1.2.0", "e86a3df3bf0dc8980f70406bcb0af2858bac247d55494d40bc58a152590bd402", [:mix], [{:cloak, "~> 1.1.1", [hex: :cloak, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "8bcc677185c813fe64b786618bd6689b1707b35cd95acaae0834557b15a0c62f"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, "con_cache": {:hex, :con_cache, "1.0.0", "6405e2bd5d5005334af72939432783562a8c35a196c2e63108fe10bb97b366e6", [:mix], [], "hexpm", "4d1f5cb1a67f3c1a468243dc98d10ac83af7f3e33b7e7c15999dc2c9bc0a551e"}, From 053b2db32e9a82b41219d1bbf811e1677c70985c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Thu, 7 Jul 2022 00:44:35 +0300 Subject: [PATCH 353/723] Need to add unique constraints and chengeset for hash fields --- apps/explorer/lib/encrypt.ex | 33 ++++++++++------ .../lib/explorer/account/custom_abi.ex | 16 +++++--- .../explorer/lib/explorer/account/identity.ex | 36 +++++++++--------- .../lib/explorer/account/tag_address.ex | 14 ++++--- .../lib/explorer/account/tag_transaction.ex | 14 ++++--- .../lib/explorer/account/watchlist_address.ex | 14 ++++--- .../account/watchlist_notification.ex | 38 +++++++++++-------- .../20220706114430_encrypt_account_data.exs | 9 +++++ .../20220706211444_set_new_indexes.exs | 37 ++++++++++++++++++ .../20220706211444_set_new_indexes.exs | 6 +++ 10 files changed, 149 insertions(+), 68 deletions(-) create mode 100644 apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs create mode 100644 apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs diff --git a/apps/explorer/lib/encrypt.ex b/apps/explorer/lib/encrypt.ex index 64d8b29f462f..976f2a7de609 100644 --- a/apps/explorer/lib/encrypt.ex +++ b/apps/explorer/lib/encrypt.ex @@ -8,14 +8,15 @@ defmodule Mix.Tasks.Encrypt do Explorer.Account.Identity |> Explorer.Repo.Account.all() - |> Enum.map(fn identity -> - identity + |> Enum.map(fn element -> + element |> Ecto.Changeset.change(%{ - encrypted_uid: identity.uid, - encrypted_email: identity.email, - encrypted_name: identity.name, - encrypted_nickname: identity.nickname, - encrypted_avatar: identity.avatar + encrypted_uid: element.uid, + encrypted_email: element.email, + encrypted_name: element.name, + encrypted_nickname: element.nickname, + encrypted_avatar: element.avatar, + uid_hash: Cloak.Ecto.SHA256.hash(element.uid) }) |> Explorer.Repo.Account.update!() end) @@ -26,7 +27,8 @@ defmodule Mix.Tasks.Encrypt do element |> Ecto.Changeset.change(%{ encrypted_name: element.name, - encrypted_address_hash: element.address_hash + encrypted_address_hash: element.address_hash, + address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) }) |> Explorer.Repo.Account.update!() end) @@ -37,7 +39,8 @@ defmodule Mix.Tasks.Encrypt do element |> Ecto.Changeset.change(%{ encrypted_name: element.name, - encrypted_tx_hash: element.tx_hash + encrypted_tx_hash: element.tx_hash, + tx_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.tx_hash)) }) |> Explorer.Repo.Account.update!() end) @@ -48,7 +51,8 @@ defmodule Mix.Tasks.Encrypt do element |> Ecto.Changeset.change(%{ encrypted_name: element.name, - encrypted_address_hash: element.address_hash + encrypted_address_hash: element.address_hash, + address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) }) |> Explorer.Repo.Account.update!() end) @@ -59,7 +63,8 @@ defmodule Mix.Tasks.Encrypt do element |> Ecto.Changeset.change(%{ encrypted_name: element.name, - encrypted_address_hash: element.address_hash + encrypted_address_hash: element.address_hash, + address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) }) |> Explorer.Repo.Account.update!() end) @@ -73,7 +78,11 @@ defmodule Mix.Tasks.Encrypt do encrypted_from_address_hash: element.from_address_hash, encrypted_to_address_hash: element.to_address_hash, encrypted_transaction_hash: element.transaction_hash, - encrypted_subject: element.subject + encrypted_subject: element.subject, + from_address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.from_address_hash)), + to_address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.to_address_hash)), + transaction_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.transaction_hash)), + subject_hash: Cloak.Ecto.SHA256.hash(element.subject) }) |> Explorer.Repo.Account.update!() end) diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index 4a9705a5e151..ec22ac17cef7 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -18,12 +18,16 @@ defmodule Explorer.Account.CustomABI do field(:abi, {:array, :map}) field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:name, Explorer.Encrypted.Binary) + + field(:name, :string) + field(:address_hash, Hash.Address, null: false) + + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:address_hash_hash, Cloak.Ecto.SHA256) + + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 0348fec4a0d8..15cc0271e13d 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -11,23 +11,25 @@ defmodule Explorer.Account.Identity do alias Explorer.Account.{TagAddress, Watchlist} schema "account_identities" do - # field(:uid, :string) - # field(:email, :string) - # field(:name, :string) - # field(:nickname, :string) - # field(:avatar, :string) - - # field(:encrypted_uid, Explorer.Encrypted.Binary) - # field(:encrypted_email, Explorer.Encrypted.Binary) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_nickname, Explorer.Encrypted.Binary) - # field(:encrypted_avatar, Explorer.Encrypted.Binary) - - field(:uid, Explorer.Encrypted.Binary) - field(:email, Explorer.Encrypted.Binary) - field(:name, Explorer.Encrypted.Binary) - field(:nickname, Explorer.Encrypted.Binary) - field(:avatar, Explorer.Encrypted.Binary) + field(:uid, :string) + field(:email, :string) + field(:name, :string) + field(:nickname, :string) + field(:avatar, :string) + + field(:encrypted_uid, Explorer.Encrypted.Binary) + field(:encrypted_email, Explorer.Encrypted.Binary) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_nickname, Explorer.Encrypted.Binary) + field(:encrypted_avatar, Explorer.Encrypted.Binary) + + field(:uid_hash, Cloak.Ecto.SHA256) + + # field(:uid, Explorer.Encrypted.Binary) + # field(:email, Explorer.Encrypted.Binary) + # field(:name, Explorer.Encrypted.Binary) + # field(:nickname, Explorer.Encrypted.Binary) + # field(:avatar, Explorer.Encrypted.Binary) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index 02c388798446..0006f59b2694 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -15,13 +15,15 @@ defmodule Explorer.Account.TagAddress do @max_tag_address_per_account 15 schema "account_tag_addresses" do - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, :string) + field(:address_hash, Hash.Address, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:name, Explorer.Encrypted.Binary) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:address_hash_hash, Cloak.Ecto.SHA256) + + # field(:name, Explorer.Encrypted.Binary) + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 10cba8747970..8050fed0d982 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -15,13 +15,15 @@ defmodule Explorer.Account.TagTransaction do @max_tag_transaction_per_account 15 schema "account_tag_transactions" do - # field(:name, :string) - # field(:tx_hash, Hash.Full, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:name, :string) + field(:tx_hash, Hash.Full, null: false) - field(:name, Explorer.Encrypted.Binary) - field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:tx_hash_hash, Cloak.Ecto.SHA256) + + # field(:name, Explorer.Encrypted.Binary) + # field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index f793add2f5cb..0ef77e2ac316 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -16,13 +16,15 @@ defmodule Explorer.Account.WatchlistAddress do @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, :string) + field(:address_hash, Hash.Address, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:name, Explorer.Encrypted.Binary) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:address_hash_hash, Cloak.Ecto.SHA256) + + # field(:name, Explorer.Encrypted.Binary) + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:watchlist, Watchlist) diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index 101893abd6aa..f7996990d67b 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -16,30 +16,38 @@ defmodule Explorer.Account.WatchlistNotification do field(:block_number, :integer) field(:direction, :string) field(:method, :string) - # field(:name, :string) - # field(:subject, :string) field(:tx_fee, :decimal) field(:type, :string) field(:viewed_at, :integer) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_subject, Explorer.Encrypted.Binary) - field(:name, Explorer.Encrypted.Binary) - field(:subject, Explorer.Encrypted.Binary) + field(:name, :string) + field(:subject, :string) + + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_subject, Explorer.Encrypted.Binary) + + # field(:name, Explorer.Encrypted.Binary) + # field(:subject, Explorer.Encrypted.Binary) + + field(:subject_hash, Cloak.Ecto.SHA256) belongs_to(:watchlist_address, WatchlistAddress) - # field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) - # field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) - # field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) + field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) + field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) + field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) + + field(:from_address_hash, Hash.Address) + field(:to_address_hash, Hash.Address) + field(:transaction_hash, Hash.Full) - # field(:from_address_hash, Hash.Address) - # field(:to_address_hash, Hash.Address) - # field(:transaction_hash, Hash.Full) + # field(:from_address_hash, Explorer.Encrypted.AddressHash) + # field(:to_address_hash, Explorer.Encrypted.AddressHash) + # field(:transaction_hash, Explorer.Encrypted.TransactionHash) - field(:from_address_hash, Explorer.Encrypted.AddressHash) - field(:to_address_hash, Explorer.Encrypted.AddressHash) - field(:transaction_hash, Explorer.Encrypted.TransactionHash) + field(:from_address_hash_hash, Cloak.Ecto.SHA256) + field(:to_address_hash_hash, Cloak.Ecto.SHA256) + field(:transaction_hash_hash, Cloak.Ecto.SHA256) timestamps() end diff --git a/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs index be4ff499672f..4811b2db0fb5 100644 --- a/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs +++ b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs @@ -4,6 +4,7 @@ defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do def change do alter table(:account_identities) do add(:encrypted_uid, :binary) + add(:uid_hash, :binary) add(:encrypted_email, :binary) add(:encrypted_name, :binary) add(:encrypted_nickname, :binary, null: true) @@ -15,21 +16,25 @@ defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do # end alter table(:account_custom_abis) do + add(:address_hash_hash, :binary) add(:encrypted_address_hash, :binary) add(:encrypted_name, :binary) end alter table(:account_tag_addresses) do + add(:address_hash_hash, :binary) add(:encrypted_name, :binary) add(:encrypted_address_hash, :binary) end alter table(:account_tag_transactions) do + add(:tx_hash_hash, :binary) add(:encrypted_name, :binary) add(:encrypted_tx_hash, :binary) end alter table(:account_watchlist_addresses) do + add(:address_hash_hash, :binary) add(:encrypted_name, :binary) add(:encrypted_address_hash, :binary) end @@ -40,6 +45,10 @@ defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do add(:encrypted_from_address_hash, :binary) add(:encrypted_to_address_hash, :binary) add(:encrypted_transaction_hash, :binary) + add(:subject_hash, :binary, null: true) + add(:from_address_hash_hash, :binary, null: true) + add(:to_address_hash_hash, :binary, null: true) + add(:transaction_hash_hash, :binary, null: true) end end end diff --git a/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs b/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs new file mode 100644 index 000000000000..ef80adea47ed --- /dev/null +++ b/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs @@ -0,0 +1,37 @@ +defmodule Explorer.Repo.Account.Migrations.SetNewIndexes do + use Ecto.Migration + + def change do + drop_if_exists(unique_index(:account_tag_addresses, [:identity_id, :address_hash])) + drop_if_exists(unique_index(:account_tag_transactions, [:identity_id, :tx_hash])) + drop_if_exists(unique_index(:account_watchlist_addresses, [:watchlist_id, :address_hash])) + drop_if_exists(unique_index(:account_custom_abis, [:identity_id, :address_hash])) + + drop_if_exists(index(:account_watchlist_notifications, [:transaction_hash])) + drop_if_exists(index(:account_watchlist_notifications, [:from_address_hash])) + drop_if_exists(index(:account_watchlist_notifications, [:to_address_hash])) + + drop_if_exists(unique_index(:account_identities, [:uid])) + + drop_if_exists(index(:account_tag_addresses, [:address_hash])) + drop_if_exists(index(:account_tag_transactions, [:tx_hash])) + + drop_if_exists(index(:account_watchlist_addresses, [:address_hash])) + + create(unique_index(:account_tag_addresses, [:identity_id, :address_hash_hash])) + create(unique_index(:account_tag_transactions, [:identity_id, :tx_hash_hash])) + create(unique_index(:account_watchlist_addresses, [:watchlist_id, :address_hash_hash])) + create(unique_index(:account_custom_abis, [:identity_id, :address_hash_hash])) + + create(index(:account_watchlist_notifications, [:transaction_hash_hash])) + create(index(:account_watchlist_notifications, [:from_address_hash_hash])) + create(index(:account_watchlist_notifications, [:to_address_hash_hash])) + + create(unique_index(:account_identities, [:uid_hash])) + + create(index(:account_tag_addresses, [:address_hash_hash])) + create(index(:account_tag_transactions, [:tx_hash_hash])) + + create(index(:account_watchlist_addresses, [:address_hash_hash])) + end +end diff --git a/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs b/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs new file mode 100644 index 000000000000..b2fdc60a0161 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs @@ -0,0 +1,6 @@ +defmodule Explorer.Repo.Migrations.SetNewIndexes do + use Ecto.Migration + + def change do + end +end From c2ce2e6a5b913842ff88a3f647dea02af3f98ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 8 Jul 2022 15:53:35 +0300 Subject: [PATCH 354/723] all is working --- .../models/get_address_tags.ex | 4 +- .../models/get_transaction_tags.ex | 3 +- .../block_scout_web/models/user_from_auth.ex | 5 +- .../templates/account/api_key/form.html.eex | 4 +- .../account/tag_transaction/form.html.eex | 2 +- apps/explorer/lib/encrypt.ex | 18 +++---- .../lib/explorer/account/custom_abi.ex | 34 ++++++++++--- .../explorer/lib/explorer/account/identity.ex | 38 ++++++++------ .../lib/explorer/account/tag_address.ex | 35 ++++++++++--- .../lib/explorer/account/tag_transaction.ex | 51 +++++++++++++------ .../lib/explorer/account/watchlist_address.ex | 37 +++++++++++--- .../account/watchlist_notification.ex | 38 ++++++++------ apps/explorer/lib/explorer/chain.ex | 6 +++ .../explorer/encrypted/types/address_hash.ex | 9 ++++ apps/explorer/lib/explorer/vault.ex | 6 +-- .../20220706211444_set_new_indexes.exs | 8 ++- .../20220706211444_set_new_indexes.exs | 6 --- 17 files changed, 208 insertions(+), 96 deletions(-) delete mode 100644 apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex index 4a834f3fef9e..459d5dffdb83 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex @@ -49,7 +49,7 @@ defmodule BlockScoutWeb.Models.GetAddressTags do query = from( ta in TagAddress, - where: ta.address_hash == ^address_hash, + where: ta.address_hash_hash == ^address_hash, where: ta.identity_id == ^id, select: %{label: ta.name, display_name: ta.name, address_hash: ta.address_hash} ) @@ -63,7 +63,7 @@ defmodule BlockScoutWeb.Models.GetAddressTags do query = from( wa in WatchlistAddress, - where: wa.address_hash == ^address_hash, + where: wa.address_hash_hash == ^address_hash, where: wa.watchlist_id == ^watchlist_id, select: %{label: wa.name, display_name: wa.name} ) diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex index d3ac7cd03fc2..97a3035b4136 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex @@ -21,7 +21,8 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do def get_transaction_with_addresses_tags(_, _), do: %{personal_tags: [], watchlist_names: [], personal_tx_tag: nil} def get_transaction_tags(transaction_hash, %{id: identity_id}) do - Repo.account_repo().get_by(TagTransaction, tx_hash: transaction_hash, identity_id: identity_id) |> debug("2434") + Repo.account_repo().get_by(TagTransaction, tx_hash_hash: transaction_hash, identity_id: identity_id) + |> debug("2434") end def get_transaction_tags(_, _), do: nil diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index 83baaf088915..2c99c886862a 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -52,6 +52,7 @@ defmodule BlockScoutWeb.Models.UserFromAuth do defp new_identity(auth) do %Identity{ uid: auth.uid, + uid_hash: auth.uid, email: email_from_auth(auth), name: name_from_auth(auth), nickname: nickname_from_auth(auth), @@ -79,11 +80,11 @@ defmodule BlockScoutWeb.Models.UserFromAuth do end def query_identity(%Auth{} = auth) do - from(i in Identity, where: i.uid == ^auth.uid) + from(i in Identity, where: i.uid_hash == ^auth.uid) end def query_identity(uid) do - from(i in Identity, where: i.uid == ^uid) + from(i in Identity, where: i.uid_hash == ^uid) end defp basic_info(auth, identity) do diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex index c8bf5a781c31..a425a078b5d8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex @@ -12,13 +12,13 @@
    <%= label f, :value, gettext("API key"), class: "control-label", style: "font-size: 14px" %> <%= text_input f, :value, class: "form-control", placeholder: gettext("API key"), readonly: true %> - <%= error_tag f, :value %> + <%= error_tag f, :value, class: "text-danger form-error" %>
    <% end %>
    <%= label f, :name, gettext("Name"), class: "control-label", style: "font-size: 14px" %> <%= text_input f, :name, class: "form-control", placeholder: gettext("Name this API key"), maxlength: 255 %> - <%= error_tag f, :name %> + <%= error_tag f, :name, class: "text-danger form-error" %>

    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex index 941e3afea662..40d9c03f83be 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex @@ -17,7 +17,7 @@
    <%= label f, :name, gettext("Name"), class: "control-label", style: "font-size: 14px" %> <%= text_input f, :name, class: "form-control", placeholder: gettext("Name this transaction"), maxlength: 35 %> - <%= error_tag f, :name %> + <%= error_tag f, :name, class: "text-danger form-error" %>
    diff --git a/apps/explorer/lib/encrypt.ex b/apps/explorer/lib/encrypt.ex index 976f2a7de609..2f8eb743213e 100644 --- a/apps/explorer/lib/encrypt.ex +++ b/apps/explorer/lib/encrypt.ex @@ -16,7 +16,7 @@ defmodule Mix.Tasks.Encrypt do encrypted_name: element.name, encrypted_nickname: element.nickname, encrypted_avatar: element.avatar, - uid_hash: Cloak.Ecto.SHA256.hash(element.uid) + uid_hash: element.uid }) |> Explorer.Repo.Account.update!() end) @@ -28,7 +28,7 @@ defmodule Mix.Tasks.Encrypt do |> Ecto.Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, - address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) + address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) |> Explorer.Repo.Account.update!() end) @@ -40,7 +40,7 @@ defmodule Mix.Tasks.Encrypt do |> Ecto.Changeset.change(%{ encrypted_name: element.name, encrypted_tx_hash: element.tx_hash, - tx_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.tx_hash)) + tx_hash_hash: element.tx_hash |> to_string() |> String.downcase() }) |> Explorer.Repo.Account.update!() end) @@ -52,7 +52,7 @@ defmodule Mix.Tasks.Encrypt do |> Ecto.Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, - address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) + address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) |> Explorer.Repo.Account.update!() end) @@ -64,7 +64,7 @@ defmodule Mix.Tasks.Encrypt do |> Ecto.Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, - address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.address_hash)) + address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) |> Explorer.Repo.Account.update!() end) @@ -79,10 +79,10 @@ defmodule Mix.Tasks.Encrypt do encrypted_to_address_hash: element.to_address_hash, encrypted_transaction_hash: element.transaction_hash, encrypted_subject: element.subject, - from_address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.from_address_hash)), - to_address_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.to_address_hash)), - transaction_hash_hash: Cloak.Ecto.SHA256.hash(to_string(element.transaction_hash)), - subject_hash: Cloak.Ecto.SHA256.hash(element.subject) + from_address_hash_hash: element.from_address_hash |> to_string() |> String.downcase(), + to_address_hash_hash: element.to_address_hash |> to_string() |> String.downcase(), + transaction_hash_hash: element.transaction_hash |> to_string() |> String.downcase(), + subject_hash: element.subject }) |> Explorer.Repo.Account.update!() end) diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index ec22ac17cef7..e6d7bea7241b 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -5,11 +5,13 @@ defmodule Explorer.Account.CustomABI do use Explorer.Schema alias ABI.FunctionSelector + alias Cloak.Ecto.SHA256 alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} alias Explorer.Chain.Hash + import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Ecto.Changeset @max_abis_per_account 15 @@ -19,15 +21,16 @@ defmodule Explorer.Account.CustomABI do field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) - field(:name, :string) - field(:address_hash, Hash.Address, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) field(:address_hash_hash, Cloak.Ecto.SHA256) - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) - # field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) @@ -43,7 +46,8 @@ defmodule Explorer.Account.CustomABI do |> validate_custom_abi() |> check_smart_contract_address() |> foreign_key_constraint(:identity_id, message: "User not found") - |> unique_constraint([:identity_id, :address_hash], + |> put_hashed_fields() + |> unique_constraint([:identity_id, :address_hash_hash], message: "Custom ABI for this address has already been added before" ) |> custom_abi_count_constraint() @@ -55,6 +59,11 @@ defmodule Explorer.Account.CustomABI do |> validate_required(@attrs, message: "Required") end + defp put_hashed_fields(changeset) do + changeset + |> put_change(:address_hash_hash, hash_to_lower_case_string(get_field(changeset, :address_hash))) + end + defp check_smart_contract_address(%Changeset{changes: %{address_hash: address_hash}} = custom_abi) do check_smart_contract_address_inner(custom_abi, address_hash) end @@ -172,7 +181,7 @@ defmodule Explorer.Account.CustomABI do def custom_abi_by_identity_id_and_address_hash_query(address_hash, identity_id) when not is_nil(identity_id) and not is_nil(address_hash) do __MODULE__ - |> where([custom_abi], custom_abi.identity_id == ^identity_id and custom_abi.address_hash == ^address_hash) + |> where([custom_abi], custom_abi.identity_id == ^identity_id and custom_abi.address_hash_hash == ^address_hash) end def custom_abi_by_identity_id_and_address_hash_query(_, _), do: nil @@ -180,10 +189,19 @@ defmodule Explorer.Account.CustomABI do def get_custom_abi_by_identity_id_and_address_hash(address_hash, identity_id) when not is_nil(identity_id) and not is_nil(address_hash) do address_hash + |> hash_to_lower_case_string() |> custom_abi_by_identity_id_and_address_hash_query(identity_id) |> Repo.account_repo().one() end + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + def get_custom_abi_by_identity_id_and_address_hash(_, _), do: nil def get_custom_abi_by_id_and_identity_id(id, identity_id) when not is_nil(id) and not is_nil(identity_id) do diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 15cc0271e13d..7923199f0c14 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -11,25 +11,25 @@ defmodule Explorer.Account.Identity do alias Explorer.Account.{TagAddress, Watchlist} schema "account_identities" do - field(:uid, :string) - field(:email, :string) - field(:name, :string) - field(:nickname, :string) - field(:avatar, :string) - - field(:encrypted_uid, Explorer.Encrypted.Binary) - field(:encrypted_email, Explorer.Encrypted.Binary) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_nickname, Explorer.Encrypted.Binary) - field(:encrypted_avatar, Explorer.Encrypted.Binary) + # field(:uid, :string) + # field(:email, :string) + # field(:name, :string) + # field(:nickname, :string) + # field(:avatar, :string) + + # field(:encrypted_uid, Explorer.Encrypted.Binary) + # field(:encrypted_email, Explorer.Encrypted.Binary) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_nickname, Explorer.Encrypted.Binary) + # field(:encrypted_avatar, Explorer.Encrypted.Binary) field(:uid_hash, Cloak.Ecto.SHA256) - # field(:uid, Explorer.Encrypted.Binary) - # field(:email, Explorer.Encrypted.Binary) - # field(:name, Explorer.Encrypted.Binary) - # field(:nickname, Explorer.Encrypted.Binary) - # field(:avatar, Explorer.Encrypted.Binary) + field(:uid, Explorer.Encrypted.Binary) + field(:email, Explorer.Encrypted.Binary) + field(:name, Explorer.Encrypted.Binary) + field(:nickname, Explorer.Encrypted.Binary) + field(:avatar, Explorer.Encrypted.Binary) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) @@ -44,5 +44,11 @@ defmodule Explorer.Account.Identity do identity |> cast(attrs, [:uid, :email, :name, :nickname, :avatar]) |> validate_required([:uid, :email, :name]) + |> put_hashed_fields() + end + + defp put_hashed_fields(changeset) do + changeset + |> put_change(:uid_hash, get_field(changeset, :uid)) end end diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index 0006f59b2694..bfe8a1bbffdd 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -12,18 +12,20 @@ defmodule Explorer.Account.TagAddress do alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Hash} + import Explorer.Chain, only: [hash_to_lower_case_string: 1] + @max_tag_address_per_account 15 schema "account_tag_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) field(:address_hash_hash, Cloak.Ecto.SHA256) - # field(:name, Explorer.Encrypted.Binary) - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:identity, Identity) @@ -43,15 +45,33 @@ defmodule Explorer.Account.TagAddress do |> cast(attrs, @attrs) |> validate_required(@attrs, message: "Required") |> validate_length(:name, min: 1, max: 35) - |> unique_constraint([:identity_id, :address_hash], message: "Address tag already exists") + |> put_hashed_fields() + |> debug("put_hashed_fields") + |> unique_constraint([:identity_id, :address_hash_hash], message: "Address tag already exists") + |> debug("unique_constraint") |> check_existance_or_create_address() |> tag_address_count_constraint() end + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + def create(attrs) do %__MODULE__{} |> changeset(attrs) + |> debug("changeset") |> Repo.account_repo().insert() + |> debug("insert") + end + + defp put_hashed_fields(changeset) do + changeset + |> put_change(:address_hash_hash, hash_to_lower_case_string(get_field(changeset, :address_hash))) end defp check_existance_or_create_address(%Changeset{changes: %{address_hash: address_hash}, valid?: true} = changeset) do @@ -108,6 +128,7 @@ defmodule Explorer.Account.TagAddress do def get_tag_address_by_address_hash_and_identity_id(address_hash, identity_id) when not is_nil(address_hash) and not is_nil(identity_id) do address_hash + |> hash_to_lower_case_string() |> tag_address_by_address_hash_and_identity_id_query(identity_id) |> Repo.account_repo().one() end diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 8050fed0d982..bb02ab73d5b5 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -11,19 +11,20 @@ defmodule Explorer.Account.TagTransaction do alias Explorer.Account.Identity alias Explorer.{Chain, Repo} alias Explorer.Chain.Hash + import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_tag_transaction_per_account 15 schema "account_tag_transactions" do - field(:name, :string) - field(:tx_hash, Hash.Full, null: false) + # field(:name, :string) + # field(:tx_hash, Hash.Full, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) field(:tx_hash_hash, Cloak.Ecto.SHA256) - # field(:name, Explorer.Encrypted.Binary) - # field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) belongs_to(:identity, Identity) @@ -43,7 +44,8 @@ defmodule Explorer.Account.TagTransaction do |> cast(attrs, @attrs) |> validate_required(@attrs, message: "Required") |> validate_length(:name, min: 1, max: 35) - |> unique_constraint([:identity_id, :tx_hash], message: "Transaction tag already exists") + |> put_hashed_fields() + |> unique_constraint([:identity_id, :tx_hash_hash], message: "Transaction tag already exists") |> tag_transaction_count_constraint() |> check_transaction_existance() end @@ -54,6 +56,22 @@ defmodule Explorer.Account.TagTransaction do |> Repo.account_repo().insert() end + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + + defp put_hashed_fields(changeset) do + debug(get_field(changeset, :tx_hash), "tx") + debug(to_string(get_field(changeset, :tx_hash)), "tx") + + changeset + |> put_change(:tx_hash_hash, hash_to_lower_case_string(get_field(changeset, :tx_hash))) + end + defp check_transaction_existance(%Changeset{changes: %{tx_hash: tx_hash}} = changeset) do check_transaction_existance_inner(changeset, tx_hash) end @@ -98,22 +116,23 @@ defmodule Explorer.Account.TagTransaction do def get_tags_transaction_by_identity_id(_), do: nil - def tag_transaction_by_address_hash_and_identity_id_query(address_hash, identity_id) - when not is_nil(address_hash) and not is_nil(identity_id) do + def tag_transaction_by_transaction_hash_and_identity_id_query(tx_hash, identity_id) + when not is_nil(tx_hash) and not is_nil(identity_id) do __MODULE__ - |> where([tag], tag.identity_id == ^identity_id and tag.address_hash == ^address_hash) + |> where([tag], tag.identity_id == ^identity_id and tag.tx_hash == ^tx_hash) end - def tag_transaction_by_address_hash_and_identity_id_query(_, _), do: nil + def tag_transaction_by_transaction_hash_and_identity_id_query(_, _), do: nil - def get_tag_transaction_by_address_hash_and_identity_id(address_hash, identity_id) - when not is_nil(address_hash) and not is_nil(identity_id) do - address_hash - |> tag_transaction_by_address_hash_and_identity_id_query(identity_id) + def get_tag_transaction_by_transaction_hash_and_identity_id(tx_hash, identity_id) + when not is_nil(tx_hash) and not is_nil(identity_id) do + tx_hash + |> hash_to_lower_case_string() + |> tag_transaction_by_transaction_hash_and_identity_id_query(identity_id) |> Repo.account_repo().one() end - def get_tag_transaction_by_address_hash_and_identity_id(_, _), do: nil + def get_tag transaction_by_transaction_hash_and_identity_id(_, _), do: nil def tag_transaction_by_id_and_identity_id_query(tag_id, identity_id) when not is_nil(tag_id) and not is_nil(identity_id) do diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index 0ef77e2ac316..f0d0e98ee76e 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -13,18 +13,20 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Hash, Wei} + import Explorer.Chain, only: [hash_to_lower_case_string: 1] + @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, :string) + # field(:address_hash, Hash.Address, null: false) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) field(:address_hash_hash, Cloak.Ecto.SHA256) - # field(:name, Explorer.Encrypted.Binary) - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:watchlist, Watchlist) @@ -46,6 +48,14 @@ defmodule Explorer.Account.WatchlistAddress do timestamps() end + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end + @attrs ~w(name address_hash watch_coin_input watch_coin_output watch_erc_20_input watch_erc_20_output watch_erc_721_input watch_erc_721_output watch_erc_1155_input watch_erc_1155_output notify_email notify_epns notify_feed notify_inapp watchlist_id)a def changeset do @@ -59,15 +69,28 @@ defmodule Explorer.Account.WatchlistAddress do |> cast(attrs, @attrs) |> validate_length(:name, min: 1, max: 35) |> validate_required([:name, :address_hash, :watchlist_id], message: "Required") - |> unique_constraint([:watchlist_id, :address_hash], message: "Address already added to the watch list") + |> put_hashed_fields() + |> debug("put_hashed_fields") + |> unique_constraint([:watchlist_id, :address_hash_hash], + name: "unique_watchlist_id_address_hash_hash_index", + message: "Address already added to the watchlist" + ) + |> debug("unique_constraint") |> check_address() |> watchlist_address_count_constraint() end + defp put_hashed_fields(changeset) do + changeset + |> put_change(:address_hash_hash, hash_to_lower_case_string(get_field(changeset, :address_hash))) + end + def create(attrs) do %__MODULE__{} |> changeset(attrs) + |> debug("changeset ") |> Repo.account_repo().insert() + |> debug("insert") end def watchlist_address_count_constraint(%Changeset{changes: %{watchlist_id: watchlist_id}} = watchlist_address) do diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index f7996990d67b..f04f93d1a04d 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -20,30 +20,30 @@ defmodule Explorer.Account.WatchlistNotification do field(:type, :string) field(:viewed_at, :integer) - field(:name, :string) - field(:subject, :string) + # field(:name, :string) + # field(:subject, :string) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_subject, Explorer.Encrypted.Binary) + # field(:encrypted_name, Explorer.Encrypted.Binary) + # field(:encrypted_subject, Explorer.Encrypted.Binary) - # field(:name, Explorer.Encrypted.Binary) - # field(:subject, Explorer.Encrypted.Binary) + field(:name, Explorer.Encrypted.Binary) + field(:subject, Explorer.Encrypted.Binary) field(:subject_hash, Cloak.Ecto.SHA256) belongs_to(:watchlist_address, WatchlistAddress) - field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) - field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) - field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) + # field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) + # field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) + # field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) - field(:from_address_hash, Hash.Address) - field(:to_address_hash, Hash.Address) - field(:transaction_hash, Hash.Full) + # field(:from_address_hash, Hash.Address) + # field(:to_address_hash, Hash.Address) + # field(:transaction_hash, Hash.Full) - # field(:from_address_hash, Explorer.Encrypted.AddressHash) - # field(:to_address_hash, Explorer.Encrypted.AddressHash) - # field(:transaction_hash, Explorer.Encrypted.TransactionHash) + field(:from_address_hash, Explorer.Encrypted.AddressHash) + field(:to_address_hash, Explorer.Encrypted.AddressHash) + field(:transaction_hash, Explorer.Encrypted.TransactionHash) field(:from_address_hash_hash, Cloak.Ecto.SHA256) field(:to_address_hash_hash, Cloak.Ecto.SHA256) @@ -68,5 +68,13 @@ defmodule Explorer.Account.WatchlistNotification do :decimals, :viewed_at ]) + |> put_hashed_fields() + end + + defp put_hashed_fields(changeset) do + changeset + |> put_change(:from_address_hash_hash, get_field(changeset, :from_address_hash)) + |> put_change(:to_address_hash_hash, get_field(changeset, :to_address_hash)) + |> put_change(:transaction_hash_hash, get_field(changeset, :transaction_hash)) end end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index c269d5de99da..e80f66a4ba14 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -6195,4 +6195,10 @@ defmodule Explorer.Chain do false end end + + def hash_to_lower_case_string(hash) do + hash + |> to_string() + |> String.downcase() + end end diff --git a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex index 20ba211a3ff0..84e8374a378f 100644 --- a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex @@ -18,9 +18,18 @@ defmodule Explorer.Encrypted.Types.AddressHash do def after_decrypt(""), do: nil def after_decrypt(value) do + debug(value, "after decrypt") {:ok, address_hash} = Explorer.Chain.Hash.Address.cast(value) address_hash end + + defp debug(value, key) do + require Logger + Logger.configure(truncate: :infinity) + Logger.info(key) + Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) + value + end end end end diff --git a/apps/explorer/lib/explorer/vault.ex b/apps/explorer/lib/explorer/vault.ex index c388bc99c843..b0eb19dfd543 100644 --- a/apps/explorer/lib/explorer/vault.ex +++ b/apps/explorer/lib/explorer/vault.ex @@ -10,8 +10,8 @@ defmodule Explorer.Vault do end defp decode_env!(var) do - var - |> System.get_env() - |> Base.decode64!() + env = if Mix.env() == :test, do: "+fh7IElJfA61+vMMw8rW9SBJFHmhVL1DLpKE22qUJgw=", else: System.get_env(var) + + Base.decode64!(env) end end diff --git a/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs b/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs index ef80adea47ed..26abb92abeb2 100644 --- a/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs +++ b/apps/explorer/priv/account/migrations/20220706211444_set_new_indexes.exs @@ -20,7 +20,13 @@ defmodule Explorer.Repo.Account.Migrations.SetNewIndexes do create(unique_index(:account_tag_addresses, [:identity_id, :address_hash_hash])) create(unique_index(:account_tag_transactions, [:identity_id, :tx_hash_hash])) - create(unique_index(:account_watchlist_addresses, [:watchlist_id, :address_hash_hash])) + + create( + unique_index(:account_watchlist_addresses, [:watchlist_id, :address_hash_hash], + name: "unique_watchlist_id_address_hash_hash_index" + ) + ) + create(unique_index(:account_custom_abis, [:identity_id, :address_hash_hash])) create(index(:account_watchlist_notifications, [:transaction_hash_hash])) diff --git a/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs b/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs deleted file mode 100644 index b2fdc60a0161..000000000000 --- a/apps/explorer/priv/repo/migrations/20220706211444_set_new_indexes.exs +++ /dev/null @@ -1,6 +0,0 @@ -defmodule Explorer.Repo.Migrations.SetNewIndexes do - use Ecto.Migration - - def change do - end -end From ba3374f11f92b287cf09b970f797ab907e79de1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 8 Jul 2022 15:59:07 +0300 Subject: [PATCH 355/723] remove debug --- .../block_scout_web/models/get_transaction_tags.ex | 9 --------- .../lib/block_scout_web/models/user_from_auth.ex | 10 +--------- apps/explorer/lib/explorer/account/custom_abi.ex | 8 -------- apps/explorer/lib/explorer/account/tag_address.ex | 12 ------------ .../explorer/lib/explorer/account/tag_transaction.ex | 11 ----------- .../lib/explorer/account/watchlist_address.ex | 12 ------------ .../lib/explorer/encrypted/types/address_hash.ex | 9 --------- 7 files changed, 1 insertion(+), 70 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex index 97a3035b4136..c173a43a3327 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/get_transaction_tags.ex @@ -22,7 +22,6 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do def get_transaction_tags(transaction_hash, %{id: identity_id}) do Repo.account_repo().get_by(TagTransaction, tx_hash_hash: transaction_hash, identity_id: identity_id) - |> debug("2434") end def get_transaction_tags(_, _), do: nil @@ -39,12 +38,4 @@ defmodule BlockScoutWeb.Models.GetTransactionTags do watchlist_names: Enum.dedup(from_tags.watchlist_names ++ to_tags.watchlist_names) } end - - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end end diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index 2c99c886862a..02d5780daf8c 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -67,16 +67,8 @@ defmodule BlockScoutWeb.Models.UserFromAuth do do: {:ok, identity} end - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end - def find_identity(auth_or_uid) do - Repo.account_repo().all(query_identity(auth_or_uid)) |> debug("identity") + Repo.account_repo().all(query_identity(auth_or_uid)) end def query_identity(%Auth{} = auth) do diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index e6d7bea7241b..7644f6fd14f3 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -194,14 +194,6 @@ defmodule Explorer.Account.CustomABI do |> Repo.account_repo().one() end - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end - def get_custom_abi_by_identity_id_and_address_hash(_, _), do: nil def get_custom_abi_by_id_and_identity_id(id, identity_id) when not is_nil(id) and not is_nil(identity_id) do diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index bfe8a1bbffdd..d82dc81c7af1 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -46,27 +46,15 @@ defmodule Explorer.Account.TagAddress do |> validate_required(@attrs, message: "Required") |> validate_length(:name, min: 1, max: 35) |> put_hashed_fields() - |> debug("put_hashed_fields") |> unique_constraint([:identity_id, :address_hash_hash], message: "Address tag already exists") - |> debug("unique_constraint") |> check_existance_or_create_address() |> tag_address_count_constraint() end - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end - def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> debug("changeset") |> Repo.account_repo().insert() - |> debug("insert") end defp put_hashed_fields(changeset) do diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index bb02ab73d5b5..34ea5335d702 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -56,18 +56,7 @@ defmodule Explorer.Account.TagTransaction do |> Repo.account_repo().insert() end - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end - defp put_hashed_fields(changeset) do - debug(get_field(changeset, :tx_hash), "tx") - debug(to_string(get_field(changeset, :tx_hash)), "tx") - changeset |> put_change(:tx_hash_hash, hash_to_lower_case_string(get_field(changeset, :tx_hash))) end diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index f0d0e98ee76e..993d3a4aa8c6 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -48,14 +48,6 @@ defmodule Explorer.Account.WatchlistAddress do timestamps() end - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end - @attrs ~w(name address_hash watch_coin_input watch_coin_output watch_erc_20_input watch_erc_20_output watch_erc_721_input watch_erc_721_output watch_erc_1155_input watch_erc_1155_output notify_email notify_epns notify_feed notify_inapp watchlist_id)a def changeset do @@ -70,12 +62,10 @@ defmodule Explorer.Account.WatchlistAddress do |> validate_length(:name, min: 1, max: 35) |> validate_required([:name, :address_hash, :watchlist_id], message: "Required") |> put_hashed_fields() - |> debug("put_hashed_fields") |> unique_constraint([:watchlist_id, :address_hash_hash], name: "unique_watchlist_id_address_hash_hash_index", message: "Address already added to the watchlist" ) - |> debug("unique_constraint") |> check_address() |> watchlist_address_count_constraint() end @@ -88,9 +78,7 @@ defmodule Explorer.Account.WatchlistAddress do def create(attrs) do %__MODULE__{} |> changeset(attrs) - |> debug("changeset ") |> Repo.account_repo().insert() - |> debug("insert") end def watchlist_address_count_constraint(%Changeset{changes: %{watchlist_id: watchlist_id}} = watchlist_address) do diff --git a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex index 84e8374a378f..20ba211a3ff0 100644 --- a/apps/explorer/lib/explorer/encrypted/types/address_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/types/address_hash.ex @@ -18,18 +18,9 @@ defmodule Explorer.Encrypted.Types.AddressHash do def after_decrypt(""), do: nil def after_decrypt(value) do - debug(value, "after decrypt") {:ok, address_hash} = Explorer.Chain.Hash.Address.cast(value) address_hash end - - defp debug(value, key) do - require Logger - Logger.configure(truncate: :infinity) - Logger.info(key) - Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity)) - value - end end end end From f07267b4e38470449060d0341f4c72a55210adf4 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 23 Aug 2022 13:25:40 +0300 Subject: [PATCH 356/723] Resolve rebase conflicts --- .github/workflows/config.yml | 2 +- apps/explorer/lib/explorer/account/tag_transaction.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index c87ed7e041b8..b8cda73ef4f6 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,7 +4,7 @@ on: push: branches: - account - - np-separate-account-separate-db + - np-separate-account-encrypt-db-1 env: MIX_ENV: test diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 34ea5335d702..559090fd1296 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -121,7 +121,7 @@ defmodule Explorer.Account.TagTransaction do |> Repo.account_repo().one() end - def get_tag transaction_by_transaction_hash_and_identity_id(_, _), do: nil + def get_tag_transaction_by_transaction_hash_and_identity_id(_, _), do: nil def tag_transaction_by_id_and_identity_id_query(tag_id, identity_id) when not is_nil(tag_id) and not is_nil(identity_id) do From e1a2f54f8125aa556440c17f32357b9a812e8770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 29 Aug 2022 12:02:24 +0300 Subject: [PATCH 357/723] Fix after rebase --- apps/explorer/lib/encrypt.ex | 67 ++++++++++--------- .../lib/explorer/account/custom_abi.ex | 3 +- .../lib/explorer/account/notifier/notify.ex | 2 +- .../lib/explorer/account/tag_transaction.ex | 2 +- .../lib/explorer/account/watchlist_address.ex | 5 +- .../account/watchlist_notification.ex | 3 +- .../lib/explorer/encrypted/address_hash.ex | 2 + .../explorer/lib/explorer/encrypted/binary.ex | 2 + .../explorer/encrypted/transaction_hash.ex | 2 + .../encrypted/types/transaction_hash.ex | 6 +- apps/explorer/lib/explorer/vault.ex | 5 +- apps/explorer/test/support/factory.ex | 2 + 12 files changed, 59 insertions(+), 42 deletions(-) diff --git a/apps/explorer/lib/encrypt.ex b/apps/explorer/lib/encrypt.ex index 2f8eb743213e..95f2f4ecf9a7 100644 --- a/apps/explorer/lib/encrypt.ex +++ b/apps/explorer/lib/encrypt.ex @@ -2,15 +2,20 @@ defmodule Mix.Tasks.Encrypt do @moduledoc "The encrypt mix task: `mix help encrypt`" use Mix.Task + alias Ecto.Changeset + alias Explorer.Account.{CustomABI, Identity, TagAddress, TagTransaction, WatchlistAddress, WatchlistNotification} + alias Explorer.Repo.Account + alias Mix.Task + @shortdoc "Encrypt" def run(_) do - Mix.Task.run("app.start") + Task.run("app.start") - Explorer.Account.Identity - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + Identity + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_uid: element.uid, encrypted_email: element.email, encrypted_name: element.name, @@ -18,62 +23,62 @@ defmodule Mix.Tasks.Encrypt do encrypted_avatar: element.avatar, uid_hash: element.uid }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) - Explorer.Account.TagAddress - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + TagAddress + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) - Explorer.Account.TagTransaction - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + TagTransaction + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_name: element.name, encrypted_tx_hash: element.tx_hash, tx_hash_hash: element.tx_hash |> to_string() |> String.downcase() }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) - Explorer.Account.CustomABI - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + CustomABI + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) - Explorer.Account.WatchlistAddress - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + WatchlistAddress + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_name: element.name, encrypted_address_hash: element.address_hash, address_hash_hash: element.address_hash |> to_string() |> String.downcase() }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) - Explorer.Account.WatchlistNotification - |> Explorer.Repo.Account.all() - |> Enum.map(fn element -> + WatchlistNotification + |> Account.all() + |> Enum.each(fn element -> element - |> Ecto.Changeset.change(%{ + |> Changeset.change(%{ encrypted_name: element.name, encrypted_from_address_hash: element.from_address_hash, encrypted_to_address_hash: element.to_address_hash, @@ -84,7 +89,7 @@ defmodule Mix.Tasks.Encrypt do transaction_hash_hash: element.transaction_hash |> to_string() |> String.downcase(), subject_hash: element.subject }) - |> Explorer.Repo.Account.update!() + |> Account.update!() end) end end diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index 7644f6fd14f3..6395f57b0e5a 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -5,11 +5,10 @@ defmodule Explorer.Account.CustomABI do use Explorer.Schema alias ABI.FunctionSelector - alias Cloak.Ecto.SHA256 alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - alias Explorer.Chain.Hash + # alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Ecto.Changeset diff --git a/apps/explorer/lib/explorer/account/notifier/notify.ex b/apps/explorer/lib/explorer/account/notifier/notify.ex index b935442baa79..122eb4585b8c 100644 --- a/apps/explorer/lib/explorer/account/notifier/notify.ex +++ b/apps/explorer/lib/explorer/account/notifier/notify.ex @@ -142,7 +142,7 @@ defmodule Explorer.Account.Notifier.Notify do end defp find_watchlists_addresses(%Explorer.Chain.Hash{} = address_hash) do - query = from(wa in WatchlistAddress, where: wa.address_hash == ^address_hash) + query = from(wa in WatchlistAddress, where: wa.address_hash_hash == ^address_hash) Repo.account_repo().all(query) end end diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 559090fd1296..26da9843cafd 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -10,7 +10,7 @@ defmodule Explorer.Account.TagTransaction do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - alias Explorer.Chain.Hash + # alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_tag_transaction_per_account 15 diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index 993d3a4aa8c6..e75dea41d65c 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -11,7 +11,8 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.Account.Notifier.ForbiddenAddress alias Explorer.Account.Watchlist alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Hash, Wei} + alias Explorer.Chain.{Address, Wei} + # , Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] @@ -64,7 +65,7 @@ defmodule Explorer.Account.WatchlistAddress do |> put_hashed_fields() |> unique_constraint([:watchlist_id, :address_hash_hash], name: "unique_watchlist_id_address_hash_hash_index", - message: "Address already added to the watchlist" + message: "Address already added to the watch list" ) |> check_address() |> watchlist_address_count_constraint() diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index f04f93d1a04d..f2e5a11cc90d 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -9,7 +9,8 @@ defmodule Explorer.Account.WatchlistNotification do import Ecto.Changeset alias Explorer.Account.WatchlistAddress - alias Explorer.Chain.Hash + + # alias Explorer.Chain.Hash schema "account_watchlist_notifications" do field(:amount, :decimal) diff --git a/apps/explorer/lib/explorer/encrypted/address_hash.ex b/apps/explorer/lib/explorer/encrypted/address_hash.ex index ad8e88dd0a3b..4518951298ee 100644 --- a/apps/explorer/lib/explorer/encrypted/address_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/address_hash.ex @@ -1,3 +1,5 @@ defmodule Explorer.Encrypted.AddressHash do + @moduledoc false + use Explorer.Encrypted.Types.AddressHash, vault: Explorer.Vault end diff --git a/apps/explorer/lib/explorer/encrypted/binary.ex b/apps/explorer/lib/explorer/encrypted/binary.ex index ca28d9205bc8..6de296ded69d 100644 --- a/apps/explorer/lib/explorer/encrypted/binary.ex +++ b/apps/explorer/lib/explorer/encrypted/binary.ex @@ -1,3 +1,5 @@ defmodule Explorer.Encrypted.Binary do + @moduledoc false + use Cloak.Ecto.Binary, vault: Explorer.Vault end diff --git a/apps/explorer/lib/explorer/encrypted/transaction_hash.ex b/apps/explorer/lib/explorer/encrypted/transaction_hash.ex index a563f464e67a..a783cb899b2b 100644 --- a/apps/explorer/lib/explorer/encrypted/transaction_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/transaction_hash.ex @@ -1,3 +1,5 @@ defmodule Explorer.Encrypted.TransactionHash do + @moduledoc false + use Explorer.Encrypted.Types.TransactionHash, vault: Explorer.Vault end diff --git a/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex index 2d9ad53b1d2d..5f3e458c023d 100644 --- a/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex +++ b/apps/explorer/lib/explorer/encrypted/types/transaction_hash.ex @@ -1,6 +1,6 @@ defmodule Explorer.Encrypted.Types.TransactionHash do @moduledoc """ - An `Ecto.Type` to encrypt address_hash fields. + An `Ecto.Type` to encrypt transaction_hash fields. """ @doc false @@ -18,8 +18,8 @@ defmodule Explorer.Encrypted.Types.TransactionHash do def after_decrypt(""), do: nil def after_decrypt(value) do - {:ok, address_hash} = Explorer.Chain.Hash.Full.cast(value) - address_hash + {:ok, transaction_hash} = Explorer.Chain.Hash.Full.cast(value) + transaction_hash end end end diff --git a/apps/explorer/lib/explorer/vault.ex b/apps/explorer/lib/explorer/vault.ex index b0eb19dfd543..76565c7ef060 100644 --- a/apps/explorer/lib/explorer/vault.ex +++ b/apps/explorer/lib/explorer/vault.ex @@ -1,5 +1,8 @@ defmodule Explorer.Vault do - use Cloak.Vault, otp_app: :my_app + @moduledoc """ + Module responsible for encrypt/decrypt GenServer initialization + """ + use Cloak.Vault, otp_app: :explorer @impl GenServer def init(config) do diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index 12d0d7301f31..f0a2050dc63d 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -4,6 +4,7 @@ defmodule Explorer.Factory do require Ecto.Query import Ecto.Query + import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Kernel, except: [+: 2] alias Comeonin.Bcrypt @@ -145,6 +146,7 @@ defmodule Explorer.Factory do name: "wallet", watchlist: build(:account_watchlist), address_hash: hash, + address_hash_hash: hash_to_lower_case_string(hash), watch_coin_input: true, watch_coin_output: true, watch_erc_20_input: true, From 2fbb4ed1de7a14c803f207f8394bbb726812d6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 30 Aug 2022 16:54:54 +0300 Subject: [PATCH 358/723] Ready to migrate and encrypt --- apps/explorer/lib/encrypt.ex | 23 ++++++++++++- .../lib/explorer/account/custom_abi.ex | 14 ++++---- .../explorer/lib/explorer/account/identity.ex | 32 +++++++++---------- .../explorer/account/public_tags_request.ex | 7 ++++ .../lib/explorer/account/tag_address.ex | 12 +++---- .../lib/explorer/account/tag_transaction.ex | 14 ++++---- .../lib/explorer/account/watchlist_address.ex | 15 ++++----- .../account/watchlist_notification.ex | 32 +++++++++---------- .../third_party_integrations/airtable.ex | 4 ++- .../20220706114430_encrypt_account_data.exs | 6 ++++ ...220706153506_remove_unencrypted_fields.exs | 9 ++++++ 11 files changed, 106 insertions(+), 62 deletions(-) diff --git a/apps/explorer/lib/encrypt.ex b/apps/explorer/lib/encrypt.ex index 95f2f4ecf9a7..e105feb11d7b 100644 --- a/apps/explorer/lib/encrypt.ex +++ b/apps/explorer/lib/encrypt.ex @@ -3,7 +3,17 @@ defmodule Mix.Tasks.Encrypt do use Mix.Task alias Ecto.Changeset - alias Explorer.Account.{CustomABI, Identity, TagAddress, TagTransaction, WatchlistAddress, WatchlistNotification} + + alias Explorer.Account.{ + CustomABI, + Identity, + PublicTagsRequest, + TagAddress, + TagTransaction, + WatchlistAddress, + WatchlistNotification + } + alias Explorer.Repo.Account alias Mix.Task @@ -91,5 +101,16 @@ defmodule Mix.Tasks.Encrypt do }) |> Account.update!() end) + + PublicTagsRequest + |> Account.all() + |> Enum.each(fn element -> + element + |> Changeset.change(%{ + encrypted_full_name: element.full_name, + encrypted_email: element.email + }) + |> Account.update!() + end) end end diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index 6395f57b0e5a..37d898eeeda4 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -8,7 +8,7 @@ defmodule Explorer.Account.CustomABI do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - # alias Explorer.Chain.Hash + alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Ecto.Changeset @@ -20,16 +20,16 @@ defmodule Explorer.Account.CustomABI do field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) + field(:name, :string) + field(:address_hash, Hash.Address, null: false) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) field(:address_hash_hash, Cloak.Ecto.SHA256) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:name, Explorer.Encrypted.Binary) + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 7923199f0c14..5be36afc1238 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -11,25 +11,25 @@ defmodule Explorer.Account.Identity do alias Explorer.Account.{TagAddress, Watchlist} schema "account_identities" do - # field(:uid, :string) - # field(:email, :string) - # field(:name, :string) - # field(:nickname, :string) - # field(:avatar, :string) - - # field(:encrypted_uid, Explorer.Encrypted.Binary) - # field(:encrypted_email, Explorer.Encrypted.Binary) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_nickname, Explorer.Encrypted.Binary) - # field(:encrypted_avatar, Explorer.Encrypted.Binary) + field(:uid, :string) + field(:email, :string) + field(:name, :string) + field(:nickname, :string) + field(:avatar, :string) + + field(:encrypted_uid, Explorer.Encrypted.Binary) + field(:encrypted_email, Explorer.Encrypted.Binary) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_nickname, Explorer.Encrypted.Binary) + field(:encrypted_avatar, Explorer.Encrypted.Binary) field(:uid_hash, Cloak.Ecto.SHA256) - field(:uid, Explorer.Encrypted.Binary) - field(:email, Explorer.Encrypted.Binary) - field(:name, Explorer.Encrypted.Binary) - field(:nickname, Explorer.Encrypted.Binary) - field(:avatar, Explorer.Encrypted.Binary) + # field(:uid, Explorer.Encrypted.Binary) + # field(:email, Explorer.Encrypted.Binary) + # field(:name, Explorer.Encrypted.Binary) + # field(:nickname, Explorer.Encrypted.Binary) + # field(:avatar, Explorer.Encrypted.Binary) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index 273d7b5b1881..2d47374bd4b6 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -22,6 +22,7 @@ defmodule Explorer.Account.PublicTagsRequest do schema("account_public_tags_requests") do field(:full_name, :string) field(:email, :string) + field(:company, :string) field(:website, :string) field(:tags, :string) @@ -33,6 +34,12 @@ defmodule Explorer.Account.PublicTagsRequest do field(:remove_reason, :string) field(:request_id, :string) + field(:encrypted_full_name, Explorer.Encrypted.Binary) + field(:encrypted_email, Explorer.Encrypted.Binary) + + # field(:full_name, Explorer.Encrypted.Binary) + # field(:email, Explorer.Encrypted.Binary) + belongs_to(:identity, Identity) timestamps() diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index d82dc81c7af1..ba91331cb42c 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -17,15 +17,15 @@ defmodule Explorer.Account.TagAddress do @max_tag_address_per_account 15 schema "account_tag_addresses" do - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, :string) + field(:address_hash, Hash.Address, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) field(:address_hash_hash, Cloak.Ecto.SHA256) - field(:name, Explorer.Encrypted.Binary) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, Explorer.Encrypted.Binary) + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 26da9843cafd..5649ea0be8d6 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -10,21 +10,21 @@ defmodule Explorer.Account.TagTransaction do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - # alias Explorer.Chain.Hash + alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_tag_transaction_per_account 15 schema "account_tag_transactions" do - # field(:name, :string) - # field(:tx_hash, Hash.Full, null: false) + field(:name, :string) + field(:tx_hash, Hash.Full, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) field(:tx_hash_hash, Cloak.Ecto.SHA256) - field(:name, Explorer.Encrypted.Binary) - field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) + # field(:name, Explorer.Encrypted.Binary) + # field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index e75dea41d65c..728ca7631312 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -11,23 +11,22 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.Account.Notifier.ForbiddenAddress alias Explorer.Account.Watchlist alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Wei} - # , Hash + alias Explorer.Chain.{Address, Wei, Hash} import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do - # field(:name, :string) - # field(:address_hash, Hash.Address, null: false) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, :string) + field(:address_hash, Hash.Address, null: false) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) field(:address_hash_hash, Cloak.Ecto.SHA256) - field(:name, Explorer.Encrypted.Binary) - field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + # field(:name, Explorer.Encrypted.Binary) + # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:watchlist, Watchlist) diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index f2e5a11cc90d..7625026c7842 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -10,7 +10,7 @@ defmodule Explorer.Account.WatchlistNotification do alias Explorer.Account.WatchlistAddress - # alias Explorer.Chain.Hash + alias Explorer.Chain.Hash schema "account_watchlist_notifications" do field(:amount, :decimal) @@ -21,30 +21,30 @@ defmodule Explorer.Account.WatchlistNotification do field(:type, :string) field(:viewed_at, :integer) - # field(:name, :string) - # field(:subject, :string) + field(:name, :string) + field(:subject, :string) - # field(:encrypted_name, Explorer.Encrypted.Binary) - # field(:encrypted_subject, Explorer.Encrypted.Binary) + field(:encrypted_name, Explorer.Encrypted.Binary) + field(:encrypted_subject, Explorer.Encrypted.Binary) - field(:name, Explorer.Encrypted.Binary) - field(:subject, Explorer.Encrypted.Binary) + # field(:name, Explorer.Encrypted.Binary) + # field(:subject, Explorer.Encrypted.Binary) field(:subject_hash, Cloak.Ecto.SHA256) belongs_to(:watchlist_address, WatchlistAddress) - # field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) - # field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) - # field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) + field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) + field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) + field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) - # field(:from_address_hash, Hash.Address) - # field(:to_address_hash, Hash.Address) - # field(:transaction_hash, Hash.Full) + field(:from_address_hash, Hash.Address) + field(:to_address_hash, Hash.Address) + field(:transaction_hash, Hash.Full) - field(:from_address_hash, Explorer.Encrypted.AddressHash) - field(:to_address_hash, Explorer.Encrypted.AddressHash) - field(:transaction_hash, Explorer.Encrypted.TransactionHash) + # field(:from_address_hash, Explorer.Encrypted.AddressHash) + # field(:to_address_hash, Explorer.Encrypted.AddressHash) + # field(:transaction_hash, Explorer.Encrypted.TransactionHash) field(:from_address_hash_hash, Cloak.Ecto.SHA256) field(:to_address_hash_hash, Cloak.Ecto.SHA256) diff --git a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex index cd7e1e0f8842..f45ea8499b52 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex @@ -37,7 +37,9 @@ defmodule Explorer.ThirdPartyIntegrations.AirTable do input - _ -> + error -> + Logger.error(fn -> ["Error while submitting AirTable entry", inspect(error)] end) + {:error, %{ (%PublicTagsRequest{} diff --git a/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs index 4811b2db0fb5..0328025982a5 100644 --- a/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs +++ b/apps/explorer/priv/account/migrations/20220706114430_encrypt_account_data.exs @@ -11,6 +11,7 @@ defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do add(:encrypted_avatar, :binary, null: true) end + # unused because we dont have personal watchlists, only autogenerated `default` for each identity # alter table(:account_watchlists) do # add(:encrypted_name, :binary) # end @@ -50,5 +51,10 @@ defmodule Explorer.Repo.Account.Migrations.EncryptAccountData do add(:to_address_hash_hash, :binary, null: true) add(:transaction_hash_hash, :binary, null: true) end + + alter table(:account_public_tags_requests) do + add(:encrypted_email, :binary) + add(:encrypted_full_name, :binary) + end end end diff --git a/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs b/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs index 0660e095210a..b887ac9f7912 100644 --- a/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs +++ b/apps/explorer/priv/account/migrations/20220706153506_remove_unencrypted_fields.exs @@ -16,6 +16,7 @@ defmodule Explorer.Repo.Account.Migrations.RemoveUnencryptedFields do rename(table(:account_identities), :encrypted_nickname, to: :nickname) rename(table(:account_identities), :encrypted_avatar, to: :avatar) + # unused because we dont have personal watchlists, only autogenerated `default` for each identity # alter table(:account_watchlists) do # remove(:name) # end @@ -66,5 +67,13 @@ defmodule Explorer.Repo.Account.Migrations.RemoveUnencryptedFields do rename(table(:account_watchlist_notifications), :encrypted_from_address_hash, to: :from_address_hash) rename(table(:account_watchlist_notifications), :encrypted_to_address_hash, to: :to_address_hash) rename(table(:account_watchlist_notifications), :encrypted_transaction_hash, to: :transaction_hash) + + alter table(:account_public_tags_requests) do + remove(:full_name) + remove(:email) + end + + rename(table(:account_public_tags_requests), :encrypted_full_name, to: :full_name) + rename(table(:account_public_tags_requests), :encrypted_email, to: :email) end end From 4874d216e20144c71d448848c1ccc8859a59097f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 30 Aug 2022 17:15:55 +0300 Subject: [PATCH 359/723] Ready to use encrypted DB --- .../lib/explorer/account/custom_abi.ex | 13 ++------- .../explorer/lib/explorer/account/identity.ex | 23 ++++----------- .../lib/explorer/account/notifier/notify.ex | 8 ++--- .../explorer/account/public_tags_request.ex | 11 ++----- .../lib/explorer/account/tag_address.ex | 10 ++----- .../lib/explorer/account/tag_transaction.ex | 11 ++----- .../lib/explorer/account/watchlist_address.ex | 12 ++------ .../account/watchlist_notification.ex | 29 ++++--------------- .../third_party_integrations/airtable.ex | 1 + 9 files changed, 27 insertions(+), 91 deletions(-) diff --git a/apps/explorer/lib/explorer/account/custom_abi.ex b/apps/explorer/lib/explorer/account/custom_abi.ex index 37d898eeeda4..94f62f482a23 100644 --- a/apps/explorer/lib/explorer/account/custom_abi.ex +++ b/apps/explorer/lib/explorer/account/custom_abi.ex @@ -8,7 +8,6 @@ defmodule Explorer.Account.CustomABI do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] import Ecto.Changeset @@ -19,17 +18,9 @@ defmodule Explorer.Account.CustomABI do field(:abi, {:array, :map}) field(:given_abi, :string, virtual: true) field(:abi_validating_error, :string, virtual: true) - - field(:name, :string) - field(:address_hash, Hash.Address, null: false) - - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:address_hash_hash, Cloak.Ecto.SHA256) - - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) - # field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/identity.ex b/apps/explorer/lib/explorer/account/identity.ex index 5be36afc1238..d0766d7d3586 100644 --- a/apps/explorer/lib/explorer/account/identity.ex +++ b/apps/explorer/lib/explorer/account/identity.ex @@ -11,25 +11,12 @@ defmodule Explorer.Account.Identity do alias Explorer.Account.{TagAddress, Watchlist} schema "account_identities" do - field(:uid, :string) - field(:email, :string) - field(:name, :string) - field(:nickname, :string) - field(:avatar, :string) - - field(:encrypted_uid, Explorer.Encrypted.Binary) - field(:encrypted_email, Explorer.Encrypted.Binary) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_nickname, Explorer.Encrypted.Binary) - field(:encrypted_avatar, Explorer.Encrypted.Binary) - field(:uid_hash, Cloak.Ecto.SHA256) - - # field(:uid, Explorer.Encrypted.Binary) - # field(:email, Explorer.Encrypted.Binary) - # field(:name, Explorer.Encrypted.Binary) - # field(:nickname, Explorer.Encrypted.Binary) - # field(:avatar, Explorer.Encrypted.Binary) + field(:uid, Explorer.Encrypted.Binary) + field(:email, Explorer.Encrypted.Binary) + field(:name, Explorer.Encrypted.Binary) + field(:nickname, Explorer.Encrypted.Binary) + field(:avatar, Explorer.Encrypted.Binary) has_many(:tag_addresses, TagAddress) has_many(:watchlists, Watchlist) diff --git a/apps/explorer/lib/explorer/account/notifier/notify.ex b/apps/explorer/lib/explorer/account/notifier/notify.ex index 122eb4585b8c..bfbcb6326dc3 100644 --- a/apps/explorer/lib/explorer/account/notifier/notify.ex +++ b/apps/explorer/lib/explorer/account/notifier/notify.ex @@ -80,12 +80,12 @@ defmodule Explorer.Account.Notifier.Notify do from(wn in WatchlistNotification, where: wn.watchlist_address_id == ^watchlist_address.id and - wn.from_address_hash == ^notification.from_address_hash and - wn.to_address_hash == ^notification.to_address_hash and - wn.transaction_hash == ^notification.transaction_hash and + wn.from_address_hash_hash == ^notification.from_address_hash and + wn.to_address_hash_hash == ^notification.to_address_hash and + wn.transaction_hash_hash == ^notification.transaction_hash and wn.block_number == ^notification.block_number and wn.direction == ^notification.direction and - wn.subject == ^notification.subject and + wn.subject_hash == ^notification.subject and wn.amount == ^notification.amount ) end diff --git a/apps/explorer/lib/explorer/account/public_tags_request.ex b/apps/explorer/lib/explorer/account/public_tags_request.ex index 2d47374bd4b6..eb989e5e7611 100644 --- a/apps/explorer/lib/explorer/account/public_tags_request.ex +++ b/apps/explorer/lib/explorer/account/public_tags_request.ex @@ -20,9 +20,6 @@ defmodule Explorer.Account.PublicTagsRequest do @max_tag_length 35 schema("account_public_tags_requests") do - field(:full_name, :string) - field(:email, :string) - field(:company, :string) field(:website, :string) field(:tags, :string) @@ -33,12 +30,8 @@ defmodule Explorer.Account.PublicTagsRequest do field(:is_owner, :boolean, default: true) field(:remove_reason, :string) field(:request_id, :string) - - field(:encrypted_full_name, Explorer.Encrypted.Binary) - field(:encrypted_email, Explorer.Encrypted.Binary) - - # field(:full_name, Explorer.Encrypted.Binary) - # field(:email, Explorer.Encrypted.Binary) + field(:full_name, Explorer.Encrypted.Binary) + field(:email, Explorer.Encrypted.Binary) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/tag_address.ex b/apps/explorer/lib/explorer/account/tag_address.ex index ba91331cb42c..75d4e8d6c888 100644 --- a/apps/explorer/lib/explorer/account/tag_address.ex +++ b/apps/explorer/lib/explorer/account/tag_address.ex @@ -17,15 +17,9 @@ defmodule Explorer.Account.TagAddress do @max_tag_address_per_account 15 schema "account_tag_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:address_hash_hash, Cloak.Ecto.SHA256) - - # field(:name, Explorer.Encrypted.Binary) - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/tag_transaction.ex b/apps/explorer/lib/explorer/account/tag_transaction.ex index 5649ea0be8d6..495dd1779a97 100644 --- a/apps/explorer/lib/explorer/account/tag_transaction.ex +++ b/apps/explorer/lib/explorer/account/tag_transaction.ex @@ -10,21 +10,14 @@ defmodule Explorer.Account.TagTransaction do alias Ecto.Changeset alias Explorer.Account.Identity alias Explorer.{Chain, Repo} - alias Explorer.Chain.Hash import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_tag_transaction_per_account 15 schema "account_tag_transactions" do - field(:name, :string) - field(:tx_hash, Hash.Full, null: false) - - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_tx_hash, Explorer.Encrypted.TransactionHash, null: false) field(:tx_hash_hash, Cloak.Ecto.SHA256) - - # field(:name, Explorer.Encrypted.Binary) - # field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:tx_hash, Explorer.Encrypted.TransactionHash, null: false) belongs_to(:identity, Identity) diff --git a/apps/explorer/lib/explorer/account/watchlist_address.ex b/apps/explorer/lib/explorer/account/watchlist_address.ex index 728ca7631312..cce6c7935e7e 100644 --- a/apps/explorer/lib/explorer/account/watchlist_address.ex +++ b/apps/explorer/lib/explorer/account/watchlist_address.ex @@ -11,22 +11,16 @@ defmodule Explorer.Account.WatchlistAddress do alias Explorer.Account.Notifier.ForbiddenAddress alias Explorer.Account.Watchlist alias Explorer.{Chain, Repo} - alias Explorer.Chain.{Address, Wei, Hash} + alias Explorer.Chain.{Address, Wei} import Explorer.Chain, only: [hash_to_lower_case_string: 1] @max_watchlist_addresses_per_account 10 schema "account_watchlist_addresses" do - field(:name, :string) - field(:address_hash, Hash.Address, null: false) - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_address_hash, Explorer.Encrypted.AddressHash, null: false) - field(:address_hash_hash, Cloak.Ecto.SHA256) - - # field(:name, Explorer.Encrypted.Binary) - # field(:address_hash, Explorer.Encrypted.AddressHash, null: false) + field(:name, Explorer.Encrypted.Binary) + field(:address_hash, Explorer.Encrypted.AddressHash, null: false) belongs_to(:watchlist, Watchlist) diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index 7625026c7842..d95c915ed8ee 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -10,8 +10,6 @@ defmodule Explorer.Account.WatchlistNotification do alias Explorer.Account.WatchlistAddress - alias Explorer.Chain.Hash - schema "account_watchlist_notifications" do field(:amount, :decimal) field(:block_number, :integer) @@ -20,31 +18,15 @@ defmodule Explorer.Account.WatchlistNotification do field(:tx_fee, :decimal) field(:type, :string) field(:viewed_at, :integer) - - field(:name, :string) - field(:subject, :string) - - field(:encrypted_name, Explorer.Encrypted.Binary) - field(:encrypted_subject, Explorer.Encrypted.Binary) - - # field(:name, Explorer.Encrypted.Binary) - # field(:subject, Explorer.Encrypted.Binary) - + field(:name, Explorer.Encrypted.Binary) + field(:subject, Explorer.Encrypted.Binary) field(:subject_hash, Cloak.Ecto.SHA256) belongs_to(:watchlist_address, WatchlistAddress) - field(:encrypted_from_address_hash, Explorer.Encrypted.AddressHash) - field(:encrypted_to_address_hash, Explorer.Encrypted.AddressHash) - field(:encrypted_transaction_hash, Explorer.Encrypted.TransactionHash) - - field(:from_address_hash, Hash.Address) - field(:to_address_hash, Hash.Address) - field(:transaction_hash, Hash.Full) - - # field(:from_address_hash, Explorer.Encrypted.AddressHash) - # field(:to_address_hash, Explorer.Encrypted.AddressHash) - # field(:transaction_hash, Explorer.Encrypted.TransactionHash) + field(:from_address_hash, Explorer.Encrypted.AddressHash) + field(:to_address_hash, Explorer.Encrypted.AddressHash) + field(:transaction_hash, Explorer.Encrypted.TransactionHash) field(:from_address_hash_hash, Cloak.Ecto.SHA256) field(:to_address_hash_hash, Cloak.Ecto.SHA256) @@ -77,5 +59,6 @@ defmodule Explorer.Account.WatchlistNotification do |> put_change(:from_address_hash_hash, get_field(changeset, :from_address_hash)) |> put_change(:to_address_hash_hash, get_field(changeset, :to_address_hash)) |> put_change(:transaction_hash_hash, get_field(changeset, :transaction_hash)) + |> put_change(:subject_hash, get_field(changeset, :subject)) end end diff --git a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex index f45ea8499b52..a2aba9c6640c 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/airtable.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/airtable.ex @@ -2,6 +2,7 @@ defmodule Explorer.ThirdPartyIntegrations.AirTable do @moduledoc """ Module is responsible for submitting requests for public tags to AirTable """ + require Logger alias Ecto.Changeset alias Explorer.Account.PublicTagsRequest From c8298fe3b5045bbb065f3fb7f41a94256ba7a9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 31 Aug 2022 13:00:38 +0300 Subject: [PATCH 360/723] Fix hash field for watchlist notifications --- apps/explorer/lib/explorer/account/notifier/notify.ex | 7 ++++++- .../lib/explorer/account/watchlist_notification.ex | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/explorer/lib/explorer/account/notifier/notify.ex b/apps/explorer/lib/explorer/account/notifier/notify.ex index bfbcb6326dc3..b64b4bd47a5a 100644 --- a/apps/explorer/lib/explorer/account/notifier/notify.ex +++ b/apps/explorer/lib/explorer/account/notifier/notify.ex @@ -11,6 +11,7 @@ defmodule Explorer.Account.Notifier.Notify do require Logger import Ecto.Query, only: [from: 2] + import Explorer.Chain, only: [hash_to_lower_case_string: 1] def call(nil), do: nil def call([]), do: nil @@ -123,7 +124,11 @@ defmodule Explorer.Account.Notifier.Notify do subject: summary.subject, tx_fee: summary.tx_fee, name: summary.name, - type: summary.type + type: summary.type, + from_address_hash_hash: hash_to_lower_case_string(summary.from_address_hash), + to_address_hash_hash: hash_to_lower_case_string(summary.to_address_hash), + transaction_hash_hash: hash_to_lower_case_string(summary.transaction_hash), + subject_hash: summary.subject } end end diff --git a/apps/explorer/lib/explorer/account/watchlist_notification.ex b/apps/explorer/lib/explorer/account/watchlist_notification.ex index d95c915ed8ee..6c909be3ed3a 100644 --- a/apps/explorer/lib/explorer/account/watchlist_notification.ex +++ b/apps/explorer/lib/explorer/account/watchlist_notification.ex @@ -7,6 +7,7 @@ defmodule Explorer.Account.WatchlistNotification do use Explorer.Schema import Ecto.Changeset + import Explorer.Chain, only: [hash_to_lower_case_string: 1] alias Explorer.Account.WatchlistAddress @@ -56,9 +57,9 @@ defmodule Explorer.Account.WatchlistNotification do defp put_hashed_fields(changeset) do changeset - |> put_change(:from_address_hash_hash, get_field(changeset, :from_address_hash)) - |> put_change(:to_address_hash_hash, get_field(changeset, :to_address_hash)) - |> put_change(:transaction_hash_hash, get_field(changeset, :transaction_hash)) + |> put_change(:from_address_hash_hash, hash_to_lower_case_string(get_field(changeset, :from_address_hash))) + |> put_change(:to_address_hash_hash, hash_to_lower_case_string(get_field(changeset, :to_address_hash))) + |> put_change(:transaction_hash_hash, hash_to_lower_case_string(get_field(changeset, :transaction_hash))) |> put_change(:subject_hash, get_field(changeset, :subject)) end end From 7f2c422e314bf34f5329982337b4234e46576d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 2 Sep 2022 23:10:49 +0300 Subject: [PATCH 361/723] Remove migration with copying account data --- .../20220901135656_copy_account_data.exs | 92 ------------------- 1 file changed, 92 deletions(-) delete mode 100644 apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs diff --git a/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs b/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs deleted file mode 100644 index 2824c366073a..000000000000 --- a/apps/explorer/priv/account/migrations/20220901135656_copy_account_data.exs +++ /dev/null @@ -1,92 +0,0 @@ -defmodule Explorer.Repo.Account.Migrations.CopyAccountData do - use Ecto.Migration - - def change do - execute("CREATE EXTENSION dblink;") - execute("SELECT dblink_connect('db_to_copy_from', '#{System.get_env("DATABASE_URL")}');") - - execute( - "INSERT INTO account_identities - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_identities') - row(id bigint, uid character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, email character varying(255), name character varying(255), plan_id bigint, nickname character varying(255), avatar text);" - ) - - # execute("INSERT INTO account_api_plans - # SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_api_plans') - # row(id integer, max_req_per_second smallint, name character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);") - - execute( - "INSERT INTO account_api_keys - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_api_keys') - row(identity_id bigint, name character varying(255), value uuid, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_custom_abis - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_custom_abis') - row(id integer, identity_id bigint, name character varying(255), address_hash bytea, abi jsonb, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_public_tags_requests - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_public_tags_requests') - row(id integer, identity_id bigint, full_name character varying(255), email character varying(255), company character varying(255), website character varying(255), tags character varying(255), description text, additional_comment character varying(255), request_type character varying(255), is_owner boolean, remove_reason text, request_id character varying(255), inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, addresses bytea[]);" - ) - - execute( - "INSERT INTO account_tag_addresses - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_tag_addresses') - row(id integer, name character varying(255), identity_id bigint, address_hash bytea, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_tag_transactions - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_tag_transactions') - row(id integer, name character varying(255), identity_id bigint, tx_hash bytea, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_watchlists - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlists') - row(id bigint, name character varying(255), identity_id bigint, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_watchlist_addresses - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlist_addresses') - row(id bigint, name character varying(255), address_hash bytea, watchlist_id bigint, watch_coin_input boolean, watch_coin_output boolean, watch_erc_20_input boolean, watch_erc_20_output boolean, watch_erc_721_input boolean, watch_erc_721_output boolean, watch_erc_1155_input boolean, watch_erc_1155_output boolean, notify_email boolean, notify_epns boolean, notify_feed boolean, notify_inapp boolean, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute( - "INSERT INTO account_watchlist_notifications - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM account_watchlist_notifications') - row(id bigint, watchlist_address_id bigint, transaction_hash bytea, from_address_hash bytea, to_address_hash bytea, direction character varying(255), name character varying(255), type character varying(255), method character varying(255), block_number integer, amount numeric, tx_fee numeric, viewed_at timestamp without time zone, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone, subject character varying(255));" - ) - - execute( - "INSERT INTO guardian_tokens - SELECT * FROM dblink('db_to_copy_from', 'SELECT * FROM guardian_tokens') - row(jti character varying(255), aud character varying(255), typ character varying(255), iss character varying(255), sub character varying(255), exp bigint, jwt text, claims jsonb, inserted_at timestamp(0) without time zone, updated_at timestamp(0) without time zone);" - ) - - execute("SELECT dblink_disconnect('db_to_copy_from');") - execute("DROP EXTENSION dblink;") - - # update sequence id counter - execute("SELECT setval('account_identities_id_seq', (SELECT MAX(id) FROM account_identities)+1);") - execute("SELECT setval('account_custom_abis_id_seq', (SELECT MAX(id) FROM account_custom_abis)+1);") - - execute( - "SELECT setval('account_public_tags_requests_id_seq', (SELECT MAX(id) FROM account_public_tags_requests)+1);" - ) - - execute("SELECT setval('account_tag_addresses_id_seq', (SELECT MAX(id) FROM account_tag_addresses)+1);") - execute("SELECT setval('account_tag_transactions_id_seq', (SELECT MAX(id) FROM account_tag_transactions)+1);") - execute("SELECT setval('account_watchlists_id_seq', (SELECT MAX(id) FROM account_watchlists)+1);") - execute("SELECT setval('account_watchlist_addresses_id_seq', (SELECT MAX(id) FROM account_watchlist_addresses)+1);") - - execute( - "SELECT setval('account_watchlist_notifications_id_seq', (SELECT MAX(id) FROM account_watchlist_notifications)+1);" - ) - end -end From 501df71449b02b959a028d8751fc161f98d8d900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sat, 3 Sep 2022 17:23:44 +0300 Subject: [PATCH 362/723] Invalidate GA cache --- .github/workflows/config.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index b8cda73ef4f6..a500cc2582da 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -38,7 +38,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps- @@ -98,7 +98,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -122,7 +122,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -145,7 +145,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -154,7 +154,7 @@ jobs: id: dialyzer-cache with: path: priv/plts - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-dialyzer-" @@ -185,7 +185,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -211,7 +211,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -239,7 +239,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -285,7 +285,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -344,7 +344,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -400,7 +400,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -467,7 +467,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" @@ -528,7 +528,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_15-${{ hashFiles('mix.lock') }} restore-keys: | ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" From 3575c6ea340fa241430c558384f91ebd751530ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Sep 2022 11:46:10 +0300 Subject: [PATCH 363/723] Add env to docker related files --- docker-compose/envs/common-blockscout.env | 1 + docker/Makefile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index babd98a2f9ff..e9d79c47b398 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -127,3 +127,4 @@ RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ # DATABASE_READ_ONLY_API_URL= # DATABASE_ACCOUNT_URL= # POOL_SIZE_ACCOUNT= +CLOAK_KEY= diff --git a/docker/Makefile b/docker/Makefile index ada9d2dc4079..aee1bb37c176 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -508,6 +508,9 @@ endif ifdef POOL_SIZE_ACCOUNT BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_ACCOUNT=$(POOL_SIZE_ACCOUNT)' endif +ifdef CLOAK_KEY + BLOCKSCOUT_CONTAINER_PARAMS += -e 'CLOAK_KEY=$(CLOAK_KEY)' +endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From 183d778f80b17bc4fd5b4271384fa526ee39c6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Sep 2022 00:08:44 +0300 Subject: [PATCH 364/723] Add submission date; Reuse legacy session cookie instead of JWT --- .github/workflows/config.yml | 2 +- apps/block_scout_web/API blueprint.md | 899 +++++++++--------- apps/block_scout_web/API.md | 869 ++++++++--------- .../lib/block_scout_web/api_router.ex | 20 +- .../account/api/v1/tags_controller.ex | 11 +- .../account/api/v1/user_controller.ex | 53 +- .../controllers/account/auth_controller.ex | 8 + .../block_scout_web/models/user_from_auth.ex | 4 +- .../views/account/api/v1/user_view.ex | 3 +- .../account/api/v1/user_controller_test.exs | 46 +- apps/block_scout_web/test/test_helper.exs | 12 +- 11 files changed, 930 insertions(+), 997 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index a500cc2582da..61e226ebb3ea 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,7 +4,7 @@ on: push: branches: - account - - np-separate-account-encrypt-db-1 + - np-account-api-improvements env: MIX_ENV: test diff --git a/apps/block_scout_web/API blueprint.md b/apps/block_scout_web/API blueprint.md index 77f2961f15cc..9cbc20a71de2 100644 --- a/apps/block_scout_web/API blueprint.md +++ b/apps/block_scout_web/API blueprint.md @@ -1,49 +1,11 @@ +FORMAT: 1A +HOST:http://blockscout.com/xdai/testnet # # API Documentation -# Group BlockScoutWeb.Account.Api.V1.AuthController -## BlockScoutWeb.Account.Api.V1.AuthController [/auth/auth0_api] -### BlockScoutWeb.Account.Api.V1.AuthController info [GET /auth/auth0_api] - - - - - -+ Login -**GET**  `/auth/auth0_api` - -+ Response 200 - - + Body - - {"auth_token":"..."} - - -# Group BlockScoutWeb.Account.Api.V1.AuthController -## BlockScoutWeb.Account.Api.V1.AuthController [/auth/api/logout] -### BlockScoutWeb.Account.Api.V1.AuthController info [GET /auth/api/logout] - - - - - -+ Logout -**GET**  `/auth/api/logout` - - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY5MjFmOGQtNjBiNC00ODE5LTk4MGEtNzFmZjcwYTAyMGNkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.yX_VbSJf6VKnszqXQXxm7JdkHlxxzmlQYUAF-1HWwoS9tVoWxiEcuo9DDOfVP6xmOSXp_pfabbX10y9XX7rQLw - -+ Response 200 - - + Body - - OK - - # Group BlockScoutWeb.Account.Api.V1.UserController ## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/info] ### BlockScoutWeb.Account.Api.V1.UserController info [GET /api/account/v1/user/info] @@ -55,27 +17,25 @@ + Request Get info about user **GET**  `/api/account/v1/user/info` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY5MjFmOGQtNjBiNC00ODE5LTk4MGEtNzFmZjcwYTAyMGNkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.yX_VbSJf6VKnszqXQXxm7JdkHlxxzmlQYUAF-1HWwoS9tVoWxiEcuo9DDOfVP6xmOSXp_pfabbX10y9XX7rQLw + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTEzQGJsb2Nrc2NvdXQuY29tZAACaWRh42QABG5hbWVtAAAAC1VzZXIgVGVzdDEwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEwZAAMd2F0Y2hsaXN0X2lkYeM.d_nsIdBT4zP1sObizRp2ufpZ2-HDGFD1puY3eNSvftY; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPvkXpQ_AFwAABPB + x-request-id: FxF1gur6Ap5Rc1YAAAYC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "nickname": "test_user5", - "name": "User Test5", - "email": "test_user-5@blockscout.com", - "avatar": "https://example.com/avatar/test_user5" + "nickname": "test_user10", + "name": "User Test10", + "email": "test_user-13@blockscout.com", + "avatar": "https://example.com/avatar/test_user10" } ### BlockScoutWeb.Account.Api.V1.UserController create_tag_address [POST /api/account/v1/user/tags/address] @@ -88,7 +48,6 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZkYjczZWEtYjRhOC00NjQ1LWJiZTMtZDU2OWQyYTM3ODY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.hWPDoWz6sjih4_W6d0_dGJzUBDaX8391rX2DhQ_PNo8JhsQ2NlQzGSk8fZ_09GNhGHvoKuZXnyJSHoIu-yt7XQ content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -101,9 +60,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYdtkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGHb.XPfo6e6fTpCgSOVWcAgze_SHHkf_6UVp-SfOi2EVKcM; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQulkfs31PUAAB7B + x-request-id: FxF1gt7Hha-gjLUAABDh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -111,7 +71,7 @@ { "name": "MyName", - "id": 186, + "id": 65, "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b" } @@ -130,17 +90,15 @@ + Request Get tags for address **GET**  `/api/account/v1/tags/address/0x3e9ac8f16c92bc4f093357933b5befbf1e16987b` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2ZkYjczZWEtYjRhOC00NjQ1LWJiZTMtZDU2OWQyYTM3ODY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.hWPDoWz6sjih4_W6d0_dGJzUBDaX8391rX2DhQ_PNo8JhsQ2NlQzGSk8fZ_09GNhGHvoKuZXnyJSHoIu-yt7XQ + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYdtkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGHb.XPfo6e6fTpCgSOVWcAgze_SHHkf_6UVp-SfOi2EVKcM; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQvZW8s31PUAAB7h + x-request-id: FxF1gt8j_62gjLUAABFB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -159,38 +117,38 @@ } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/187] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/72] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_address [PUT /api/account/v1/user/tags/address/{id}] + Parameters - + id: `187` - id: 187 + + id: `72` + id: 72 + Request Edit private address tag -**PUT**  `/api/account/v1/user/tags/address/187` +**PUT**  `/api/account/v1/user/tags/address/72` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzMwMzNmZTgtZTcwOS00YmU3LWI5Y2MtMzRhOTdjMGM0NzIyIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.9X0Kzbgoz9dO4NF390Umo4m_iqJbzDbssIl2Rm9WzEL3Q2bkAqtM1Pt_M3-uRTlATOCrlyNCN0LV1UYMPmEQAQ content-type: multipart/mixed; boundary=plug_conn_test + Body { "name": "name3", - "address_hash": "0x0000000000000000000000000000000000000087" + "address_hash": "0x0000000000000000000000000000000000000054" } + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTdkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIxQGJsb2Nrc2NvdXQuY29tZAACaWRh6mQABG5hbWVtAAAAC1VzZXIgVGVzdDE3ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE3ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE3ZAAMd2F0Y2hsaXN0X2lkYeo.SwNPw9upySrwQX8GCp62J924WYWbJY-WNA31fMLjUas; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnRItprfUTWIAACPB + x-request-id: FxF1gvKquVfUECUAAB4B access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -198,8 +156,8 @@ { "name": "name3", - "id": 187, - "address_hash": "0x0000000000000000000000000000000000000087" + "id": 72, + "address_hash": "0x0000000000000000000000000000000000000054" } ### BlockScoutWeb.Account.Api.V1.UserController tags_address [GET /api/account/v1/user/tags/address] @@ -210,17 +168,15 @@ + Request Get private addresses tags **GET**  `/api/account/v1/user/tags/address` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDY2MzY5MmEtOGIyMC00NGYwLWExNzItYWJlYmM2OWU5YjQ3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.48A1cvh2LlJSNm5R-gpJOE5DzikztneJ0BA04Q6vpyjinzWYuI43-L9dQ0zju_OFx_GSQZ2jiVbvMS1qRqW2WA + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE0QGJsb2Nrc2NvdXQuY29tZAACaWRh5GQABG5hbWVtAAAAC1VzZXIgVGVzdDExZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjExZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDExZAAMd2F0Y2hsaXN0X2lkYeQ.YOpB44xZNsuC9o5OZZQWpH-ijPijlYkT_fApVrfNuhs; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQXweZ7Vod4AABrB + x-request-id: FxF1guwn5VVeZtAAABdh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -229,18 +185,18 @@ [ { "name": "name2", - "id": 185, - "address_hash": "0x000000000000000000000000000000000000005f" + "id": 71, + "address_hash": "0x000000000000000000000000000000000000003a" }, { "name": "name1", - "id": 184, - "address_hash": "0x000000000000000000000000000000000000005e" + "id": 70, + "address_hash": "0x0000000000000000000000000000000000000039" }, { "name": "name0", - "id": 183, - "address_hash": "0x000000000000000000000000000000000000005d" + "id": 69, + "address_hash": "0x0000000000000000000000000000000000000038" } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_address [DELETE /api/account/v1/user/tags/address/{id}] @@ -249,24 +205,22 @@ + Parameters - + id: `180` - id: 180 + + id: `66` + id: 66 + Request Delete private address tag -**DELETE**  `/api/account/v1/user/tags/address/180` +**DELETE**  `/api/account/v1/user/tags/address/66` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGRmZDM5OWItYzI2My00Mjg2LWFjYzEtN2JhYzdlNzk3ODcwIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.S6enBZxXhYvL5JrJolfuYYDHn_oW36UpHUdyKVi6FHpH5wUZGTeOQ4Gj_9HaNcvm-wC7HNqU5OLTT6epq8rjuw + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNmQABWVtYWlsbQAAABp0ZXN0X3VzZXItN0BibG9ja3Njb3V0LmNvbWQAAmlkYd9kAARuYW1lbQAAAApVc2VyIFRlc3Q2ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjZkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNmQADHdhdGNobGlzdF9pZGHf.2gy24vcTMAaovCIPA7q8PYmlv1ojuZGzgHCkQ6n_W70; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPYnRIrQD4QAAAHE + x-request-id: FxF1guUM2L0cz9IAABXh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -286,12 +240,11 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA content-type: multipart/mixed; boundary=plug_conn_test + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", "name": "MyName" } @@ -299,18 +252,19 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQl3iGVb82YAAB1B + x-request-id: FxF1gvV7jRTkLOwAACCB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", "name": "MyName", - "id": 209 + "id": 72 } @@ -319,12 +273,11 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA content-type: multipart/mixed; boundary=plug_conn_test + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000005", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", "name": "MyName" } @@ -332,9 +285,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQlK1bBb82YAAB0h + x-request-id: FxF1gvVV0ZPkLOwAACBh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -349,31 +303,29 @@ } # Group BlockScoutWeb.Account.Api.V1.TagsController -## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006] +## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009] ### BlockScoutWeb.Account.Api.V1.TagsController tags_transaction [GET /api/account/v1/tags/transaction/{transaction_hash}] + Parameters - + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000006` - transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000006 + + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000009` + transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000009 + Request Get tags for transaction -**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006` +**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZWY0ZjZkZDItMmRkMC00ZjliLWFjZDYtYzkwODk4Yjc0Y2FlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.z81pOVwr8GyKW_uw51OfwKm4m5Tt3URf8Aoymnb_wy6OfatVTUrdYQ75TwyHsBbnt6-isJYI6ZxeAE-OnKydfA + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQmM88tb82YAAB1h + x-request-id: FxF1gvWZkx3kLOwAACCh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -389,23 +341,22 @@ } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/204] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/65] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_transaction [PUT /api/account/v1/user/tags/transaction/{id}] + Parameters - + id: `204` - id: 204 + + id: `65` + id: 65 + Request Edit private transaction tag -**PUT**  `/api/account/v1/user/tags/transaction/204` +**PUT**  `/api/account/v1/user/tags/transaction/65` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODRkMGU4ZGEtY2JjMi00NjVmLWE2MzgtM2Q3ZjYzY2FjZTdiIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.h6ACZ8fDDQp-XGwcG7mw3-B-kNrM0gdcAVFFTFJPH8p7Yh8c0kN_pSNBfZog1efajV6jZhJlf-XpSaekXDi3KQ content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -418,9 +369,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOGQABWVtYWlsbQAAABp0ZXN0X3VzZXItOUBibG9ja3Njb3V0LmNvbWQAAmlkYeFkAARuYW1lbQAAAApVc2VyIFRlc3Q4ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjhkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwOGQADHdhdGNobGlzdF9pZGHh.CybEtb6DRCGrUsJ2qnEERIZwD6pRhUfUSwFugOLA9kg; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQNlh9q_YHIAABiB + x-request-id: FxF1gunOuMiiGZsAAASi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -429,7 +381,7 @@ { "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", "name": "name1", - "id": 204 + "id": 65 } ### BlockScoutWeb.Account.Api.V1.UserController tags_transaction [GET /api/account/v1/user/tags/transaction] @@ -440,17 +392,15 @@ + Request Get private transactions tags **GET**  `/api/account/v1/user/tags/transaction` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMTAwZGRiNjUtYzlkYi00NjA5LWIwZTktNzc3OGQ3Y2FjNDU2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.CykUrkOmwHt_1jl3eu54NXtMzx-v0sbPCPTBilbQf82mTjhXLvNT9Qr8AV9mFm9Yseb8LNVlAfBMhyNs4zbywQ + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE4QGJsb2Nrc2NvdXQuY29tZAACaWRh52QABG5hbWVtAAAAC1VzZXIgVGVzdDE0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE0ZAAMd2F0Y2hsaXN0X2lkYec.CDHGLjvSgiNStdl55exaXgWiuAWfGw65IX3_vK5h5dU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnRER4BGMdJQAAAni + x-request-id: FxF1gu9MDrtpGp0AABnh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -458,19 +408,19 @@ [ { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004", "name": "name2", - "id": 212 + "id": 68 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", "name": "name1", - "id": 211 + "id": 67 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", "name": "name0", - "id": 210 + "id": 66 } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_transaction [DELETE /api/account/v1/user/tags/transaction/{id}] @@ -479,24 +429,22 @@ + Parameters - + id: `205` - id: 205 + + id: `69` + id: 69 + Request Delete private transaction tag -**DELETE**  `/api/account/v1/user/tags/transaction/205` +**DELETE**  `/api/account/v1/user/tags/transaction/69` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODNmODk3ZjktMGYwOS00YmE4LTk2NjItYTkwNTgyMjg4YjU4IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.F0g8CraaDyRHqI3wEZRMPMpg-mvyMBT2kExHmdG0Kh0iM7qs0vuHghXKBGZbnRaF_g6ebHj3sqkXNIZqgaHgRw + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTZkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIwQGJsb2Nrc2NvdXQuY29tZAACaWRh6WQABG5hbWVtAAAAC1VzZXIgVGVzdDE2ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE2ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE2ZAAMd2F0Y2hsaXN0X2lkYek.LsY5H_7VsGeJ-WoDRIReTCTZmPTJNCTjme7ZshEuEpQ; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQf2NAcAeg4AAAZC + x-request-id: FxF1gvGE13QyfYIAAByB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -516,39 +464,39 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjY2MWJiZDMtZjE5Yy00NGI0LTk1MmYtN2M3N2NmYmU1YjE3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.W1hndEZ1_BeNMjTRi_NFnsRDrkbZ6odl2kHotJKownHzFqy_aStjwwnvMUDf0eSDbaH41EWVejYkU-e0t3Jb7A content-type: multipart/mixed; boundary=plug_conn_test + Body { "notification_settings": { "native": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": false }, "ERC-20": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test18", - "address_hash": "0x0000000000000000000000000000000000000053" + "name": "test16", + "address_hash": "0x0000000000000000000000000000000000000011" } + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYdxkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHc.ujumccFj98DtF6Rf_O0i31DGgry0eHmykzCC1xvjVfY; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnP-UqzU3wm8AABXB + x-request-id: FxF1gt-4UWemyBYAABJB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -557,25 +505,25 @@ { "notification_settings": { "native": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": false }, "ERC-20": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test18", - "id": 210, + "name": "test16", + "id": 75, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000053", + "address_hash": "0x0000000000000000000000000000000000000011", "address_balance": null } ### BlockScoutWeb.Account.Api.V1.UserController watchlist [GET /api/account/v1/user/watchlist] @@ -587,17 +535,15 @@ + Request Get addresses from watchlists **GET**  `/api/account/v1/user/watchlist` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjY2MWJiZDMtZjE5Yy00NGI0LTk1MmYtN2M3N2NmYmU1YjE3IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.W1hndEZ1_BeNMjTRi_NFnsRDrkbZ6odl2kHotJKownHzFqy_aStjwwnvMUDf0eSDbaH41EWVejYkU-e0t3Jb7A + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYdxkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHc.ujumccFj98DtF6Rf_O0i31DGgry0eHmykzCC1xvjVfY; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQCLxGQ3wm8AABZB + x-request-id: FxF1guCYRuamyBYAAANj access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -607,49 +553,49 @@ { "notification_settings": { "native": { - "outcoming": false, - "incoming": true + "outcoming": true, + "incoming": false }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": false }, "ERC-20": { "outcoming": false, - "incoming": false + "incoming": true } }, "notification_methods": { "email": false }, - "name": "test19", - "id": 211, + "name": "test17", + "id": 76, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000054", + "address_hash": "0x0000000000000000000000000000000000000012", "address_balance": null }, { "notification_settings": { "native": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": false }, "ERC-20": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test18", - "id": 210, + "name": "test16", + "id": 75, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000053", + "address_hash": "0x0000000000000000000000000000000000000011", "address_balance": null } ] @@ -659,24 +605,22 @@ + Parameters - + id: `214` - id: 214 + + id: `82` + id: 82 + Request Delete address from watchlist by id -**DELETE**  `/api/account/v1/user/watchlist/214` +**DELETE**  `/api/account/v1/user/watchlist/82` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOGNiMDRmYjgtMjA1Mi00NjNkLTk4NTYtZWFlNjc5MzBlZjkwIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.Z7mQYkFDdcMSc851qemRQR3Q-IBqA-fIWjmRMZtkvWdskeW1_bbjfOI8DHHaM59wRyzqdbUpihdLaOjF7hxpxw + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRh7GQABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYew.slyWFXgdvd78Pwp3lyrU5tmgCtF7VNIPHxnFkfAQ-YQ; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQ6IcAyZMSkAAAkC + x-request-id: FxF1gvR861_DWHcAAAhC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -691,16 +635,15 @@ + Parameters - + id: `212` - id: 212 + + id: `80` + id: 80 + Request Edit watchlist address -**PUT**  `/api/account/v1/user/watchlist/212` +**PUT**  `/api/account/v1/user/watchlist/80` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTBkNmQ5ZTItNGE2MC00ZDczLWIxZTgtYzRlZDYxYzMwZTk5IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.YRkIi1DrDYXsUBJaAda80uK9zZ5c5q_bMovYS_sVzfZsTWNtVgODi4dHsnwTeMGJb97RU8L12SuiiaEUGB9BNA content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -708,10 +651,10 @@ "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": true }, "ERC-20": { @@ -720,19 +663,20 @@ } }, "notification_methods": { - "email": true + "email": false }, - "name": "test23", - "address_hash": "0x000000000000000000000000000000000000005c" + "name": "test21", + "address_hash": "0x0000000000000000000000000000000000000023" } + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyN2QABWVtYWlsbQAAABp0ZXN0X3VzZXItOEBibG9ja3Njb3V0LmNvbWQAAmlkYeBkAARuYW1lbQAAAApVc2VyIFRlc3Q3ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjdkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwN2QADHdhdGNobGlzdF9pZGHg.2IaE2naK_o4H_guVwcTb0JZIp2hs2c4fvtASxCmIWHM; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQQmuI8HFF0AABlh + x-request-id: FxF1gugvkSj5PXEAAANi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -742,10 +686,10 @@ "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": false, + "outcoming": true, "incoming": true }, "ERC-20": { @@ -754,12 +698,12 @@ } }, "notification_methods": { - "email": true + "email": false }, - "name": "test23", - "id": 212, + "name": "test21", + "id": 80, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000005c", + "address_hash": "0x0000000000000000000000000000000000000023", "address_balance": null } ### BlockScoutWeb.Account.Api.V1.UserController create_watchlist [POST /api/account/v1/user/watchlist] @@ -773,39 +717,39 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOTVhOTk1N2ItNjAyMS00MDVhLTk2NTAtYTc5YWIyY2ZkNTllIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.7Oj-gf_a43Lv_7Lw5NWpbsO-pSyIzQXEsuLTnHGyz9OMsaZgmRulXrTezMGjeX1FQ-jdFTFIcNx1_B2hRt1tJQ content-type: multipart/mixed; boundary=plug_conn_test + Body { "notification_settings": { "native": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false }, "ERC-721": { "outcoming": true, - "incoming": true + "incoming": false }, "ERC-20": { "outcoming": true, - "incoming": false + "incoming": true } }, "notification_methods": { "email": false }, - "name": "test16", - "address_hash": "0x0000000000000000000000000000000000000014" + "name": "test18", + "address_hash": "0x0000000000000000000000000000000000000013" } + Response 422 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABp0ZXN0X3VzZXItNEBibG9ja3Njb3V0LmNvbWQAAmlkYd1kAARuYW1lbQAAAApVc2VyIFRlc3Q0ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjRkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNGQADHdhdGNobGlzdF9pZGHd.jCNAb9dB6WGIZv9wIVL9tpikIPr056ChTYcDeSWdnG4; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPsF_80NBRoAABLB + x-request-id: FxF1guGsUmFGrIUAABMB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -824,48 +768,48 @@ + Parameters - + id: `209` - id: 209 + + id: `79` + id: 79 + Request Example of error on editing watchlist address -**PUT**  `/api/account/v1/user/watchlist/209` +**PUT**  `/api/account/v1/user/watchlist/79` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOTVhOTk1N2ItNjAyMS00MDVhLTk2NTAtYTc5YWIyY2ZkNTllIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.7Oj-gf_a43Lv_7Lw5NWpbsO-pSyIzQXEsuLTnHGyz9OMsaZgmRulXrTezMGjeX1FQ-jdFTFIcNx1_B2hRt1tJQ content-type: multipart/mixed; boundary=plug_conn_test + Body { "notification_settings": { "native": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false }, "ERC-721": { "outcoming": true, - "incoming": true + "incoming": false }, "ERC-20": { "outcoming": true, - "incoming": false + "incoming": true } }, "notification_methods": { "email": false }, - "name": "test16", - "address_hash": "0x0000000000000000000000000000000000000014" + "name": "test18", + "address_hash": "0x0000000000000000000000000000000000000013" } + Response 422 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABp0ZXN0X3VzZXItNEBibG9ja3Njb3V0LmNvbWQAAmlkYd1kAARuYW1lbQAAAApVc2VyIFRlc3Q0ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjRkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNGQADHdhdGNobGlzdF9pZGHd.jCNAb9dB6WGIZv9wIVL9tpikIPr056ChTYcDeSWdnG4; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPtn2b0NBRoAABMB + x-request-id: FxF1guIKk8ZGrIUAABNB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -889,7 +833,6 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWYyYzYyY2QtMmYwNC00OTU3LTljZDAtMWM5OWNkYzhmYjA2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.6Mgi8a_whFYSD51Z-nkRQOehblhx7HbyPy6n35wxjVANsA7ZL3aiKDdF7p2sNzYkw1dPmAx8LzrZDehVdu_v1g content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -901,9 +844,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI0QGJsb2Nrc2NvdXQuY29tZAACaWRh7WQABG5hbWVtAAAAC1VzZXIgVGVzdDIwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIwZAAMd2F0Y2hsaXN0X2lkYe0.hIRgUayy_NKWZARAIxD2-TPy3PaP5kQSHuKGOLxxwz0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQIzqZt_3TEAAAXi + x-request-id: FxF1gvTjkbFZ2PwAACBB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -911,7 +855,7 @@ { "name": "test", - "api_key": "fef20f61-10b0-4a0c-8e95-4866a4889b6c" + "api_key": "05b65dfd-0d08-4aa1-b22b-95e3fc8a55e5" } @@ -920,7 +864,6 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDBiODFkZWQtZjY5Yi00MjAxLWI3NmEtYzM4YWFiYzkzYzhmIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.iL8cSQTiKO9VN4jpUIunL0HYIe8W1OjlpH0kJXWPjq1xzLs_9_r6La3Uup_ALfEhq7BEt2s7wr1jaVPko99W7g content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -932,9 +875,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE5QGJsb2Nrc2NvdXQuY29tZAACaWRh6GQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYeg.M4suuaCnSncg5sgQepwyEGrDqMcSle2BvUjGq5qw0Q8; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQzjbeMxzQ0AAB_B + x-request-id: FxF1gu_KXoEIU2IAABrh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -956,17 +900,15 @@ + Request Get api keys list **GET**  `/api/account/v1/user/api_keys` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDBiODFkZWQtZjY5Yi00MjAxLWI3NmEtYzM4YWFiYzkzYzhmIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.iL8cSQTiKO9VN4jpUIunL0HYIe8W1OjlpH0kJXWPjq1xzLs_9_r6La3Uup_ALfEhq7BEt2s7wr1jaVPko99W7g + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE5QGJsb2Nrc2NvdXQuY29tZAACaWRh6GQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYeg.M4suuaCnSncg5sgQepwyEGrDqMcSle2BvUjGq5qw0Q8; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQ0avJQxzQ0AAB_h + x-request-id: FxF1gu_ZqjIIU2IAABsB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -975,15 +917,15 @@ [ { "name": "test", - "api_key": "93614ffc-1676-4d57-9a62-7d0b125e489a" + "api_key": "3d07da0e-428e-4410-bc54-43ab544e20f4" }, { "name": "test", - "api_key": "b45de683-41eb-462d-b284-02e6ad3bd5e9" + "api_key": "92036fb5-a22a-418d-ac3a-0415e731d55a" }, { "name": "test", - "api_key": "6e696004-25c1-4950-bb18-4c19ae0c6cc7" + "api_key": "0262ffe5-6d6a-4f79-8444-479e8be85d0e" } ] ### BlockScoutWeb.Account.Api.V1.UserController update_api_key [PUT /api/account/v1/user/api_keys/{api_key}] @@ -992,16 +934,15 @@ + Parameters - + api_key: `cb4cf42c-c366-4c89-99e4-13000f6f3c67` - api_key: cb4cf42c-c366-4c89-99e4-13000f6f3c67 + + api_key: `6bcec727-d945-4785-99b6-c6094bbf0452` + api_key: 6bcec727-d945-4785-99b6-c6094bbf0452 + Request Edit api key -**PUT**  `/api/account/v1/user/api_keys/cb4cf42c-c366-4c89-99e4-13000f6f3c67` +**PUT**  `/api/account/v1/user/api_keys/6bcec727-d945-4785-99b6-c6094bbf0452` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYWU1NjhhY2ItZGVhYy00YWZhLTkwODUtOGU4OGMxZDFiODdkIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.cfYSCi18vPBf4rXf4VI9RbtFaYjZVWhiNKxnNB26_SBl-1uEdtGwYXcvC9FDkGBNk_M2XDehKxFF8EK5egy9hw content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -1013,9 +954,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMGQABWVtYWlsbQAAABp0ZXN0X3VzZXItMEBibG9ja3Njb3V0LmNvbWQAAmlkYdlkAARuYW1lbQAAAApVc2VyIFRlc3QwZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjBkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMGQADHdhdGNobGlzdF9pZGHZ.eNhiwGmTdeNAVqQGfVgtac9gGTsoXnysChIBQN75BQk; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPdqSzQmvRQAAAPD + x-request-id: FxF1gtunEs8BJMYAABCE access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1023,7 +965,7 @@ { "name": "test_1", - "api_key": "cb4cf42c-c366-4c89-99e4-13000f6f3c67" + "api_key": "6bcec727-d945-4785-99b6-c6094bbf0452" } ### BlockScoutWeb.Account.Api.V1.UserController delete_api_key [DELETE /api/account/v1/user/api_keys/{api_key}] @@ -1031,24 +973,22 @@ + Parameters - + api_key: `0b952302-aab3-4347-9f2d-2de817fef0d3` - api_key: 0b952302-aab3-4347-9f2d-2de817fef0d3 + + api_key: `0e26955f-5431-4652-84da-d08aded97a28` + api_key: 0e26955f-5431-4652-84da-d08aded97a28 + Request Delete api key -**DELETE**  `/api/account/v1/user/api_keys/0b952302-aab3-4347-9f2d-2de817fef0d3` +**DELETE**  `/api/account/v1/user/api_keys/0e26955f-5431-4652-84da-d08aded97a28` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjI4MDFkYmMtMjZiNi00MTk4LWJkNGEtZWNkMzgyZjZiNDcxIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.sDgN3J5doqMhMePUiIKldbvwPmn9fk4Xt00-t-qYI05Oc06wYctim2r5Gbdzbb4AhAW3iPPnHo_0--fhiV8aUw + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMThkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIyQGJsb2Nrc2NvdXQuY29tZAACaWRh62QABG5hbWVtAAAAC1VzZXIgVGVzdDE4ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE4ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE4ZAAMd2F0Y2hsaXN0X2lkYes.NYp71-Be73f-HTquq2QWWCa70c169Rd9GXDOOSCdC34; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPEXjB3HPBMAABCh + x-request-id: FxF1gvMpP3rEvHcAAAei access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1068,13 +1008,12 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNWRmM2Y3MmItODM1NS00MjIyLWFmYjgtNTE0MWUxMTM0YmY4IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.t_1KQfANUi8bymIC3rl_GKwpF8pmHFWaV6AZBJrXMartT_hge4aAVE_MHNq133hDq_r24AN2U9bWJmNTj0u01A content-type: multipart/mixed; boundary=plug_conn_test + Body { - "name": "test24", - "contract_address_hash": "0x000000000000000000000000000000000000006a", + "name": "test26", + "contract_address_hash": "0x0000000000000000000000000000000000000089", "abi": [ { "type": "function", @@ -1111,18 +1050,19 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM3QGJsb2Nrc2NvdXQuY29tZAACaWRh8GQABG5hbWVtAAAAC1VzZXIgVGVzdDIzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIzZAAMd2F0Y2hsaXN0X2lkYfA.EgDkDw8R9zBMVjqsTcEWr77klYQVx6QOCcxXyN7EAqg; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQo0o9tYelIAAB2B + x-request-id: FxF1gvk62Sj0d-gAAArC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "name": "test24", - "id": 449, - "contract_address_hash": "0x000000000000000000000000000000000000006a", + "name": "test26", + "id": 161, + "contract_address_hash": "0x0000000000000000000000000000000000000089", "abi": [ { "type": "function", @@ -1161,13 +1101,12 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMmNkYjIzZWQtNjg5ZS00M2ZiLWJhY2UtMThkNmI1ZjA2MmJhIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.JZLbq5J8ZoqANBHDXX3hkZUOS8fdRZrOUdIq1uULZBe4Mb2gnVPY2ug0O4zLKLxCvIj4t6DXqUfAq9Afsm5_9Q content-type: multipart/mixed; boundary=plug_conn_test + Body { "name": "test15", - "contract_address_hash": "0x0000000000000000000000000000000000000013", + "contract_address_hash": "0x0000000000000000000000000000000000000010", "abi": [ { "type": "function", @@ -1204,9 +1143,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYdpkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGHa.ynGrz6gad7RIkTh1lopco9xXNhiI-y6Bm6ecAnv3Usg; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPoF3xt_aCMAAAaj + x-request-id: FxF1gt5BIL0fpssAABCB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1228,17 +1168,15 @@ + Request Get custom abis list **GET**  `/api/account/v1/user/custom_abis` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMmNkYjIzZWQtNjg5ZS00M2ZiLWJhY2UtMThkNmI1ZjA2MmJhIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.JZLbq5J8ZoqANBHDXX3hkZUOS8fdRZrOUdIq1uULZBe4Mb2gnVPY2ug0O4zLKLxCvIj4t6DXqUfAq9Afsm5_9Q + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYdpkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGHa.ynGrz6gad7RIkTh1lopco9xXNhiI-y6Bm6ecAnv3Usg; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnPocnyl_aCMAAAbD + x-request-id: FxF1gt5U3pwfpssAABCh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1247,8 +1185,8 @@ [ { "name": "test14", - "id": 447, - "contract_address_hash": "0x0000000000000000000000000000000000000012", + "id": 159, + "contract_address_hash": "0x000000000000000000000000000000000000000f", "abi": [ { "type": "function", @@ -1282,8 +1220,8 @@ }, { "name": "test13", - "id": 446, - "contract_address_hash": "0x0000000000000000000000000000000000000011", + "id": 158, + "contract_address_hash": "0x000000000000000000000000000000000000000e", "abi": [ { "type": "function", @@ -1317,8 +1255,8 @@ }, { "name": "test12", - "id": 445, - "contract_address_hash": "0x0000000000000000000000000000000000000010", + "id": 157, + "contract_address_hash": "0x000000000000000000000000000000000000000d", "abi": [ { "type": "function", @@ -1352,8 +1290,8 @@ }, { "name": "test11", - "id": 444, - "contract_address_hash": "0x000000000000000000000000000000000000000f", + "id": 156, + "contract_address_hash": "0x000000000000000000000000000000000000000c", "abi": [ { "type": "function", @@ -1387,8 +1325,8 @@ }, { "name": "test10", - "id": 443, - "contract_address_hash": "0x000000000000000000000000000000000000000e", + "id": 155, + "contract_address_hash": "0x000000000000000000000000000000000000000b", "abi": [ { "type": "function", @@ -1422,8 +1360,8 @@ }, { "name": "test9", - "id": 442, - "contract_address_hash": "0x000000000000000000000000000000000000000d", + "id": 154, + "contract_address_hash": "0x000000000000000000000000000000000000000a", "abi": [ { "type": "function", @@ -1457,8 +1395,8 @@ }, { "name": "test8", - "id": 441, - "contract_address_hash": "0x000000000000000000000000000000000000000c", + "id": 153, + "contract_address_hash": "0x0000000000000000000000000000000000000009", "abi": [ { "type": "function", @@ -1492,8 +1430,8 @@ }, { "name": "test7", - "id": 440, - "contract_address_hash": "0x000000000000000000000000000000000000000b", + "id": 152, + "contract_address_hash": "0x0000000000000000000000000000000000000008", "abi": [ { "type": "function", @@ -1527,8 +1465,8 @@ }, { "name": "test6", - "id": 439, - "contract_address_hash": "0x000000000000000000000000000000000000000a", + "id": 151, + "contract_address_hash": "0x0000000000000000000000000000000000000007", "abi": [ { "type": "function", @@ -1562,8 +1500,8 @@ }, { "name": "test5", - "id": 438, - "contract_address_hash": "0x0000000000000000000000000000000000000009", + "id": 150, + "contract_address_hash": "0x0000000000000000000000000000000000000006", "abi": [ { "type": "function", @@ -1597,8 +1535,8 @@ }, { "name": "test4", - "id": 437, - "contract_address_hash": "0x0000000000000000000000000000000000000008", + "id": 149, + "contract_address_hash": "0x0000000000000000000000000000000000000005", "abi": [ { "type": "function", @@ -1632,8 +1570,8 @@ }, { "name": "test3", - "id": 436, - "contract_address_hash": "0x0000000000000000000000000000000000000007", + "id": 148, + "contract_address_hash": "0x0000000000000000000000000000000000000004", "abi": [ { "type": "function", @@ -1667,8 +1605,8 @@ }, { "name": "test2", - "id": 435, - "contract_address_hash": "0x0000000000000000000000000000000000000006", + "id": 147, + "contract_address_hash": "0x0000000000000000000000000000000000000003", "abi": [ { "type": "function", @@ -1702,8 +1640,8 @@ }, { "name": "test1", - "id": 434, - "contract_address_hash": "0x0000000000000000000000000000000000000005", + "id": 146, + "contract_address_hash": "0x0000000000000000000000000000000000000002", "abi": [ { "type": "function", @@ -1737,8 +1675,8 @@ }, { "name": "test0", - "id": 433, - "contract_address_hash": "0x0000000000000000000000000000000000000004", + "id": 145, + "contract_address_hash": "0x0000000000000000000000000000000000000001", "abi": [ { "type": "function", @@ -1777,22 +1715,21 @@ + Parameters - + id: `448` - id: 448 + + id: `160` + id: 160 + Request Edit custom abi -**PUT**  `/api/account/v1/user/custom_abis/448` +**PUT**  `/api/account/v1/user/custom_abis/160` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjg4MWVmYjQtOTZlNy00MTU2LTg2YWUtNmVlNDQ2MWZhNzAzIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.zKX_W91W5X7Vvf-YRnk26wCgu8aFTOBkpYcsH5XrQ-5XBMFwH68dWcRtnJD09zlB-FnU6ycG4C9vlFk02KiJrg content-type: multipart/mixed; boundary=plug_conn_test + Body { - "name": "test21", - "contract_address_hash": "0x0000000000000000000000000000000000000056", + "name": "test23", + "contract_address_hash": "0x0000000000000000000000000000000000000046", "abi": [ { "type": "function", @@ -1829,18 +1766,19 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE3QGJsb2Nrc2NvdXQuY29tZAACaWRh5mQABG5hbWVtAAAAC1VzZXIgVGVzdDEzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEzZAAMd2F0Y2hsaXN0X2lkYeY.sl0nMtxBkMGt3aK7ohM3AYMcNEI-l37Xvqvl9qZ2Tso; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQGu3MsFRCAAAAVC + x-request-id: FxF1gu0y0bFQlB0AAAbi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "name": "test21", - "id": 448, - "contract_address_hash": "0x0000000000000000000000000000000000000056", + "name": "test23", + "id": 160, + "contract_address_hash": "0x0000000000000000000000000000000000000046", "abi": [ { "type": "function", @@ -1878,24 +1816,22 @@ + Parameters - + id: `450` - id: 450 + + id: `162` + id: 162 + Request Delete custom abi -**DELETE**  `/api/account/v1/user/custom_abis/450` +**DELETE**  `/api/account/v1/user/custom_abis/162` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2JmOWVlY2EtZDkzMy00YmFkLWIzMDEtYmFkOTBiYzdiNjY2IiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.7t1rm0x4t5HCE1IhRENVWG_Iq1AUuGoHkezenu4jgiDB96rdQbC9TRASZnLDjjPPuH468IRhsCil7iy8pYxe8A + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM4QGJsb2Nrc2NvdXQuY29tZAACaWRh8WQABG5hbWVtAAAAC1VzZXIgVGVzdDI0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjI0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDI0ZAAMd2F0Y2hsaXN0X2lkYfE.i0XOrEfBULTfd08Ig4nhy_veB1sWxl2UWYT9kkveABw; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQs0IM3_0WMAAAfC + x-request-id: FxF1gvnkpEhLN3QAACMB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1915,49 +1851,66 @@ + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTcyOTA2ZWEtOGI3OS00Zjk3LWIzZmUtMmU3NDk4MDkxYjAzIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.Hq_Fbau0LFELf4Oer6WQXj05jJWRSTedBkAwz3x2HNlFxDzsNtgmmpvWkA9qvr8usmRxye-_jz3tZgD1VElhqg content-type: multipart/mixed; boundary=plug_conn_test + Body { - "website": "website11", - "tags": "Tag17;Tag18", - "is_owner": true, - "full_name": "full name11", - "email": "test_user-33@blockscout.com", - "company": "company11", + "website": "website3", + "tags": "Tag5;Tag6", + "is_owner": false, + "full_name": "full name3", + "email": "test_user-16@blockscout.com", + "company": "company3", "addresses": [ - "0x0000000000000000000000000000000000000070", - "0x0000000000000000000000000000000000000071" + "0x000000000000000000000000000000000000003b", + "0x000000000000000000000000000000000000003c", + "0x000000000000000000000000000000000000003d", + "0x000000000000000000000000000000000000003e", + "0x000000000000000000000000000000000000003f", + "0x0000000000000000000000000000000000000040", + "0x0000000000000000000000000000000000000041", + "0x0000000000000000000000000000000000000042", + "0x0000000000000000000000000000000000000043", + "0x0000000000000000000000000000000000000044" ], - "additional_comment": "additional_comment11" + "additional_comment": "additional_comment3" } + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE1QGJsb2Nrc2NvdXQuY29tZAACaWRh5WQABG5hbWVtAAAAC1VzZXIgVGVzdDEyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEyZAAMd2F0Y2hsaXN0X2lkYeU.8B0VERlCeTBlp1w0Zys_ZGaVIKj0VYi6pV2wMnCjeac; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnQ9l-uQIRYYAAAmi + x-request-id: FxF1guxmyw_F-rUAAATj access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "website": "website11", - "tags": "Tag17;Tag18", - "is_owner": true, - "id": 180, - "full_name": "full name11", - "email": "test_user-33@blockscout.com", - "company": "company11", + "website": "website3", + "tags": "Tag5;Tag6", + "submission_date": "2022-09-03T21:02:22.651943Z", + "is_owner": false, + "id": 146, + "full_name": "full name3", + "email": "test_user-16@blockscout.com", + "company": "company3", "addresses": [ - "0x0000000000000000000000000000000000000070", - "0x0000000000000000000000000000000000000071" + "0x000000000000000000000000000000000000003b", + "0x000000000000000000000000000000000000003c", + "0x000000000000000000000000000000000000003d", + "0x000000000000000000000000000000000000003e", + "0x000000000000000000000000000000000000003f", + "0x0000000000000000000000000000000000000040", + "0x0000000000000000000000000000000000000041", + "0x0000000000000000000000000000000000000042", + "0x0000000000000000000000000000000000000043", + "0x0000000000000000000000000000000000000044" ], - "additional_comment": "additional_comment11" + "additional_comment": "additional_comment3" } ### BlockScoutWeb.Account.Api.V1.UserController public_tags_requests [GET /api/account/v1/user/public_tags] @@ -1968,17 +1921,15 @@ + Request Get list of requests to add a public tag **GET**  `/api/account/v1/user/public_tags` - + Headers - - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWZkMTljNWItZjQzNS00MGI0LTllOWQtMTc5OTllNDhmOTdlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.wj5e8pYhIOE_XWoQolj-ghI1R3pzEyKTNudIJDN3zcQFa33wO_slJpJxsZaZq_NChLLslMoBmnCKJthZfhYBIA + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh72QABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYe8.oZY96LW6ZLfw1aK-C5TYkrK2GRNQEJCapnUSkd5OjXU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnP3ZDj9rrjAAAAjj + x-request-id: FxF1gvdQvQ8r6iIAAAki access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1986,185 +1937,180 @@ [ { - "website": "website9", - "tags": "Tag14;Tag15", + "website": "website13", + "tags": "Tag18;Tag19", + "submission_date": "2022-09-03T21:02:23.000000Z", + "is_owner": false, + "id": 156, + "full_name": "full name13", + "email": "test_user-36@blockscout.com", + "company": "company13", + "addresses": [ + "0x0000000000000000000000000000000000000084", + "0x0000000000000000000000000000000000000085", + "0x0000000000000000000000000000000000000086", + "0x0000000000000000000000000000000000000087", + "0x0000000000000000000000000000000000000088" + ], + "additional_comment": "additional_comment13" + }, + { + "website": "website12", + "tags": "Tag17", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": true, - "id": 178, + "id": 155, + "full_name": "full name12", + "email": "test_user-35@blockscout.com", + "company": "company12", + "addresses": [ + "0x0000000000000000000000000000000000000083" + ], + "additional_comment": "additional_comment12" + }, + { + "website": "website11", + "tags": "Tag16", + "submission_date": "2022-09-03T21:02:23.000000Z", + "is_owner": false, + "id": 154, + "full_name": "full name11", + "email": "test_user-34@blockscout.com", + "company": "company11", + "addresses": [ + "0x000000000000000000000000000000000000007b", + "0x000000000000000000000000000000000000007c", + "0x000000000000000000000000000000000000007d", + "0x000000000000000000000000000000000000007e", + "0x000000000000000000000000000000000000007f", + "0x0000000000000000000000000000000000000080", + "0x0000000000000000000000000000000000000081", + "0x0000000000000000000000000000000000000082" + ], + "additional_comment": "additional_comment11" + }, + { + "website": "website10", + "tags": "Tag15", + "submission_date": "2022-09-03T21:02:23.000000Z", + "is_owner": false, + "id": 153, + "full_name": "full name10", + "email": "test_user-33@blockscout.com", + "company": "company10", + "addresses": [ + "0x0000000000000000000000000000000000000073", + "0x0000000000000000000000000000000000000074", + "0x0000000000000000000000000000000000000075", + "0x0000000000000000000000000000000000000076", + "0x0000000000000000000000000000000000000077", + "0x0000000000000000000000000000000000000078", + "0x0000000000000000000000000000000000000079", + "0x000000000000000000000000000000000000007a" + ], + "additional_comment": "additional_comment10" + }, + { + "website": "website9", + "tags": "Tag14", + "submission_date": "2022-09-03T21:02:23.000000Z", + "is_owner": false, + "id": 152, "full_name": "full name9", - "email": "test_user-16@blockscout.com", + "email": "test_user-32@blockscout.com", "company": "company9", "addresses": [ - "0x0000000000000000000000000000000000000052" + "0x000000000000000000000000000000000000006d", + "0x000000000000000000000000000000000000006e", + "0x000000000000000000000000000000000000006f", + "0x0000000000000000000000000000000000000070", + "0x0000000000000000000000000000000000000071", + "0x0000000000000000000000000000000000000072" ], "additional_comment": "additional_comment9" }, { "website": "website8", "tags": "Tag13", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": false, - "id": 177, + "id": 151, "full_name": "full name8", - "email": "test_user-15@blockscout.com", + "email": "test_user-31@blockscout.com", "company": "company8", "addresses": [ - "0x0000000000000000000000000000000000000048", - "0x0000000000000000000000000000000000000049", - "0x000000000000000000000000000000000000004a", - "0x000000000000000000000000000000000000004b", - "0x000000000000000000000000000000000000004c", - "0x000000000000000000000000000000000000004d", - "0x000000000000000000000000000000000000004e", - "0x000000000000000000000000000000000000004f", - "0x0000000000000000000000000000000000000050", - "0x0000000000000000000000000000000000000051" + "0x0000000000000000000000000000000000000064", + "0x0000000000000000000000000000000000000065", + "0x0000000000000000000000000000000000000066", + "0x0000000000000000000000000000000000000067", + "0x0000000000000000000000000000000000000068", + "0x0000000000000000000000000000000000000069", + "0x000000000000000000000000000000000000006a", + "0x000000000000000000000000000000000000006b", + "0x000000000000000000000000000000000000006c" ], "additional_comment": "additional_comment8" }, { "website": "website7", "tags": "Tag11;Tag12", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": true, - "id": 176, + "id": 150, "full_name": "full name7", - "email": "test_user-14@blockscout.com", + "email": "test_user-30@blockscout.com", "company": "company7", "addresses": [ - "0x000000000000000000000000000000000000003e", - "0x000000000000000000000000000000000000003f", - "0x0000000000000000000000000000000000000040", - "0x0000000000000000000000000000000000000041", - "0x0000000000000000000000000000000000000042", - "0x0000000000000000000000000000000000000043", - "0x0000000000000000000000000000000000000044", - "0x0000000000000000000000000000000000000045", - "0x0000000000000000000000000000000000000046", - "0x0000000000000000000000000000000000000047" + "0x0000000000000000000000000000000000000063" ], "additional_comment": "additional_comment7" }, { "website": "website6", "tags": "Tag9;Tag10", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": false, - "id": 175, + "id": 149, "full_name": "full name6", - "email": "test_user-13@blockscout.com", + "email": "test_user-29@blockscout.com", "company": "company6", "addresses": [ - "0x000000000000000000000000000000000000003a", - "0x000000000000000000000000000000000000003b", - "0x000000000000000000000000000000000000003c", - "0x000000000000000000000000000000000000003d" + "0x0000000000000000000000000000000000000060", + "0x0000000000000000000000000000000000000061", + "0x0000000000000000000000000000000000000062" ], "additional_comment": "additional_comment6" }, { "website": "website5", "tags": "Tag8", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": true, - "id": 174, + "id": 148, "full_name": "full name5", - "email": "test_user-12@blockscout.com", + "email": "test_user-28@blockscout.com", "company": "company5", "addresses": [ - "0x0000000000000000000000000000000000000033", - "0x0000000000000000000000000000000000000034", - "0x0000000000000000000000000000000000000035", - "0x0000000000000000000000000000000000000036", - "0x0000000000000000000000000000000000000037", - "0x0000000000000000000000000000000000000038", - "0x0000000000000000000000000000000000000039" + "0x000000000000000000000000000000000000005e", + "0x000000000000000000000000000000000000005f" ], "additional_comment": "additional_comment5" }, { "website": "website4", - "tags": "Tag6;Tag7", - "is_owner": true, - "id": 173, + "tags": "Tag7", + "submission_date": "2022-09-03T21:02:23.000000Z", + "is_owner": false, + "id": 147, "full_name": "full name4", - "email": "test_user-11@blockscout.com", + "email": "test_user-27@blockscout.com", "company": "company4", "addresses": [ - "0x0000000000000000000000000000000000000031", - "0x0000000000000000000000000000000000000032" + "0x000000000000000000000000000000000000005b", + "0x000000000000000000000000000000000000005c", + "0x000000000000000000000000000000000000005d" ], "additional_comment": "additional_comment4" - }, - { - "website": "website3", - "tags": "Tag5", - "is_owner": false, - "id": 172, - "full_name": "full name3", - "email": "test_user-10@blockscout.com", - "company": "company3", - "addresses": [ - "0x0000000000000000000000000000000000000028", - "0x0000000000000000000000000000000000000029", - "0x000000000000000000000000000000000000002a", - "0x000000000000000000000000000000000000002b", - "0x000000000000000000000000000000000000002c", - "0x000000000000000000000000000000000000002d", - "0x000000000000000000000000000000000000002e", - "0x000000000000000000000000000000000000002f", - "0x0000000000000000000000000000000000000030" - ], - "additional_comment": "additional_comment3" - }, - { - "website": "website2", - "tags": "Tag4", - "is_owner": false, - "id": 171, - "full_name": "full name2", - "email": "test_user-9@blockscout.com", - "company": "company2", - "addresses": [ - "0x0000000000000000000000000000000000000020", - "0x0000000000000000000000000000000000000021", - "0x0000000000000000000000000000000000000022", - "0x0000000000000000000000000000000000000023", - "0x0000000000000000000000000000000000000024", - "0x0000000000000000000000000000000000000025", - "0x0000000000000000000000000000000000000026", - "0x0000000000000000000000000000000000000027" - ], - "additional_comment": "additional_comment2" - }, - { - "website": "website1", - "tags": "Tag2;Tag3", - "is_owner": true, - "id": 170, - "full_name": "full name1", - "email": "test_user-8@blockscout.com", - "company": "company1", - "addresses": [ - "0x0000000000000000000000000000000000000019", - "0x000000000000000000000000000000000000001a", - "0x000000000000000000000000000000000000001b", - "0x000000000000000000000000000000000000001c", - "0x000000000000000000000000000000000000001d", - "0x000000000000000000000000000000000000001e", - "0x000000000000000000000000000000000000001f" - ], - "additional_comment": "additional_comment1" - }, - { - "website": "website0", - "tags": "Tag0;Tag1", - "is_owner": true, - "id": 169, - "full_name": "full name0", - "email": "test_user-7@blockscout.com", - "company": "company0", - "addresses": [ - "0x0000000000000000000000000000000000000016", - "0x0000000000000000000000000000000000000017", - "0x0000000000000000000000000000000000000018" - ], - "additional_comment": "additional_comment0" } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_public_tags_request [DELETE /api/account/v1/user/public_tags/{id}] @@ -2173,16 +2119,15 @@ + Parameters - + id: `178` - id: 178 + + id: `156` + id: 156 + Request Delete public tags request -**DELETE**  `/api/account/v1/user/public_tags/178` +**DELETE**  `/api/account/v1/user/public_tags/156` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWZkMTljNWItZjQzNS00MGI0LTllOWQtMTc5OTllNDhmOTdlIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.wj5e8pYhIOE_XWoQolj-ghI1R3pzEyKTNudIJDN3zcQFa33wO_slJpJxsZaZq_NChLLslMoBmnCKJthZfhYBIA content-type: multipart/mixed; boundary=plug_conn_test + Body @@ -2194,9 +2139,10 @@ + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh72QABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYe8.oZY96LW6ZLfw1aK-C5TYkrK2GRNQEJCapnUSkd5OjXU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnP3w4p5rrjAAAAkj + x-request-id: FxF1gvdm8H0r6iIAAAlC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -2211,65 +2157,72 @@ + Parameters - + id: `181` - id: 181 + + id: `145` + id: 145 + Request Edit request to add a public tag -**PUT**  `/api/account/v1/user/public_tags/181` +**PUT**  `/api/account/v1/user/public_tags/145` + Headers - authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkwOTEsImlhdCI6MTY2MDU3OTg5MSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZmRjNDRmOTAtYzViMy00MjJjLTk4MGQtZjE5MWQzMDEzYmUxIiwibmJmIjoxNjYwNTc5ODkwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIzIiwidHlwIjoiYWNjZXNzIn0.TxgamYKfzZqUXdVA4RsbFJ4_ozJfQzz4wVRBIyFLgrMGWi-7tZe5Lh3Oe_2LCKuf4Q4uZ9GQM5bD0V5WWk-YZw content-type: multipart/mixed; boundary=plug_conn_test + Body { - "website": "website13", - "tags": "Tag20;Tag21", + "website": "website2", + "tags": "Tag3;Tag4", "is_owner": false, - "full_name": "full name13", - "email": "test_user-37@blockscout.com", - "company": "company13", + "full_name": "full name2", + "email": "test_user-12@blockscout.com", + "company": "company2", "addresses": [ - "0x0000000000000000000000000000000000000080", - "0x0000000000000000000000000000000000000081", - "0x0000000000000000000000000000000000000082", - "0x0000000000000000000000000000000000000083", - "0x0000000000000000000000000000000000000084", - "0x0000000000000000000000000000000000000085" + "0x000000000000000000000000000000000000002f", + "0x0000000000000000000000000000000000000030", + "0x0000000000000000000000000000000000000031", + "0x0000000000000000000000000000000000000032", + "0x0000000000000000000000000000000000000033", + "0x0000000000000000000000000000000000000034", + "0x0000000000000000000000000000000000000035", + "0x0000000000000000000000000000000000000036", + "0x0000000000000000000000000000000000000037" ], - "additional_comment": "additional_comment13" + "additional_comment": "additional_comment2" } + Response 200 + Headers + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOWQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTBAYmxvY2tzY291dC5jb21kAAJpZGHiZAAEbmFtZW0AAAAKVXNlciBUZXN0OWQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI5ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDlkAAx3YXRjaGxpc3RfaWRh4g.cM2caeO_bvTyojrTAKD7Tt4WEPEIsHwTMmWkTEVgSLo; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FwuQnRGPAcIPFzIAAApC + x-request-id: FxF1guqVaODqqc8AAAUi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "website": "website13", - "tags": "Tag20;Tag21", + "website": "website2", + "tags": "Tag3;Tag4", + "submission_date": "2022-09-03T21:02:23.000000Z", "is_owner": false, - "id": 181, - "full_name": "full name13", - "email": "test_user-37@blockscout.com", - "company": "company13", + "id": 145, + "full_name": "full name2", + "email": "test_user-12@blockscout.com", + "company": "company2", "addresses": [ - "0x0000000000000000000000000000000000000080", - "0x0000000000000000000000000000000000000081", - "0x0000000000000000000000000000000000000082", - "0x0000000000000000000000000000000000000083", - "0x0000000000000000000000000000000000000084", - "0x0000000000000000000000000000000000000085" + "0x000000000000000000000000000000000000002f", + "0x0000000000000000000000000000000000000030", + "0x0000000000000000000000000000000000000031", + "0x0000000000000000000000000000000000000032", + "0x0000000000000000000000000000000000000033", + "0x0000000000000000000000000000000000000034", + "0x0000000000000000000000000000000000000035", + "0x0000000000000000000000000000000000000036", + "0x0000000000000000000000000000000000000037" ], - "additional_comment": "additional_comment13" + "additional_comment": "additional_comment2" } diff --git a/apps/block_scout_web/API.md b/apps/block_scout_web/API.md index b73ab47e1828..afc68c19e65f 100644 --- a/apps/block_scout_web/API.md +++ b/apps/block_scout_web/API.md @@ -34,41 +34,6 @@ * [public_tags_requests](#blockscoutweb-account-api-v1-usercontroller-public_tags_requests) * [delete_public_tags_request](#blockscoutweb-account-api-v1-usercontroller-delete_public_tags_request) * [update_public_tags_request](#blockscoutweb-account-api-v1-usercontroller-update_public_tags_request) - * [BlockScoutWeb.Account.Api.V1.AuthController](#blockscoutweb-account-api-v1-authcontroller) - -## BlockScoutWeb.Account.Api.V1.AuthController -### login -#### Login - -##### Request -* __Method:__ GET -* __Path:__ /auth/auth0_api - - -##### Response -* __Status__: 200 -* __Response body:__ -```json -{"auth_token":"..."} -``` - -### logout -#### Logout - -##### Request -* __Method:__ GET -* __Path:__ /auth/api/logout -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjAzYjliYjctMjAzNS00ZTMwLWFmMDYtZjQzZjdhZGY4YTFjIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.P4fttdoki0KFFU9WjeuV1ysYVcdOfjZHpupA5ljWyZfaTaGsNGXr8ENf7jZlKxLy6cSjbsL2k3ZAEv9FdJErmg -``` - -##### Response -* __Status__: 200 -* __Response body:__ -``` -OK -``` ## BlockScoutWeb.Account.Api.V1.UserController ### info @@ -77,18 +42,15 @@ OK ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/info -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNjAzYjliYjctMjAzNS00ZTMwLWFmMDYtZjQzZjdhZGY4YTFjIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE4IiwidHlwIjoiYWNjZXNzIn0.P4fttdoki0KFFU9WjeuV1ysYVcdOfjZHpupA5ljWyZfaTaGsNGXr8ENf7jZlKxLy6cSjbsL2k3ZAEv9FdJErmg -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABp0ZXN0X3VzZXItNEBibG9ja3Njb3V0LmNvbWQAAmlkYcRkAARuYW1lbQAAAApVc2VyIFRlc3Q0ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjRkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNGQADHdhdGNobGlzdF9pZGHE.Ovcc2Vzzv4fhFzmirtQjJ06gcqQwUHMMlju7VX24fyo; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjVVLIQxzQ0AAAjk +x-request-id: FxF1Y1_QfU9-YaIAAGdh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -96,10 +58,10 @@ access-control-expose-headers: * __Response body:__ ```json { - "nickname": "test_user18", - "name": "User Test18", - "email": "test_user-29@blockscout.com", - "avatar": "https://example.com/avatar/test_user18" + "nickname": "test_user4", + "name": "User Test4", + "email": "test_user-4@blockscout.com", + "avatar": "https://example.com/avatar/test_user4" } ``` @@ -111,7 +73,6 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/tags/address * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjYwY2U1NjUtNmJkYy00YTUzLWFmNTUtNDgzNTAzYmE2ZTliIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.g3dZzR7VoucLcnWZe8_Ww-w3BaxGOMpyOYZBgyoP5y9uHd_zWvFzvmvo-3uD10Hmuy3Z48jcxZypO0CTACQ3tg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -126,9 +87,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMThkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIyQGJsb2Nrc2NvdXQuY29tZAACaWRh0mQABG5hbWVtAAAAC1VzZXIgVGVzdDE4ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE4ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE4ZAAMd2F0Y2hsaXN0X2lkYdI.tFFJ387fBBdBFuMzzeaWcMTeapzMHnbuEfnqTdq5lJ8; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpim7VYsHFF0AABlD +x-request-id: FxF1Y3ALw8xSCMAAAHAC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -137,7 +99,7 @@ access-control-expose-headers: ```json { "name": "MyName", - "id": 191, + "id": 61, "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b" } ``` @@ -149,18 +111,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/tags/address/0x3e9ac8f16c92bc4f093357933b5befbf1e16987b -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjYwY2U1NjUtNmJkYy00YTUzLWFmNTUtNDgzNTAzYmE2ZTliIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDExIiwidHlwIjoiYWNjZXNzIn0.g3dZzR7VoucLcnWZe8_Ww-w3BaxGOMpyOYZBgyoP5y9uHd_zWvFzvmvo-3uD10Hmuy3Z48jcxZypO0CTACQ3tg -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMThkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIyQGJsb2Nrc2NvdXQuY29tZAACaWRh0mQABG5hbWVtAAAAC1VzZXIgVGVzdDE4ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE4ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE4ZAAMd2F0Y2hsaXN0X2lkYdI.tFFJ387fBBdBFuMzzeaWcMTeapzMHnbuEfnqTdq5lJ8; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpioOkSkHFF0AAAVh +x-request-id: FxF1Y3BIWjdSCMAAAG4B access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -186,17 +145,16 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/tags/address/195 +* __Path:__ /api/account/v1/user/tags/address/57 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDVhMTIzNDItOTEzYS00NWNiLWIzMjktMzY3MTRiMTQwODE3IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE0IiwidHlwIjoiYWNjZXNzIn0.p-9LA2uAMy1UKcax83biqshChsDVZBCADgNy677IorSszZ98-tlIQ2ACKao0gR_uhVNZu-wqAxgPJcg22iQpuQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { "name": "name3", - "address_hash": "0x0000000000000000000000000000000000000071" + "address_hash": "0x0000000000000000000000000000000000000016" } ``` @@ -204,9 +162,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyN2QABWVtYWlsbQAAABt0ZXN0X3VzZXItMTBAYmxvY2tzY291dC5jb21kAAJpZGHHZAAEbmFtZW0AAAAKVXNlciBUZXN0N2QACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI3ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDdkAAx3YXRjaGxpc3RfaWRhxw.Bn03yTZrlP0m6amYLQVeI-pvhvUf1F6d9SGAkDTLEck; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjEYwtEDCiMAAAXB +x-request-id: FxF1Y2IdgOjzsTkAAGYC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -215,8 +174,8 @@ access-control-expose-headers: ```json { "name": "name3", - "id": 195, - "address_hash": "0x0000000000000000000000000000000000000071" + "id": 57, + "address_hash": "0x0000000000000000000000000000000000000016" } ``` @@ -226,18 +185,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/tags/address -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZGMyN2RkZjItZTRkMi00ZWEzLWFkZWYtMDIyYjMwY2QxMzUzIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.wWzQx7QIkq0slxN9T67pycERqba5-0KKTxcSjKEy5q4Fi1zNDAYrdQ4UZVXvzU63ec9Y1MMxzLCaOlZ2p8ci4A -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE5QGJsb2Nrc2NvdXQuY29tZAACaWRhz2QABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYc8.AoYBq7uUH9JOt11vL4-71qtsXMzpPDFsx8BV97n1Y-o; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQphwzPKDHPBMAAA8j +x-request-id: FxF1Y2ynKDFWAsYAAG5C access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -247,18 +203,18 @@ access-control-expose-headers: [ { "name": "name2", - "id": 190, - "address_hash": "0x0000000000000000000000000000000000000003" + "id": 60, + "address_hash": "0x000000000000000000000000000000000000003f" }, { "name": "name1", - "id": 189, - "address_hash": "0x0000000000000000000000000000000000000002" + "id": 59, + "address_hash": "0x000000000000000000000000000000000000003e" }, { "name": "name0", - "id": 188, - "address_hash": "0x0000000000000000000000000000000000000001" + "id": 58, + "address_hash": "0x000000000000000000000000000000000000003d" } ] ``` @@ -268,19 +224,16 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/tags/address/192 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNTBiZjNmY2QtYTdiNi00ZjVmLTg2MTktOWIwZGVmMzY5MGE2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDEzIiwidHlwIjoiYWNjZXNzIn0.CJ4QnRrUvkbrO36NOPAqiyZj09iPA6yma7U2P4P8aBlLxWy3bAZUl-3ZKLJmu5gSrCFdPlEDAcDR4o2s3SVyHw -``` +* __Path:__ /api/account/v1/user/tags/address/62 ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM4QGJsb2Nrc2NvdXQuY29tZAACaWRh2GQABG5hbWVtAAAAC1VzZXIgVGVzdDI0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjI0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDI0ZAAMd2F0Y2hsaXN0X2lkYdg.x6Qf5zC5gCGQrKy2MbTqd3Xt7S_2oUYaCnO-pbZwRMI; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpi-vPnoAeg4AAAYC +x-request-id: FxF1Y3biZmVZE0MAAHKC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -300,13 +253,12 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/tags/transaction * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", "name": "MyName" } ``` @@ -315,9 +267,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 422 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRh02QABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYdM.zuwR-sOIcF7Xpo97W6G9Szzi_BPlu6Pu9_4kn7T2c10; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiSlZ8MFRCAAAAPi +x-request-id: FxF1Y3DXWVBu-HUAAG6h access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -340,13 +293,12 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/tags/transaction * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", "name": "MyName" } ``` @@ -355,9 +307,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRh02QABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYdM.zuwR-sOIcF7Xpo97W6G9Szzi_BPlu6Pu9_4kn7T2c10; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiTYW2IFRCAAABeD +x-request-id: FxF1Y3EB0Ytu-HUAAG7B access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -365,9 +318,9 @@ access-control-expose-headers: * __Response body:__ ```json { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", "name": "MyName", - "id": 215 + "id": 64 } ``` @@ -377,19 +330,16 @@ access-control-expose-headers: ##### Request * __Method:__ GET -* __Path:__ /api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000003 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODg4ZTUwZjItNzJjYi00OWYzLWI2YTItNjViMTYzNWZkZjY3IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.PwpzZUToKUFzfEHeDBubhp_HD5funsu5wrP6fMZXieRItYK9LewGXk7v_D-Iqd2UxQSgmMaqpxRk_-c8RwjHEQ -``` +* __Path:__ /api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009 ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRh02QABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYdM.zuwR-sOIcF7Xpo97W6G9Szzi_BPlu6Pu9_4kn7T2c10; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiTucn4FRCAAAAQC +x-request-id: FxF1Y3Efe0tu-HUAAG7h access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -412,10 +362,9 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/tags/transaction/213 +* __Path:__ /api/account/v1/user/tags/transaction/57 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOThjZGVlYjgtMGI3Yy00M2U2LWI3ZDAtODAzYjAyZmNkZTlmIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDMiLCJ0eXAiOiJhY2Nlc3MifQ.wx0GAbtOBVhAcDksePh2srpuYZV0YEKWJzbcWXXzO_zNck0lHLu_AUQ9pJMeLADfsHD5BBtypA8eRYcAPIANeg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -430,9 +379,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMGQABWVtYWlsbQAAABp0ZXN0X3VzZXItMEBibG9ja3Njb3V0LmNvbWQAAmlkYcBkAARuYW1lbQAAAApVc2VyIFRlc3QwZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjBkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMGQADHdhdGNobGlzdF9pZGHA.-aMP6TTEeEfxopoeChJPvTvjkSRD9_ZgaeLDlOC21gU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQph4dlZl_aCMAABFD +x-request-id: FxF1Y1xoENHeIlkAAGEi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -442,7 +392,7 @@ access-control-expose-headers: { "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", "name": "name1", - "id": 213 + "id": 57 } ``` @@ -452,18 +402,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/tags/transaction -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNmY3YTU5MTctZTkzZS00ZDIwLWJkMjItYzZkZmI1MjcxMGI4IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE3IiwidHlwIjoiYWNjZXNzIn0.EwNpusuNiETjPyX99BCG7kFVw1ILO2h5ma3-F6rXbC1C_r4YtIRH3dX8OxxzoGzVkzdT9ycO8N6QywNV2oKRvg -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE4QGJsb2Nrc2NvdXQuY29tZAACaWRhzmQABG5hbWVtAAAAC1VzZXIgVGVzdDE0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE0ZAAMd2F0Y2hsaXN0X2lkYc4.8SGhlMOY4aB444Afz1VajofmGp9YZbrfbVkZ4BTyaBI; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjT3AhI31PUAAAhi +x-request-id: FxF1Y2tEsVp5P30AAGzi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -472,19 +419,19 @@ access-control-expose-headers: ```json [ { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004", "name": "name2", - "id": 221 + "id": 60 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", "name": "name1", - "id": 220 + "id": 59 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", "name": "name0", - "id": 219 + "id": 58 } ] ``` @@ -494,19 +441,16 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/tags/transaction/216 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiN2JmNmY2NTAtNDFlOS00NzU1LThkM2UtNDYyNTgzMWE0ODAwIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEyIiwidHlwIjoiYWNjZXNzIn0.OApbGu0VIJAb92sk2z5uRryqJfNQUgTZMNYPg3l-fAqFC5Q8Ozf7fzvi7D6UOZYYH_kV7KOplbYSf_f6d6EHww -``` +* __Path:__ /api/account/v1/user/tags/transaction/61 ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTZkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIwQGJsb2Nrc2NvdXQuY29tZAACaWRh0GQABG5hbWVtAAAAC1VzZXIgVGVzdDE2ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE2ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE2ZAAMd2F0Y2hsaXN0X2lkYdA.YfL9L7-UIBleRbWWhHNvutNuw8Y4SadvwGFmGwakxQA; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiy51yHVod4AABpD +x-request-id: FxF1Y26c9UuC4TcAAGwh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -526,7 +470,6 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/watchlist * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDkzN2VjYjMtN2NiYi00MGE3LThiMTUtOTI1NGI2NDBlMzA2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.T2XfV2XJ74KVI_ILXC37uTQZi1WlIQfr60fQd7aX1eC-in8ZW2cO0yBSnTMb8vliqVnvq3ChI4XRZoza0CEpnw content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -542,15 +485,15 @@ content-type: multipart/mixed; boundary=plug_conn_test "incoming": true }, "ERC-20": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false } }, "notification_methods": { - "email": false + "email": true }, - "name": "test22", - "address_hash": "0x000000000000000000000000000000000000007d" + "name": "test2", + "address_hash": "0x0000000000000000000000000000000000000007" } ``` @@ -558,9 +501,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYcNkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHD.kv5nnz8sVGLaopoZs9ppOfu0hfpFi58yuisPDN6PtPI; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjb3H08IRYYAAApk +x-request-id: FxF1Y16Kv_0GzWcAAGKi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -578,17 +522,17 @@ access-control-expose-headers: "incoming": true }, "ERC-20": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false } }, "notification_methods": { - "email": false + "email": true }, - "name": "test22", - "id": 218, + "name": "test2", + "id": 68, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000007d", + "address_hash": "0x0000000000000000000000000000000000000007", "address_balance": null } ``` @@ -599,18 +543,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/watchlist -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMDkzN2VjYjMtN2NiYi00MGE3LThiMTUtOTI1NGI2NDBlMzA2IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIxIiwidHlwIjoiYWNjZXNzIn0.T2XfV2XJ74KVI_ILXC37uTQZi1WlIQfr60fQd7aX1eC-in8ZW2cO0yBSnTMb8vliqVnvq3ChI4XRZoza0CEpnw -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYcNkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHD.kv5nnz8sVGLaopoZs9ppOfu0hfpFi58yuisPDN6PtPI; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjfSdyoIRYYAAArk +x-request-id: FxF1Y19FyIUGzWcAAGMC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -622,24 +563,24 @@ access-control-expose-headers: "notification_settings": { "native": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-721": { - "outcoming": false, - "incoming": true + "outcoming": true, + "incoming": false }, "ERC-20": { "outcoming": true, - "incoming": true + "incoming": false } }, "notification_methods": { - "email": true + "email": false }, - "name": "test23", - "id": 219, + "name": "test3", + "id": 69, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000007e", + "address_hash": "0x0000000000000000000000000000000000000008", "address_balance": null }, { @@ -653,17 +594,17 @@ access-control-expose-headers: "incoming": true }, "ERC-20": { - "outcoming": true, - "incoming": true + "outcoming": false, + "incoming": false } }, "notification_methods": { - "email": false + "email": true }, - "name": "test22", - "id": 218, + "name": "test2", + "id": 68, "exchange_rate": null, - "address_hash": "0x000000000000000000000000000000000000007d", + "address_hash": "0x0000000000000000000000000000000000000007", "address_balance": null } ] @@ -674,19 +615,16 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/watchlist/222 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjE2YTNmZDktYmZmOS00MDc1LTgwMGMtMzIzMGViY2NkNTQyIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDI0IiwidHlwIjoiYWNjZXNzIn0.owHZYYTtUZ117ErpxW3xW-qqmfeWCVlli5JbAL1GbRpAKBxsLJ56tcjTv7pbKIq4cM-PzC2bbrw5JuISHhdfOQ -``` +* __Path:__ /api/account/v1/user/watchlist/74 ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE0QGJsb2Nrc2NvdXQuY29tZAACaWRhy2QABG5hbWVtAAAAC1VzZXIgVGVzdDExZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjExZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDExZAAMd2F0Y2hsaXN0X2lkYcs.YjW8nzuA66id0ADg2qpyjTMGfKJ7BHhjU_HdVq8w8vk; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjtUa8rUTWIAAAlB +x-request-id: FxF1Y2f5j2WpY30AAGuC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -703,10 +641,9 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/watchlist/220 +* __Path:__ /api/account/v1/user/watchlist/67 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDE0OWJiNzktZDFlZi00NTIyLThmYTMtMTFmODZmMzBkYmE4IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIyIiwidHlwIjoiYWNjZXNzIn0.yZjVfTRrQ3nuv0eU19VW5swMPO75WdiWZPW2EVrZLcEyXUP0X8oenB-A1haYT_0kMu40K7JZS7XMnR6Fo4wlkA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -714,23 +651,23 @@ content-type: multipart/mixed; boundary=plug_conn_test { "notification_settings": { "native": { - "outcoming": true, - "incoming": false + "outcoming": false, + "incoming": true }, "ERC-721": { "outcoming": true, - "incoming": false + "incoming": true }, "ERC-20": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test25", - "address_hash": "0x0000000000000000000000000000000000000080" + "name": "test1", + "address_hash": "0x0000000000000000000000000000000000000006" } ``` @@ -738,9 +675,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYcFkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGHB.3KOkZkPrcMrRXfooQckn-zi6xmax1LJMBGBSjmGM8ww; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjkDIU6MdJQAAAki +x-request-id: FxF1Y12FoNKu97sAAGch access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -750,25 +688,25 @@ access-control-expose-headers: { "notification_settings": { "native": { - "outcoming": true, - "incoming": false + "outcoming": false, + "incoming": true }, "ERC-721": { "outcoming": true, - "incoming": false + "incoming": true }, "ERC-20": { - "outcoming": false, - "incoming": false + "outcoming": true, + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test25", - "id": 220, + "name": "test1", + "id": 67, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000080", + "address_hash": "0x0000000000000000000000000000000000000006", "address_balance": null } ``` @@ -781,7 +719,6 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/watchlist * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZTNiNjE0MDEtZjJlOS00YzVlLTllODMtMzdmNWZkNjJhZDIyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.jgzonm_tqZGmwcImaz114SJkaEVFR-4sjENu3OyUTbjfnxokTHyth6GxgKgyWuakTv0QmwlWLkvI27f6LIcvWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -790,11 +727,11 @@ content-type: multipart/mixed; boundary=plug_conn_test "notification_settings": { "native": { "outcoming": false, - "incoming": false + "incoming": true }, "ERC-721": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-20": { "outcoming": true, @@ -804,8 +741,8 @@ content-type: multipart/mixed; boundary=plug_conn_test "notification_methods": { "email": false }, - "name": "test0", - "address_hash": "0x0000000000000000000000000000000000000008" + "name": "test4", + "address_hash": "0x0000000000000000000000000000000000000017" } ``` @@ -813,9 +750,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 422 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOGQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTFAYmxvY2tzY291dC5jb21kAAJpZGHIZAAEbmFtZW0AAAAKVXNlciBUZXN0OGQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI4ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDhkAAx3YXRjaGxpc3RfaWRhyA.q1Rmte0qLd31GbmpA46bE8rXo2okwzX8aD_oDHn8CIQ; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQph-LHUg_AFwAABND +x-request-id: FxF1Y2MCqHvooPMAAGbi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -836,10 +774,9 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/watchlist/217 +* __Path:__ /api/account/v1/user/watchlist/72 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZTNiNjE0MDEtZjJlOS00YzVlLTllODMtMzdmNWZkNjJhZDIyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDUiLCJ0eXAiOiJhY2Nlc3MifQ.jgzonm_tqZGmwcImaz114SJkaEVFR-4sjENu3OyUTbjfnxokTHyth6GxgKgyWuakTv0QmwlWLkvI27f6LIcvWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -848,11 +785,11 @@ content-type: multipart/mixed; boundary=plug_conn_test "notification_settings": { "native": { "outcoming": false, - "incoming": false + "incoming": true }, "ERC-721": { "outcoming": false, - "incoming": true + "incoming": false }, "ERC-20": { "outcoming": true, @@ -862,8 +799,8 @@ content-type: multipart/mixed; boundary=plug_conn_test "notification_methods": { "email": false }, - "name": "test0", - "address_hash": "0x0000000000000000000000000000000000000008" + "name": "test4", + "address_hash": "0x0000000000000000000000000000000000000017" } ``` @@ -871,9 +808,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 422 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOGQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTFAYmxvY2tzY291dC5jb21kAAJpZGHIZAAEbmFtZW0AAAAKVXNlciBUZXN0OGQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI4ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDhkAAx3YXRjaGxpc3RfaWRhyA.q1Rmte0qLd31GbmpA46bE8rXo2okwzX8aD_oDHn8CIQ; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQph_yy5k_AFwAABOD +x-request-id: FxF1Y2Nh1eHooPMAAGci access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -897,7 +835,6 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/api_keys * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjM1ZWI1MzEtY2U1My00MGY5LWIwZmEtZDE3NTc3NDA4OWI5IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.v1lMn6bUzn8hrFFv6sDR0xioMWiqDt5q5SluJ8p3jAEdEA18ZAXsOLH6-vDNWr50GhObEB6KoSOX8wmbvTtuOg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -911,9 +848,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYcJkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGHC.ULESD1_sOySz8eEVGnagUzGw6eMIx_8Pwoyr_5S3K0M; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQphyX8rDQD4QAAATB +x-request-id: FxF1Y14XlMBqXaQAAGHi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -922,7 +860,7 @@ access-control-expose-headers: ```json { "name": "test", - "api_key": "b8c07804-e992-4de4-ae29-f0d6a6691d12" + "api_key": "de9ef457-3f47-48d3-affa-79ad9d3b27b9" } ``` @@ -933,7 +871,6 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/api_keys * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOWMxYmQ2ZTEtYWZjMi00ODk3LTgwNDktYWE1YWQ4Mjc5MzljIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.NQGehmwQo4_-iivPSEspKQ4mFxkg8RskxjxkBCc_D7FulNFu3dUA2Qg8sLxCK3Oqxu57WO8HpI2qIeBw3H1HWA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -947,9 +884,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 422 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh1mQABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYdY.P37J2lZZdHaT4P-RatVaXCx77UcSH3s_TMx-FieaYk0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjYLyBOZMSkAAAiC +x-request-id: FxF1Y3LmuuofZKYAAG_h access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -971,18 +909,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/api_keys -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiOWMxYmQ2ZTEtYWZjMi00ODk3LTgwNDktYWE1YWQ4Mjc5MzljIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE5IiwidHlwIjoiYWNjZXNzIn0.NQGehmwQo4_-iivPSEspKQ4mFxkg8RskxjxkBCc_D7FulNFu3dUA2Qg8sLxCK3Oqxu57WO8HpI2qIeBw3H1HWA -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh1mQABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYdY.P37J2lZZdHaT4P-RatVaXCx77UcSH3s_TMx-FieaYk0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjY6CbWZMSkAAAgB +x-request-id: FxF1Y3LyOSIfZKYAAHAB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -992,15 +927,15 @@ access-control-expose-headers: [ { "name": "test", - "api_key": "4b8a9016-f6c7-4cf4-8697-5fb1851e16ec" + "api_key": "2ac16688-34e6-4fa4-8983-a9bc34c912f6" }, { "name": "test", - "api_key": "0f16c464-b857-41c1-894d-233110158756" + "api_key": "a55426db-04f0-40be-a146-1ced4558aa0c" }, { "name": "test", - "api_key": "12cd8bf6-508a-4311-98d7-09ffa6ee043d" + "api_key": "d73fc23b-59f0-4e6f-a739-f4de30995101" } ] ``` @@ -1010,10 +945,9 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/api_keys/f46581bc-cc15-4482-8038-dab72c0e4405 +* __Path:__ /api/account/v1/user/api_keys/2b1d400d-713e-4bfc-8ef0-710555693138 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTFjZGU3ZjEtMzA4My00ZTQ5LWFmNzEtYmU1YmRiOGNlYjFiIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDIiLCJ0eXAiOiJhY2Nlc3MifQ.1QQjWUyhuw2yEHEk-vEI1NcWQpK0BO3uFQPmLCaMhTuzEsg-HIztelraJIB7FSAN70Bt_FzKUN40TjoNvAQGDQ content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -1027,9 +961,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTdkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIxQGJsb2Nrc2NvdXQuY29tZAACaWRh0WQABG5hbWVtAAAAC1VzZXIgVGVzdDE3ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE3ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE3ZAAMd2F0Y2hsaXN0X2lkYdE.bLJKM3-kFm04mMC-4-3b2mjrig_lmQYt5C2tg-9q9so; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQph0kB14mvRQAAA_D +x-request-id: FxF1Y2-0eR7T2BMAAG0B access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1038,7 +973,7 @@ access-control-expose-headers: ```json { "name": "test_1", - "api_key": "f46581bc-cc15-4482-8038-dab72c0e4405" + "api_key": "2b1d400d-713e-4bfc-8ef0-710555693138" } ``` @@ -1047,19 +982,16 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/api_keys/50804f9d-d929-4017-a8e0-380facf88d42 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMjE1NThjZTgtNmE5NC00ODQyLThmZmEtMDNmYzI3MzY1MDgyIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.YowVxGq8eb3dX2UK_7Dxl_Lg9T3HeoTEvOkHvgq520H4NYo-6oU8vfFbUMUkLr3jTfWDJgGidhnOfud44JM2vA -``` +* __Path:__ /api/account/v1/user/api_keys/3bd44c0d-290f-4dfc-9283-5f674080f8ef ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI0QGJsb2Nrc2NvdXQuY29tZAACaWRh1GQABG5hbWVtAAAAC1VzZXIgVGVzdDIwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIwZAAMd2F0Y2hsaXN0X2lkYdQ.WgjMmOxwwBGcTZZscpLA8EXErwL8ITCvoIXPLIQAhtw; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQph6_OaQNBRoAAAOC +x-request-id: FxF1Y3HQdpa0710AAHBi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1079,14 +1011,13 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/custom_abis * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiODQzZjg1ODEtMmU3Zi00YzQyLTkxMTAtMzFkNjAwNWFiZDdkIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE2IiwidHlwIjoiYWNjZXNzIn0.IQC9TAYZyygTEv-g4AilY6tpZmGUCCAyIQfj4tCdmnrHfajzkpnbO3lctA-3oiRlnNB71ZG3te7JWcfvc7ro0w content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test21", - "contract_address_hash": "0x0000000000000000000000000000000000000074", + "name": "test25", + "contract_address_hash": "0x000000000000000000000000000000000000002c", "abi": [ { "type": "function", @@ -1124,9 +1055,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE1QGJsb2Nrc2NvdXQuY29tZAACaWRhzGQABG5hbWVtAAAAC1VzZXIgVGVzdDEyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEyZAAMd2F0Y2hsaXN0X2lkYcw.7cCOt6SVrOb5VLYplBzwZ03FWMo9jQpAV7cNroY4txY; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjIzQYD_0WMAABxj +x-request-id: FxF1Y2iZJWbZgfgAAGwC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1134,9 +1066,9 @@ access-control-expose-headers: * __Response body:__ ```json { - "name": "test21", - "id": 468, - "contract_address_hash": "0x0000000000000000000000000000000000000074", + "name": "test25", + "id": 143, + "contract_address_hash": "0x000000000000000000000000000000000000002c", "abi": [ { "type": "function", @@ -1177,14 +1109,13 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/custom_abis * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYzdmN2NmOWQtMjEzYi00OGVhLWJlOTEtNWQ2YTI0Yjc1NTdlIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.lZboWExo17mBNR-sGWkbyyZhjLEI7-7GBLwZqI22LT9kIPa3sXXhkUZNfjlhlotS2l_AlXxTpVNZkhDZ_XxdZg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test17", - "contract_address_hash": "0x0000000000000000000000000000000000000065", + "name": "test21", + "contract_address_hash": "0x0000000000000000000000000000000000000028", "abi": [ { "type": "function", @@ -1222,9 +1153,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 422 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOWQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTJAYmxvY2tzY291dC5jb21kAAJpZGHJZAAEbmFtZW0AAAAKVXNlciBUZXN0OWQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI5ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDlkAAx3YXRjaGxpc3RfaWRhyQ.MCpJsS-nb95ccHRtzOk7DbIRjEcTG34ONq4PrC5hOcU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiiglpJ_3TEAAAZk +x-request-id: FxF1Y2Ypm-ny0swAAGiB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1246,18 +1178,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/custom_abis -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYzdmN2NmOWQtMjEzYi00OGVhLWJlOTEtNWQ2YTI0Yjc1NTdlIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDkiLCJ0eXAiOiJhY2Nlc3MifQ.lZboWExo17mBNR-sGWkbyyZhjLEI7-7GBLwZqI22LT9kIPa3sXXhkUZNfjlhlotS2l_AlXxTpVNZkhDZ_XxdZg -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOWQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTJAYmxvY2tzY291dC5jb21kAAJpZGHJZAAEbmFtZW0AAAAKVXNlciBUZXN0OWQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI5ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDlkAAx3YXRjaGxpc3RfaWRhyQ.MCpJsS-nb95ccHRtzOk7DbIRjEcTG34ONq4PrC5hOcU; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpii331h_3TEAAAaE +x-request-id: FxF1Y2Y-qjXy0swAAGnC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1266,9 +1195,9 @@ access-control-expose-headers: ```json [ { - "name": "test16", - "id": 465, - "contract_address_hash": "0x0000000000000000000000000000000000000064", + "name": "test20", + "id": 141, + "contract_address_hash": "0x0000000000000000000000000000000000000027", "abi": [ { "type": "function", @@ -1301,9 +1230,9 @@ access-control-expose-headers: ] }, { - "name": "test15", - "id": 464, - "contract_address_hash": "0x0000000000000000000000000000000000000063", + "name": "test19", + "id": 140, + "contract_address_hash": "0x0000000000000000000000000000000000000026", "abi": [ { "type": "function", @@ -1336,9 +1265,9 @@ access-control-expose-headers: ] }, { - "name": "test14", - "id": 463, - "contract_address_hash": "0x0000000000000000000000000000000000000062", + "name": "test18", + "id": 139, + "contract_address_hash": "0x0000000000000000000000000000000000000025", "abi": [ { "type": "function", @@ -1371,9 +1300,9 @@ access-control-expose-headers: ] }, { - "name": "test13", - "id": 462, - "contract_address_hash": "0x0000000000000000000000000000000000000061", + "name": "test17", + "id": 138, + "contract_address_hash": "0x0000000000000000000000000000000000000024", "abi": [ { "type": "function", @@ -1406,9 +1335,9 @@ access-control-expose-headers: ] }, { - "name": "test12", - "id": 461, - "contract_address_hash": "0x0000000000000000000000000000000000000060", + "name": "test16", + "id": 137, + "contract_address_hash": "0x0000000000000000000000000000000000000023", "abi": [ { "type": "function", @@ -1441,9 +1370,9 @@ access-control-expose-headers: ] }, { - "name": "test11", - "id": 460, - "contract_address_hash": "0x000000000000000000000000000000000000005f", + "name": "test15", + "id": 136, + "contract_address_hash": "0x0000000000000000000000000000000000000022", "abi": [ { "type": "function", @@ -1476,9 +1405,9 @@ access-control-expose-headers: ] }, { - "name": "test10", - "id": 459, - "contract_address_hash": "0x000000000000000000000000000000000000005e", + "name": "test14", + "id": 135, + "contract_address_hash": "0x0000000000000000000000000000000000000021", "abi": [ { "type": "function", @@ -1511,9 +1440,9 @@ access-control-expose-headers: ] }, { - "name": "test9", - "id": 458, - "contract_address_hash": "0x000000000000000000000000000000000000005d", + "name": "test13", + "id": 134, + "contract_address_hash": "0x0000000000000000000000000000000000000020", "abi": [ { "type": "function", @@ -1546,9 +1475,9 @@ access-control-expose-headers: ] }, { - "name": "test8", - "id": 457, - "contract_address_hash": "0x000000000000000000000000000000000000005c", + "name": "test12", + "id": 133, + "contract_address_hash": "0x000000000000000000000000000000000000001f", "abi": [ { "type": "function", @@ -1581,9 +1510,9 @@ access-control-expose-headers: ] }, { - "name": "test7", - "id": 456, - "contract_address_hash": "0x000000000000000000000000000000000000005b", + "name": "test11", + "id": 132, + "contract_address_hash": "0x000000000000000000000000000000000000001e", "abi": [ { "type": "function", @@ -1616,9 +1545,9 @@ access-control-expose-headers: ] }, { - "name": "test6", - "id": 455, - "contract_address_hash": "0x000000000000000000000000000000000000005a", + "name": "test10", + "id": 131, + "contract_address_hash": "0x000000000000000000000000000000000000001d", "abi": [ { "type": "function", @@ -1651,9 +1580,9 @@ access-control-expose-headers: ] }, { - "name": "test5", - "id": 454, - "contract_address_hash": "0x0000000000000000000000000000000000000059", + "name": "test9", + "id": 130, + "contract_address_hash": "0x000000000000000000000000000000000000001c", "abi": [ { "type": "function", @@ -1686,9 +1615,9 @@ access-control-expose-headers: ] }, { - "name": "test4", - "id": 453, - "contract_address_hash": "0x0000000000000000000000000000000000000058", + "name": "test8", + "id": 129, + "contract_address_hash": "0x000000000000000000000000000000000000001b", "abi": [ { "type": "function", @@ -1721,9 +1650,9 @@ access-control-expose-headers: ] }, { - "name": "test3", - "id": 452, - "contract_address_hash": "0x0000000000000000000000000000000000000057", + "name": "test7", + "id": 128, + "contract_address_hash": "0x000000000000000000000000000000000000001a", "abi": [ { "type": "function", @@ -1756,9 +1685,9 @@ access-control-expose-headers: ] }, { - "name": "test2", - "id": 451, - "contract_address_hash": "0x0000000000000000000000000000000000000056", + "name": "test6", + "id": 127, + "contract_address_hash": "0x0000000000000000000000000000000000000019", "abi": [ { "type": "function", @@ -1798,17 +1727,16 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/custom_abis/467 +* __Path:__ /api/account/v1/user/custom_abis/144 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDU2YTY5NzYtY2U4NS00OWQ2LWI2YTgtNzY1OTUzMDkxMGU5IiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDE1IiwidHlwIjoiYWNjZXNzIn0.VeRQl9FN6i2NxfT_x0-E8YPGo8gDxDmGEHfjmLPJAa0-s8vRykPNq5C8loESJAFowi0MCIeHottQvR94oK-TVg content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "name": "test20", - "contract_address_hash": "0x0000000000000000000000000000000000000073", + "name": "test27", + "contract_address_hash": "0x000000000000000000000000000000000000004b", "abi": [ { "type": "function", @@ -1846,9 +1774,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh1WQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYdU.SEUqq9ZiSD79HIzwKvwTspmBKKU87m_Xwu5gw2pX1e0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjG3_3dYelIAABwD +x-request-id: FxF1Y3JcHmB4X2AAAHDC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1856,9 +1785,9 @@ access-control-expose-headers: * __Response body:__ ```json { - "name": "test20", - "id": 467, - "contract_address_hash": "0x0000000000000000000000000000000000000073", + "name": "test27", + "id": 144, + "contract_address_hash": "0x000000000000000000000000000000000000004b", "abi": [ { "type": "function", @@ -1897,19 +1826,16 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/custom_abis/466 -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzE2ZjNhNjAtZTQzYi00MzE1LWE0NzUtY2NlY2VkZTZmYWY4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEwIiwidHlwIjoiYWNjZXNzIn0.sMNyE8SSLXLL9f1Jx6xUfxeuYNDjbOCdoUwmlB1fcEKOrELZGUU_sHnDKKyaL5y1wYyd5PNC0NJ7E1gEPtWUrA -``` +* __Path:__ /api/account/v1/user/custom_abis/142 ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTEzQGJsb2Nrc2NvdXQuY29tZAACaWRhymQABG5hbWVtAAAAC1VzZXIgVGVzdDEwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEwZAAMd2F0Y2hsaXN0X2lkYco.x_6dmEjpZ1o8_ct-M7pWWP0LkI66xhwl8gWeQt9XzHA; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpilcg3W_YHIAAAbk +x-request-id: FxF1Y2b1jJGBaO4AAGrC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1929,22 +1855,25 @@ access-control-expose-headers: * __Path:__ /api/account/v1/user/public_tags * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMGEzZDI5ZjMtY2UxOS00Y2U5LWEyMTMtMjlhMDA4MGYzMDJkIiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ._znDLvjrXnb4b2J74_RA2olgq8Zj_eWYKq1J3W3ZkdJksaF0fmJnJ_K35vzAsd4mShDGkRUnJbWveyo-R5egXA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "website": "website10", - "tags": "Tag11", + "website": "website0", + "tags": "Tag0", "is_owner": true, - "full_name": "full name10", - "email": "test_user-18@blockscout.com", - "company": "company10", + "full_name": "full name0", + "email": "test_user-6@blockscout.com", + "company": "company0", "addresses": [ - "0x0000000000000000000000000000000000000051" + "0x0000000000000000000000000000000000000009", + "0x000000000000000000000000000000000000000a", + "0x000000000000000000000000000000000000000b", + "0x000000000000000000000000000000000000000c", + "0x000000000000000000000000000000000000000d" ], - "additional_comment": "additional_comment10" + "additional_comment": "additional_comment0" } ``` @@ -1952,9 +1881,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNWQABWVtYWlsbQAAABp0ZXN0X3VzZXItNUBibG9ja3Njb3V0LmNvbWQAAmlkYcVkAARuYW1lbQAAAApVc2VyIFRlc3Q1ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjVkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNWQADHdhdGNobGlzdF9pZGHF.kXAMBaL9a7aYjPDgZ9Llxe1etUCPH3vEvQe9Fq2May4; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiPkYbM3wm8AAAXk +x-request-id: FxF1Y2BIESA-ecUAAGgB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1962,17 +1892,22 @@ access-control-expose-headers: * __Response body:__ ```json { - "website": "website10", - "tags": "Tag11", + "website": "website0", + "tags": "Tag0", + "submission_date": "2022-09-03T21:00:07.156465Z", "is_owner": true, - "id": 192, - "full_name": "full name10", - "email": "test_user-18@blockscout.com", - "company": "company10", + "id": 131, + "full_name": "full name0", + "email": "test_user-6@blockscout.com", + "company": "company0", "addresses": [ - "0x0000000000000000000000000000000000000051" + "0x0000000000000000000000000000000000000009", + "0x000000000000000000000000000000000000000a", + "0x000000000000000000000000000000000000000b", + "0x000000000000000000000000000000000000000c", + "0x000000000000000000000000000000000000000d" ], - "additional_comment": "additional_comment10" + "additional_comment": "additional_comment0" } ``` @@ -1982,18 +1917,15 @@ access-control-expose-headers: ##### Request * __Method:__ GET * __Path:__ /api/account/v1/user/public_tags -* __Request headers:__ -``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTJkNGIxNjAtZTNiMC00ZDZhLWI0NWUtNTEyYmI0OTZkZWQ4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.ZBfbt5qBLc1tVkZvatWlCqdiPgZ3nXF23O5hfGvFdj47rHB2ej7gbg6MKLDOLHBAdt7qIqaKGPnQWj1VerQDcA -``` ##### Response * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI3QGJsb2Nrc2NvdXQuY29tZAACaWRh12QABG5hbWVtAAAAC1VzZXIgVGVzdDIzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIzZAAMd2F0Y2hsaXN0X2lkYdc._6gJnvzjA6VEztgoIdpp7chhmhsdFrJImlcdrp4-pW0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiJB0_ZrrjAAABTD +x-request-id: FxF1Y3SaPVCdkicAAHIi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -2002,195 +1934,191 @@ access-control-expose-headers: ```json [ { - "website": "website9", - "tags": "Tag10", + "website": "website13", + "tags": "Tag17", + "submission_date": "2022-09-03T21:00:07.000000Z", "is_owner": false, - "id": 191, + "id": 143, + "full_name": "full name13", + "email": "test_user-37@blockscout.com", + "company": "company13", + "addresses": [ + "0x000000000000000000000000000000000000007e", + "0x000000000000000000000000000000000000007f", + "0x0000000000000000000000000000000000000080", + "0x0000000000000000000000000000000000000081", + "0x0000000000000000000000000000000000000082", + "0x0000000000000000000000000000000000000083", + "0x0000000000000000000000000000000000000084" + ], + "additional_comment": "additional_comment13" + }, + { + "website": "website12", + "tags": "Tag16", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": false, + "id": 142, + "full_name": "full name12", + "email": "test_user-36@blockscout.com", + "company": "company12", + "addresses": [ + "0x0000000000000000000000000000000000000075", + "0x0000000000000000000000000000000000000076", + "0x0000000000000000000000000000000000000077", + "0x0000000000000000000000000000000000000078", + "0x0000000000000000000000000000000000000079", + "0x000000000000000000000000000000000000007a", + "0x000000000000000000000000000000000000007b", + "0x000000000000000000000000000000000000007c", + "0x000000000000000000000000000000000000007d" + ], + "additional_comment": "additional_comment12" + }, + { + "website": "website11", + "tags": "Tag15", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": false, + "id": 141, + "full_name": "full name11", + "email": "test_user-35@blockscout.com", + "company": "company11", + "addresses": [ + "0x000000000000000000000000000000000000006d", + "0x000000000000000000000000000000000000006e", + "0x000000000000000000000000000000000000006f", + "0x0000000000000000000000000000000000000070", + "0x0000000000000000000000000000000000000071", + "0x0000000000000000000000000000000000000072", + "0x0000000000000000000000000000000000000073", + "0x0000000000000000000000000000000000000074" + ], + "additional_comment": "additional_comment11" + }, + { + "website": "website10", + "tags": "Tag14", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": false, + "id": 140, + "full_name": "full name10", + "email": "test_user-34@blockscout.com", + "company": "company10", + "addresses": [ + "0x0000000000000000000000000000000000000067", + "0x0000000000000000000000000000000000000068", + "0x0000000000000000000000000000000000000069", + "0x000000000000000000000000000000000000006a", + "0x000000000000000000000000000000000000006b", + "0x000000000000000000000000000000000000006c" + ], + "additional_comment": "additional_comment10" + }, + { + "website": "website9", + "tags": "Tag13", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": true, + "id": 139, "full_name": "full name9", - "email": "test_user-16@blockscout.com", + "email": "test_user-33@blockscout.com", "company": "company9", "addresses": [ - "0x0000000000000000000000000000000000000048", - "0x0000000000000000000000000000000000000049", - "0x000000000000000000000000000000000000004a", - "0x000000000000000000000000000000000000004b", - "0x000000000000000000000000000000000000004c", - "0x000000000000000000000000000000000000004d", - "0x000000000000000000000000000000000000004e", - "0x000000000000000000000000000000000000004f", - "0x0000000000000000000000000000000000000050" + "0x0000000000000000000000000000000000000061", + "0x0000000000000000000000000000000000000062", + "0x0000000000000000000000000000000000000063", + "0x0000000000000000000000000000000000000064", + "0x0000000000000000000000000000000000000065", + "0x0000000000000000000000000000000000000066" ], "additional_comment": "additional_comment9" }, { "website": "website8", - "tags": "Tag9", - "is_owner": true, - "id": 190, + "tags": "Tag12", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": false, + "id": 138, "full_name": "full name8", - "email": "test_user-15@blockscout.com", + "email": "test_user-32@blockscout.com", "company": "company8", "addresses": [ - "0x000000000000000000000000000000000000003f", - "0x0000000000000000000000000000000000000040", - "0x0000000000000000000000000000000000000041", - "0x0000000000000000000000000000000000000042", - "0x0000000000000000000000000000000000000043", - "0x0000000000000000000000000000000000000044", - "0x0000000000000000000000000000000000000045", - "0x0000000000000000000000000000000000000046", - "0x0000000000000000000000000000000000000047" + "0x0000000000000000000000000000000000000060" ], "additional_comment": "additional_comment8" }, { "website": "website7", - "tags": "Tag7;Tag8", + "tags": "Tag11", + "submission_date": "2022-09-03T21:00:07.000000Z", "is_owner": true, - "id": 189, + "id": 137, "full_name": "full name7", - "email": "test_user-14@blockscout.com", + "email": "test_user-31@blockscout.com", "company": "company7", "addresses": [ - "0x0000000000000000000000000000000000000035", - "0x0000000000000000000000000000000000000036", - "0x0000000000000000000000000000000000000037", - "0x0000000000000000000000000000000000000038", - "0x0000000000000000000000000000000000000039", - "0x000000000000000000000000000000000000003a", - "0x000000000000000000000000000000000000003b", - "0x000000000000000000000000000000000000003c", - "0x000000000000000000000000000000000000003d", - "0x000000000000000000000000000000000000003e" + "0x000000000000000000000000000000000000005f" ], "additional_comment": "additional_comment7" }, { "website": "website6", - "tags": "Tag6", + "tags": "Tag9;Tag10", + "submission_date": "2022-09-03T21:00:07.000000Z", "is_owner": true, - "id": 188, + "id": 136, "full_name": "full name6", - "email": "test_user-13@blockscout.com", + "email": "test_user-30@blockscout.com", "company": "company6", "addresses": [ - "0x000000000000000000000000000000000000002f", - "0x0000000000000000000000000000000000000030", - "0x0000000000000000000000000000000000000031", - "0x0000000000000000000000000000000000000032", - "0x0000000000000000000000000000000000000033", - "0x0000000000000000000000000000000000000034" + "0x000000000000000000000000000000000000005a", + "0x000000000000000000000000000000000000005b", + "0x000000000000000000000000000000000000005c", + "0x000000000000000000000000000000000000005d", + "0x000000000000000000000000000000000000005e" ], "additional_comment": "additional_comment6" }, { "website": "website5", - "tags": "Tag5", - "is_owner": true, - "id": 187, + "tags": "Tag8", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": false, + "id": 135, "full_name": "full name5", - "email": "test_user-12@blockscout.com", + "email": "test_user-29@blockscout.com", "company": "company5", "addresses": [ - "0x0000000000000000000000000000000000000028", - "0x0000000000000000000000000000000000000029", - "0x000000000000000000000000000000000000002a", - "0x000000000000000000000000000000000000002b", - "0x000000000000000000000000000000000000002c", - "0x000000000000000000000000000000000000002d", - "0x000000000000000000000000000000000000002e" + "0x0000000000000000000000000000000000000051", + "0x0000000000000000000000000000000000000052", + "0x0000000000000000000000000000000000000053", + "0x0000000000000000000000000000000000000054", + "0x0000000000000000000000000000000000000055", + "0x0000000000000000000000000000000000000056", + "0x0000000000000000000000000000000000000057", + "0x0000000000000000000000000000000000000058", + "0x0000000000000000000000000000000000000059" ], "additional_comment": "additional_comment5" }, { "website": "website4", - "tags": "Tag4", - "is_owner": false, - "id": 186, + "tags": "Tag6;Tag7", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": true, + "id": 134, "full_name": "full name4", - "email": "test_user-11@blockscout.com", + "email": "test_user-28@blockscout.com", "company": "company4", "addresses": [ - "0x0000000000000000000000000000000000000022", - "0x0000000000000000000000000000000000000023", - "0x0000000000000000000000000000000000000024", - "0x0000000000000000000000000000000000000025", - "0x0000000000000000000000000000000000000026", - "0x0000000000000000000000000000000000000027" + "0x000000000000000000000000000000000000004c", + "0x000000000000000000000000000000000000004d", + "0x000000000000000000000000000000000000004e", + "0x000000000000000000000000000000000000004f", + "0x0000000000000000000000000000000000000050" ], "additional_comment": "additional_comment4" - }, - { - "website": "website3", - "tags": "Tag3", - "is_owner": false, - "id": 185, - "full_name": "full name3", - "email": "test_user-10@blockscout.com", - "company": "company3", - "addresses": [ - "0x000000000000000000000000000000000000001b", - "0x000000000000000000000000000000000000001c", - "0x000000000000000000000000000000000000001d", - "0x000000000000000000000000000000000000001e", - "0x000000000000000000000000000000000000001f", - "0x0000000000000000000000000000000000000020", - "0x0000000000000000000000000000000000000021" - ], - "additional_comment": "additional_comment3" - }, - { - "website": "website2", - "tags": "Tag2", - "is_owner": true, - "id": 184, - "full_name": "full name2", - "email": "test_user-9@blockscout.com", - "company": "company2", - "addresses": [ - "0x0000000000000000000000000000000000000016", - "0x0000000000000000000000000000000000000017", - "0x0000000000000000000000000000000000000018", - "0x0000000000000000000000000000000000000019", - "0x000000000000000000000000000000000000001a" - ], - "additional_comment": "additional_comment2" - }, - { - "website": "website1", - "tags": "Tag1", - "is_owner": false, - "id": 183, - "full_name": "full name1", - "email": "test_user-8@blockscout.com", - "company": "company1", - "addresses": [ - "0x0000000000000000000000000000000000000010", - "0x0000000000000000000000000000000000000011", - "0x0000000000000000000000000000000000000012", - "0x0000000000000000000000000000000000000013", - "0x0000000000000000000000000000000000000014", - "0x0000000000000000000000000000000000000015" - ], - "additional_comment": "additional_comment1" - }, - { - "website": "website0", - "tags": "Tag0", - "is_owner": true, - "id": 182, - "full_name": "full name0", - "email": "test_user-7@blockscout.com", - "company": "company0", - "addresses": [ - "0x000000000000000000000000000000000000000a", - "0x000000000000000000000000000000000000000b", - "0x000000000000000000000000000000000000000c", - "0x000000000000000000000000000000000000000d", - "0x000000000000000000000000000000000000000e", - "0x000000000000000000000000000000000000000f" - ], - "additional_comment": "additional_comment0" } ] ``` @@ -2200,10 +2128,9 @@ access-control-expose-headers: ##### Request * __Method:__ DELETE -* __Path:__ /api/account/v1/user/public_tags/191 +* __Path:__ /api/account/v1/user/public_tags/143 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzAsImlhdCI6MTY2MDU3OTkzMCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYTJkNGIxNjAtZTNiMC00ZDZhLWI0NWUtNTEyYmI0OTZkZWQ4IiwibmJmIjoxNjYwNTc5OTI5LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.ZBfbt5qBLc1tVkZvatWlCqdiPgZ3nXF23O5hfGvFdj47rHB2ej7gbg6MKLDOLHBAdt7qIqaKGPnQWj1VerQDcA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ @@ -2217,9 +2144,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI3QGJsb2Nrc2NvdXQuY29tZAACaWRh12QABG5hbWVtAAAAC1VzZXIgVGVzdDIzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIzZAAMd2F0Y2hsaXN0X2lkYdc._6gJnvzjA6VEztgoIdpp7chhmhsdFrJImlcdrp4-pW0; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpiJiCRRrrjAAABUD +x-request-id: FxF1Y3SwObudkicAAHBB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -2236,25 +2164,29 @@ access-control-expose-headers: ##### Request * __Method:__ PUT -* __Path:__ /api/account/v1/user/public_tags/194 +* __Path:__ /api/account/v1/user/public_tags/132 * __Request headers:__ ``` -authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NjI5OTkxMzEsImlhdCI6MTY2MDU3OTkzMSwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMzMzOWViOWYtYTE3Ny00MzJlLWE3NjYtMTk4YzIwZjk2ZTMyIiwibmJmIjoxNjYwNTc5OTMwLCJzdWIiOiJibG9ja3Njb3V0fDAwMDIzIiwidHlwIjoiYWNjZXNzIn0.cv2NCc9KC-ad5u8hDlXeSL1EJpt3E_C1OvoENI_xkjBSnWqBL-M-KXSqqgo_42Od_cVKslI4XGtVeK3fk0eaOA content-type: multipart/mixed; boundary=plug_conn_test ``` * __Request body:__ ```json { - "website": "website13", - "tags": "Tag14", - "is_owner": false, - "full_name": "full name13", - "email": "test_user-37@blockscout.com", - "company": "company13", + "website": "website2", + "tags": "Tag2;Tag3", + "is_owner": true, + "full_name": "full name2", + "email": "test_user-9@blockscout.com", + "company": "company2", "addresses": [ - "0x0000000000000000000000000000000000000082" + "0x000000000000000000000000000000000000000f", + "0x0000000000000000000000000000000000000010", + "0x0000000000000000000000000000000000000011", + "0x0000000000000000000000000000000000000012", + "0x0000000000000000000000000000000000000013", + "0x0000000000000000000000000000000000000014" ], - "additional_comment": "additional_comment13" + "additional_comment": "additional_comment2" } ``` @@ -2262,9 +2194,10 @@ content-type: multipart/mixed; boundary=plug_conn_test * __Status__: 200 * __Response headers:__ ``` +set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNmQABWVtYWlsbQAAABp0ZXN0X3VzZXItN0BibG9ja3Njb3V0LmNvbWQAAmlkYcZkAARuYW1lbQAAAApVc2VyIFRlc3Q2ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjZkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNmQADHdhdGNobGlzdF9pZGHG.86gruprPiLE-Nf9xkOzjEcW2wfSnCCPly5fHTwHrF6c; path=/; HttpOnly content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate -x-request-id: FwuQpjnaeEIPFzIAAAiB +x-request-id: FxF1Y2E03jhU4u4AAGSi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -2272,17 +2205,23 @@ access-control-expose-headers: * __Response body:__ ```json { - "website": "website13", - "tags": "Tag14", - "is_owner": false, - "id": 194, - "full_name": "full name13", - "email": "test_user-37@blockscout.com", - "company": "company13", + "website": "website2", + "tags": "Tag2;Tag3", + "submission_date": "2022-09-03T21:00:07.000000Z", + "is_owner": true, + "id": 132, + "full_name": "full name2", + "email": "test_user-9@blockscout.com", + "company": "company2", "addresses": [ - "0x0000000000000000000000000000000000000082" + "0x000000000000000000000000000000000000000f", + "0x0000000000000000000000000000000000000010", + "0x0000000000000000000000000000000000000011", + "0x0000000000000000000000000000000000000012", + "0x0000000000000000000000000000000000000013", + "0x0000000000000000000000000000000000000014" ], - "additional_comment": "additional_comment13" + "additional_comment": "additional_comment2" } ``` diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index e3e0313ecc67..f5190067e915 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -13,24 +13,26 @@ defmodule BlockScoutWeb.ApiRouter do Router for API """ use BlockScoutWeb, :router - alias BlockScoutWeb.Plug.CheckAuth + # alias BlockScoutWeb.Plug.CheckAuth pipeline :api do plug(:accepts, ["json"]) end pipeline :account_api do - plug(Guardian.Plug.VerifyHeader, module: BlockScoutWeb.Guardian, error_handler: BlockScoutWeb.GuardianErrorHandler) - plug(CheckAuth) + # plug(Guardian.Plug.VerifyHeader, module: BlockScoutWeb.Guardian, error_handler: BlockScoutWeb.GuardianErrorHandler) + # plug(CheckAuth) + plug(:fetch_session) end pipeline :tags_api do - plug(Guardian.Plug.VerifyHeader, - module: BlockScoutWeb.Guardian, - error_handler: BlockScoutWeb.GuardianErrorHandler, - tolerant?: true, - halt: false - ) + # plug(Guardian.Plug.VerifyHeader, + # module: BlockScoutWeb.Guardian, + # error_handler: BlockScoutWeb.GuardianErrorHandler, + # tolerant?: true, + # halt: false + # ) + plug(:fetch_session) end alias BlockScoutWeb.Account.Api.V1.{TagsController, UserController} diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex index 529de91d5bb7..91f8ab58333c 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/tags_controller.ex @@ -1,20 +1,21 @@ defmodule BlockScoutWeb.Account.Api.V1.TagsController do use BlockScoutWeb, :controller + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] + alias BlockScoutWeb.Models.{GetAddressTags, GetTransactionTags, UserFromAuth} alias Explorer.Account.Identity alias Explorer.{Chain, Repo} alias Explorer.Chain.Hash.{Address, Full} - alias Guardian.Plug action_fallback(BlockScoutWeb.Account.Api.V1.FallbackController) def tags_address(conn, %{"address_hash" => address_hash}) do personal_tags = - if is_nil(Plug.current_claims(conn)) do + if is_nil(current_user(conn)) do %{personal_tags: [], watchlist_names: []} else - uid = Plug.current_claims(conn)["sub"] + uid = current_user(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- @@ -52,10 +53,10 @@ defmodule BlockScoutWeb.Account.Api.V1.TagsController do end personal_tags = - if is_nil(Plug.current_claims(conn)) do + if is_nil(current_user(conn)) do %{personal_tags: [], watchlist_names: [], personal_tx_tag: nil} else - uid = Plug.current_claims(conn)["sub"] + uid = current_user(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index 6b3e9098ea0a..a6bd6baa60e5 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -1,23 +1,22 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do use BlockScoutWeb, :controller + import BlockScoutWeb.Account.AuthController, only: [api_authenticate!: 1] import Ecto.Query, only: [from: 2] - alias BlockScoutWeb.Guardian alias BlockScoutWeb.Models.UserFromAuth alias Explorer.Account.Api.Key, as: ApiKey alias Explorer.Account.CustomABI alias Explorer.Account.{Identity, PublicTagsRequest, TagAddress, TagTransaction, WatchlistAddress} alias Explorer.ExchangeRates.Token alias Explorer.{Market, Repo} - alias Guardian.Plug action_fallback(BlockScoutWeb.Account.Api.V1.FallbackController) @ok_message "OK" def info(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)} do conn @@ -27,7 +26,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def watchlist(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- @@ -43,7 +42,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_watchlist(conn, %{"id" => watchlist_address_id}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- @@ -82,7 +81,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "email" => notify_email } }) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id watchlist_params = %{ name: name, @@ -140,7 +139,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "email" => notify_email } }) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id watchlist_params = %{ id: watchlist_address_id, @@ -173,7 +172,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def tags_address(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, address_tags <- TagAddress.get_tags_address_by_identity_id(identity.id) do @@ -184,7 +183,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_tag_address(conn, %{"id" => tag_id}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- TagAddress.delete(tag_id, identity.id), @@ -196,7 +195,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_tag_address(conn, %{"address_hash" => address_hash, "name" => name}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, address_tag} <- @@ -212,7 +211,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_tag_address(conn, %{"id" => tag_id} = attrs) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, address_tag} <- @@ -231,7 +230,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def tags_transaction(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, transaction_tags <- TagTransaction.get_tags_transaction_by_identity_id(identity.id) do @@ -242,7 +241,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_tag_transaction(conn, %{"id" => tag_id}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- TagTransaction.delete(tag_id, identity.id), @@ -254,7 +253,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_tag_transaction(conn, %{"transaction_hash" => tx_hash, "name" => name}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, transaction_tag} <- @@ -270,7 +269,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_tag_transaction(conn, %{"id" => tag_id} = attrs) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, transaction_tag} <- @@ -289,7 +288,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def api_keys(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, api_keys <- ApiKey.get_api_keys_by_identity_id(identity.id) do @@ -300,7 +299,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_api_key(conn, %{"api_key" => api_key_uuid}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- ApiKey.delete(api_key_uuid, identity.id), @@ -312,7 +311,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_api_key(conn, %{"name" => api_key_name}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, api_key} <- @@ -324,7 +323,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_api_key(conn, %{"name" => api_key_name, "api_key" => api_key_value}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, api_key} <- @@ -336,7 +335,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def custom_abis(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, custom_abis <- CustomABI.get_custom_abis_by_identity_id(identity.id) do @@ -347,7 +346,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_custom_abi(conn, %{"id" => id}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- CustomABI.delete(id, identity.id), @@ -359,7 +358,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_custom_abi(conn, %{"contract_address_hash" => contract_address_hash, "name" => name, "abi" => abi}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, custom_abi} <- @@ -381,7 +380,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "id" => id } = params ) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, custom_abi} <- @@ -401,7 +400,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def public_tags_requests(conn, _params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, public_tags_requests <- PublicTagsRequest.get_public_tags_requests_by_identity_id(identity.id) do @@ -412,7 +411,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_public_tags_request(conn, %{"id" => id, "remove_reason" => remove_reason}) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:public_tag_delete, true} <- @@ -429,7 +428,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_public_tags_request(conn, params) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, public_tags_request} <- @@ -456,7 +455,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "id" => id } = params ) do - uid = Plug.current_claims(conn)["sub"] + uid = api_authenticate!(conn).id with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, public_tags_request} <- diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 8bc9ba8b142e..10c5d1a5978a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -78,6 +78,14 @@ defmodule BlockScoutWeb.Account.AuthController do current_user(conn) || redirect(conn, to: root()) end + def api_authenticate!(conn) do + current_user(conn) || + conn + |> put_resp_content_type("application/json") + |> send_resp(401, Jason.encode!(%{message: "Unauthorized"})) + |> halt() + end + def current_user(%{private: %{plug_session: %{"current_user" => _}}} = conn), do: get_session(conn, :current_user) diff --git a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex index 02d5780daf8c..058b1605409b 100644 --- a/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex +++ b/apps/block_scout_web/lib/block_scout_web/models/user_from_auth.ex @@ -75,8 +75,8 @@ defmodule BlockScoutWeb.Models.UserFromAuth do from(i in Identity, where: i.uid_hash == ^auth.uid) end - def query_identity(uid) do - from(i in Identity, where: i.uid_hash == ^uid) + def query_identity(id) do + from(i in Identity, where: i.id == ^id) end defp basic_info(auth, identity) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex index e1c65a905c6b..91299034a1cb 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex @@ -134,7 +134,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do "tags" => public_tags_request.tags, "addresses" => public_tags_request.addresses, "additional_comment" => public_tags_request.additional_comment, - "is_owner" => public_tags_request.is_owner + "is_owner" => public_tags_request.is_owner, + "submission_date" => public_tags_request.inserted_at } end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs index e10353c0c45a..27fa7f30dead 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs @@ -9,9 +9,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do {:ok, user} = UserFromAuth.find_or_create(auth) - {:ok, token, _} = Guardian.encode_and_sign(user) - - {:ok, user: user, conn: Plug.Conn.put_req_header(conn, "authorization", "Bearer " <> token)} + {:ok, user: user, conn: Plug.Test.init_test_session(conn, current_user: user)} end describe "Test account/api/v1/user" do @@ -799,7 +797,16 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") - |> json_response(200) == [post_public_tasg_request_response] + |> json_response(200) + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) == + [post_public_tasg_request_response] + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) end test "get and delete several public tags requests", %{conn: conn} do @@ -826,14 +833,19 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert response["is_owner"] == request["is_owner"] assert response["id"] - response + {:ok, time, _} = DateTime.from_iso8601(response["submission_date"]) + %{response | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} end) |> Enum.reverse() assert conn |> get("/api/account/v1/user/public_tags") |> doc(description: "Get list of requests to add a public tag") - |> json_response(200) == final_list + |> json_response(200) + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) == final_list %{"id" => id} = Enum.at(final_list, 0) @@ -876,7 +888,16 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") - |> json_response(200) == [post_public_tasg_request_response] + |> json_response(200) + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) == + [post_public_tasg_request_response] + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) new_public_tags_request = build(:public_tags_request) @@ -901,7 +922,16 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") - |> json_response(200) == [put_public_tasg_request_response] + |> json_response(200) + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) == + [put_public_tasg_request_response] + |> Enum.map(fn request -> + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end) end end end diff --git a/apps/block_scout_web/test/test_helper.exs b/apps/block_scout_web/test/test_helper.exs index 11c846c47cd9..a99ba9a234d5 100644 --- a/apps/block_scout_web/test/test_helper.exs +++ b/apps/block_scout_web/test/test_helper.exs @@ -11,13 +11,13 @@ Application.put_env(:wallaby, :base_url, BlockScoutWeb.Endpoint.url()) {:ok, _} = Application.ensure_all_started(:ex_machina) -# Bureaucrat.start( -# writer: Bureaucrat.ApiBlueprintWriter, -# default_path: "API blueprint.md", -# env_var: "DOC" -# ) +Bureaucrat.start( + writer: Bureaucrat.ApiBlueprintWriter, + default_path: "API blueprint.md", + env_var: "DOC" +) -Bureaucrat.start() +# Bureaucrat.start() ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter, Bureaucrat.Formatter]) ExUnit.start() From 2ee642d6ba4753468e1f56307358b901bae47697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Sep 2022 00:29:26 +0300 Subject: [PATCH 365/723] Fix tests --- apps/block_scout_web/lib/block_scout_web/api_router.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index f5190067e915..16f36e948f6f 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -23,6 +23,7 @@ defmodule BlockScoutWeb.ApiRouter do # plug(Guardian.Plug.VerifyHeader, module: BlockScoutWeb.Guardian, error_handler: BlockScoutWeb.GuardianErrorHandler) # plug(CheckAuth) plug(:fetch_session) + plug(:protect_from_forgery) end pipeline :tags_api do @@ -33,6 +34,7 @@ defmodule BlockScoutWeb.ApiRouter do # halt: false # ) plug(:fetch_session) + plug(:protect_from_forgery) end alias BlockScoutWeb.Account.Api.V1.{TagsController, UserController} From 9869120dec018fb7f10f33f0e19d39f69f4dab23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Sep 2022 12:20:43 +0300 Subject: [PATCH 366/723] Set SameSite attribute to Lax for session cookie --- apps/block_scout_web/lib/block_scout_web/endpoint.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index f53445bc052f..2d52b192d89a 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -63,7 +63,8 @@ defmodule BlockScoutWeb.Endpoint do Plug.Session, store: :cookie, key: "_explorer_key", - signing_salt: "iC2ksJHS" + signing_salt: "iC2ksJHS", + same_site: "Lax" ) use SpandexPhoenix From 361bf84e8c5e8cb2faf471ee37e9570e54927f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Sep 2022 23:03:50 +0300 Subject: [PATCH 367/723] Remove Guardian, JWT related code --- apps/block_scout_web/config/config.exs | 11 ---- apps/block_scout_web/config/runtime/test.exs | 2 - apps/block_scout_web/config/test.exs | 2 - .../lib/block_scout_web/api_router.ex | 16 +----- .../lib/block_scout_web/application.ex | 3 +- .../controllers/account/auth_controller.ex | 33 ------------ .../lib/block_scout_web/guardian.ex | 51 ------------------- .../block_scout_web/guardian_error_handler.ex | 22 -------- .../lib/block_scout_web/plug/check_auth.ex | 21 -------- .../lib/block_scout_web/web_router.ex | 1 - apps/block_scout_web/mix.exs | 4 +- .../account/api/v1/user_controller_test.exs | 1 - .../migrations/20220729075714_guardiandb.exs | 17 ------- .../20220905195203_remove_guardian_tokens.exs | 7 +++ config/runtime.exs | 2 - docker/Makefile | 3 -- mix.lock | 2 - 17 files changed, 10 insertions(+), 188 deletions(-) delete mode 100644 apps/block_scout_web/lib/block_scout_web/guardian.ex delete mode 100644 apps/block_scout_web/lib/block_scout_web/guardian_error_handler.ex delete mode 100644 apps/block_scout_web/lib/block_scout_web/plug/check_auth.ex delete mode 100644 apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs create mode 100644 apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index f6e44d7013dd..87804da86837 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -81,10 +81,6 @@ config :block_scout_web, BlockScoutWeb.WebRouter, enabled: System.get_env("DISAB # Configures Ueberauth local settings config :ueberauth, Ueberauth, providers: [ - auth0_api: { - Ueberauth.Strategy.Auth0, - [callback_path: "/auth/auth0_api/api_callback"] - }, auth0: { Ueberauth.Strategy.Auth0, [callback_path: "/auth/auth0/callback"] @@ -94,13 +90,6 @@ config :ueberauth, Ueberauth, config :hammer, backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} -config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web" - -config :guardian, Guardian.DB, - repo: Explorer.Repo.Account, - schema_name: "guardian_tokens", - sweep_interval: 60 - # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{config_env()}.exs" diff --git a/apps/block_scout_web/config/runtime/test.exs b/apps/block_scout_web/config/runtime/test.exs index 2e5534074166..d7100466c1c3 100644 --- a/apps/block_scout_web/config/runtime/test.exs +++ b/apps/block_scout_web/config/runtime/test.exs @@ -13,8 +13,6 @@ config :ueberauth, Ueberauth, logout_url: "example.com/logout", logout_return_to_url: "example.com/return" -config :block_scout_web, BlockScoutWeb.Guardian, secret_key: "secret_key" - variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "parity" diff --git a/apps/block_scout_web/config/test.exs b/apps/block_scout_web/config/test.exs index cc8b4824d07b..c18e31b20dc9 100644 --- a/apps/block_scout_web/config/test.exs +++ b/apps/block_scout_web/config/test.exs @@ -31,5 +31,3 @@ config :ueberauth, Ueberauth, [callback_url: "example.com/callback"] } ] - -config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web" diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index 16f36e948f6f..8fea1a1db04a 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -13,26 +13,12 @@ defmodule BlockScoutWeb.ApiRouter do Router for API """ use BlockScoutWeb, :router - # alias BlockScoutWeb.Plug.CheckAuth pipeline :api do plug(:accepts, ["json"]) end pipeline :account_api do - # plug(Guardian.Plug.VerifyHeader, module: BlockScoutWeb.Guardian, error_handler: BlockScoutWeb.GuardianErrorHandler) - # plug(CheckAuth) - plug(:fetch_session) - plug(:protect_from_forgery) - end - - pipeline :tags_api do - # plug(Guardian.Plug.VerifyHeader, - # module: BlockScoutWeb.Guardian, - # error_handler: BlockScoutWeb.GuardianErrorHandler, - # tolerant?: true, - # halt: false - # ) plug(:fetch_session) plug(:protect_from_forgery) end @@ -84,7 +70,7 @@ defmodule BlockScoutWeb.ApiRouter do scope "/account/v1" do pipe_through(:api) - pipe_through(:tags_api) + pipe_through(:account_api) scope "/tags" do get("/address/:address_hash", TagsController, :tags_address) diff --git a/apps/block_scout_web/lib/block_scout_web/application.ex b/apps/block_scout_web/lib/block_scout_web/application.ex index 9a63fbed88c2..07ff0f87f1c1 100644 --- a/apps/block_scout_web/lib/block_scout_web/application.ex +++ b/apps/block_scout_web/lib/block_scout_web/application.ex @@ -22,8 +22,7 @@ defmodule BlockScoutWeb.Application do child_spec(Endpoint, []), {Absinthe.Subscription, Endpoint}, {RealtimeEventHandler, name: RealtimeEventHandler}, - {BlocksIndexedCounter, name: BlocksIndexedCounter}, - {Guardian.DB.Token.SweeperServer, []} + {BlocksIndexedCounter, name: BlocksIndexedCounter} ] opts = [strategy: :one_for_one, name: BlockScoutWeb.Supervisor, max_restarts: 1_000] diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 10c5d1a5978a..1a9eab3f60f0 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -1,7 +1,6 @@ defmodule BlockScoutWeb.Account.AuthController do use BlockScoutWeb, :controller - alias BlockScoutWeb.Guardian alias BlockScoutWeb.Models.UserFromAuth plug(Ueberauth) @@ -41,38 +40,6 @@ defmodule BlockScoutWeb.Account.AuthController do end end - def api_callback(%{assigns: %{ueberauth_failure: _fails}} = conn, _params) do - send_resp(conn, 200, "Failed to authenticate") - end - - def api_callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do - case UserFromAuth.find_or_create(auth, true) do - {:ok, user} -> - {:ok, token, _} = Guardian.encode_and_sign(user) - - conn - |> put_resp_content_type("application/json") - |> send_resp(200, Jason.encode!(%{"auth_token" => token})) - - {:error, _reason} -> - conn - |> put_resp_content_type("application/json") - |> send_resp(200, Jason.encode!(%{"message" => "Failed to authenticate."})) - end - end - - def api_logout(conn, _params) do - if match?(["Bearer " <> _token], get_req_header(conn, "authorization")) do - ["Bearer " <> token] = get_req_header(conn, "authorization") - Guardian.revoke(token) - end - - logout_url = Application.get_env(:ueberauth, Ueberauth)[:logout_url] - - conn - |> redirect(external: logout_url) - end - # for importing in other controllers def authenticate!(conn) do current_user(conn) || redirect(conn, to: root()) diff --git a/apps/block_scout_web/lib/block_scout_web/guardian.ex b/apps/block_scout_web/lib/block_scout_web/guardian.ex deleted file mode 100644 index 5eb564ac9d9a..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/guardian.ex +++ /dev/null @@ -1,51 +0,0 @@ -defmodule BlockScoutWeb.Guardian do - @moduledoc """ - Module is responsible for selecting the info which will be included into jwt - """ - use Guardian, otp_app: :block_scout_web - - alias BlockScoutWeb.Models.UserFromAuth - alias Guardian.DB - - def subject_for_token(%{uid: uid}, _claims) do - sub = to_string(uid) - {:ok, sub} - end - - def subject_for_token(_, _) do - {:error, :missing_id_field} - end - - def resource_from_claims(%{"sub" => uid}) do - resource = UserFromAuth.find_identity(uid) - {:ok, resource} - end - - def resource_from_claims(_claims) do - {:error, :invalid_data} - end - - def after_encode_and_sign(resource, claims, token, _options) do - with {:ok, _} <- DB.after_encode_and_sign(resource, claims["sub"], claims, token) do - {:ok, token} - end - end - - def on_verify(claims, token, _options) do - with {:ok, _} <- DB.on_verify(claims, token) do - {:ok, claims} - end - end - - def on_refresh({old_token, old_claims}, {new_token, new_claims}, _options) do - with {:ok, _, _} <- DB.on_refresh({old_token, old_claims}, {new_token, new_claims}) do - {:ok, {old_token, old_claims}, {new_token, new_claims}} - end - end - - def on_revoke(claims, token, _options) do - with {:ok, _} <- DB.on_revoke(claims, token) do - {:ok, claims} - end - end -end diff --git a/apps/block_scout_web/lib/block_scout_web/guardian_error_handler.ex b/apps/block_scout_web/lib/block_scout_web/guardian_error_handler.ex deleted file mode 100644 index e5b98cab9c6f..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/guardian_error_handler.ex +++ /dev/null @@ -1,22 +0,0 @@ -defmodule BlockScoutWeb.GuardianErrorHandler do - @moduledoc """ - Module is responsible for handling errors on decoding Authorization header - """ - import Plug.Conn - - @behaviour Guardian.Plug.ErrorHandler - - @impl Guardian.Plug.ErrorHandler - def auth_error(conn, {type, _reason}, opts) do - if Keyword.get(opts, :tolerant?) do - conn - else - body = Jason.encode!(%{message: to_string(type)}) - - conn - |> put_resp_content_type("application/json") - |> send_resp(401, body) - |> halt() - end - end -end diff --git a/apps/block_scout_web/lib/block_scout_web/plug/check_auth.ex b/apps/block_scout_web/lib/block_scout_web/plug/check_auth.ex deleted file mode 100644 index f114842310e7..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/plug/check_auth.ex +++ /dev/null @@ -1,21 +0,0 @@ -defmodule BlockScoutWeb.Plug.CheckAuth do - @moduledoc """ - Checks if the guardian did find token. If not, send 401 Unauthorized response - """ - import Plug.Conn - - alias Guardian.Plug - - def init(opts), do: opts - - def call(conn, _opts) do - if is_nil(Plug.current_claims(conn)) do - conn - |> put_resp_content_type("application/json") - |> send_resp(401, Jason.encode!(%{message: "Unauthorized"})) - |> halt() - else - conn - end - end -end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 3c684737baeb..9fe6b1542efc 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -24,7 +24,6 @@ defmodule BlockScoutWeb.WebRouter do get("/profile", Account.AuthController, :profile) get("/logout", Account.AuthController, :logout) get("/:provider", Account.AuthController, :request) - get("/:provider/api_callback", Account.AuthController, :api_callback) get("/:provider/callback", Account.AuthController, :callback) get("/api/logout", Account.AuthController, :api_logout) end diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index aa0b3a446891..ff58199c7565 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -131,10 +131,8 @@ defmodule BlockScoutWeb.Mixfile do {:ex_json_schema, "~> 0.9.1"}, {:ueberauth, "~> 0.7"}, {:ueberauth_auth0, "~> 2.0"}, - {:guardian, "~> 2.2"}, {:bureaucrat, "~> 0.2.9", only: :test}, - {:poison, "~> 4.0.0"}, - {:guardian_db, "~> 2.0"} + {:poison, "~> 4.0.0"} ] end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs index 27fa7f30dead..e315a74b27fa 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs @@ -1,7 +1,6 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do use BlockScoutWeb.ConnCase - alias BlockScoutWeb.Guardian alias BlockScoutWeb.Models.UserFromAuth setup %{conn: conn} do diff --git a/apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs b/apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs deleted file mode 100644 index fc058ff73bd8..000000000000 --- a/apps/explorer/priv/account/migrations/20220729075714_guardiandb.exs +++ /dev/null @@ -1,17 +0,0 @@ -defmodule Explorer.Repo.Account.Migrations.CreateGuardianDBTokensTable do - use Ecto.Migration - - def change do - create table(:guardian_tokens, primary_key: false) do - add(:jti, :string, primary_key: true) - add(:aud, :string, primary_key: true) - add(:typ, :string) - add(:iss, :string) - add(:sub, :string) - add(:exp, :bigint) - add(:jwt, :text) - add(:claims, :map) - timestamps() - end - end -end diff --git a/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs b/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs new file mode 100644 index 000000000000..5443f3d6515c --- /dev/null +++ b/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs @@ -0,0 +1,7 @@ +defmodule Explorer.Repo.Account.Migrations.RemoveGuardianTokens do + use Ecto.Migration + + def change do + drop_if_exists table("guardian_tokens") + end +end diff --git a/config/runtime.exs b/config/runtime.exs index e439b0a5f091..a8baa641af64 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -46,8 +46,6 @@ config :ueberauth, Ueberauth, logout_url: System.get_env("AUTH0_LOGOUT_URL"), logout_return_to_url: System.get_env("AUTH0_LOGOUT_RETURN_URL") -config :block_scout_web, BlockScoutWeb.Guardian, secret_key: System.get_env("SECRET_KEY_GUARDIAN") - config :block_scout_web, version: System.get_env("BLOCKSCOUT_VERSION"), release_link: System.get_env("RELEASE_LINK"), diff --git a/docker/Makefile b/docker/Makefile index aee1bb37c176..0e30637b17aa 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -385,9 +385,6 @@ endif ifdef PUBLIC_TAGS_AIRTABLE_API_KEY BLOCKSCOUT_CONTAINER_PARAMS += -e 'PUBLIC_TAGS_AIRTABLE_API_KEY=$(PUBLIC_TAGS_AIRTABLE_API_KEY)' endif -ifdef SECRET_KEY_GUARDIAN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SECRET_KEY_GUARDIAN=$(SECRET_KEY_GUARDIAN)' -endif ifdef API_RATE_LIMIT BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT=$(API_RATE_LIMIT)' endif diff --git a/mix.lock b/mix.lock index e2b158158d29..6dcd12035d02 100644 --- a/mix.lock +++ b/mix.lock @@ -63,8 +63,6 @@ "flow": {:hex, :flow, "1.2.0", "515e03aa3d056cecc3e3f1e80f6ca4bbf5f45b13c88dee5db880b2f3f24f1caa", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "1b45bfc8a9202c5ec80b077c21df133561e56c56189ba4082dddccb6b5762525"}, "gen_stage": {:hex, :gen_stage, "1.1.2", "b1656cd4ba431ed02c5656fe10cb5423820847113a07218da68eae5d6a260c23", [:mix], [], "hexpm", "9e39af23140f704e2b07a3e29d8f05fd21c2aaf4088ff43cb82be4b9e3148d02"}, "gettext": {:hex, :gettext, "0.20.0", "75ad71de05f2ef56991dbae224d35c68b098dd0e26918def5bb45591d5c8d429", [:mix], [], "hexpm", "1c03b177435e93a47441d7f681a7040bd2a816ece9e2666d1c9001035121eb3d"}, - "guardian": {:hex, :guardian, "2.2.4", "3dafdc19665411c96b2796d184064d691bc08813a132da5119e39302a252b755", [:mix], [{:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "6f83d4309c16ec2469da8606bb2a9815512cc2fac1595ad34b79940a224eb110"}, - "guardian_db": {:hex, :guardian_db, "2.1.0", "ec95a9d99cdd1e550555d09a7bb4a340d8887aad0697f594590c2fd74be02426", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.1", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:guardian, "~> 1.0 or ~> 2.0", [hex: :guardian, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "f8e7d543ac92c395f3a7fd5acbe6829faeade57d688f7562e2f0fca8f94a0d70"}, "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, "hammer": {:hex, :hammer, "6.1.0", "f263e3c3e9946bd410ea0336b2abe0cb6260af4afb3a221e1027540706e76c55", [:make, :mix], [{:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}], "hexpm", "b47e415a562a6d072392deabcd58090d8a41182cf9044cdd6b0d0faaaf68ba57"}, "html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"}, From 83990b0f62e28434aacdcc1978422b9ab2b68b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Sep 2022 23:11:56 +0300 Subject: [PATCH 368/723] Clean up tests code --- .../account/api/v1/user_controller_test.exs | 43 ++++++------------- .../20220905195203_remove_guardian_tokens.exs | 2 +- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs index e315a74b27fa..2ce2a92d627a 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs @@ -797,15 +797,9 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") |> json_response(200) - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) == + |> Enum.map(&convert_date/1) == [post_public_tasg_request_response] - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) + |> Enum.map(&convert_date/1) end test "get and delete several public tags requests", %{conn: conn} do @@ -832,8 +826,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert response["is_owner"] == request["is_owner"] assert response["id"] - {:ok, time, _} = DateTime.from_iso8601(response["submission_date"]) - %{response | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + convert_date(response) end) |> Enum.reverse() @@ -841,10 +834,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do |> get("/api/account/v1/user/public_tags") |> doc(description: "Get list of requests to add a public tag") |> json_response(200) - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) == final_list + |> Enum.map(&convert_date/1) == final_list %{"id" => id} = Enum.at(final_list, 0) @@ -888,15 +878,9 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") |> json_response(200) - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) == + |> Enum.map(&convert_date/1) == [post_public_tasg_request_response] - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) + |> Enum.map(&convert_date/1) new_public_tags_request = build(:public_tags_request) @@ -922,15 +906,14 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do assert conn |> get("/api/account/v1/user/public_tags") |> json_response(200) - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) == + |> Enum.map(&convert_date/1) == [put_public_tasg_request_response] - |> Enum.map(fn request -> - {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) - %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} - end) + |> Enum.map(&convert_date/1) end end + + def convert_date(request) do + {:ok, time, _} = DateTime.from_iso8601(request["submission_date"]) + %{request | "submission_date" => Calendar.strftime(time, "%b %d, %Y")} + end end diff --git a/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs b/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs index 5443f3d6515c..2c76df8099c0 100644 --- a/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs +++ b/apps/explorer/priv/account/migrations/20220905195203_remove_guardian_tokens.exs @@ -2,6 +2,6 @@ defmodule Explorer.Repo.Account.Migrations.RemoveGuardianTokens do use Ecto.Migration def change do - drop_if_exists table("guardian_tokens") + drop_if_exists(table("guardian_tokens")) end end From ba2754e4d6c62f1d37dea8e2ce1d23c4a9d4ed6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 6 Sep 2022 10:05:49 +0300 Subject: [PATCH 369/723] Fix key :id not found error --- .../account/api/v1/fallback_controller.ex | 7 + .../account/api/v1/user_controller.ex | 127 +++++++----------- .../controllers/account/auth_controller.ex | 8 -- 3 files changed, 58 insertions(+), 84 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/fallback_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/fallback_controller.ex index 42492e70ed46..56c3e4422916 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/fallback_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/fallback_controller.ex @@ -73,4 +73,11 @@ defmodule BlockScoutWeb.Account.Api.V1.FallbackController do |> put_view(UserView) |> render(:message, %{message: "Error"}) end + + def call(conn, {:auth, _}) do + conn + |> put_status(:unauthorized) + |> put_view(UserView) + |> render(:message, %{message: "Unauthorized"}) + end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index a6bd6baa60e5..e94248695eb1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -1,7 +1,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do use BlockScoutWeb, :controller - import BlockScoutWeb.Account.AuthController, only: [api_authenticate!: 1] + import BlockScoutWeb.Account.AuthController, only: [current_user: 1] import Ecto.Query, only: [from: 2] alias BlockScoutWeb.Models.UserFromAuth @@ -16,9 +16,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do @ok_message "OK" def info(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)} do + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)} do conn |> put_status(200) |> render(:user_info, %{identity: identity}) @@ -26,9 +25,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def watchlist(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, watchlist_with_addresses <- preload_watchlist_address_fetched_coin_balance(watchlist) do @@ -42,9 +40,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_watchlist(conn, %{"id" => watchlist_address_id}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {count, _} <- WatchlistAddress.delete(watchlist_address_id, watchlist.id), @@ -81,8 +78,6 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "email" => notify_email } }) do - uid = api_authenticate!(conn).id - watchlist_params = %{ name: name, watch_coin_input: watch_coin_input, @@ -97,7 +92,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do address_hash: address_hash } - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- @@ -139,8 +135,6 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "email" => notify_email } }) do - uid = api_authenticate!(conn).id - watchlist_params = %{ id: watchlist_address_id, name: name, @@ -156,7 +150,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do address_hash: address_hash } - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- @@ -172,9 +167,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def tags_address(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, address_tags <- TagAddress.get_tags_address_by_identity_id(identity.id) do conn |> put_status(200) @@ -183,9 +177,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_tag_address(conn, %{"id" => tag_id}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- TagAddress.delete(tag_id, identity.id), {:tag_delete, true} <- {:tag_delete, count > 0} do conn @@ -195,9 +188,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_tag_address(conn, %{"address_hash" => address_hash, "name" => name}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, address_tag} <- TagAddress.create(%{ name: name, @@ -211,9 +203,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_tag_address(conn, %{"id" => tag_id} = attrs) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, address_tag} <- TagAddress.update( reject_nil_map_values(%{ @@ -230,9 +221,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def tags_transaction(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, transaction_tags <- TagTransaction.get_tags_transaction_by_identity_id(identity.id) do conn |> put_status(200) @@ -241,9 +231,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_tag_transaction(conn, %{"id" => tag_id}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- TagTransaction.delete(tag_id, identity.id), {:tag_delete, true} <- {:tag_delete, count > 0} do conn @@ -253,9 +242,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_tag_transaction(conn, %{"transaction_hash" => tx_hash, "name" => name}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, transaction_tag} <- TagTransaction.create(%{ name: name, @@ -269,9 +257,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_tag_transaction(conn, %{"id" => tag_id} = attrs) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, transaction_tag} <- TagTransaction.update( reject_nil_map_values(%{ @@ -288,9 +275,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def api_keys(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, api_keys <- ApiKey.get_api_keys_by_identity_id(identity.id) do conn |> put_status(200) @@ -299,9 +285,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_api_key(conn, %{"api_key" => api_key_uuid}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- ApiKey.delete(api_key_uuid, identity.id), {:api_key_delete, true} <- {:api_key_delete, count > 0} do conn @@ -311,9 +296,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_api_key(conn, %{"name" => api_key_name}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, api_key} <- ApiKey.create(%{name: api_key_name, identity_id: identity.id}) do conn @@ -323,9 +307,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def update_api_key(conn, %{"name" => api_key_name, "api_key" => api_key_value}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, api_key} <- ApiKey.update(%{value: api_key_value, name: api_key_name, identity_id: identity.id}) do conn @@ -335,9 +318,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def custom_abis(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, custom_abis <- CustomABI.get_custom_abis_by_identity_id(identity.id) do conn |> put_status(200) @@ -346,9 +328,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_custom_abi(conn, %{"id" => id}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {count, _} <- CustomABI.delete(id, identity.id), {:custom_abi_delete, true} <- {:custom_abi_delete, count > 0} do conn @@ -358,9 +339,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_custom_abi(conn, %{"contract_address_hash" => contract_address_hash, "name" => name, "abi" => abi}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, custom_abi} <- CustomABI.create(%{ name: name, @@ -380,9 +360,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "id" => id } = params ) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, custom_abi} <- CustomABI.update( reject_nil_map_values(%{ @@ -400,9 +379,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def public_tags_requests(conn, _params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, public_tags_requests <- PublicTagsRequest.get_public_tags_requests_by_identity_id(identity.id) do conn |> put_status(200) @@ -411,9 +389,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def delete_public_tags_request(conn, %{"id" => id, "remove_reason" => remove_reason}) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:public_tag_delete, true} <- {:public_tag_delete, PublicTagsRequest.mark_as_deleted_public_tags_request(%{ @@ -428,9 +405,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end def create_public_tags_request(conn, params) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, public_tags_request} <- PublicTagsRequest.create(%{ full_name: params["full_name"], @@ -455,9 +431,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do "id" => id } = params ) do - uid = api_authenticate!(conn).id - - with {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, + with {:auth, %{id: uid}} <- {:auth, current_user(conn)}, + {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:ok, public_tags_request} <- PublicTagsRequest.update( reject_nil_map_values(%{ diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 1a9eab3f60f0..108ede6f6f6d 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -45,14 +45,6 @@ defmodule BlockScoutWeb.Account.AuthController do current_user(conn) || redirect(conn, to: root()) end - def api_authenticate!(conn) do - current_user(conn) || - conn - |> put_resp_content_type("application/json") - |> send_resp(401, Jason.encode!(%{message: "Unauthorized"})) - |> halt() - end - def current_user(%{private: %{plug_session: %{"current_user" => _}}} = conn), do: get_session(conn, :current_user) From 253bbcde173b1bef6a40bb0d2739435e66eaac3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 6 Sep 2022 19:11:11 +0300 Subject: [PATCH 370/723] Add get_csrf method; Fix some errors --- apps/block_scout_web/lib/block_scout_web/api_router.ex | 2 ++ .../controllers/account/api/v1/user_controller.ex | 9 +++++++++ .../controllers/account/auth_controller.ex | 8 ++++++++ .../block_scout_web/views/account/api/v1/user_view.ex | 4 ++++ .../lib/block_scout_web/views/error_view.ex | 8 ++++++++ 5 files changed, 31 insertions(+) diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index 8fea1a1db04a..0471b66f9b9d 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -29,6 +29,8 @@ defmodule BlockScoutWeb.ApiRouter do pipe_through(:api) pipe_through(:account_api) + get("/get_csrf", UserController, :get_csrf) + scope "/user" do get("/info", UserController, :info) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index e94248695eb1..7ca5514a3625 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -10,6 +10,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do alias Explorer.Account.{Identity, PublicTagsRequest, TagAddress, TagTransaction, WatchlistAddress} alias Explorer.ExchangeRates.Token alias Explorer.{Market, Repo} + alias Plug.CSRFProtection action_fallback(BlockScoutWeb.Account.Api.V1.FallbackController) @@ -454,6 +455,14 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do end end + def get_csrf(conn, _) do + with {:auth, %{id: _}} <- {:auth, current_user(conn)} do + conn + |> put_status(200) + |> render(:csrf, %{csrf: CSRFProtection.get_csrf_token()}) + end + end + defp reject_nil_map_values(map) when is_map(map) do Map.reject(map, fn {_k, v} -> is_nil(v) end) end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 108ede6f6f6d..73a78d9194eb 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -5,6 +5,10 @@ defmodule BlockScoutWeb.Account.AuthController do plug(Ueberauth) + def request(conn, _) do + not_found(conn) + end + def logout(conn, _params) do conn |> configure_session(drop: true) @@ -40,6 +44,10 @@ defmodule BlockScoutWeb.Account.AuthController do end end + def callback(conn, _) do + not_found(conn) + end + # for importing in other controllers def authenticate!(conn) do current_user(conn) || redirect(conn, to: root()) diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex index 91299034a1cb..171c647b8340 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex @@ -6,6 +6,10 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do AccountView.render("message.json", assigns) end + def render("csrf.json", %{csrf: csrf}) do + %{"token" => csrf} + end + def render("user_info.json", %{identity: identity}) do %{"name" => identity.name, "email" => identity.email, "avatar" => identity.avatar, "nickname" => identity.nickname} end diff --git a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex index a73af1a7de09..090159d94684 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex @@ -10,6 +10,14 @@ defmodule BlockScoutWeb.ErrorView do "Bad request" end + def render("401." <> _type, _assigns) do + "Unauthorized" + end + + def render("403." <> _type, _assigns) do + "Forbidden" + end + def render("422." <> _type, _assigns) do "Unprocessable entity" end From 053c0e94d532174e2dbcb4ced3c9186ba5e96c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 7 Sep 2022 22:01:35 +0300 Subject: [PATCH 371/723] Put csrf token into header --- .../controllers/account/api/v1/user_controller.ex | 3 ++- .../lib/block_scout_web/views/account/api/v1/user_view.ex | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index 7ca5514a3625..22ab4e2696ff 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -458,8 +458,9 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do def get_csrf(conn, _) do with {:auth, %{id: _}} <- {:auth, current_user(conn)} do conn + |> put_resp_header("x-bs-account-csrf", CSRFProtection.get_csrf_token()) |> put_status(200) - |> render(:csrf, %{csrf: CSRFProtection.get_csrf_token()}) + |> render(:message, %{message: "ok"}) end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex index 171c647b8340..91299034a1cb 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex @@ -6,10 +6,6 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do AccountView.render("message.json", assigns) end - def render("csrf.json", %{csrf: csrf}) do - %{"token" => csrf} - end - def render("user_info.json", %{identity: identity}) do %{"name" => identity.name, "email" => identity.email, "avatar" => identity.avatar, "nickname" => identity.nickname} end From a547a43b20b4ca85cc29c199bda53bbabf98f6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Thu, 8 Sep 2022 11:49:25 +0300 Subject: [PATCH 372/723] Remove api_logout path --- apps/block_scout_web/lib/block_scout_web/web_router.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 9fe6b1542efc..83923a2e9ba0 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -25,7 +25,6 @@ defmodule BlockScoutWeb.WebRouter do get("/logout", Account.AuthController, :logout) get("/:provider", Account.AuthController, :request) get("/:provider/callback", Account.AuthController, :callback) - get("/api/logout", Account.AuthController, :api_logout) end scope "/account", BlockScoutWeb do From 911b601d24e248584403a8b5f5d4acd04a8ea0e6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 8 Sep 2022 13:06:09 +0300 Subject: [PATCH 373/723] Update config.yml --- .github/workflows/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 61e226ebb3ea..1b723f98b1b7 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -4,7 +4,6 @@ on: push: branches: - account - - np-account-api-improvements env: MIX_ENV: test From ddc898b3591d4e17093ebd6e14555c1144db5d3b Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 14:15:18 +0300 Subject: [PATCH 374/723] Rename account env vars --- .github/workflows/config.yml | 6 +- apps/explorer/lib/explorer/vault.ex | 4 +- config/runtime.exs | 20 +++---- config/runtime/dev.exs | 12 ++-- config/runtime/prod.exs | 4 +- docker-compose/envs/common-blockscout.env | 16 ++++- docker/Makefile | 72 +++++++++++------------ 7 files changed, 73 insertions(+), 61 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 1b723f98b1b7..7e5d17bcdbdf 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -9,9 +9,9 @@ env: MIX_ENV: test OTP_VERSION: '24.3.4.1' ELIXIR_VERSION: '1.13.4' - AUTH0_DOMAIN: 'blockscoutcom.us.auth0.com' - AUTH0_LOGOUT_URL: 'https://blockscoutcom.us.auth0.com/v2/logout' - AUTH0_LOGOUT_RETURN_URL: 'https://blockscout.com/auth/logout' + ACCOUNT_AUTH0_DOMAIN: 'blockscoutcom.us.auth0.com' + ACCOUNT_AUTH0_LOGOUT_URL: 'https://blockscoutcom.us.auth0.com/v2/logout' + ACCOUNT_AUTH0_LOGOUT_RETURN_URL: 'https://blockscout.com/auth/logout' jobs: build-and-cache: diff --git a/apps/explorer/lib/explorer/vault.ex b/apps/explorer/lib/explorer/vault.ex index 76565c7ef060..cd8940157d35 100644 --- a/apps/explorer/lib/explorer/vault.ex +++ b/apps/explorer/lib/explorer/vault.ex @@ -7,7 +7,9 @@ defmodule Explorer.Vault do @impl GenServer def init(config) do config = - Keyword.put(config, :ciphers, default: {Cloak.Ciphers.AES.GCM, tag: "AES.GCM.V1", key: decode_env!("CLOAK_KEY")}) + Keyword.put(config, :ciphers, + default: {Cloak.Ciphers.AES.GCM, tag: "AES.GCM.V1", key: decode_env!("ACCOUNT_CLOAK_KEY")} + ) {:ok, config} end diff --git a/config/runtime.exs b/config/runtime.exs index a8baa641af64..143fe93b392d 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -37,14 +37,14 @@ config :block_scout_web, :footer, # Configures Ueberauth's Auth0 auth provider config :ueberauth, Ueberauth.Strategy.Auth0.OAuth, - domain: System.get_env("AUTH0_DOMAIN"), - client_id: System.get_env("AUTH0_CLIENT_ID"), - client_secret: System.get_env("AUTH0_CLIENT_SECRET") + domain: System.get_env("ACCOUNT_AUTH0_DOMAIN"), + client_id: System.get_env("ACCOUNT_AUTH0_CLIENT_ID"), + client_secret: System.get_env("ACCOUNT_AUTH0_CLIENT_SECRET") # Configures Ueberauth local settings config :ueberauth, Ueberauth, - logout_url: System.get_env("AUTH0_LOGOUT_URL"), - logout_return_to_url: System.get_env("AUTH0_LOGOUT_RETURN_URL") + logout_url: System.get_env("ACCOUNT_AUTH0_LOGOUT_URL"), + logout_return_to_url: System.get_env("ACCOUNT_AUTH0_LOGOUT_RETURN_URL") config :block_scout_web, version: System.get_env("BLOCKSCOUT_VERSION"), @@ -320,17 +320,17 @@ config :explorer, Explorer.SmartContract.RustVerifierInterface, enabled: System.get_env("ENABLE_RUST_VERIFICATION_SERVICE") == "true" config :explorer, Explorer.ThirdPartyIntegrations.AirTable, - table_url: System.get_env("PUBLIC_TAGS_AIRTABLE_URL"), - api_key: System.get_env("PUBLIC_TAGS_AIRTABLE_API_KEY") + table_url: System.get_env("ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL"), + api_key: System.get_env("ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY") config :explorer, Explorer.Mailer, adapter: Bamboo.SendGridAdapter, - api_key: System.get_env("SENDGRID_API_KEY") + api_key: System.get_env("ACCOUNT_SENDGRID_API_KEY") config :explorer, Explorer.Account, sendgrid: [ - sender: System.get_env("SENDGRID_SENDER"), - template: System.get_env("SENDGRID_TEMPLATE") + sender: System.get_env("ACCOUNT_SENDGRID_SENDER"), + template: System.get_env("ACCOUNT_SENDGRID_TEMPLATE") ] ############### diff --git a/config/runtime/dev.exs b/config/runtime/dev.exs index 3c69ee9c1a03..a4d0d5b6a782 100644 --- a/config/runtime/dev.exs +++ b/config/runtime/dev.exs @@ -74,15 +74,15 @@ config :explorer, Explorer.Repo.Replica1, url: database_api_url, pool_size: pool_size_api -database_account_url = System.get_env("DATABASE_ACCOUNT_URL") || System.get_env("DATABASE_URL") +database_account_url = System.get_env("ACCOUNT_DATABASE_URL") || System.get_env("DATABASE_URL") pool_size_account = - if System.get_env("DATABASE_ACCOUNT_URL"), - do: String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "10")), - else: String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "10")) + if System.get_env("ACCOUNT_DATABASE_URL"), + do: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")), + else: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) -database_account = if System.get_env("DATABASE_ACCOUNT_URL"), do: nil, else: database -hostname_account = if System.get_env("DATABASE_ACCOUNT_URL"), do: nil, else: hostname +database_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: database +hostname_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: hostname # Configure Account database config :explorer, Explorer.Repo.Account, diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 43f07fde4264..2b15151aab2c 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -49,8 +49,8 @@ config :explorer, Explorer.Repo.Replica1, pool_size: pool_size_api, ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true") -database_account_url = System.get_env("DATABASE_ACCOUNT_URL") -pool_size_account = String.to_integer(System.get_env("POOL_SIZE_ACCOUNT", "50")) +database_account_url = System.get_env("ACCOUNT_DATABASE_URL") +pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "50")) # Configures Account database config :explorer, Explorer.Repo.Account, diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index e9d79c47b398..4a1fdaa820a2 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -125,6 +125,16 @@ FETCH_REWARDS_WAY=trace_block ENABLE_RUST_VERIFICATION_SERVICE=true RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ # DATABASE_READ_ONLY_API_URL= -# DATABASE_ACCOUNT_URL= -# POOL_SIZE_ACCOUNT= -CLOAK_KEY= +# ACCOUNT_DATABASE_URL= +# ACCOUNT_POOL_SIZE= +# ACCOUNT_AUTH0_DOMAIN= +# ACCOUNT_AUTH0_CLIENT_ID= +# ACCOUNT_AUTH0_CLIENT_SECRET= +# ACCOUNT_AUTH0_LOGOUT_URL= +# ACCOUNT_AUTH0_LOGOUT_RETURN_URL= +# ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL= +# ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY= +# ACCOUNT_SENDGRID_API_KEY= +# ACCOUNT_SENDGRID_SENDER= +# ACCOUNT_SENDGRID_TEMPLATE= +ACCOUNT_CLOAK_KEY= diff --git a/docker/Makefile b/docker/Makefile index 0e30637b17aa..5678caa01fcb 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -355,36 +355,6 @@ endif ifdef CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD=$(CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD)' endif -ifdef AUTH0_DOMAIN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_DOMAIN=$(AUTH0_DOMAIN)' -endif -ifdef AUTH0_CLIENT_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_CLIENT_ID=$(AUTH0_CLIENT_ID)' -endif -ifdef AUTH0_CLIENT_SECRET - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_CLIENT_SECRET=$(AUTH0_CLIENT_SECRET)' -endif -ifdef AUTH0_LOGOUT_RETURN_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_LOGOUT_RETURN_URL=$(AUTH0_LOGOUT_RETURN_URL)' -endif -ifdef AUTH0_LOGOUT_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AUTH0_LOGOUT_URL=$(AUTH0_LOGOUT_URL)' -endif -ifdef SENDGRID_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_API_KEY=$(SENDGRID_API_KEY)' -endif -ifdef SENDGRID_SENDER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_SENDER=$(SENDGRID_SENDER)' -endif -ifdef SENDGRID_TEMPLATE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SENDGRID_TEMPLATE=$(SENDGRID_TEMPLATE)' -endif -ifdef PUBLIC_TAGS_AIRTABLE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'PUBLIC_TAGS_AIRTABLE_URL=$(PUBLIC_TAGS_AIRTABLE_URL)' -endif -ifdef PUBLIC_TAGS_AIRTABLE_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'PUBLIC_TAGS_AIRTABLE_API_KEY=$(PUBLIC_TAGS_AIRTABLE_API_KEY)' -endif ifdef API_RATE_LIMIT BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT=$(API_RATE_LIMIT)' endif @@ -499,14 +469,44 @@ endif ifdef RUST_VERIFICATION_SERVICE_URL BLOCKSCOUT_CONTAINER_PARAMS += -e 'RUST_VERIFICATION_SERVICE_URL=$(RUST_VERIFICATION_SERVICE_URL)' endif -ifdef DATABASE_ACCOUNT_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATABASE_ACCOUNT_URL=$(DATABASE_ACCOUNT_URL)' +ifdef ACCOUNT_AUTH0_DOMAIN + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_DOMAIN=$(ACCOUNT_AUTH0_DOMAIN)' +endif +ifdef ACCOUNT_AUTH0_CLIENT_ID + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_ID=$(ACCOUNT_AUTH0_CLIENT_ID)' +endif +ifdef ACCOUNT_AUTH0_CLIENT_SECRET + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_SECRET=$(ACCOUNT_AUTH0_CLIENT_SECRET)' +endif +ifdef ACCOUNT_AUTH0_LOGOUT_RETURN_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_LOGOUT_RETURN_URL=$(ACCOUNT_AUTH0_LOGOUT_RETURN_URL)' +endif +ifdef ACCOUNT_AUTH0_LOGOUT_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_LOGOUT_URL=$(ACCOUNT_AUTH0_LOGOUT_URL)' +endif +ifdef ACCOUNT_SENDGRID_API_KEY + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_API_KEY=$(ACCOUNT_SENDGRID_API_KEY)' +endif +ifdef ACCOUNT_SENDGRID_SENDER + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_SENDER=$(ACCOUNT_SENDGRID_SENDER)' +endif +ifdef ACCOUNT_SENDGRID_TEMPLATE + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_TEMPLATE=$(ACCOUNT_SENDGRID_TEMPLATE)' +endif +ifdef ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL)' +endif +ifdef ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY)' +endif +ifdef ACCOUNT_DATABASE_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_DATABASE_URL=$(ACCOUNT_DATABASE_URL)' endif -ifdef POOL_SIZE_ACCOUNT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_ACCOUNT=$(POOL_SIZE_ACCOUNT)' +ifdef ACCOUNT_POOL_SIZE + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_POOL_SIZE=$(ACCOUNT_POOL_SIZE)' endif -ifdef CLOAK_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CLOAK_KEY=$(CLOAK_KEY)' +ifdef ACCOUNT_CLOAK_KEY + BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)' endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") From ff51149eaba6c31555976a06c6f9be379d397fdc Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 14:15:18 +0300 Subject: [PATCH 375/723] Rename account env vars --- docker/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index 5678caa01fcb..9a890bc1bc93 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -507,7 +507,6 @@ ifdef ACCOUNT_POOL_SIZE endif ifdef ACCOUNT_CLOAK_KEY BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)' -endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From 428aac015298b79d16c8c63a502203bd2f5239c3 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 6 Sep 2022 21:56:59 +0300 Subject: [PATCH 376/723] Ability to disable account by default and enable it with ACCOUNT_ENABLED env variable --- .../lib/block_scout_web/api_router.ex | 2 ++ .../controllers/account/auth_controller.ex | 10 ++++-- .../block_scout_web/plug/check_account_api.ex | 21 ++++++++++++ .../block_scout_web/plug/check_account_web.ex | 31 +++++++++++++++++ .../layout/_account_menu_item.html.eex | 33 +++++++++++++++++++ .../templates/layout/_topnav.html.eex | 32 +----------------- .../lib/block_scout_web/views/layout_view.ex | 14 +++++--- .../lib/block_scout_web/web_router.ex | 16 +++++++-- apps/block_scout_web/priv/gettext/default.pot | 10 +++--- .../priv/gettext/en/LC_MESSAGES/default.po | 10 +++--- apps/explorer/lib/explorer/account.ex | 9 +++++ apps/explorer/lib/explorer/account/notify.ex | 7 ++-- apps/explorer/lib/explorer/vault.ex | 2 +- config/runtime.exs | 1 + docker/Makefile | 1 + 15 files changed, 146 insertions(+), 53 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/plug/check_account_api.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/plug/check_account_web.ex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex create mode 100644 apps/explorer/lib/explorer/account.ex diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index 0471b66f9b9d..9e1b414f3dce 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -13,6 +13,7 @@ defmodule BlockScoutWeb.ApiRouter do Router for API """ use BlockScoutWeb, :router + alias BlockScoutWeb.Plug.CheckAccountAPI pipeline :api do plug(:accepts, ["json"]) @@ -21,6 +22,7 @@ defmodule BlockScoutWeb.ApiRouter do pipeline :account_api do plug(:fetch_session) plug(:protect_from_forgery) + plug(CheckAccountAPI) end alias BlockScoutWeb.Account.Api.V1.{TagsController, UserController} diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 73a78d9194eb..e4ad0d07d283 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -2,6 +2,7 @@ defmodule BlockScoutWeb.Account.AuthController do use BlockScoutWeb, :controller alias BlockScoutWeb.Models.UserFromAuth + alias Explorer.Account plug(Ueberauth) @@ -53,8 +54,13 @@ defmodule BlockScoutWeb.Account.AuthController do current_user(conn) || redirect(conn, to: root()) end - def current_user(%{private: %{plug_session: %{"current_user" => _}}} = conn), - do: get_session(conn, :current_user) + def current_user(%{private: %{plug_session: %{"current_user" => _}}} = conn) do + if Account.enabled?() do + get_session(conn, :current_user) + else + nil + end + end def current_user(_), do: nil diff --git a/apps/block_scout_web/lib/block_scout_web/plug/check_account_api.ex b/apps/block_scout_web/lib/block_scout_web/plug/check_account_api.ex new file mode 100644 index 000000000000..80c5301bce15 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/plug/check_account_api.ex @@ -0,0 +1,21 @@ +defmodule BlockScoutWeb.Plug.CheckAccountAPI do + @moduledoc """ + Checks if the Account functionality enabled for API level. + """ + import Plug.Conn + + alias Explorer.Account + + def init(opts), do: opts + + def call(conn, _opts) do + if Account.enabled?() do + conn + else + conn + |> put_resp_content_type("application/json") + |> send_resp(404, Jason.encode!(%{message: "Account functionality is disabled"})) + |> halt() + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/plug/check_account_web.ex b/apps/block_scout_web/lib/block_scout_web/plug/check_account_web.ex new file mode 100644 index 000000000000..00a3af4e002e --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/plug/check_account_web.ex @@ -0,0 +1,31 @@ +defmodule BlockScoutWeb.Plug.CheckAccountWeb do + @moduledoc """ + Checks if the Account functionality enabled for web interface. + """ + import Phoenix.Controller + alias Phoenix.View + import Plug.Conn + + alias Explorer.Account + + def init(opts), do: opts + + def call(conn, _opts) do + if Account.enabled?() do + conn + else + inner_view = + View.render( + BlockScoutWeb.PageNotFoundView, + "index.html", + token: nil + ) + + conn + |> put_status(404) + |> put_view(BlockScoutWeb.LayoutView) + |> render(:app, inner_content: inner_view) + |> halt() + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex new file mode 100644 index 000000000000..e8f8e58f6203 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex @@ -0,0 +1,33 @@ +<%= if Explorer.Account.enabled?() do %> + <%= if @current_user do %> + + <% else %> +
  • + + + <%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> + + Sign in + +
  • + <% end %> +<% end %> \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index c4bdd88d32d2..8347d71e3c56 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -172,37 +172,7 @@ - <%= if @current_user do %> - - <% else %> -
  • - - - <%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> - - Sign in - -
  • - <% end %> + <%= render BlockScoutWeb.LayoutView, "_account_menu_item.html", conn: @conn, current_user: @current_user %> <%= render BlockScoutWeb.LayoutView, "_search.html", conn: @conn, id: "main-search-autocomplete", additional_classes: ["mobile-search-hide"] %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex index 97368e880bf9..f60152575b36 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/layout_view.ex @@ -266,11 +266,15 @@ defmodule BlockScoutWeb.LayoutView do return_to = Application.get_env(:ueberauth, Ueberauth)[:logout_return_to_url] logout_url = Application.get_env(:ueberauth, Ueberauth)[:logout_url] - params = [ - client_id: client_id, - returnTo: return_to - ] + if client_id && return_to && logout_url do + params = [ + client_id: client_id, + returnTo: return_to + ] - [logout_url, "?", URI.encode_query(params)] + [logout_url, "?", URI.encode_query(params)] + else + [] + end end end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 83923a2e9ba0..4350a4fc6f6f 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -5,6 +5,8 @@ defmodule BlockScoutWeb.WebRouter do use BlockScoutWeb, :router require Ueberauth + alias BlockScoutWeb.Plug.CheckAccountWeb + pipeline :browser do plug(:accepts, ["html"]) plug(:fetch_session) @@ -14,12 +16,22 @@ defmodule BlockScoutWeb.WebRouter do plug(BlockScoutWeb.ChecksumAddress) end + pipeline :account do + plug(:accepts, ["html"]) + plug(:fetch_session) + plug(:fetch_flash) + plug(CheckAccountWeb) + plug(:protect_from_forgery) + plug(BlockScoutWeb.CSPHeader) + plug(BlockScoutWeb.ChecksumAddress) + end + if Mix.env() == :dev do forward("/sent_emails", Bamboo.SentEmailViewerPlug) end scope "/auth", BlockScoutWeb do - pipe_through(:browser) + pipe_through(:account) get("/profile", Account.AuthController, :profile) get("/logout", Account.AuthController, :logout) @@ -28,7 +40,7 @@ defmodule BlockScoutWeb.WebRouter do end scope "/account", BlockScoutWeb do - pipe_through(:browser) + pipe_through(:account) resources("/tag_address", Account.TagAddressController, only: [:index, :new, :create, :delete], diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 68786489150e..6eb232be8edc 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -804,7 +804,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:19 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 #: lib/block_scout_web/templates/account/custom_abi/index.html.eex:7 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:182 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:18 #, elixir-autogen, elixir-format msgid "Custom ABI" msgstr "" @@ -1828,12 +1828,12 @@ msgid "Priority Fees" msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:4 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:177 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:13 #, elixir-autogen, elixir-format msgid "Profile" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:183 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:19 #, elixir-autogen, elixir-format msgid "Public Tags" msgstr "" @@ -2048,7 +2048,7 @@ msgstr "" msgid "Shows total assets held in the address" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:184 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:20 #, elixir-autogen, elixir-format msgid "Sign out" msgstr "" @@ -2905,7 +2905,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:7 #: lib/block_scout_web/templates/account/watchlist/show.html.eex:7 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:178 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:14 #, elixir-autogen, elixir-format msgid "Watch list" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 715fd375aa87..c8756a1219d2 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -804,7 +804,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:19 #: lib/block_scout_web/templates/account/custom_abi/form.html.eex:8 #: lib/block_scout_web/templates/account/custom_abi/index.html.eex:7 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:182 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:18 #, elixir-autogen, elixir-format msgid "Custom ABI" msgstr "" @@ -1828,12 +1828,12 @@ msgid "Priority Fees" msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:4 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:177 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:13 #, elixir-autogen, elixir-format msgid "Profile" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:183 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:19 #, elixir-autogen, elixir-format msgid "Public Tags" msgstr "" @@ -2048,7 +2048,7 @@ msgstr "" msgid "Shows total assets held in the address" msgstr "" -#: lib/block_scout_web/templates/layout/_topnav.html.eex:184 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:20 #, elixir-autogen, elixir-format msgid "Sign out" msgstr "" @@ -2905,7 +2905,7 @@ msgstr "" #: lib/block_scout_web/templates/account/common/_nav.html.eex:7 #: lib/block_scout_web/templates/account/watchlist/show.html.eex:7 -#: lib/block_scout_web/templates/layout/_topnav.html.eex:178 +#: lib/block_scout_web/templates/layout/_account_menu_item.html.eex:14 #, elixir-autogen, elixir-format msgid "Watch list" msgstr "" diff --git a/apps/explorer/lib/explorer/account.ex b/apps/explorer/lib/explorer/account.ex new file mode 100644 index 000000000000..5f2155b1f4f5 --- /dev/null +++ b/apps/explorer/lib/explorer/account.ex @@ -0,0 +1,9 @@ +defmodule Explorer.Account do + @moduledoc """ + Context for Account module. + """ + + def enabled? do + Application.get_env(:explorer, __MODULE__)[:enabled] + end +end diff --git a/apps/explorer/lib/explorer/account/notify.ex b/apps/explorer/lib/explorer/account/notify.ex index 8a9506eb10be..fc1057929465 100644 --- a/apps/explorer/lib/explorer/account/notify.ex +++ b/apps/explorer/lib/explorer/account/notify.ex @@ -3,6 +3,7 @@ defmodule Explorer.Account.Notify do Interface for notifier, for import and call from other modules """ + alias Explorer.Account alias Explorer.Account.Notifier.Notify require Logger @@ -12,8 +13,10 @@ defmodule Explorer.Account.Notify do end defp process(transactions) do - check_envs() - Notify.call(transactions) + if Account.enabled?() do + check_envs() + Notify.call(transactions) + end rescue err -> Logger.info("--- Notifier error", fetcher: :account) diff --git a/apps/explorer/lib/explorer/vault.ex b/apps/explorer/lib/explorer/vault.ex index cd8940157d35..70fc1ed17d7a 100644 --- a/apps/explorer/lib/explorer/vault.ex +++ b/apps/explorer/lib/explorer/vault.ex @@ -17,6 +17,6 @@ defmodule Explorer.Vault do defp decode_env!(var) do env = if Mix.env() == :test, do: "+fh7IElJfA61+vMMw8rW9SBJFHmhVL1DLpKE22qUJgw=", else: System.get_env(var) - Base.decode64!(env) + Base.decode64!(env || "") end end diff --git a/config/runtime.exs b/config/runtime.exs index 143fe93b392d..f661efbe402b 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -328,6 +328,7 @@ config :explorer, Explorer.Mailer, api_key: System.get_env("ACCOUNT_SENDGRID_API_KEY") config :explorer, Explorer.Account, + enabled: System.get_env("ACCOUNT_ENABLED") == "true", sendgrid: [ sender: System.get_env("ACCOUNT_SENDGRID_SENDER"), template: System.get_env("ACCOUNT_SENDGRID_TEMPLATE") diff --git a/docker/Makefile b/docker/Makefile index 9a890bc1bc93..5678caa01fcb 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -507,6 +507,7 @@ ifdef ACCOUNT_POOL_SIZE endif ifdef ACCOUNT_CLOAK_KEY BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)' +endif HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From 4591667ba46bb5dfe51f480849196ee808bb35c2 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Fri, 9 Sep 2022 16:35:34 +0300 Subject: [PATCH 377/723] Handle wrong Cloak key --- .../account/tag_address/row.html.eex | 28 ++++++++------- .../account/tag_transaction/row.html.eex | 34 ++++++++++--------- .../templates/address/_labels.html.eex | 10 +++--- .../templates/transaction/_tile.html.eex | 2 +- .../templates/transaction/overview.html.eex | 2 +- apps/block_scout_web/priv/gettext/default.pot | 8 ++--- .../priv/gettext/en/LC_MESSAGES/default.po | 8 ++--- .../explorer/encrypted/types/address_hash.ex | 1 + .../encrypted/types/transaction_hash.ex | 1 + 9 files changed, 51 insertions(+), 43 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex index 6e3a6cdf6dfa..5fd4445741e7 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/row.html.eex @@ -1,13 +1,15 @@ -
    <%= @address_tag.name %> -
    - <%= link(trimmed_hash(@address_tag.address_hash), to: address_path(@conn, :show, @address_tag.address_hash)) %> - <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", - additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @address_tag.address_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> -
    - <%= link "Remove Tag", to: tag_address_path(@conn, :delete, @address_tag.id), method: :delete %> - -
    <%= @address_tag.name %> +
    + <%= link(trimmed_hash(@address_tag.address_hash), to: address_path(@conn, :show, @address_tag.address_hash)) %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @address_tag.address_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> +
    + <%= link "Remove Tag", to: tag_address_path(@conn, :delete, @address_tag.id), method: :delete %> + +
    <%= @tx_tag.name %> -
    - <%= link(@tx_tag.tx_hash, - to: transaction_path(BlockScoutWeb.Endpoint, :show, @tx_tag.tx_hash), - "data-test": "transaction_hash_link", - class: "text-truncate") %> - <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", - additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @tx_tag.tx_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> -
    -
    - <%= link "Remove Tag", to: tag_transaction_path(@conn, :delete, @tx_tag.id), method: :delete %> -
    <%= @tx_tag.name %> +
    + <%= link(@tx_tag.tx_hash, + to: transaction_path(BlockScoutWeb.Endpoint, :show, @tx_tag.tx_hash), + "data-test": "transaction_hash_link", + class: "text-truncate") %> + <%= render BlockScoutWeb.CommonComponentsView, "_btn_copy.html", + additional_classes: ["btn-copy-icon-small", "btn-copy-icon-custom", "btn-copy-icon-no-borders"], clipboard_text: @tx_tag.tx_hash, aria_label: gettext("Copy Address"), title: gettext("Copy Address"), style: "display: inline-block; vertical-align: text-bottom; position: initial; margin-top: 1px;" %> +
    +
    + <%= link "Remove Tag", to: tag_transaction_path(@conn, :delete, @tx_tag.id), method: :delete %> +

    - <% token_price = if @token_balance.token.usd_value, do: @token_balance.token.usd_value, else: nil %> - <%= ChainView.format_currency_value(token_price, "@") %> + <% token_price = if @token.usd_value, do: @token.usd_value, else: nil %> + <%= ChainView.format_currency_value(token_price, "@") %>

    - <%= if @token_balance.token.usd_value do %> + <%= if @token.usd_value do %>

    - <%= ChainView.format_usd_value(Chain.balance_in_usd(@token_balance)) %> + <%= ChainView.format_usd_value(Chain.balance_in_usd(@token_balance, @token)) %>

    <% end %>
    +
    + <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", + text: gettext("Address used in token mintings and burnings.") %> + <%= gettext("Burn address") %> +
    +
    + <%= render BlockScoutWeb.AddressView, "_link.html", address: @address, contract: BlockScoutWeb.AddressView.contract?(@address), use_custom_tooltip: false %> + +
    + <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", + text: gettext("A block producer who successfully included the block onto the blockchain.") %> + <%= gettext("Miner") %> +
    +
    + <%= render BlockScoutWeb.AddressView, "_link.html", address: @address, contract: false, use_custom_tooltip: false %> + + <%= render BlockScoutWeb.AddressView, "_link.html", address: @address, contract: BlockScoutWeb.AddressView.contract?(@address), use_custom_tooltip: false %> + + <%= display_value(@balance_before, coin_or_transfer) %> + + <%= display_value(@balance_after, coin_or_transfer) %> + + <%= if is_list(@coin_or_token_transfers) and elem(List.first(@coin_or_token_transfers), 1).token.type != "ERC-20" do %> + <%= for {type, transfer} <- @coin_or_token_transfers do %> + <%= case type do %> + <% :from -> %> +
    ▼ <%= display_nft(transfer) %>
    + <% :to -> %> +
    ▲ <%= display_nft(transfer) %>
    + <% end %> + <% end %> + <% else %> + <%= if not_negative?(@balance_diff) do %> + ▲ <%= display_value(@balance_diff, coin_or_transfer) %> + <% else %> + ▼ <%= display_value(absolute_value_of(@balance_diff), coin_or_transfer) %> + <% end %> + <% end %> +
    + + + + + + + + + + + <%= render BlockScoutWeb.CommonComponentsView, "_table-loader.html", columns_num: 5 %> + +
    +
     
    +
    +
    <%= gettext "Address" %>
    +
    +
    <%= gettext "Balance before" %>
    +
    +
    <%= gettext "Balance after" %>
    +
    +
    <%= gettext "Change" %>
    +
    +
    +
    + <% end %> +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_state_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_state_view.ex new file mode 100644 index 000000000000..27b5950c4ce8 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_state_view.ex @@ -0,0 +1,48 @@ +defmodule BlockScoutWeb.TransactionStateView do + use BlockScoutWeb, :view + + alias Explorer.Chain + alias Explorer.Chain.Wei + + import BlockScoutWeb.TransactionStateController, only: [from_loss: 1, to_profit: 1] + + def has_diff?(%Wei{value: val}) do + not Decimal.eq?(val, Decimal.new(0)) + end + + def has_diff?(val) do + not Decimal.eq?(val, Decimal.new(0)) + end + + def not_negative?(%Wei{value: val}) do + not Decimal.negative?(val) + end + + def not_negative?(val) do + not Decimal.negative?(val) + end + + def absolute_value_of(%Wei{value: val}) do + %Wei{value: Decimal.abs(val)} + end + + def absolute_value_of(val) do + Decimal.abs(val) + end + + def has_state_changes?(tx) do + has_diff?(from_loss(tx)) or has_diff?(to_profit(tx)) + end + + def display_value(balance, :coin) do + format_wei_value(balance, :ether) + end + + def display_value(balance, token_transfer) do + render("_token_balance.html", transfer: token_transfer, balance: balance) + end + + def display_nft(token_transfer) do + render(BlockScoutWeb.TransactionView, "_total_transfers.html", transfer: token_transfer) + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex index 72f300bc4c7f..e5e7f9922c11 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex @@ -15,7 +15,7 @@ defmodule BlockScoutWeb.TransactionView do import BlockScoutWeb.AddressView, only: [from_address_hash: 1, short_token_id: 2, tag_name_to_label: 1] import BlockScoutWeb.Tokens.Helpers - @tabs ["token-transfers", "internal-transactions", "logs", "raw-trace"] + @tabs ["token-transfers", "internal-transactions", "logs", "raw-trace", "state"] @token_burning_title "Token Burning" @token_minting_title "Token Minting" @@ -513,6 +513,7 @@ defmodule BlockScoutWeb.TransactionView do defp tab_name(["internal-transactions"]), do: gettext("Internal Transactions") defp tab_name(["logs"]), do: gettext("Logs") defp tab_name(["raw-trace"]), do: gettext("Raw Trace") + defp tab_name(["state"]), do: gettext("State changes") defp get_transaction_type_from_token_transfers(token_transfers) do token_transfers_types = diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 4350a4fc6f6f..30de6760f1bc 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -144,6 +144,11 @@ defmodule BlockScoutWeb.WebRouter do only: [:index], as: :token_transfer ) + + resources("/state", TransactionStateController, + only: [:index], + as: :state + ) end resources("/accounts", AddressController, only: [:index]) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 213db8e5773c..138d1338c33e 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -76,7 +76,7 @@ msgstr "" msgid "(query)" msgstr "" -#: lib/block_scout_web/templates/layout/app.html.eex:224 +#: lib/block_scout_web/templates/layout/app.html.eex:225 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -87,6 +87,7 @@ msgid "64-bit hash of value verifying proof-of-work (note: null for POA chains). msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:97 +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:23 #, elixir-autogen, elixir-format msgid "A block producer who successfully included the block onto the blockchain." msgstr "" @@ -221,6 +222,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:29 #: lib/block_scout_web/views/address_view.ex:107 #, elixir-autogen, elixir-format msgid "Address" @@ -1592,6 +1594,7 @@ msgstr "" #: lib/block_scout_web/templates/block/_tile.html.eex:41 #: lib/block_scout_web/templates/block/overview.html.eex:98 #: lib/block_scout_web/templates/chain/_block.html.eex:16 +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:24 #, elixir-autogen, elixir-format msgid "Miner" msgstr "" @@ -2201,6 +2204,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/index.html.eex:25 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:8 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Something went wrong, click to reload." @@ -3263,6 +3267,48 @@ msgstr "" msgid "Library" msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Address used in token mintings and burnings." +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 +#, elixir-autogen, elixir-format +msgid "Balance after" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 +#, elixir-autogen, elixir-format +msgid "Balance before" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:10 +#, elixir-autogen, elixir-format +msgid "Burn address" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Change" +msgstr "" + +#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 +#: lib/block_scout_web/views/transaction_view.ex:516 +#, elixir-autogen, elixir-format +msgid "State changes" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "The changes from this transaction have not yet happened since the transaction is still pending." +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 +#, elixir-autogen, elixir-format +msgid "This transaction hasn't changed state." +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:120 #, elixir-autogen, elixir-format msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 83ed5290b320..65a65eb903f0 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -76,7 +76,7 @@ msgstr "" msgid "(query)" msgstr "" -#: lib/block_scout_web/templates/layout/app.html.eex:224 +#: lib/block_scout_web/templates/layout/app.html.eex:225 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" @@ -87,6 +87,7 @@ msgid "64-bit hash of value verifying proof-of-work (note: null for POA chains). msgstr "" #: lib/block_scout_web/templates/block/overview.html.eex:97 +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:23 #, elixir-autogen, elixir-format msgid "A block producer who successfully included the block onto the blockchain." msgstr "" @@ -221,6 +222,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:20 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:29 #: lib/block_scout_web/views/address_view.ex:107 #, elixir-autogen, elixir-format msgid "Address" @@ -1592,6 +1594,7 @@ msgstr "" #: lib/block_scout_web/templates/block/_tile.html.eex:41 #: lib/block_scout_web/templates/block/overview.html.eex:98 #: lib/block_scout_web/templates/chain/_block.html.eex:16 +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:24 #, elixir-autogen, elixir-format msgid "Miner" msgstr "" @@ -2201,6 +2204,7 @@ msgstr "" #: lib/block_scout_web/templates/transaction/index.html.eex:25 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:13 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:8 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Something went wrong, click to reload." @@ -3263,6 +3267,48 @@ msgstr "" msgid "Library" msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Address used in token mintings and burnings." +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 +#, elixir-autogen, elixir-format, fuzzy +msgid "Balance after" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 +#, elixir-autogen, elixir-format, fuzzy +msgid "Balance before" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:10 +#, elixir-autogen, elixir-format +msgid "Burn address" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Change" +msgstr "" + +#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 +#: lib/block_scout_web/views/transaction_view.ex:516 +#, elixir-autogen, elixir-format +msgid "State changes" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "The changes from this transaction have not yet happened since the transaction is still pending." +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 +#, elixir-autogen, elixir-format +msgid "This transaction hasn't changed state." +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:120 #, elixir-autogen, elixir-format msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" diff --git a/apps/block_scout_web/test/block_scout_web/controllers/transaction_state_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/transaction_state_controller_test.exs new file mode 100644 index 000000000000..a4adb8f8d1e6 --- /dev/null +++ b/apps/block_scout_web/test/block_scout_web/controllers/transaction_state_controller_test.exs @@ -0,0 +1,187 @@ +defmodule BlockScoutWeb.TransactionStateControllerTest do + use BlockScoutWeb.ConnCase + + import Mox + + import BlockScoutWeb.WebRouter.Helpers, only: [transaction_state_path: 3] + import BlockScoutWeb.WeiHelpers, only: [format_wei_value: 2] + import EthereumJSONRPC, only: [integer_to_quantity: 1] + alias Explorer.Chain.Wei + alias EthereumJSONRPC.Blocks + + describe "GET index/3" do + test "loads existing transaction", %{conn: conn} do + transaction = insert(:transaction) + conn = get(conn, transaction_state_path(conn, :index, transaction.hash)) + + assert html_response(conn, 200) + end + + test "with missing transaction", %{conn: conn} do + hash = transaction_hash() + conn = get(conn, transaction_state_path(BlockScoutWeb.Endpoint, :index, hash)) + + assert html_response(conn, 404) + end + + test "with invalid transaction hash", %{conn: conn} do + conn = get(conn, transaction_state_path(BlockScoutWeb.Endpoint, :index, "nope")) + + assert html_response(conn, 422) + end + + test "with duplicated from, to or miner fields", %{conn: conn} do + address = insert(:address) + + insert(:block) + block = insert(:block, miner: address) + + insert(:fetched_balance, + address_hash: address.hash, + value: 1_000_000, + block_number: block.number - 1 + ) + + transaction = insert(:transaction, from_address: address, to_address: address) |> with_block(block, status: :ok) + + conn = get(conn, transaction_state_path(conn, :index, transaction), %{type: "JSON"}) + {:ok, %{"items" => items}} = conn.resp_body |> Poison.decode() + + assert(items |> Enum.filter(fn item -> item != nil end) |> length() == 1) + end + + test "returns fetched state changes for the transaction with token transfer", %{conn: conn} do + block = insert(:block) + address_a = insert(:address) + address_b = insert(:address) + token = insert(:token, type: "ERC-20") + + insert(:fetched_balance, + address_hash: address_a.hash, + value: 1_000_000_000_000_000_000, + block_number: block.number + ) + + insert(:fetched_balance, + address_hash: address_b.hash, + value: 2_000_000_000_000_000_000, + block_number: block.number + ) + + transaction = + :transaction + |> insert(from_address: address_a, to_address: address_b, value: 1000) + |> with_block(status: :ok) + + insert(:fetched_balance, + address_hash: transaction.block.miner_hash, + value: 2_500_000, + block_number: block.number + ) + + token_transfer = + insert(:token_transfer, + transaction: transaction, + block: transaction.block, + block_number: transaction.block_number, + token: token, + token_contract_address: token.contract_address + ) + + insert( + :token_balance, + address: token_transfer.from_address, + token: token, + token_contract_address_hash: token.contract_address_hash, + value: 3_000_000, + block_number: block.number + ) + + insert( + :token_balance, + address: token_transfer.to_address, + token: token, + token_contract_address_hash: token.contract_address_hash, + value: 1000, + block_number: block.number + ) + + # to check if we can display transaction overview + get(conn, transaction_state_path(conn, :index, transaction)) + conn = get(conn, transaction_state_path(conn, :index, transaction), %{type: "JSON"}) + + {:ok, %{"items" => items}} = conn.resp_body |> Poison.decode() + full_text = Enum.join(items) + + assert(String.contains?(full_text, format_wei_value(%Wei{value: Decimal.new(1, 1, 18)}, :ether))) + + assert(String.contains?(full_text, format_wei_value(%Wei{value: Decimal.new(1, 2, 18)}, :ether))) + + assert(length(items) == 5) + end + + test "fetch coin balances if needed", %{conn: conn} do + EthereumJSONRPC.Mox + |> stub(:json_rpc, fn + [%{id: id, method: "eth_getBalance", params: _}], _options -> + {:ok, [%{id: id, result: integer_to_quantity(123)}]} + + [%{id: id, method: "eth_getBlockByNumber", params: _}], _options -> + {:ok, + [ + %{ + id: 0, + jsonrpc: "2.0", + result: %{ + "author" => "0x0000000000000000000000000000000000000000", + "difficulty" => "0x20000", + "extraData" => "0x", + "gasLimit" => "0x663be0", + "gasUsed" => "0x0", + "hash" => "0x5b28c1bfd3a15230c9a46b399cd0f9a6920d432e85381cc6a140b06e8410112f", + "logsBloom" => + "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner" => "0x0000000000000000000000000000000000000000", + "number" => integer_to_quantity(1), + "parentHash" => "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptsRoot" => "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "sealFields" => [ + "0x80", + "0xb8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "sha3Uncles" => "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "signature" => + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "size" => "0x215", + "stateRoot" => "0xfad4af258fd11939fae0c6c6eec9d340b1caac0b0196fd9a1bc3f489c5bf00b3", + "step" => "0", + "timestamp" => "0x0", + "totalDifficulty" => "0x20000", + "transactions" => [], + "transactionsRoot" => "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncles" => [] + } + } + ]} + end) + + insert(:block) + insert(:block) + address_a = insert(:address) + address_b = insert(:address) + + transaction = + :transaction + |> insert(from_address: address_a, to_address: address_b, value: 1000) + |> with_block(status: :ok) + + conn = get(conn, transaction_state_path(conn, :index, transaction), %{type: "JSON"}) + + {:ok, %{"items" => items}} = conn.resp_body |> Poison.decode() + full_text = Enum.join(items) + + assert(String.contains?(full_text, format_wei_value(%Wei{value: Decimal.new(123)}, :ether))) + assert(length(items) == 3) + end + end +end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 693ac4b37f89..1f82e7d744ef 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4351,6 +4351,8 @@ defmodule Explorer.Chain do defp handle_paging_options(query, nil), do: query + defp handle_paging_options(query, %PagingOptions{key: nil, page_size: nil}), do: query + defp handle_paging_options(query, paging_options) do query |> page_transaction(paging_options) @@ -5141,6 +5143,12 @@ defmodule Explorer.Chain do end end + def get_token_balance(address_hash, token_contract_address_hash, block_number) do + query = TokenBalance.fetch_token_balance(address_hash, token_contract_address_hash, block_number) + + Repo.one(query) + end + def get_coin_balance(address_hash, block_number) do query = CoinBalance.fetch_coin_balance(address_hash, block_number) diff --git a/apps/explorer/lib/explorer/chain/address/token_balance.ex b/apps/explorer/lib/explorer/chain/address/token_balance.ex index 001e9951ef64..1fd2219bfb90 100644 --- a/apps/explorer/lib/explorer/chain/address/token_balance.ex +++ b/apps/explorer/lib/explorer/chain/address/token_balance.ex @@ -9,9 +9,6 @@ defmodule Explorer.Chain.Address.TokenBalance do use Explorer.Schema - import Ecto.Changeset - import Ecto.Query, only: [from: 2] - alias Explorer.Chain alias Explorer.Chain.Address.TokenBalance alias Explorer.Chain.{Address, Block, Hash, Token} @@ -93,4 +90,18 @@ defmodule Explorer.Chain.Address.TokenBalance do (is_nil(tb.value_fetched_at) or is_nil(tb.value)) ) end + + @doc """ + Builds an `Ecto.Query` to fetch the token balance of the given token contract hash of the given address in the given block. + """ + def fetch_token_balance(address_hash, token_contract_address_hash, block_number) do + from( + tb in TokenBalance, + where: tb.address_hash == ^address_hash, + where: tb.token_contract_address_hash == ^token_contract_address_hash, + where: tb.block_number <= ^block_number, + limit: ^1, + order_by: [desc: :block_number] + ) + end end diff --git a/apps/explorer/test/explorer/chain/address/token_balance_test.exs b/apps/explorer/test/explorer/chain/address/token_balance_test.exs index 4c59c675bf3d..717a783767a5 100644 --- a/apps/explorer/test/explorer/chain/address/token_balance_test.exs +++ b/apps/explorer/test/explorer/chain/address/token_balance_test.exs @@ -3,6 +3,7 @@ defmodule Explorer.Chain.Address.TokenBalanceTest do alias Explorer.Repo alias Explorer.Chain.Address.TokenBalance + alias Explorer.Chain describe "unfetched_token_balances/0" do test "returns only the token balances that have value_fetched_at nil" do @@ -76,4 +77,46 @@ defmodule Explorer.Chain.Address.TokenBalanceTest do assert result.block_number == token_balance.block_number end end + + describe "fetch_token_balance/3" do + test "returns the token balance for the given address" do + token_balance = insert(:token_balance) + + result = + TokenBalance.fetch_token_balance( + token_balance.address_hash, + token_balance.token_contract_address_hash, + token_balance.block_number + ) + |> Repo.one() + + assert(result.address_hash == token_balance.address_hash) + end + + test "returns the token balance only from block less or equal than given for the given address" do + address = insert(:address) + token_balance_a = insert(:token_balance, address: address, block_number: 10) + + result = + TokenBalance.fetch_token_balance( + token_balance_a.address_hash, + token_balance_a.token_contract_address_hash, + token_balance_a.block_number - 3 + ) + |> Repo.one() + + assert(is_nil(result)) + token_balance_b = insert(:token_balance, address: address, block_number: token_balance_a.block_number - 3) + + result = + TokenBalance.fetch_token_balance( + token_balance_b.address_hash, + token_balance_b.token_contract_address_hash, + token_balance_b.block_number + ) + |> Repo.one() + + assert(result.value == token_balance_b.value) + end + end end From 3b037fcb1749e7d6ab8a910b488d7ebbd126acea Mon Sep 17 00:00:00 2001 From: Andrew Gross Date: Tue, 1 Nov 2022 12:04:54 -0600 Subject: [PATCH 546/723] Update README.md General wording, add Note for Linux users, update to Postgres 14 --- docker-compose/README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/docker-compose/README.md b/docker-compose/README.md index 67c1496a601c..39067753d663 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -1,6 +1,6 @@ # Docker-compose configuration -Runs BlockScout locally in Docker container with usage [docker-compose](https://github.com/docker/compose). +Runs Blockscout locally in Docker containers with [docker-compose](https://github.com/docker/compose). ## Prerequisites @@ -14,13 +14,15 @@ Runs BlockScout locally in Docker container with usage [docker-compose](https:// docker-compose up --build ``` -This command uses by-default `docker-compose.yml`, which build the explorer into Docker image and runs 3 Docker containers: +This command uses by-default `docker-compose.yml`, which builds the explorer into the Docker image and runs 3 Docker containers: -- one for the database. Postgres 13.x, which will be available at port 7432 on localhost -- [smart-contract-verifier](https://github.com/blockscout/blockscout-rs/) service, which will be available at port 8043 on localhost -- and the BlockScout explorer at http://localhost:4000 +- Postgres 14.x database, which will be available at port 7432 on localhost. +- [Smart-contract-verifier](https://github.com/blockscout/blockscout-rs/) service, which will be available at port 8043 on localhost. +- Blockscout explorer at http://localhost:4000. -## Building Docker contrainers from source with native smart contract verification (deprecated) +Note for Linux users: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/ + +## Building Docker containers from source with native smart contract verification (deprecated) ```bash docker-compose -f docker-compose-no-rust-verification.yml up --build @@ -28,17 +30,17 @@ docker-compose -f docker-compose-no-rust-verification.yml up --build ## Configs for different Ethereum clients -Also, the repo contains built-in configs for different clients without need to build the image +The repo contains built-in configs for different clients without needing to build the image. - Erigon: `docker-compose -f docker-compose-no-build-erigon.yml up -d` - Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d` - Nethermind, OpenEthereum: `docker-compose -f docker-compose-no-build-nethermind up -d` - Ganache: `docker-compose -f docker-compose-no-build-ganache.yml up -d` - HardHat network: `docker-compose -f docker-compose-no-build-hardhat-network.yml up -d` -- Running only explorer without DB: `docker-compose -f docker-compose-no-build-no-db-container.yml up -d`. In this case, one container is created - for the explorer itself. And it assumes that the DB credentials are provided through `DATABASE_URL` environment variable. +- Running explorer only without DB: `docker-compose -f docker-compose-no-build-no-db-container.yml up -d`. In this case, one container is created - for the explorer itself. It assumes DB credentials are provided through the `DATABASE_URL` environment variable. -All of the configs assume, that the Ethereum JSON RPC is running at http://localhost:8545. +All of the configs assume the Ethereum JSON RPC is running at http://localhost:8545. -In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, where replace `config_file.yml` with the file name of the config, which has been launched before. +In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, replacing `config_file.yml` with the file name of the config which was previously launched. -You can play with the BlockScout environment variables, which are present at `./envs/common-blockscout.env`. The description of the environment variables are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). +You can adjust BlockScout environment variables from `./envs/common-blockscout.env`. Descriptions of the ENVs are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). From 25e4a0e7f744561f289be52a840dfa8a294dab9d Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Mon, 17 Oct 2022 23:25:20 +0300 Subject: [PATCH 547/723] Add verified contracts controller --- .../verified_contracts_controller.ex | 72 +++++++++++++++++++ .../lib/block_scout_web/web_router.ex | 4 ++ 2 files changed, 76 insertions(+) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex new file mode 100644 index 000000000000..a8b502a5a877 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex @@ -0,0 +1,72 @@ +defmodule BlockScoutWeb.VerifiedContractsController do + use BlockScoutWeb, :controller + + import BlockScoutWeb.Chain, + only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1, fetch_page_number: 1] + + + alias BlockScoutWeb.{Controller, VerifiedContractsView} + alias Explorer.{Chain, Market} + alias Explorer.ExchangeRates.Token + alias Phoenix.View + + @necessity_by_association %{[address: :token] => :optional} + + def index(conn, %{"type" => "JSON"} = params) do + full_options = + [necessity_by_association: @necessity_by_association] + |> Keyword.merge(paging_options(params)) + |> Keyword.merge(current_filter(params)) + |> Keyword.merge(search_query(params)) + |> IO.inspect(label: "options") + + verified_contracts_plus_one = Chain.verified_contracts(full_options) + {verified_contracts, next_page} = split_list_by_page(verified_contracts_plus_one) + + items = + for contract <- verified_contracts do + token = + if contract.address.token, + do: Market.get_exchange_rate(contract.address.token.symbol), + else: Token.null() + + View.render_to_string(VerifiedContractsView, "_contract.html", + contract: contract, + token: token + ) + end + + next_page_path = + case next_page_params(next_page, verified_contracts, params) do + nil -> nil + next_page_params -> verified_contracts_path(conn, :index, Map.delete(next_page_params, "type")) + end + + json(conn, %{items: items, next_page_path: next_page_path}) + end + + def index(conn, params) do + render(conn, "index.html", + current_path: Controller.current_full_path(conn), + filter: params["filter"] + ) + end + + defp current_filter(%{"filter" => "solidity"}) do + [filter: :solidity] + end + + defp current_filter(%{"filter" => "vyper"}) do + [filter: :vyper] + end + + defp current_filter(_), do: [] + + defp search_query(%{"search" => ""}), do: [] + + defp search_query(%{"search" => search_string}) do + [search: search_string] + end + + defp search_query(_), do: [] +end diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index 30de6760f1bc..e03bd10d43ba 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -121,6 +121,8 @@ defmodule BlockScoutWeb.WebRouter do resources("/recent-transactions", RecentTransactionsController, only: [:index]) + resources("/verified-contracts", VerifiedContractsController, only: [:index]) + get("/txs", TransactionController, :index) resources "/tx", TransactionController, only: [:show] do @@ -474,6 +476,8 @@ defmodule BlockScoutWeb.WebRouter do get("/search-results", SearchController, :search_results) + get("/search-verified-contracts", VerifiedContractsController, :search_verified_contracts) + get("/csv-export", CsvExportController, :index) get("/transactions-csv", AddressTransactionController, :transactions_csv) From 628d601c143b3e30ae5a0f41375c045ee19073fc Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Mon, 17 Oct 2022 23:27:15 +0300 Subject: [PATCH 548/723] Add functions for contracts to Explorer.Chain Fix chain functions --- apps/explorer/lib/explorer/chain.ex | 109 ++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 1f82e7d744ef..e5e254a45c45 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4359,6 +4359,14 @@ defmodule Explorer.Chain do |> limit(^paging_options.page_size) end + defp handle_verified_contracts_paging_options(query, nil), do: query + + defp handle_verified_contracts_paging_options(query, paging_options) do + query + |> page_verified_contracts(paging_options) + |> limit(^paging_options.page_size) + end + defp handle_token_transfer_paging_options(query, nil), do: query defp handle_token_transfer_paging_options(query, paging_options) do @@ -4606,6 +4614,12 @@ defmodule Explorer.Chain do ) end + defp page_verified_contracts(query, %PagingOptions{key: nil}), do: query + + defp page_verified_contracts(query, %PagingOptions{key: {inserted_at}}) do + where(query, [contract], contract.inserted_at < ^inserted_at) + end + @doc """ Ensures the following conditions are true: @@ -6479,4 +6493,99 @@ defmodule Explorer.Chain do def filter_token_creation_dynamic(dynamic) do dynamic([tx, created_token: created_token], ^dynamic or (is_nil(tx.to_address_hash) and not is_nil(created_token))) end + + def verified_contracts(options \\ []) do + necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) + + paging_options = Keyword.get(options, :paging_options, @default_paging_options) + + filter = Keyword.get(options, :filter, nil) + search_string = Keyword.get(options, :search, nil) + + query = from(contract in SmartContract, select: contract, order_by: [desc: :id]) + + query + |> filter_contracts(filter) + |> search_contracts(search_string) + |> handle_verified_contracts_paging_options(paging_options) + |> join_associations(necessity_by_association) + |> Repo.all() + end + + defp search_contracts(basic_query, nil), do: basic_query + + defp search_contracts(basic_query, search_string) do + from(contract in basic_query, + where: + ilike(contract.name, ^"%#{search_string}%") or + ilike(fragment("'0x' || encode(?, 'hex')", contract.address_hash), ^"%#{search_string}%") + ) + end + + defp filter_contracts(basic_query, :solidity) do + basic_query + |> where(is_vyper_contract: ^false) + end + + defp filter_contracts(basic_query, :vyper) do + basic_query + |> where(is_vyper_contract: ^true) + end + + defp filter_contracts(basic_query, _), do: basic_query + + def count_verified_contracts do + Repo.aggregate(SmartContract, :count) + end + + def count_new_verified_contracts do + query = + from(contract in SmartContract, + select: contract.inserted_at, + where: fragment("NOW() - ? at time zone 'UTC' <= interval '24 hours'", contract.inserted_at) + ) + + query + |> Repo.aggregate(:count) + end + + def count_contracts do + query = + from(address in Address, + select: address, + where: not is_nil(address.contract_code) + ) + + query + |> Repo.aggregate(:count) + end + + def count_new_contracts do + query = + from(tx in Transaction, + select: tx, + where: + tx.status == ^:ok and + fragment("NOW() - ? at time zone 'UTC' <= interval '24 hours'", tx.created_contract_code_indexed_at) + ) + + query + |> Repo.aggregate(:count) + end + + def count_verified_contracts_from_cache do + ContractsCounter.fetch("verified") + end + + def count_new_verified_contracts_from_cache do + ContractsCounter.fetch("new_verified") + end + + def count_contracts_from_cache do + ContractsCounter.fetch("all") + end + + def count_new_contracts_from_cache do + ContractsCounter.fetch("new") + end end From e8adc4d6beada35509b3ff7413ec844c849afe2a Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Mon, 17 Oct 2022 23:28:45 +0300 Subject: [PATCH 549/723] Frontend for verified contracts Add paging by id and page number Fix paging Fix column order Add gettext to html Fix mobile ui Add gettext Fix formatting Fix formatting Fix formatting Add gettext to html and update Fix Add scrolling to view in page change fix front --- .../assets/js/pages/verified_contracts.js | 101 +++++++++++++ apps/block_scout_web/assets/webpack.config.js | 1 + .../lib/block_scout_web/chain.ex | 14 ++ .../verified_contracts_controller.ex | 9 +- .../templates/layout/_topnav.html.eex | 65 ++++---- .../templates/layout/app.html.eex | 1 + .../verified_contracts/_contract.html.eex | 59 ++++++++ .../verified_contracts/_metatags.html.eex | 8 + .../verified_contracts/_stats.html.eex | 33 ++++ .../verified_contracts/index.html.eex | 100 +++++++++++++ .../views/verified_contracts_view.ex | 14 ++ apps/block_scout_web/priv/gettext/default.pot | 141 ++++++++++++++++-- .../priv/gettext/en/LC_MESSAGES/default.po | 141 ++++++++++++++++-- apps/explorer/lib/explorer/chain.ex | 4 +- 14 files changed, 629 insertions(+), 62 deletions(-) create mode 100644 apps/block_scout_web/assets/js/pages/verified_contracts.js create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/_contract.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/_metatags.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/_stats.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/verified_contracts_view.ex diff --git a/apps/block_scout_web/assets/js/pages/verified_contracts.js b/apps/block_scout_web/assets/js/pages/verified_contracts.js new file mode 100644 index 000000000000..5522af36804d --- /dev/null +++ b/apps/block_scout_web/assets/js/pages/verified_contracts.js @@ -0,0 +1,101 @@ +import $ from 'jquery' +import omit from 'lodash.omit' +import { loadPage, createAsyncLoadStore } from '../lib/async_listing_load' +import { connectElements } from '../lib/redux_helpers.js' + +export const initialState = { + isSearch: false +} + +const elements = { + '[data-search-field]': { + render ($el, state) { + return $el + } + }, + '[data-search-button]': { + render ($el, state) { + return $el + } + }, + '[data-cancel-search-button]': { + render ($el, state) { + if (!state.isSearch) { + return $el.hide() + } + + return $el.show() + } + }, + '[data-search]': { + render ($el, state) { + if (state.emptyResponse && !state.isSearch) { + return $el.hide() + } + + return $el.show() + } + } +} + +export function reducer (state, action) { + switch (action.type) { + case 'PAGE_LOAD': + case 'ELEMENTS_LOAD': { + return Object.assign({}, state, omit(action, 'type')) + } + case 'START_SEARCH': { + return Object.assign({}, state, { pagesStack: [], isSearch: true }) + } + default: + return state + } +} + +if ($('[data-page="verified-contracts-list"]').length) { + let timer + const waitTime = 500 + + const $element = $('[data-async-listing]') + + $element.on('click', '[data-next-page-button], [data-prev-page-button]', (event) => { + document.getElementById('verified-contratc-list').scrollIntoView() + }) + + const store = createAsyncLoadStore(reducer, initialState, 'dataset.identifierHash') + + connectElements({ store, elements }) + + const searchFunc = (_event) => { + store.dispatch({ type: 'START_SEARCH' }) + const searchInput = $('[data-search-field]').val() + const pathHaveNoParams = window.location.pathname + '?search=' + searchInput + const pathHaveParams = window.location.pathname + window.location.search + '&search=' + searchInput + const path = window.location.href.includes('?') ? pathHaveParams : pathHaveNoParams + loadPage(store, path) + } + + store.dispatch({ + type: 'PAGE_LOAD' + }) + + $element.on('click', '[data-search-button]', searchFunc) + + $element.on('click', '[data-cancel-search-button]', (_event) => { + $('[data-search-field]').val('') + loadPage(store, window.location.pathname) + }) + + $element.on('input keyup', '[data-search-field]', (event) => { + if (event.type === 'input') { + clearTimeout(timer) + timer = setTimeout(() => { + searchFunc(event) + }, waitTime) + } + if (event.type === 'keyup' && event.keyCode === 13) { + clearTimeout(timer) + searchFunc(event) + } + }) +} diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 6c422fedc384..0a1ec272fb72 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -48,6 +48,7 @@ const appJs = 'address-logs': './js/pages/address/logs.js', 'address-validations': './js/pages/address/validations.js', 'validated-transactions': './js/pages/transactions.js', + 'verified-contracts': './js/pages/verified_contracts.js', 'pending-transactions': './js/pages/pending_transactions.js', 'transaction': './js/pages/transaction.js', 'verification-form': './js/pages/verification_form.js', diff --git a/apps/block_scout_web/lib/block_scout_web/chain.ex b/apps/block_scout_web/lib/block_scout_web/chain.ex index 927e5f254656..3d710fe8686d 100644 --- a/apps/block_scout_web/lib/block_scout_web/chain.ex +++ b/apps/block_scout_web/lib/block_scout_web/chain.ex @@ -24,6 +24,7 @@ defmodule BlockScoutWeb.Chain do Block, InternalTransaction, Log, + SmartContract, Token, TokenTransfer, Transaction, @@ -216,6 +217,10 @@ defmodule BlockScoutWeb.Chain do [paging_options: %{@default_paging_options | key: {name, type, value}}] end + def paging_options(%{"smart_contract_id" => id}) do + [paging_options: %{@default_paging_options | key: {id}}] + end + def paging_options(_params), do: [paging_options: @default_paging_options] def put_key_value_to_paging_options([paging_options: paging_options], key, value) do @@ -232,6 +237,11 @@ defmodule BlockScoutWeb.Chain do end end + def fetch_page_number(%{"items_count" => item_count_str}) do + {items_count, _} = Integer.parse(item_count_str) + div(items_count, @page_size) + 1 + end + def fetch_page_number(_), do: 1 def update_page_parameters(new_page_number, new_page_size, %PagingOptions{} = options) do @@ -349,6 +359,10 @@ defmodule BlockScoutWeb.Chain do %{"block_number" => block_number} end + defp paging_params(%SmartContract{} = smart_contract) do + %{"smart_contract_id" => smart_contract.id} + end + defp paging_params(%{ address_hash: address_hash, tx_hash: tx_hash, diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex index a8b502a5a877..c75b25e27ecb 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/verified_contracts_controller.ex @@ -4,7 +4,6 @@ defmodule BlockScoutWeb.VerifiedContractsController do import BlockScoutWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 1, fetch_page_number: 1] - alias BlockScoutWeb.{Controller, VerifiedContractsView} alias Explorer.{Chain, Market} alias Explorer.ExchangeRates.Token @@ -18,7 +17,6 @@ defmodule BlockScoutWeb.VerifiedContractsController do |> Keyword.merge(paging_options(params)) |> Keyword.merge(current_filter(params)) |> Keyword.merge(search_query(params)) - |> IO.inspect(label: "options") verified_contracts_plus_one = Chain.verified_contracts(full_options) {verified_contracts, next_page} = split_list_by_page(verified_contracts_plus_one) @@ -48,7 +46,12 @@ defmodule BlockScoutWeb.VerifiedContractsController do def index(conn, params) do render(conn, "index.html", current_path: Controller.current_full_path(conn), - filter: params["filter"] + filter: params["filter"], + page_number: params |> fetch_page_number() |> Integer.to_string(), + contracts_count: Chain.count_contracts_from_cache(), + verified_contracts_count: Chain.count_verified_contracts_from_cache(), + new_contracts_count: Chain.count_new_contracts_from_cache(), + new_verified_contracts_count: Chain.count_new_verified_contracts_from_cache() ) end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 400cc96f05fb..9a0d1ba675fb 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -24,45 +24,56 @@ -
    @@ -19,11 +19,11 @@

    <%= @verified_contracts_count %>

    - <%= gettext ("Total") %> + Total

    +<%= @new_verified_contracts_count %>

    - <%= gettext ("Last 24h") %> + Last 24h
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/index.html.eex index de909a3ef08b..e3e5337d1270 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/verified_contracts/index.html.eex @@ -1,3 +1,4 @@ +<%= render "_stats.html", assigns %>
    <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
    diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 4ecea375fa57..9a2dda63e5ba 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -54,6 +54,11 @@ config :explorer, Explorer.Counters.AddressTokenUsdSum, enabled: true, enable_consolidation: true +config :explorer, Explorer.Counters.ContractsCounter, + enabled: true, + enable_consolidation: true, + update_interval_in_seconds: 30 * 60 + config :explorer, Explorer.Chain.Cache.TokenExchangeRate, enabled: true, enable_consolidation: true diff --git a/apps/explorer/lib/explorer/application.ex b/apps/explorer/lib/explorer/application.ex index c17a8c42afd0..143ac616b183 100644 --- a/apps/explorer/lib/explorer/application.ex +++ b/apps/explorer/lib/explorer/application.ex @@ -97,6 +97,7 @@ defmodule Explorer.Application do configure(Explorer.Counters.TokenTransfersCounter), configure(Explorer.Counters.BlockBurnedFeeCounter), configure(Explorer.Counters.BlockPriorityFeeCounter), + configure(Explorer.Counters.ContractsCounter), configure(Explorer.Counters.AverageBlockTime), configure(Explorer.Counters.Bridge), configure(Explorer.Validator.MetadataProcessor), diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 5c41146b5ca6..8522c842e05e 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -75,7 +75,7 @@ defmodule Explorer.Chain do alias Explorer.Chain.Import.Runner alias Explorer.Chain.InternalTransaction.{CallType, Type} - alias Explorer.Counters.{AddressesCounter, AddressesWithBalanceCounter} + alias Explorer.Counters.{AddressesCounter, AddressesWithBalanceCounter, ContractsCounter} alias Explorer.Market.MarketHistoryCache alias Explorer.{PagingOptions, Repo} alias Explorer.SmartContract.{Helper, Reader} @@ -6494,11 +6494,12 @@ defmodule Explorer.Chain do dynamic([tx, created_token: created_token], ^dynamic or (is_nil(tx.to_address_hash) and not is_nil(created_token))) end + @spec verified_contracts([ + paging_options | necessity_by_association_option | {:filter, :solidity | :vyper} | {:search, String.t()} + ]) :: [SmartContract.t()] def verified_contracts(options \\ []) do - necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) - paging_options = Keyword.get(options, :paging_options, @default_paging_options) - + necessity_by_association = Keyword.get(options, :necessity_by_association, %{}) filter = Keyword.get(options, :filter, nil) search_string = Keyword.get(options, :search, nil) diff --git a/apps/explorer/lib/explorer/counters/contracts_counter.ex b/apps/explorer/lib/explorer/counters/contracts_counter.ex new file mode 100644 index 000000000000..c58fd9f3ac12 --- /dev/null +++ b/apps/explorer/lib/explorer/counters/contracts_counter.ex @@ -0,0 +1,120 @@ +defmodule Explorer.Counters.ContractsCounter do + @moduledoc """ + Caches the number of contracts, new and verified. + + It loads the count asynchronously and in a time interval of 30 minutes. + """ + + use GenServer + + alias Explorer.Chain + alias Explorer.Counters.Helper + + @cache_name :contracts_counter + + @all "all" + @verified "verified" + @new_all "new" + @new_verified "new_verified" + + @keys [@all, @verified, @new_all, @new_verified] + + # It is undesirable to automatically start the consolidation in all environments. + # Consider the test environment: if the consolidation initiates but does not + # finish before a test ends, that test will fail. This way, hundreds of + # tests were failing before disabling the consolidation and the scheduler in + # the test env. + config = Application.compile_env(:explorer, Explorer.Counters.ContractsCounter) + @enable_consolidation Keyword.get(config, :enable_consolidation) + + @update_interval_in_seconds Keyword.get(config, :update_interval_in_seconds) + + @doc """ + Starts a process to periodically update the counter of the . + """ + @spec start_link(term()) :: GenServer.on_start() + def start_link(_) do + GenServer.start_link(__MODULE__, :ok, name: __MODULE__) + end + + @impl true + def init(_args) do + create_table() + + {:ok, %{consolidate?: enable_consolidation?()}, {:continue, :ok}} + end + + def create_table do + Helper.create_cache_table(@cache_name) + end + + defp schedule_next_consolidation do + Process.send_after(self(), :consolidate, :timer.seconds(@update_interval_in_seconds)) + end + + @doc """ + Inserts new items into the `:ets` table. + """ + def insert_counter({key, info}) do + :ets.insert(@cache_name, {key, info}) + end + + @impl true + def handle_continue(:ok, %{consolidate?: true} = state) do + consolidate() + schedule_next_consolidation() + + {:noreply, state} + end + + @impl true + def handle_continue(:ok, state) do + {:noreply, state} + end + + @impl true + def handle_info(:consolidate, state) do + consolidate() + schedule_next_consolidation() + + {:noreply, state} + end + + @doc """ + Fetches the info for a specific item from the `:ets` table. + """ + def fetch(key) when key in @keys do + Helper.fetch_from_cache(key, @cache_name) + end + + def fetch(_), do: 0 + + @doc """ + Consolidates the info by populating the `:ets` table with the current database information. + """ + def consolidate do + all_counter = Chain.count_contracts() + new_all_counter = Chain.count_new_contracts() + verified_counter = Chain.count_verified_contracts() + new_verified_counter = Chain.count_new_verified_contracts() + + insert_counter({@all, all_counter}) + insert_counter({@new_all, new_all_counter}) + insert_counter({@verified, verified_counter}) + insert_counter({@new_verified, new_verified_counter}) + end + + @doc """ + Returns a boolean that indicates whether consolidation is enabled + + In order to choose whether or not to enable the scheduler and the initial + consolidation, change the following Explorer config: + + `config :explorer, Explorer.Counters.ContractsCounter, enable_consolidation: true` + + to: + + `config :explorer, Explorer.Counters.ContractsCounter, enable_consolidation: false` + """ + def enable_consolidation?, do: @enable_consolidation +end From ce10763e2e624ccb7d69ef3a443571705ab27b63 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Thu, 20 Oct 2022 21:15:27 +0300 Subject: [PATCH 551/723] Add smart contracts to nav bar --- .../templates/icons/_blockchain_icon.html.eex | 3 +++ .../templates/layout/_topnav.html.eex | 22 +++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/icons/_blockchain_icon.html.eex diff --git a/apps/block_scout_web/lib/block_scout_web/templates/icons/_blockchain_icon.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/icons/_blockchain_icon.html.eex new file mode 100644 index 000000000000..f8234731c29d --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/icons/_blockchain_icon.html.eex @@ -0,0 +1,3 @@ + + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 9a0d1ba675fb..8fd0e7898fa3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -83,7 +83,7 @@ <%= gettext("Tokens") %> -
    From d405a672d53a760ecf32b554202e24367356491e Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Tue, 8 Nov 2022 12:32:28 +0300 Subject: [PATCH 646/723] Fix image viewer bug --- .../assets/js/pages/img_viewer.js | 23 ++++++++++-- apps/block_scout_web/assets/package-lock.json | 37 +++++++++---------- apps/block_scout_web/assets/package.json | 3 +- apps/block_scout_web/assets/webpack.config.js | 4 ++ .../visualize_sol2uml/index.html.eex | 4 +- 5 files changed, 46 insertions(+), 25 deletions(-) diff --git a/apps/block_scout_web/assets/js/pages/img_viewer.js b/apps/block_scout_web/assets/js/pages/img_viewer.js index 544443d68518..9b9e26749d47 100644 --- a/apps/block_scout_web/assets/js/pages/img_viewer.js +++ b/apps/block_scout_web/assets/js/pages/img_viewer.js @@ -1,3 +1,20 @@ -import Viewer from 'viewerjs' -const gallery = document.getElementById('img-view') -const viewer = new Viewer(gallery) +import 'viewerjs/dist/viewer.min.css'; +import Viewer from 'viewerjs'; +const gallery = document.getElementById('gallery'); +const viewer = new Viewer(gallery, { + inline: false, + toolbar: { + zoomIn: 2, + zoomOut: 4, + oneToOne: 4, + reset: 4, + play: { + show: 4, + size: 'large', + }, + rotateLeft: 4, + rotateRight: 4, + flipHorizontal: 4, + flipVertical: 4, + } +}); diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 4ed35918d294..24bc901f47ef 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -23,8 +23,6 @@ "highlight.js": "^11.7.0", "https-browserify": "^1.0.0", "humps": "^2.0.1", - "jquery": "^3.6.1", - "jquery-viewer": "^1.0.1", "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", @@ -52,6 +50,7 @@ "path-parser": "^6.1.0", "phoenix": "file:../../../deps/phoenix", "phoenix_html": "file:../../../deps/phoenix_html", + "photoswipe": "^5.3.3", "pikaday": "^1.8.2", "popper.js": "^1.14.7", "reduce-reducers": "^1.0.4", @@ -11889,16 +11888,8 @@ "node_modules/jquery": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", - "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==" - }, - "node_modules/jquery-viewer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jquery-viewer/-/jquery-viewer-1.0.1.tgz", - "integrity": "sha512-d7qd/9zKCcsxgKDDt9nC2Jdbr2SdXcJkQVzQDxj/H7ZkXzS+scxt2KxGWQlsBthiRmvv9aCPt7kPnGsFA2ds/Q==", - "peerDependencies": { - "jquery": ">=1.9.1", - "viewerjs": ">=1.5.0" - } + "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==", + "peer": true }, "node_modules/js-base64": { "version": "2.6.4", @@ -14036,6 +14027,14 @@ "resolved": "../../../deps/phoenix_html", "link": true }, + "node_modules/photoswipe": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.3.tgz", + "integrity": "sha512-BUuulwZwkYFKADSe5xf0dd+wf6dws34ZvqP8R3oYHepRauOXoQHvw600sw1HlWd8K0S3LRCS4jxyR5fTuI383Q==", + "engines": { + "node": ">= 0.12.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -27464,13 +27463,8 @@ "jquery": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", - "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==" - }, - "jquery-viewer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/jquery-viewer/-/jquery-viewer-1.0.1.tgz", - "integrity": "sha512-d7qd/9zKCcsxgKDDt9nC2Jdbr2SdXcJkQVzQDxj/H7ZkXzS+scxt2KxGWQlsBthiRmvv9aCPt7kPnGsFA2ds/Q==", - "requires": {} + "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==", + "peer": true }, "js-base64": { "version": "2.6.4", @@ -29198,6 +29192,11 @@ "phoenix_html": { "version": "file:../../../deps/phoenix_html" }, + "photoswipe": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.3.tgz", + "integrity": "sha512-BUuulwZwkYFKADSe5xf0dd+wf6dws34ZvqP8R3oYHepRauOXoQHvw600sw1HlWd8K0S3LRCS4jxyR5fTuI383Q==" + }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index eb004a2a9020..7e04b2dea29a 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -35,8 +35,6 @@ "highlight.js": "^11.7.0", "https-browserify": "^1.0.0", "humps": "^2.0.1", - "jquery": "^3.6.1", - "jquery-viewer": "^1.0.1", "js-cookie": "^3.0.1", "lodash.debounce": "^4.0.8", "lodash.differenceby": "^4.8.0", @@ -64,6 +62,7 @@ "path-parser": "^6.1.0", "phoenix": "file:../../../deps/phoenix", "phoenix_html": "file:../../../deps/phoenix_html", + "photoswipe": "^5.3.3", "pikaday": "^1.8.2", "popper.js": "^1.14.7", "reduce-reducers": "^1.0.4", diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 29bce00a6aaf..caf148c7a005 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -85,6 +85,10 @@ const appJs = }, module: { rules: [ + { + test: /\.css$/, + use: ["style-loader", "css-loader"], + }, { test: /\.js$/, exclude: /node_modules/, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex index e60c6f216fb3..938b1607544f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex @@ -10,7 +10,9 @@
    <%= if is_nil(@error) do %>
    - +
    <% else %> <%= gettext("Cannot visualize contract")%>: <%= @error %> From 6b01b2c44f2c3598764cd0ee429f4df2c55952ba Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Tue, 8 Nov 2022 12:50:06 +0300 Subject: [PATCH 647/723] Add tooltip for image viewer --- .../templates/visualize_sol2uml/index.html.eex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex index 938b1607544f..d0615e41a8db 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex @@ -10,9 +10,11 @@
    <%= if is_nil(@error) do %>
    - + + +
    <% else %> <%= gettext("Cannot visualize contract")%>: <%= @error %> From 5cddfa847ba6e59e08c4e25c4810ca8d5eb4d540 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Tue, 8 Nov 2022 17:18:15 +0300 Subject: [PATCH 648/723] Add visualizer to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b64bb1add79e..e3bbcfbbdbc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization - [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice - [#6440](https://github.com/blockscout/blockscout/pull/6440) - Add support for base64 encoded NFT metadata - [#6407](https://github.com/blockscout/blockscout/pull/6407) - Indexed ratio for int txs fetching stage From a5e7d1dd837eb6f37d3965382ef71284c63c00cf Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Fri, 11 Nov 2022 12:04:54 +0300 Subject: [PATCH 649/723] Fix nil filename bug --- .../controllers/visualize_sol2uml_controller.ex | 6 +++++- apps/explorer/lib/explorer/visualize/sol2uml.ex | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex index d56cd89acdb1..92d9784fb2ba 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex @@ -23,7 +23,7 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do |> Enum.map(fn additional_source -> {additional_source.file_name, additional_source.contract_source_code} end) |> Enum.into(%{}) |> Map.merge(%{ - address.smart_contract.file_path => address.smart_contract.contract_source_code + get_contract_filename(address.smart_contract.file_path) => address.smart_contract.contract_source_code }) params = %{ @@ -39,6 +39,10 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do end end + def get_contract_filename(nil), do: "main.sol" + def get_contract_filename(filename), do: filename + + def index(conn, params) do not_found(conn) end diff --git a/apps/explorer/lib/explorer/visualize/sol2uml.ex b/apps/explorer/lib/explorer/visualize/sol2uml.ex index 879bf9ec54f4..cd7615cbcf3a 100644 --- a/apps/explorer/lib/explorer/visualize/sol2uml.ex +++ b/apps/explorer/lib/explorer/visualize/sol2uml.ex @@ -54,7 +54,7 @@ defmodule Explorer.Visualize.Sol2uml do def proccess_visualizer_response(other), do: {:error, other} - def visualize_contracts_url, do: "#{base_api_url()}" <> "/solidity:visualizeContracts" + def visualize_contracts_url, do: "#{base_api_url()}" <> "/solidity:visualize-contracts" def base_api_url, do: "#{base_url()}" <> "/api/v1" From 078ee26b7caa395ff79bd11d7f5d1e399df276dd Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Fri, 11 Nov 2022 12:09:46 +0300 Subject: [PATCH 650/723] Move new badge for sol2uml button --- .../templates/address_contract/index.html.eex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index a40d43ea276b..5904601a2bd3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -103,9 +103,11 @@ <%= if visualize_sol2uml_enabled && !target_contract.is_vyper_contract do %> -
    new
    - - Sol2uml +
    + + Sol2uml +
    new
    +
    <% end %> From f518a24a2b7f073fd9a356e43ad7cdd27d7bb06d Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Tue, 15 Nov 2022 21:55:40 +0300 Subject: [PATCH 651/723] Fix pr issues for sol2uml --- apps/block_scout_web/assets/webpack.config.js | 2 +- .../visualize_sol2uml_controller.ex | 20 ++++++++----------- .../visualize_sol2uml/index.html.eex | 4 ++-- .../lib/block_scout_web/web_router.ex | 2 +- .../lib/explorer/visualize/sol2uml.ex | 5 +++-- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index caf148c7a005..321a7f8947ea 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -57,7 +57,7 @@ const appJs = 'admin-tasks': './js/pages/admin/tasks.js', 'token-contract': './js/pages/token_contract.js', 'smart-contract-helpers': './js/lib/smart_contract/index.js', - 'img_viewer': './js/pages/img_viewer.js', + 'img-viewer': './js/pages/img_viewer.js', 'token-transfers-toggle': './js/lib/token_transfers_toggle.js', 'try-api': './js/lib/try_api.js', 'try-eth-api': './js/lib/try_eth_api.js', diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex index 92d9784fb2ba..b40011760e7c 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex @@ -6,18 +6,15 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do def index(conn, %{"address" => address_hash_string}) do address_options = [ necessity_by_association: %{ - :contracts_creation_internal_transaction => :optional, - :names => :optional, - :smart_contract => :optional, - :token => :optional, - :contracts_creation_transaction => :optional + :smart_contract => :optional } ] with true <- Sol2uml.enabled?(), - true <- Chain.smart_contract_fully_verified?(address_hash_string), {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do + {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), + # check that contract is verified. partial and twin verification is ok for this case + false <- is_nil(address.smart_contract) do sources = address.smart_contract_additional_sources |> Enum.map(fn additional_source -> {additional_source.file_name, additional_source.contract_source_code} end) @@ -39,11 +36,10 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do end end - def get_contract_filename(nil), do: "main.sol" - def get_contract_filename(filename), do: filename - - - def index(conn, params) do + def index(conn, _) do not_found(conn) end + + def get_contract_filename(nil), do: "main.sol" + def get_contract_filename(filename), do: filename end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex index d0615e41a8db..79a9d20af18d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex @@ -12,7 +12,7 @@
    @@ -21,5 +21,5 @@ <% end %>
    - +
    diff --git a/apps/block_scout_web/lib/block_scout_web/web_router.ex b/apps/block_scout_web/lib/block_scout_web/web_router.ex index c356489ff189..d039ae9b1236 100644 --- a/apps/block_scout_web/lib/block_scout_web/web_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/web_router.ex @@ -494,7 +494,7 @@ defmodule BlockScoutWeb.WebRouter do get("/token-counters", Tokens.TokenController, :token_counters) - get("/vis/sol2uml", VisualizeSol2umlController, :index) + get("/visualize/sol2uml", VisualizeSol2umlController, :index) get("/*path", PageNotFoundController, :index) end diff --git a/apps/explorer/lib/explorer/visualize/sol2uml.ex b/apps/explorer/lib/explorer/visualize/sol2uml.ex index cd7615cbcf3a..e9281b3ca153 100644 --- a/apps/explorer/lib/explorer/visualize/sol2uml.ex +++ b/apps/explorer/lib/explorer/visualize/sol2uml.ex @@ -19,8 +19,9 @@ defmodule Explorer.Visualize.Sol2uml do {:ok, %Response{body: body, status_code: 200}} -> proccess_visualizer_response(body) - {:ok, %Response{body: body, status_code: _}} -> - proccess_visualizer_response(body) + {:ok, %Response{body: body, status_code: status_code}} -> + Logger.error(fn -> ["Invalid status code from visualizer: #{status_code}. body: ", inspect(body)] end) + {:error, "failed to visualize contract"} {:error, error} -> old_truncate = Application.get_env(:logger, :truncate) From a9b6eca3b5fa44934f785ff99b698d8f07993a6d Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 16 Nov 2022 17:57:06 +0300 Subject: [PATCH 652/723] Add async loading of contract visualization --- .../assets/js/pages/img_viewer.js | 20 ----- .../assets/js/pages/sol2uml.js | 85 +++++++++++++++++++ apps/block_scout_web/assets/webpack.config.js | 2 +- .../visualize_sol2uml_controller.ex | 53 +++++++----- .../visualize_sol2uml/index.html.eex | 25 +++--- 5 files changed, 134 insertions(+), 51 deletions(-) delete mode 100644 apps/block_scout_web/assets/js/pages/img_viewer.js create mode 100644 apps/block_scout_web/assets/js/pages/sol2uml.js diff --git a/apps/block_scout_web/assets/js/pages/img_viewer.js b/apps/block_scout_web/assets/js/pages/img_viewer.js deleted file mode 100644 index 9b9e26749d47..000000000000 --- a/apps/block_scout_web/assets/js/pages/img_viewer.js +++ /dev/null @@ -1,20 +0,0 @@ -import 'viewerjs/dist/viewer.min.css'; -import Viewer from 'viewerjs'; -const gallery = document.getElementById('gallery'); -const viewer = new Viewer(gallery, { - inline: false, - toolbar: { - zoomIn: 2, - zoomOut: 4, - oneToOne: 4, - reset: 4, - play: { - show: 4, - size: 'large', - }, - rotateLeft: 4, - rotateRight: 4, - flipHorizontal: 4, - flipVertical: 4, - } -}); diff --git a/apps/block_scout_web/assets/js/pages/sol2uml.js b/apps/block_scout_web/assets/js/pages/sol2uml.js new file mode 100644 index 000000000000..4d24361b5f81 --- /dev/null +++ b/apps/block_scout_web/assets/js/pages/sol2uml.js @@ -0,0 +1,85 @@ +import 'viewerjs/dist/viewer.min.css' +import Viewer from 'viewerjs' +import $ from 'jquery' +import { createStore, connectElements } from '../lib/redux_helpers.js' + +export const initialState = { + contract_svg: null, + visualize_error: null +} + +export function reducer (state = initialState, action) { + switch (action.type) { + case 'SVG_FETCHED': { + return Object.assign({}, state, { + contract_svg: action.contract_svg, + visualize_error: action.error + }) + } + default: + return state + } +} + +const elements = { + '[data-selector="contract-image"]': { + render ($el, state, oldState) { + if (state.contract_svg) { + console.log('Got svg from server') + $('#spinner').hide() + $('#gallery img').attr('src', 'data:image/svg+xml;base64,' + state.contract_svg) + const gallery = document.getElementById('gallery') + const viewer = new Viewer(gallery, { + inline: false, + toolbar: { + zoomIn: 2, + zoomOut: 4, + oneToOne: 4, + reset: 4, + play: { + show: 4, + size: 'large' + }, + rotateLeft: 4, + rotateRight: 4, + flipHorizontal: 4, + flipVertical: 4 + } + }) + viewer.update() + $el.show() + } else if (state.visualize_error) { + console.log('Got error from server') + + $('#spinner').hide() + $el.empty().text('Cannot visalize contract: ' + state.visualize_error) + $el.show() + } else { + $('#spinner').show() + $el.hide() + } + } + } +} + +function loadSvg (store) { + const $element = $('[data-async-contract-svg]') + const path = $element.data().asyncContractSvg + + function fetchSvg () { + $.getJSON(path) + .done((response) => { + store.dispatch(Object.assign({ type: 'SVG_FETCHED' }, response)) + }) + } + + fetchSvg() +} + +function main () { + const store = createStore(reducer) + connectElements({ store, elements }) + loadSvg(store) +} + +main() diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 321a7f8947ea..d4f59631be08 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -57,7 +57,7 @@ const appJs = 'admin-tasks': './js/pages/admin/tasks.js', 'token-contract': './js/pages/token_contract.js', 'smart-contract-helpers': './js/lib/smart_contract/index.js', - 'img-viewer': './js/pages/img_viewer.js', + 'sol2uml': './js/pages/sol2uml.js', 'token-transfers-toggle': './js/lib/token_transfers_toggle.js', 'try-api': './js/lib/try_api.js', 'try-eth-api': './js/lib/try_eth_api.js', diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex index b40011760e7c..b3955c109086 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex @@ -3,34 +3,49 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do alias Explorer.Chain alias Explorer.Visualize.Sol2uml - def index(conn, %{"address" => address_hash_string}) do + def index(conn, %{"type" => "JSON", "address" => address_hash_string}) do address_options = [ necessity_by_association: %{ :smart_contract => :optional } ] - with true <- Sol2uml.enabled?(), - {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), - {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), - # check that contract is verified. partial and twin verification is ok for this case - false <- is_nil(address.smart_contract) do - sources = - address.smart_contract_additional_sources - |> Enum.map(fn additional_source -> {additional_source.file_name, additional_source.contract_source_code} end) - |> Enum.into(%{}) - |> Map.merge(%{ - get_contract_filename(address.smart_contract.file_path) => address.smart_contract.contract_source_code - }) + if Sol2uml.enabled?() do + with {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string), + {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true), + # check that contract is verified. partial and twin verification is ok for this case + false <- is_nil(address.smart_contract) do + sources = + address.smart_contract_additional_sources + |> Enum.map(fn additional_source -> {additional_source.file_name, additional_source.contract_source_code} end) + |> Enum.into(%{}) + |> Map.merge(%{ + get_contract_filename(address.smart_contract.file_path) => address.smart_contract.contract_source_code + }) - params = %{ - sources: sources - } + params = %{ + sources: sources + } - case Sol2uml.visualize_contracts(params) do - {:ok, svg} -> render(conn, "index.html", address: address, svg: svg, error: nil) - {:error, error} -> render(conn, "index.html", address: address, svg: nil, error: error) + case Sol2uml.visualize_contracts(params) do + {:ok, svg} -> json(conn, %{"address" => address.hash, "contract_svg" => svg, "error" => nil}) + {:error, error} -> json(conn, %{"address" => address.hash, "contract_svg" => nil, "error" => error}) + end + else + _ -> json(conn, %{error: "contract not found or unverified"}) end + else + not_found(conn) + end + end + + def index(conn, %{"address" => address_hash_string}) do + with true <- Sol2uml.enabled?(), + {:ok, _} <- Chain.string_to_address_hash(address_hash_string) do + render(conn, "index.html", + address: address_hash_string, + get_svg_path: visualize_sol2uml_path(conn, :index, %{"type" => "JSON", "address" => address_hash_string}) + ) else _ -> not_found(conn) end diff --git a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex index 79a9d20af18d..46758d9a446a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex @@ -1,25 +1,28 @@
    -
    +

    <%= gettext("UML diagram") %>

    <%= gettext("For contract") %> <%= link( - @address.hash, - to: address_contract_path(@conn, :index, @address.hash) + @address, + to: address_contract_path(@conn, :index, @address) ) %>
    - <%= if is_nil(@error) do %>
    - + + + + + +
    + - + +
    - <% else %> - <%= gettext("Cannot visualize contract")%>: <%= @error %> - <% end %>
    - +
    From cce19f2bbe35f97e8f8171b319da24f5ec00bd9c Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 16 Nov 2022 20:49:20 +0300 Subject: [PATCH 653/723] Add translation keys --- apps/block_scout_web/priv/gettext/default.pot | 466 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 466 +++++++++--------- 2 files changed, 476 insertions(+), 456 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index ace26ccbff2d..ae907d6d85ed 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -76,6 +76,11 @@ msgstr "" msgid "(query)" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#, elixir-autogen, elixir-format +msgid ") may be added for each contract. Click the Add Library button to add an additional one." +msgstr "" + #: lib/block_scout_web/templates/layout/app.html.eex:230 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." @@ -92,6 +97,11 @@ msgstr "" msgid "A block producer who successfully included the block onto the blockchain." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#, elixir-autogen, elixir-format +msgid "A library name called in the .sol file. Multiple libraries (up to " +msgstr "" + #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:73 #, elixir-autogen, elixir-format msgid "A string with the name of the action to be invoked." @@ -256,6 +266,11 @@ msgstr "" msgid "Address of the token contract" msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Address used in token mintings and burnings." +msgstr "" + #: lib/block_scout_web/templates/account/public_tags_request/address_field.html.eex:2 #, elixir-autogen, elixir-format msgid "Address*" @@ -284,7 +299,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -363,6 +378,16 @@ msgstr "" msgid "Balance" msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 +#, elixir-autogen, elixir-format +msgid "Balance after" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 +#, elixir-autogen, elixir-format +msgid "Balance before" +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Balances" @@ -448,6 +473,11 @@ msgstr "" msgid "BlockScout provides analytics data, API, and Smart Contract tools for the %{subnetwork}" msgstr "" +#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 +#, elixir-autogen, elixir-format +msgid "Blockchain" +msgstr "" + #: lib/block_scout_web/templates/chain/show.html.eex:153 #: lib/block_scout_web/templates/layout/_topnav.html.eex:34 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 @@ -468,11 +498,21 @@ msgstr "" msgid "Blocks Validated" msgstr "" +#: lib/block_scout_web/templates/layout/app.html.eex:44 +#, elixir-autogen, elixir-format +msgid "Blocks With Internal Transactions Indexed" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:22 #, elixir-autogen, elixir-format msgid "Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks." msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Burn address" +msgstr "" + #: lib/block_scout_web/templates/block/_tile.html.eex:64 #: lib/block_scout_web/templates/block/overview.html.eex:216 #, elixir-autogen, elixir-format @@ -513,6 +553,11 @@ msgstr "" msgid "Cancel" msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Change" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:41 #, elixir-autogen, elixir-format msgid "Chat (#blockscout)" @@ -575,7 +620,7 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:65 +#: lib/block_scout_web/templates/address_contract/index.html.eex:66 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" @@ -629,18 +674,23 @@ msgstr "" msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:90 +#: lib/block_scout_web/templates/address_contract/index.html.eex:91 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Constructor args" +msgstr "" + #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:52 #: lib/block_scout_web/templates/transaction/overview.html.eex:227 #, elixir-autogen, elixir-format msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:123 +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -670,8 +720,8 @@ msgstr "" msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:155 +#: lib/block_scout_web/templates/address_contract/index.html.eex:154 +#: lib/block_scout_web/templates/address_contract/index.html.eex:169 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -688,23 +738,38 @@ msgstr "" msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:25 +#: lib/block_scout_web/templates/address_contract/index.html.eex:26 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:57 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:41 +#, elixir-autogen, elixir-format +msgid "Contract name or address" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:58 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:100 +#: lib/block_scout_web/templates/address_contract/index.html.eex:101 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:146 +#: lib/block_scout_web/templates/address/overview.html.eex:120 +#, elixir-autogen, elixir-format +msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" +msgstr "" + +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:5 +#, elixir-autogen, elixir-format +msgid "Contracts" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:160 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -714,7 +779,7 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:125 +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" @@ -746,8 +811,8 @@ msgstr "" msgid "Copy Contract Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:142 -#: lib/block_scout_web/templates/address_contract/index.html.eex:158 +#: lib/block_scout_web/templates/address_contract/index.html.eex:156 +#: lib/block_scout_web/templates/address_contract/index.html.eex:172 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" @@ -757,8 +822,8 @@ msgstr "" msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:179 -#: lib/block_scout_web/templates/address_contract/index.html.eex:189 +#: lib/block_scout_web/templates/address_contract/index.html.eex:193 +#: lib/block_scout_web/templates/address_contract/index.html.eex:203 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -794,8 +859,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 -#: lib/block_scout_web/templates/address_contract/index.html.eex:113 +#: lib/block_scout_web/templates/address_contract/index.html.eex:115 +#: lib/block_scout_web/templates/address_contract/index.html.eex:127 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -966,8 +1031,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:177 -#: lib/block_scout_web/templates/address_contract/index.html.eex:185 +#: lib/block_scout_web/templates/address_contract/index.html.eex:191 +#: lib/block_scout_web/templates/address_contract/index.html.eex:199 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -997,7 +1062,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:161 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -1012,6 +1077,11 @@ msgstr "" msgid "Drop all Solidity contract source files into the drop zone." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Drop all Solidity or Yul contract source files into the drop zone." +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:18 #, elixir-autogen, elixir-format msgid "Drop sources and metadata JSON file or click here" @@ -1072,7 +1142,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:77 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -1190,7 +1260,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:214 +#: lib/block_scout_web/templates/address_contract/index.html.eex:228 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1239,11 +1309,21 @@ msgstr "" msgid "Fetching transfers..." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:15 +#, elixir-autogen, elixir-format +msgid "Filter by compiler:" +msgstr "" + #: lib/block_scout_web/templates/admin/dashboard/index.html.eex:16 #, elixir-autogen, elixir-format msgid "For any existing contracts in the database, insert all ABI entries into the contract_methods table. Use this in case you have verified smart contracts before early March 2019 and you want other contracts with the same functions to show those ABI's as candidate matches." msgstr "" +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:6 +#, elixir-autogen, elixir-format +msgid "For contract" +msgstr "" + #: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #, elixir-autogen, elixir-format msgid "Forked Blocks (Reorgs)" @@ -1453,11 +1533,22 @@ msgstr "" msgid "Inventory" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Is Yul contract" +msgstr "" + #: lib/block_scout_web/templates/transaction/not_found.html.eex:16 #, elixir-autogen, elixir-format msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 +#, elixir-autogen, elixir-format +msgid "Last 24h" +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:259 #, elixir-autogen, elixir-format msgid "Last Balance Update" @@ -1474,6 +1565,12 @@ msgstr "" msgid "Less than" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex:4 +#, elixir-autogen, elixir-format +msgid "Library" +msgstr "" + #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:24 #, elixir-autogen, elixir-format msgid "License Expires" @@ -1559,6 +1656,11 @@ msgstr "" msgid "Market Cap" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:78 +#, elixir-autogen, elixir-format +msgid "Market cap" +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:382 #, elixir-autogen, elixir-format msgid "Max Fee per Gas" @@ -1654,6 +1756,12 @@ msgstr "" msgid "Must match the name specified in the code. For example, in contract MyContract {..} MyContract is the contract name." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:21 +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:58 +#, elixir-autogen, elixir-format +msgid "N/A" +msgstr "" + #: lib/block_scout_web/templates/block/overview.html.eex:116 #, elixir-autogen, elixir-format msgid "N/A bytes" @@ -1717,6 +1825,11 @@ msgstr "" msgid "New Solidity Smart Contract Verification" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:7 +#, elixir-autogen, elixir-format +msgid "New Solidity/Yul Smart Contract Verification" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:7 #, elixir-autogen, elixir-format msgid "New Vyper Smart Contract Verification" @@ -1797,12 +1910,17 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:61 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 +#, elixir-autogen, elixir-format +msgid "Optimization" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:62 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:70 +#: lib/block_scout_web/templates/address_contract/index.html.eex:71 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -2115,6 +2233,11 @@ msgstr "" msgid "Search tokens" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select Yes if you want to vefify Yul contract." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:27 #, elixir-autogen, elixir-format msgid "Self-Destruct" @@ -2192,6 +2315,13 @@ msgstr "" msgid "Smart contract / Address (0x...)" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:26 +#: lib/block_scout_web/views/verified_contracts_view.ex:9 +#, elixir-autogen, elixir-format +msgid "Solidity" +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:30 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:50 #: lib/block_scout_web/templates/address_logs/index.html.eex:23 @@ -2232,6 +2362,11 @@ msgstr "" msgid "Sources *.sol files" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 +#, elixir-autogen, elixir-format +msgid "Sources *.sol or *.yul files" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:14 #, elixir-autogen, elixir-format msgid "Sources and Metadata JSON" @@ -2247,6 +2382,13 @@ msgstr "" msgid "Standard Input JSON" msgstr "" +#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 +#: lib/block_scout_web/views/transaction_view.ex:513 +#, elixir-autogen, elixir-format +msgid "State changes" +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:24 #, elixir-autogen, elixir-format msgid "Static Call" @@ -2310,6 +2452,11 @@ msgstr "" msgid "The block height of a particular block is defined as the number of blocks preceding it in the blockchain." msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "The changes from this transaction have not yet happened since the transaction is still pending." +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:18 #, elixir-autogen, elixir-format @@ -2453,6 +2600,11 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:93 +#, elixir-autogen, elixir-format +msgid "There are no verified contracts." +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." @@ -2484,12 +2636,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:41 +#: lib/block_scout_web/templates/address_contract/index.html.eex:42 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:45 +#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2499,6 +2651,11 @@ msgstr "" msgid "This is useful to allow sending requests to blockscout without having to change anything about the request." msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 +#, elixir-autogen, elixir-format +msgid "This transaction hasn't changed state." +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:64 #, elixir-autogen, elixir-format msgid "This transaction is pending confirmation." @@ -2663,6 +2820,12 @@ msgstr "" msgid "Topics" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:9 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:22 +#, elixir-autogen, elixir-format +msgid "Total" +msgstr "" + #: lib/block_scout_web/templates/block/overview.html.eex:169 #, elixir-autogen, elixir-format msgid "Total Difficulty" @@ -2818,6 +2981,11 @@ msgstr "" msgid "Tx/day" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:60 +#, elixir-autogen, elixir-format +msgid "Txns" +msgstr "" + #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:5 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:22 #, elixir-autogen, elixir-format @@ -2829,6 +2997,11 @@ msgstr "" msgid "Type of the token standard" msgstr "" +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:5 +#, elixir-autogen, elixir-format +msgid "UML diagram" +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:461 #, elixir-autogen, elixir-format msgid "UTF-8" @@ -2916,6 +3089,11 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Verifed contracts, %{subnetwork}, %{coin}" +msgstr "" + #: lib/block_scout_web/templates/address_read_contract/index.html.eex:17 #: lib/block_scout_web/templates/address_write_contract/index.html.eex:15 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:75 @@ -2923,15 +3101,31 @@ msgstr "" msgid "Verified" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:82 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:18 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:6 +#, elixir-autogen, elixir-format +msgid "Verified Contracts" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:83 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:163 -#: lib/block_scout_web/templates/address_contract/index.html.eex:194 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 +#, elixir-autogen, elixir-format +msgid "Verified contracts" +msgstr "" + +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:2 +#, elixir-autogen, elixir-format +msgid "Verified contracts - %{subnetwork} Explorer" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 +#: lib/block_scout_web/templates/address_contract/index.html.eex:30 +#: lib/block_scout_web/templates/address_contract/index.html.eex:177 +#: lib/block_scout_web/templates/address_contract/index.html.eex:208 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -3025,11 +3219,23 @@ msgstr "" msgid "View the transactions, token transfers, and uncles for block number %{block_number}" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:8 +#, elixir-autogen, elixir-format +msgid "View the verified contracts on %{subnetwork}" +msgstr "" + #: lib/block_scout_web/templates/transaction/_metatags.html.eex:10 #, elixir-autogen, elixir-format msgid "View transaction %{transaction} on %{subnetwork}" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:32 +#: lib/block_scout_web/views/verified_contracts_view.ex:10 +#, elixir-autogen, elixir-format +msgid "Vyper" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:46 #, elixir-autogen, elixir-format msgid "Vyper contract" @@ -3160,7 +3366,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #, elixir-autogen, elixir-format msgid "button" msgstr "" @@ -3255,199 +3461,3 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 -#, elixir-autogen, elixir-format -msgid ") may be added for each contract. Click the Add Library button to add an additional one." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 -#, elixir-autogen, elixir-format -msgid "A library name called in the .sol file. Multiple libraries (up to " -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex:4 -#, elixir-autogen, elixir-format -msgid "Library" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:8 -#, elixir-autogen, elixir-format -msgid "Address used in token mintings and burnings." -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 -#, elixir-autogen, elixir-format -msgid "Balance after" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 -#, elixir-autogen, elixir-format -msgid "Balance before" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 -#, elixir-autogen, elixir-format -msgid "Burn address" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 -#, elixir-autogen, elixir-format -msgid "Change" -msgstr "" - -#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 -#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 -#: lib/block_scout_web/views/transaction_view.ex:513 -#, elixir-autogen, elixir-format -msgid "State changes" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 -#, elixir-autogen, elixir-format -msgid "The changes from this transaction have not yet happened since the transaction is still pending." -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 -#, elixir-autogen, elixir-format -msgid "This transaction hasn't changed state." -msgstr "" - -#: lib/block_scout_web/templates/address/overview.html.eex:120 -#, elixir-autogen, elixir-format -msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" -msgstr "" - -#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 -#, elixir-autogen, elixir-format -msgid "Blockchain" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:72 -#, elixir-autogen, elixir-format -msgid "Constructor args" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:41 -#, elixir-autogen, elixir-format -msgid "Contract name or address" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:5 -#, elixir-autogen, elixir-format -msgid "Contracts" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:15 -#, elixir-autogen, elixir-format -msgid "Filter by compiler:" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 -#, elixir-autogen, elixir-format -msgid "Last 24h" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:78 -#, elixir-autogen, elixir-format -msgid "Market cap" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:21 -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:58 -#, elixir-autogen, elixir-format -msgid "N/A" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 -#, elixir-autogen, elixir-format -msgid "Optimization" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:26 -#: lib/block_scout_web/views/verified_contracts_view.ex:9 -#, elixir-autogen, elixir-format -msgid "Solidity" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:93 -#, elixir-autogen, elixir-format -msgid "There are no verified contracts." -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:9 -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:22 -#, elixir-autogen, elixir-format -msgid "Total" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:60 -#, elixir-autogen, elixir-format -msgid "Txns" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:18 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:6 -#, elixir-autogen, elixir-format -msgid "Verified Contracts" -msgstr "" - -#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 -#, elixir-autogen, elixir-format -msgid "Verified contracts" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:2 -#, elixir-autogen, elixir-format -msgid "Verified contracts - %{subnetwork} Explorer" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:8 -#, elixir-autogen, elixir-format -msgid "View the verified contracts on %{subnetwork}" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:32 -#: lib/block_scout_web/views/verified_contracts_view.ex:10 -#, elixir-autogen, elixir-format -msgid "Vyper" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Verifed contracts, %{subnetwork}, %{coin}" -msgstr "" - -#: lib/block_scout_web/templates/layout/app.html.eex:44 -#, elixir-autogen, elixir-format -msgid "Blocks With Internal Transactions Indexed" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 -#, elixir-autogen, elixir-format -msgid "Drop all Solidity or Yul contract source files into the drop zone." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:7 -#, elixir-autogen, elixir-format -msgid "New Solidity/Yul Smart Contract Verification" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:19 -#, elixir-autogen, elixir-format -msgid "Select Yes if you want to vefify Yul contract." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 -#, elixir-autogen, elixir-format -msgid "Sources *.sol or *.yul files" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Is Yul contract" -msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 3a9c3f463765..ae907d6d85ed 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -76,6 +76,11 @@ msgstr "" msgid "(query)" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#, elixir-autogen, elixir-format +msgid ") may be added for each contract. Click the Add Library button to add an additional one." +msgstr "" + #: lib/block_scout_web/templates/layout/app.html.eex:230 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." @@ -92,6 +97,11 @@ msgstr "" msgid "A block producer who successfully included the block onto the blockchain." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#, elixir-autogen, elixir-format +msgid "A library name called in the .sol file. Multiple libraries (up to " +msgstr "" + #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:73 #, elixir-autogen, elixir-format msgid "A string with the name of the action to be invoked." @@ -256,6 +266,11 @@ msgstr "" msgid "Address of the token contract" msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Address used in token mintings and burnings." +msgstr "" + #: lib/block_scout_web/templates/account/public_tags_request/address_field.html.eex:2 #, elixir-autogen, elixir-format msgid "Address*" @@ -284,7 +299,7 @@ msgstr "" msgid "All functions displayed below are from ABI of that contract. In order to verify current contract, proceed with" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #, elixir-autogen, elixir-format msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" @@ -363,6 +378,16 @@ msgstr "" msgid "Balance" msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 +#, elixir-autogen, elixir-format +msgid "Balance after" +msgstr "" + +#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 +#, elixir-autogen, elixir-format +msgid "Balance before" +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #, elixir-autogen, elixir-format msgid "Balances" @@ -448,6 +473,11 @@ msgstr "" msgid "BlockScout provides analytics data, API, and Smart Contract tools for the %{subnetwork}" msgstr "" +#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 +#, elixir-autogen, elixir-format +msgid "Blockchain" +msgstr "" + #: lib/block_scout_web/templates/chain/show.html.eex:153 #: lib/block_scout_web/templates/layout/_topnav.html.eex:34 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 @@ -468,11 +498,21 @@ msgstr "" msgid "Blocks Validated" msgstr "" +#: lib/block_scout_web/templates/layout/app.html.eex:44 +#, elixir-autogen, elixir-format +msgid "Blocks With Internal Transactions Indexed" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:22 #, elixir-autogen, elixir-format msgid "Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks." msgstr "" +#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 +#, elixir-autogen, elixir-format +msgid "Burn address" +msgstr "" + #: lib/block_scout_web/templates/block/_tile.html.eex:64 #: lib/block_scout_web/templates/block/overview.html.eex:216 #, elixir-autogen, elixir-format @@ -513,6 +553,11 @@ msgstr "" msgid "Cancel" msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 +#, elixir-autogen, elixir-format +msgid "Change" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:41 #, elixir-autogen, elixir-format msgid "Chat (#blockscout)" @@ -575,7 +620,7 @@ msgstr "" msgid "Compiler" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:65 +#: lib/block_scout_web/templates/address_contract/index.html.eex:66 #, elixir-autogen, elixir-format msgid "Compiler version" msgstr "" @@ -629,18 +674,23 @@ msgstr "" msgid "Connection Lost, click to load newer validations" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:90 +#: lib/block_scout_web/templates/address_contract/index.html.eex:91 #, elixir-autogen, elixir-format msgid "Constructor Arguments" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Constructor args" +msgstr "" + #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:52 #: lib/block_scout_web/templates/transaction/overview.html.eex:227 #, elixir-autogen, elixir-format msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:123 +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -670,8 +720,8 @@ msgstr "" msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:140 -#: lib/block_scout_web/templates/address_contract/index.html.eex:155 +#: lib/block_scout_web/templates/address_contract/index.html.eex:154 +#: lib/block_scout_web/templates/address_contract/index.html.eex:169 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -688,23 +738,38 @@ msgstr "" msgid "Contract Name" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:25 +#: lib/block_scout_web/templates/address_contract/index.html.eex:26 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:11 #, elixir-autogen, elixir-format msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:57 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:41 +#, elixir-autogen, elixir-format +msgid "Contract name or address" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:58 #, elixir-autogen, elixir-format msgid "Contract name:" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:100 +#: lib/block_scout_web/templates/address_contract/index.html.eex:101 #, elixir-autogen, elixir-format msgid "Contract source code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:146 +#: lib/block_scout_web/templates/address/overview.html.eex:120 +#, elixir-autogen, elixir-format +msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" +msgstr "" + +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:5 +#, elixir-autogen, elixir-format +msgid "Contracts" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:160 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -714,7 +779,7 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:125 +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" @@ -746,8 +811,8 @@ msgstr "" msgid "Copy Contract Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:142 -#: lib/block_scout_web/templates/address_contract/index.html.eex:158 +#: lib/block_scout_web/templates/address_contract/index.html.eex:156 +#: lib/block_scout_web/templates/address_contract/index.html.eex:172 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" @@ -757,8 +822,8 @@ msgstr "" msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:179 -#: lib/block_scout_web/templates/address_contract/index.html.eex:189 +#: lib/block_scout_web/templates/address_contract/index.html.eex:193 +#: lib/block_scout_web/templates/address_contract/index.html.eex:203 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -794,8 +859,8 @@ msgstr "" msgid "Copy Raw Trace" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:102 -#: lib/block_scout_web/templates/address_contract/index.html.eex:113 +#: lib/block_scout_web/templates/address_contract/index.html.eex:115 +#: lib/block_scout_web/templates/address_contract/index.html.eex:127 #, elixir-autogen, elixir-format msgid "Copy Source Code" msgstr "" @@ -966,8 +1031,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:177 -#: lib/block_scout_web/templates/address_contract/index.html.eex:185 +#: lib/block_scout_web/templates/address_contract/index.html.eex:191 +#: lib/block_scout_web/templates/address_contract/index.html.eex:199 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -997,7 +1062,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:161 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -1012,6 +1077,11 @@ msgstr "" msgid "Drop all Solidity contract source files into the drop zone." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 +#, elixir-autogen, elixir-format +msgid "Drop all Solidity or Yul contract source files into the drop zone." +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:18 #, elixir-autogen, elixir-format msgid "Drop sources and metadata JSON file or click here" @@ -1072,7 +1142,7 @@ msgstr "" msgid "ETH RPC API Documentation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:77 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #, elixir-autogen, elixir-format @@ -1190,7 +1260,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:214 +#: lib/block_scout_web/templates/address_contract/index.html.eex:228 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1239,11 +1309,21 @@ msgstr "" msgid "Fetching transfers..." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:15 +#, elixir-autogen, elixir-format +msgid "Filter by compiler:" +msgstr "" + #: lib/block_scout_web/templates/admin/dashboard/index.html.eex:16 #, elixir-autogen, elixir-format msgid "For any existing contracts in the database, insert all ABI entries into the contract_methods table. Use this in case you have verified smart contracts before early March 2019 and you want other contracts with the same functions to show those ABI's as candidate matches." msgstr "" +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:6 +#, elixir-autogen, elixir-format +msgid "For contract" +msgstr "" + #: lib/block_scout_web/templates/layout/_topnav.html.eex:44 #, elixir-autogen, elixir-format msgid "Forked Blocks (Reorgs)" @@ -1453,11 +1533,22 @@ msgstr "" msgid "Inventory" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Is Yul contract" +msgstr "" + #: lib/block_scout_web/templates/transaction/not_found.html.eex:16 #, elixir-autogen, elixir-format msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 +#, elixir-autogen, elixir-format +msgid "Last 24h" +msgstr "" + #: lib/block_scout_web/templates/address/overview.html.eex:259 #, elixir-autogen, elixir-format msgid "Last Balance Update" @@ -1474,6 +1565,12 @@ msgstr "" msgid "Less than" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex:4 +#, elixir-autogen, elixir-format +msgid "Library" +msgstr "" + #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:24 #, elixir-autogen, elixir-format msgid "License Expires" @@ -1559,6 +1656,11 @@ msgstr "" msgid "Market Cap" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:78 +#, elixir-autogen, elixir-format +msgid "Market cap" +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:382 #, elixir-autogen, elixir-format msgid "Max Fee per Gas" @@ -1654,6 +1756,12 @@ msgstr "" msgid "Must match the name specified in the code. For example, in contract MyContract {..} MyContract is the contract name." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:21 +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:58 +#, elixir-autogen, elixir-format +msgid "N/A" +msgstr "" + #: lib/block_scout_web/templates/block/overview.html.eex:116 #, elixir-autogen, elixir-format msgid "N/A bytes" @@ -1717,6 +1825,11 @@ msgstr "" msgid "New Solidity Smart Contract Verification" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:7 +#, elixir-autogen, elixir-format +msgid "New Solidity/Yul Smart Contract Verification" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:7 #, elixir-autogen, elixir-format msgid "New Vyper Smart Contract Verification" @@ -1797,12 +1910,17 @@ msgstr "" msgid "Only the first" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:61 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 +#, elixir-autogen, elixir-format +msgid "Optimization" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:62 #, elixir-autogen, elixir-format msgid "Optimization enabled" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:70 +#: lib/block_scout_web/templates/address_contract/index.html.eex:71 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #, elixir-autogen, elixir-format @@ -2115,6 +2233,11 @@ msgstr "" msgid "Search tokens" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select Yes if you want to vefify Yul contract." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:27 #, elixir-autogen, elixir-format msgid "Self-Destruct" @@ -2192,6 +2315,13 @@ msgstr "" msgid "Smart contract / Address (0x...)" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:26 +#: lib/block_scout_web/views/verified_contracts_view.ex:9 +#, elixir-autogen, elixir-format +msgid "Solidity" +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:30 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:50 #: lib/block_scout_web/templates/address_logs/index.html.eex:23 @@ -2232,6 +2362,11 @@ msgstr "" msgid "Sources *.sol files" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 +#, elixir-autogen, elixir-format +msgid "Sources *.sol or *.yul files" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:14 #, elixir-autogen, elixir-format msgid "Sources and Metadata JSON" @@ -2247,6 +2382,13 @@ msgstr "" msgid "Standard Input JSON" msgstr "" +#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 +#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 +#: lib/block_scout_web/views/transaction_view.ex:513 +#, elixir-autogen, elixir-format +msgid "State changes" +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:24 #, elixir-autogen, elixir-format msgid "Static Call" @@ -2310,6 +2452,11 @@ msgstr "" msgid "The block height of a particular block is defined as the number of blocks preceding it in the blockchain." msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 +#, elixir-autogen, elixir-format +msgid "The changes from this transaction have not yet happened since the transaction is still pending." +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:26 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:18 #, elixir-autogen, elixir-format @@ -2453,6 +2600,11 @@ msgstr "" msgid "There are no transfers for this Token." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:93 +#, elixir-autogen, elixir-format +msgid "There are no verified contracts." +msgstr "" + #: lib/block_scout_web/templates/address_coin_balance/index.html.eex:35 #, elixir-autogen, elixir-format msgid "There is no coin history for this address." @@ -2484,12 +2636,12 @@ msgstr "" msgid "This block has not been processed yet." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:41 +#: lib/block_scout_web/templates/address_contract/index.html.eex:42 #, elixir-autogen, elixir-format msgid "This contract has been partially verified via Sourcify." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:45 +#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #, elixir-autogen, elixir-format msgid "This contract has been verified via Sourcify." msgstr "" @@ -2499,6 +2651,11 @@ msgstr "" msgid "This is useful to allow sending requests to blockscout without having to change anything about the request." msgstr "" +#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 +#, elixir-autogen, elixir-format +msgid "This transaction hasn't changed state." +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:64 #, elixir-autogen, elixir-format msgid "This transaction is pending confirmation." @@ -2663,6 +2820,12 @@ msgstr "" msgid "Topics" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:9 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:22 +#, elixir-autogen, elixir-format +msgid "Total" +msgstr "" + #: lib/block_scout_web/templates/block/overview.html.eex:169 #, elixir-autogen, elixir-format msgid "Total Difficulty" @@ -2818,6 +2981,11 @@ msgstr "" msgid "Tx/day" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:60 +#, elixir-autogen, elixir-format +msgid "Txns" +msgstr "" + #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:5 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:22 #, elixir-autogen, elixir-format @@ -2829,6 +2997,11 @@ msgstr "" msgid "Type of the token standard" msgstr "" +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:5 +#, elixir-autogen, elixir-format +msgid "UML diagram" +msgstr "" + #: lib/block_scout_web/templates/transaction/overview.html.eex:461 #, elixir-autogen, elixir-format msgid "UTF-8" @@ -2916,6 +3089,11 @@ msgstr "" msgid "Value sent in the native token (and USD) if applicable." msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Verifed contracts, %{subnetwork}, %{coin}" +msgstr "" + #: lib/block_scout_web/templates/address_read_contract/index.html.eex:17 #: lib/block_scout_web/templates/address_write_contract/index.html.eex:15 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:75 @@ -2923,15 +3101,31 @@ msgstr "" msgid "Verified" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:82 +#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:18 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:6 +#, elixir-autogen, elixir-format +msgid "Verified Contracts" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:83 #, elixir-autogen, elixir-format msgid "Verified at" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 -#: lib/block_scout_web/templates/address_contract/index.html.eex:29 -#: lib/block_scout_web/templates/address_contract/index.html.eex:163 -#: lib/block_scout_web/templates/address_contract/index.html.eex:194 +#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 +#, elixir-autogen, elixir-format +msgid "Verified contracts" +msgstr "" + +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:2 +#, elixir-autogen, elixir-format +msgid "Verified contracts - %{subnetwork} Explorer" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 +#: lib/block_scout_web/templates/address_contract/index.html.eex:30 +#: lib/block_scout_web/templates/address_contract/index.html.eex:177 +#: lib/block_scout_web/templates/address_contract/index.html.eex:208 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -3025,11 +3219,23 @@ msgstr "" msgid "View the transactions, token transfers, and uncles for block number %{block_number}" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:8 +#, elixir-autogen, elixir-format +msgid "View the verified contracts on %{subnetwork}" +msgstr "" + #: lib/block_scout_web/templates/transaction/_metatags.html.eex:10 #, elixir-autogen, elixir-format msgid "View transaction %{transaction} on %{subnetwork}" msgstr "" +#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 +#: lib/block_scout_web/templates/verified_contracts/index.html.eex:32 +#: lib/block_scout_web/views/verified_contracts_view.ex:10 +#, elixir-autogen, elixir-format +msgid "Vyper" +msgstr "" + #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:46 #, elixir-autogen, elixir-format msgid "Vyper contract" @@ -3160,7 +3366,7 @@ msgstr "" msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #, elixir-autogen, elixir-format msgid "button" msgstr "" @@ -3255,199 +3461,3 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 -#, elixir-autogen, elixir-format -msgid ") may be added for each contract. Click the Add Library button to add an additional one." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 -#, elixir-autogen, elixir-format, fuzzy -msgid "A library name called in the .sol file. Multiple libraries (up to " -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex:4 -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex:4 -#, elixir-autogen, elixir-format, fuzzy -msgid "Library" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:8 -#, elixir-autogen, elixir-format -msgid "Address used in token mintings and burnings." -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:35 -#, elixir-autogen, elixir-format, fuzzy -msgid "Balance after" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:32 -#, elixir-autogen, elixir-format, fuzzy -msgid "Balance before" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/_state_change.html.eex:9 -#, elixir-autogen, elixir-format -msgid "Burn address" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:38 -#, elixir-autogen, elixir-format -msgid "Change" -msgstr "" - -#: lib/block_scout_web/templates/transaction/_tabs.html.eex:29 -#: lib/block_scout_web/templates/transaction_state/index.html.eex:6 -#: lib/block_scout_web/views/transaction_view.ex:513 -#, elixir-autogen, elixir-format -msgid "State changes" -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:13 -#, elixir-autogen, elixir-format -msgid "The changes from this transaction have not yet happened since the transaction is still pending." -msgstr "" - -#: lib/block_scout_web/templates/transaction_state/index.html.eex:17 -#, elixir-autogen, elixir-format -msgid "This transaction hasn't changed state." -msgstr "" - -#: lib/block_scout_web/templates/address/overview.html.eex:120 -#, elixir-autogen, elixir-format -msgid "Contract was precompiled and created at genesis or contract creation transaction is missing" -msgstr "" - -#: lib/block_scout_web/templates/layout/_topnav.html.eex:29 -#, elixir-autogen, elixir-format, fuzzy -msgid "Blockchain" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:72 -#, elixir-autogen, elixir-format, fuzzy -msgid "Constructor args" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:41 -#, elixir-autogen, elixir-format, fuzzy -msgid "Contract name or address" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:5 -#, elixir-autogen, elixir-format, fuzzy -msgid "Contracts" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:15 -#, elixir-autogen, elixir-format -msgid "Filter by compiler:" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 -#, elixir-autogen, elixir-format -msgid "Last 24h" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:78 -#, elixir-autogen, elixir-format, fuzzy -msgid "Market cap" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:21 -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:58 -#, elixir-autogen, elixir-format -msgid "N/A" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 -#, elixir-autogen, elixir-format, fuzzy -msgid "Optimization" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:26 -#: lib/block_scout_web/views/verified_contracts_view.ex:9 -#, elixir-autogen, elixir-format -msgid "Solidity" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:93 -#, elixir-autogen, elixir-format, fuzzy -msgid "There are no verified contracts." -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:9 -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:22 -#, elixir-autogen, elixir-format, fuzzy -msgid "Total" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:60 -#, elixir-autogen, elixir-format -msgid "Txns" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:18 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:6 -#, elixir-autogen, elixir-format, fuzzy -msgid "Verified Contracts" -msgstr "" - -#: lib/block_scout_web/templates/layout/_topnav.html.eex:68 -#, elixir-autogen, elixir-format, fuzzy -msgid "Verified contracts" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:2 -#, elixir-autogen, elixir-format, fuzzy -msgid "Verified contracts - %{subnetwork} Explorer" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:8 -#, elixir-autogen, elixir-format -msgid "View the verified contracts on %{subnetwork}" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_contract.html.eex:28 -#: lib/block_scout_web/templates/verified_contracts/index.html.eex:32 -#: lib/block_scout_web/views/verified_contracts_view.ex:10 -#, elixir-autogen, elixir-format -msgid "Vyper" -msgstr "" - -#: lib/block_scout_web/templates/verified_contracts/_metatags.html.eex:7 -#, elixir-autogen, elixir-format, fuzzy -msgid "Verifed contracts, %{subnetwork}, %{coin}" -msgstr "" - -#: lib/block_scout_web/templates/layout/app.html.eex:44 -#, elixir-autogen, elixir-format, fuzzy -msgid "Blocks With Internal Transactions Indexed" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:72 -#, elixir-autogen, elixir-format, fuzzy -msgid "Drop all Solidity or Yul contract source files into the drop zone." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:7 -#, elixir-autogen, elixir-format, fuzzy -msgid "New Solidity/Yul Smart Contract Verification" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:19 -#, elixir-autogen, elixir-format -msgid "Select Yes if you want to vefify Yul contract." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 -#, elixir-autogen, elixir-format, fuzzy -msgid "Sources *.sol or *.yul files" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Is Yul contract" -msgstr "" From 3e2e546ed72bbe299b9385ba622a84ab6c3d8a4b Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Wed, 23 Nov 2022 12:10:11 +0300 Subject: [PATCH 654/723] Fix sol2uml button layout --- .../templates/address_contract/index.html.eex | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 5904601a2bd3..86e9f64cd6e2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -99,21 +99,21 @@

    <%= target_contract.file_path || gettext "Contract source code" %>

    -
    - <%= if visualize_sol2uml_enabled && !target_contract.is_vyper_contract do %> - - -
    - - Sol2uml -
    new
    -
    -
    -
    - <% end %> - +
    + <%= if visualize_sol2uml_enabled && !target_contract.is_vyper_contract && !is_nil(target_contract.abi) do %> + + +
    + + Sol2uml +
    new
    +
    +
    +
    + <% end %> +
    ><%= target_contract.contract_source_code %>
    
    From 131d03b83226c751688706a46c5dde8e809878aa Mon Sep 17 00:00:00 2001
    From: Lymarenko Lev 
    Date: Thu, 24 Nov 2022 15:59:01 +0300
    Subject: [PATCH 655/723] Fix pr issues
    
    ---
     .../block_scout_web/assets/js/pages/sol2uml.js |  5 +----
     apps/block_scout_web/assets/package-lock.json  |  7 +++----
     apps/block_scout_web/assets/package.json       |  1 +
     .../visualize_sol2uml_controller.ex            | 11 +++++++++--
     .../templates/visualize_sol2uml/index.html.eex | 18 +++++++++++++-----
     .../smart_contract/rust_verifier_interface.ex  |  9 +--------
     .../lib/explorer/utility/rust_service.ex       | 12 ++++++++++++
     .../explorer/lib/explorer/visualize/sol2uml.ex | 11 ++---------
     8 files changed, 42 insertions(+), 32 deletions(-)
     create mode 100644 apps/explorer/lib/explorer/utility/rust_service.ex
    
    diff --git a/apps/block_scout_web/assets/js/pages/sol2uml.js b/apps/block_scout_web/assets/js/pages/sol2uml.js
    index 4d24361b5f81..253f268a6bf8 100644
    --- a/apps/block_scout_web/assets/js/pages/sol2uml.js
    +++ b/apps/block_scout_web/assets/js/pages/sol2uml.js
    @@ -25,7 +25,6 @@ const elements = {
       '[data-selector="contract-image"]': {
         render ($el, state, oldState) {
           if (state.contract_svg) {
    -        console.log('Got svg from server')
             $('#spinner').hide()
             $('#gallery img').attr('src', 'data:image/svg+xml;base64,' + state.contract_svg)
             const gallery = document.getElementById('gallery')
    @@ -49,10 +48,8 @@ const elements = {
             viewer.update()
             $el.show()
           } else if (state.visualize_error) {
    -        console.log('Got error from server')
    -
             $('#spinner').hide()
    -        $el.empty().text('Cannot visalize contract: ' + state.visualize_error)
    +        $el.empty().text('Cannot visualize contract: ' + state.visualize_error)
             $el.show()
           } else {
             $('#spinner').show()
    diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json
    index 24bc901f47ef..bd616a3a1d1b 100644
    --- a/apps/block_scout_web/assets/package-lock.json
    +++ b/apps/block_scout_web/assets/package-lock.json
    @@ -23,6 +23,7 @@
             "highlight.js": "^11.7.0",
             "https-browserify": "^1.0.0",
             "humps": "^2.0.1",
    +        "jquery": "^3.6.1",
             "js-cookie": "^3.0.1",
             "lodash.debounce": "^4.0.8",
             "lodash.differenceby": "^4.8.0",
    @@ -11888,8 +11889,7 @@
         "node_modules/jquery": {
           "version": "3.6.1",
           "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
    -      "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==",
    -      "peer": true
    +      "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
         },
         "node_modules/js-base64": {
           "version": "2.6.4",
    @@ -27463,8 +27463,7 @@
         "jquery": {
           "version": "3.6.1",
           "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz",
    -      "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==",
    -      "peer": true
    +      "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw=="
         },
         "js-base64": {
           "version": "2.6.4",
    diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json
    index 7e04b2dea29a..b066d3788021 100644
    --- a/apps/block_scout_web/assets/package.json
    +++ b/apps/block_scout_web/assets/package.json
    @@ -35,6 +35,7 @@
         "highlight.js": "^11.7.0",
         "https-browserify": "^1.0.0",
         "humps": "^2.0.1",
    +    "jquery": "^3.6.1",
         "js-cookie": "^3.0.1",
         "lodash.debounce": "^4.0.8",
         "lodash.differenceby": "^4.8.0",
    diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex
    index b3955c109086..3863fb31a8c6 100644
    --- a/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex
    +++ b/apps/block_scout_web/lib/block_scout_web/controllers/visualize_sol2uml_controller.ex
    @@ -40,10 +40,17 @@ defmodule BlockScoutWeb.VisualizeSol2umlController do
       end
     
       def index(conn, %{"address" => address_hash_string}) do
    +    address_options = [
    +      necessity_by_association: %{
    +        :smart_contract => :optional
    +      }
    +    ]
    +
         with true <- Sol2uml.enabled?(),
    -         {:ok, _} <- Chain.string_to_address_hash(address_hash_string) do
    +         {:ok, address_hash} <- Chain.string_to_address_hash(address_hash_string),
    +         {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do
           render(conn, "index.html",
    -        address: address_hash_string,
    +        address: address,
             get_svg_path: visualize_sol2uml_path(conn, :index, %{"type" => "JSON", "address" => address_hash_string})
           )
         else
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex
    index 46758d9a446a..b78d3ef514ec 100644
    --- a/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex
    +++ b/apps/block_scout_web/lib/block_scout_web/templates/visualize_sol2uml/index.html.eex
    @@ -2,11 +2,19 @@
         
    -

    <%= gettext("UML diagram") %>

    - <%= gettext("For contract") %> <%= link( - @address, - to: address_contract_path(@conn, :index, @address) - ) %> +
    <%= gettext("UML diagram") %>
    +

    + <%= gettext("For contract") %> + <%= link to: address_contract_path(@conn, :index, @address), "data-test": "address_hash_link" do %> + <%= render( + BlockScoutWeb.AddressView, + "_responsive_hash.html", + address: @address, + contract: true, + use_custom_tooltip: false + ) %> + <% end %> +

    diff --git a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex index e54fcddd7b62..8f3afb74c93b 100644 --- a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex +++ b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex @@ -137,14 +137,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do - url = Application.get_env(:explorer, __MODULE__)[:service_url] - - if String.ends_with?(url, "/") do - url - |> String.slice(0..(String.length(url) - 2)) - else - url - end + Explorer.Utility.RustService.base_url(__MODULE__) end def enabled?, do: Application.get_env(:explorer, __MODULE__)[:enabled] diff --git a/apps/explorer/lib/explorer/utility/rust_service.ex b/apps/explorer/lib/explorer/utility/rust_service.ex new file mode 100644 index 000000000000..97924a997567 --- /dev/null +++ b/apps/explorer/lib/explorer/utility/rust_service.ex @@ -0,0 +1,12 @@ +defmodule Explorer.Utility.RustService do + def base_url(module) do + url = Application.get_env(:explorer, module)[:service_url] + + if String.ends_with?(url, "/") do + url + |> String.slice(0..(String.length(url) - 2)) + else + url + end + end +end diff --git a/apps/explorer/lib/explorer/visualize/sol2uml.ex b/apps/explorer/lib/explorer/visualize/sol2uml.ex index e9281b3ca153..53edc0a17b69 100644 --- a/apps/explorer/lib/explorer/visualize/sol2uml.ex +++ b/apps/explorer/lib/explorer/visualize/sol2uml.ex @@ -5,7 +5,7 @@ defmodule Explorer.Visualize.Sol2uml do alias HTTPoison.Response require Logger - @post_timeout :infinity + @post_timeout 60_000 @request_error_msg "Error while sending request to visualizer microservice" def visualize_contracts(body) do @@ -60,14 +60,7 @@ defmodule Explorer.Visualize.Sol2uml do def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do - url = Application.get_env(:explorer, __MODULE__)[:service_url] - - if String.ends_with?(url, "/") do - url - |> String.slice(0..(String.length(url) - 2)) - else - url - end + Explorer.Utility.RustService.base_url(__MODULE__) end def enabled?, do: Application.get_env(:explorer, __MODULE__)[:enabled] From 1579071165515d012bbf6e61decf58a343922f96 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Thu, 24 Nov 2022 16:23:08 +0300 Subject: [PATCH 656/723] Add sol2uml env vars to makefile and docker-compose envs --- docker-compose/envs/common-blockscout.env | 2 ++ docker/Makefile | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index b0d3c84156cf..7119152aed10 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -137,6 +137,8 @@ API_RATE_LIMIT_STATIC_API_KEY= FETCH_REWARDS_WAY=trace_block ENABLE_RUST_VERIFICATION_SERVICE=true RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ +VISUALIZE_SOL2UML_ENABLED=true +VISUALIZE_SOL2UML_VISUALIZE_SOL2UML_SERVICE_URL=http://host.docker.internal:8050/ # DATABASE_READ_ONLY_API_URL= # ACCOUNT_DATABASE_URL= # ACCOUNT_POOL_SIZE= diff --git a/docker/Makefile b/docker/Makefile index c38684bae11e..7c420a771018 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -550,6 +550,13 @@ endif ifdef ACCOUNT_CLOAK_KEY BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)' endif +ifdef VISUALIZE_SOL2UML_ENABLED + BLOCKSCOUT_CONTAINER_PARAMS += -e 'VISUALIZE_SOL2UML_ENABLED=$(VISUALIZE_SOL2UML_ENABLED)' +endif +ifdef VISUALIZE_SOL2UML_SERVICE_URL + BLOCKSCOUT_CONTAINER_PARAMS += -e 'VISUALIZE_SOL2UML_SERVICE_URL=$(VISUALIZE_SOL2UML_SERVICE_URL)' +endif + HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") build: From ae8e38d52d3d14270725d3871adec901b5bb9168 Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Thu, 24 Nov 2022 16:30:22 +0300 Subject: [PATCH 657/723] Fix mix credo --- .../lib/explorer/smart_contract/rust_verifier_interface.ex | 3 ++- apps/explorer/lib/explorer/utility/rust_service.ex | 3 +++ apps/explorer/lib/explorer/visualize/sol2uml.ex | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex index 8f3afb74c93b..ccca2505bc88 100644 --- a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex +++ b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex @@ -2,6 +2,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do @moduledoc """ Adapter for contracts verification with https://github.com/blockscout/blockscout-rs/blob/main/smart-contract-verifier """ + alias Explorer.Utility.RustService alias HTTPoison.Response require Logger @@ -137,7 +138,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do - Explorer.Utility.RustService.base_url(__MODULE__) + RustService.base_url(__MODULE__) end def enabled?, do: Application.get_env(:explorer, __MODULE__)[:enabled] diff --git a/apps/explorer/lib/explorer/utility/rust_service.ex b/apps/explorer/lib/explorer/utility/rust_service.ex index 97924a997567..63f949961252 100644 --- a/apps/explorer/lib/explorer/utility/rust_service.ex +++ b/apps/explorer/lib/explorer/utility/rust_service.ex @@ -1,4 +1,7 @@ defmodule Explorer.Utility.RustService do + @moduledoc """ + Module is responsible for common utils related to rust microservices. + """ def base_url(module) do url = Application.get_env(:explorer, module)[:service_url] diff --git a/apps/explorer/lib/explorer/visualize/sol2uml.ex b/apps/explorer/lib/explorer/visualize/sol2uml.ex index 53edc0a17b69..b507c63a2e10 100644 --- a/apps/explorer/lib/explorer/visualize/sol2uml.ex +++ b/apps/explorer/lib/explorer/visualize/sol2uml.ex @@ -2,6 +2,7 @@ defmodule Explorer.Visualize.Sol2uml do @moduledoc """ Adapter for sol2uml visualizer with https://github.com/blockscout/blockscout-rs/blob/main/visualizer """ + alias Explorer.Utility.RustService alias HTTPoison.Response require Logger @@ -60,7 +61,7 @@ defmodule Explorer.Visualize.Sol2uml do def base_api_url, do: "#{base_url()}" <> "/api/v1" def base_url do - Explorer.Utility.RustService.base_url(__MODULE__) + RustService.base_url(__MODULE__) end def enabled?, do: Application.get_env(:explorer, __MODULE__)[:enabled] From 3ad3ad49f82399352bce1a457124b173343fb30e Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Thu, 24 Nov 2022 18:40:22 +0300 Subject: [PATCH 658/723] Fix mix gettext --- apps/block_scout_web/priv/gettext/default.pot | 2 +- apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index ae907d6d85ed..6cfb1c37a8d3 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -1319,7 +1319,7 @@ msgstr "" msgid "For any existing contracts in the database, insert all ABI entries into the contract_methods table. Use this in case you have verified smart contracts before early March 2019 and you want other contracts with the same functions to show those ABI's as candidate matches." msgstr "" -#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:6 +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:7 #, elixir-autogen, elixir-format msgid "For contract" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index ae907d6d85ed..6cfb1c37a8d3 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -1319,7 +1319,7 @@ msgstr "" msgid "For any existing contracts in the database, insert all ABI entries into the contract_methods table. Use this in case you have verified smart contracts before early March 2019 and you want other contracts with the same functions to show those ABI's as candidate matches." msgstr "" -#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:6 +#: lib/block_scout_web/templates/visualize_sol2uml/index.html.eex:7 #, elixir-autogen, elixir-format msgid "For contract" msgstr "" From 772c06b035cad46314946656cd50790ff88a9877 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 25 Nov 2022 19:37:59 +0400 Subject: [PATCH 659/723] Log only uniq hashes --- apps/indexer/lib/indexer/fetcher/internal_transaction.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/indexer/lib/indexer/fetcher/internal_transaction.ex b/apps/indexer/lib/indexer/fetcher/internal_transaction.ex index 004e6a20917d..cc29e205cdac 100644 --- a/apps/indexer/lib/indexer/fetcher/internal_transaction.ex +++ b/apps/indexer/lib/indexer/fetcher/internal_transaction.ex @@ -276,7 +276,11 @@ defmodule Indexer.Fetcher.InternalTransaction do defp handle_foreign_key_violation(internal_transactions_params, block_numbers) do Chain.remove_blocks_consensus(block_numbers) - transaction_hashes = Enum.map(internal_transactions_params, &to_string(&1.transaction_hash)) + + transaction_hashes = + internal_transactions_params + |> Enum.map(&to_string(&1.transaction_hash)) + |> Enum.uniq() Logger.error(fn -> [ From 4b73d1170f3a18d611ff68abe564b53dcc59649d Mon Sep 17 00:00:00 2001 From: Lymarenko Lev Date: Sat, 26 Nov 2022 15:34:52 +0300 Subject: [PATCH 660/723] Add visualizer to docker-compose --- docker-compose/docker-compose-no-build-erigon.yml | 10 ++++++++++ docker-compose/docker-compose-no-build-ganache.yml | 9 +++++++++ docker-compose/docker-compose-no-build-geth.yml | 10 ++++++++++ .../docker-compose-no-build-hardhat-network.yml | 10 ++++++++++ docker-compose/docker-compose-no-build-nethermind.yml | 10 ++++++++++ .../docker-compose-no-build-no-db-container.yml | 10 ++++++++++ ...ication.yml => docker-compose-no-rust-services.yml} | 1 + docker-compose/docker-compose.yml | 9 +++++++++ docker-compose/envs/common-blockscout.env | 2 +- docker-compose/envs/common-visualizer.env | 1 + 10 files changed, 71 insertions(+), 1 deletion(-) rename docker-compose/{docker-compose-no-rust-verification.yml => docker-compose-no-rust-services.yml} (97%) create mode 100644 docker-compose/envs/common-visualizer.env diff --git a/docker-compose/docker-compose-no-build-erigon.yml b/docker-compose/docker-compose-no-build-erigon.yml index 5f3eb2a0122e..b1640627a815 100644 --- a/docker-compose/docker-compose-no-build-erigon.yml +++ b/docker-compose/docker-compose-no-build-erigon.yml @@ -58,3 +58,13 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index 22442c15a98c..177d402e47bf 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -60,3 +60,12 @@ services: ports: - 8043:8043 + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-build-geth.yml b/docker-compose/docker-compose-no-build-geth.yml index 0fd7caa74db8..116ee4afe79a 100644 --- a/docker-compose/docker-compose-no-build-geth.yml +++ b/docker-compose/docker-compose-no-build-geth.yml @@ -58,3 +58,13 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-build-hardhat-network.yml b/docker-compose/docker-compose-no-build-hardhat-network.yml index 9fabf5f3e185..3748696d8353 100644 --- a/docker-compose/docker-compose-no-build-hardhat-network.yml +++ b/docker-compose/docker-compose-no-build-hardhat-network.yml @@ -57,3 +57,13 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-build-nethermind.yml b/docker-compose/docker-compose-no-build-nethermind.yml index e5d607428012..300d63c8278d 100644 --- a/docker-compose/docker-compose-no-build-nethermind.yml +++ b/docker-compose/docker-compose-no-build-nethermind.yml @@ -58,3 +58,13 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-build-no-db-container.yml b/docker-compose/docker-compose-no-build-no-db-container.yml index 24295de00e3a..c73468c81cd0 100644 --- a/docker-compose/docker-compose-no-build-no-db-container.yml +++ b/docker-compose/docker-compose-no-build-no-db-container.yml @@ -41,3 +41,13 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 + diff --git a/docker-compose/docker-compose-no-rust-verification.yml b/docker-compose/docker-compose-no-rust-services.yml similarity index 97% rename from docker-compose/docker-compose-no-rust-verification.yml rename to docker-compose/docker-compose-no-rust-services.yml index 287912e609e0..f0ede3f16325 100644 --- a/docker-compose/docker-compose-no-rust-verification.yml +++ b/docker-compose/docker-compose-no-rust-services.yml @@ -52,6 +52,7 @@ services: - ./envs/common-blockscout.env environment: ENABLE_RUST_VERIFICATION_SERVICE: 'false' + VISUALIZE_SOL2UML_ENABLED: 'false' ports: - 4000:4000 volumes: diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 24b67343ac5c..63223524638b 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -64,3 +64,12 @@ services: - ./envs/common-smart-contract-verifier.env ports: - 8043:8043 + + visualizer: + image: ghcr.io/blockscout/visualizer:${VISUALIZER_DOCKER_TAG:-latest} + restart: always + container_name: 'visualizer' + env_file: + - ./envs/common-visualizer.env + ports: + - 8050:8050 diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 7119152aed10..73c936dbfa47 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -138,7 +138,7 @@ FETCH_REWARDS_WAY=trace_block ENABLE_RUST_VERIFICATION_SERVICE=true RUST_VERIFICATION_SERVICE_URL=http://host.docker.internal:8043/ VISUALIZE_SOL2UML_ENABLED=true -VISUALIZE_SOL2UML_VISUALIZE_SOL2UML_SERVICE_URL=http://host.docker.internal:8050/ +VISUALIZE_SOL2UML_SERVICE_URL=http://host.docker.internal:8050/ # DATABASE_READ_ONLY_API_URL= # ACCOUNT_DATABASE_URL= # ACCOUNT_POOL_SIZE= diff --git a/docker-compose/envs/common-visualizer.env b/docker-compose/envs/common-visualizer.env new file mode 100644 index 000000000000..b4fd470849cb --- /dev/null +++ b/docker-compose/envs/common-visualizer.env @@ -0,0 +1 @@ +VISUALIZER__SERVER__GRPC__ENABLED=false From f354a1e9f4812cc8bbb5a36bf031ff58c67745c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 25 Nov 2022 15:18:40 +0300 Subject: [PATCH 661/723] Split ordering cases for txs --- apps/explorer/lib/explorer/chain.ex | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 2ccb300b3e3e..a731bdea1642 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -439,7 +439,7 @@ defmodule Explorer.Chain do options |> Keyword.get(:paging_options, @default_paging_options) - |> fetch_transactions(from_block, to_block) + |> fetch_transactions(from_block, to_block, true) end defp transactions_block_numbers_at_address(address_hash, options) do @@ -4383,16 +4383,36 @@ defmodule Explorer.Chain do if Repo.one(query), do: true, else: false end - defp fetch_transactions(paging_options \\ nil, from_block \\ nil, to_block \\ nil) do + defp fetch_transactions(paging_options \\ nil, from_block \\ nil, to_block \\ nil, is_address? \\ false) do Transaction + |> order_for_transactions(paging_options, is_address?) + |> where_block_number_in_period(from_block, to_block) + |> handle_paging_options(paging_options) + end + + defp order_for_transactions(query, %PagingOptions{is_pending_tx: true}, true) do + query |> order_by([transaction], desc: transaction.block_number, desc: transaction.index, desc: transaction.inserted_at, desc: transaction.hash ) - |> where_block_number_in_period(from_block, to_block) - |> handle_paging_options(paging_options) + end + + defp order_for_transactions(query, %PagingOptions{key: nil}, true) do + query + |> order_by([transaction], + desc: transaction.block_number, + desc: transaction.index, + desc: transaction.inserted_at, + desc: transaction.hash + ) + end + + defp order_for_transactions(query, _, _) do + query + |> order_by([transaction], desc: transaction.block_number, desc: transaction.index) end defp fetch_transactions_in_ascending_order_by_index(paging_options) do From d40eee9057088a71a148cfa4744b267c533a4431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sat, 26 Nov 2022 15:08:29 +0300 Subject: [PATCH 662/723] Add new indexes --- CHANGELOG.md | 2 +- .../20221126103223_add_txs_indexes.exs | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index e3bbcfbbdbc2..6933920f5db2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ - [#6473](https://github.com/blockscout/blockscout/pull/6473) - Fix state changes for contract creation transactions - [#6475](https://github.com/blockscout/blockscout/pull/6475) - Fix token name with unicode graphemes shortening - [#6420](https://github.com/blockscout/blockscout/pull/6420) - Fix address logs search -- [#6390](https://github.com/blockscout/blockscout/pull/6390), [#6502](https://github.com/blockscout/blockscout/pull/6502) - Fix transactions responses in API v2 +- [#6390](https://github.com/blockscout/blockscout/pull/6390), [#6502](https://github.com/blockscout/blockscout/pull/6502), [#6511](https://github.com/blockscout/blockscout/pull/6511) - Fix transactions responses in API v2 - [#6357](https://github.com/blockscout/blockscout/pull/6357), [#6409](https://github.com/blockscout/blockscout/pull/6409), [#6428](https://github.com/blockscout/blockscout/pull/6428) - Fix definitions of NETWORK_PATH, API_PATH, SOCKET_ROOT: process trailing slash - [#6338](https://github.com/blockscout/blockscout/pull/6338) - Fix token search with space - [#6329](https://github.com/blockscout/blockscout/pull/6329) - Prevent logger from truncating response from rust verifier service in case of an error diff --git a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs new file mode 100644 index 000000000000..c7799819c045 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs @@ -0,0 +1,46 @@ +defmodule Explorer.Repo.Migrations.AddTxsIndexes do + use Ecto.Migration + @disable_ddl_transaction true + @disable_migration_lock true + + def change do + create( + index( + :transactions, + [ + :from_address_hash, + "block_number DESC NULLS FIRST", + "index DESC NULLS FIRST", + "inserted_at DESC", + "hash DESC" + ], + name: "transactions_from_address_hash_with_pending_index", + concurrently: true + ) + ) + + create( + index( + :transactions, + [:to_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", "hash DESC"], + name: "transactions_to_address_hash_with_pending_index", + concurrently: true + ) + ) + + create( + index( + :transactions, + [ + :created_contract_address_hash, + "block_number DESC NULLS FIRST", + "index DESC NULLS FIRST", + "inserted_at DESC", + "hash DESC" + ], + name: "transactions_created_contract_address_hash_with_pending_index", + concurrently: true + ) + ) + end +end From a63db41206176a3c9c9d8f2b24ef6515ec170afc Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Mon, 28 Nov 2022 14:34:13 +0300 Subject: [PATCH 663/723] Smart contract verification improvements (#6481) * Refactor smart contract verification form; Add support for smart contract verification without creation bytecode * Add compiler settings for smart contracts verified via standard JSON input or Sourcify * Add verified twin name as fallback name for unverified contract; Fix compiler label --- .dialyzer-ignore | 2 +- CHANGELOG.md | 1 + .../templates/address_contract/index.html.eex | 17 +++- .../_compiler_field.html.eex | 2 +- .../_fetch_constructor_args.html.eex | 6 +- .../_include_nightly_builds_field.html.eex | 34 ++++---- .../_libraries_other.html.eex | 9 +- .../_library_address.html.eex | 8 +- .../_library_first.html.eex | 18 ++-- .../_library_name.html.eex | 14 +-- .../_yul_contracts_switcher.html.eex | 4 +- .../new.html.eex | 8 +- .../new.html.eex | 10 +-- .../new.html.eex | 2 +- .../lib/block_scout_web/views/address_view.ex | 19 ++-- .../views/api/rpc/contract_view.ex | 12 +++ apps/block_scout_web/priv/gettext/default.pot | 87 ++++++++++++------- .../priv/gettext/en/LC_MESSAGES/default.po | 87 ++++++++++++------- apps/explorer/lib/explorer/chain.ex | 44 ++++++---- .../lib/explorer/chain/smart_contract.ex | 6 +- .../smart_contract/rust_verifier_interface.ex | 6 +- .../smart_contract/solidity/publisher.ex | 30 ++++++- .../smart_contract/solidity/verifier.ex | 1 + .../third_party_integrations/sourcify.ex | 1 + ...21120184715_add_json_compiler_settings.exs | 9 ++ 25 files changed, 287 insertions(+), 150 deletions(-) create mode 100644 apps/explorer/priv/repo/migrations/20221120184715_add_json_compiler_settings.exs diff --git a/.dialyzer-ignore b/.dialyzer-ignore index 7c287bf3b506..73a7edec27db 100644 --- a/.dialyzer-ignore +++ b/.dialyzer-ignore @@ -22,7 +22,7 @@ lib/explorer/smart_contract/reader.ex:435 lib/indexer/fetcher/token_total_supply_on_demand.ex:16 lib/explorer/exchange_rates/source.ex:116 lib/explorer/exchange_rates/source.ex:119 -lib/explorer/smart_contract/solidity/verifier.ex:316 +lib/explorer/smart_contract/solidity/verifier.ex:317 lib/block_scout_web/templates/address_contract/index.html.eex:158 lib/block_scout_web/templates/address_contract/index.html.eex:195 lib/explorer/third_party_integrations/sourcify.ex:120 diff --git a/CHANGELOG.md b/CHANGELOG.md index e3bbcfbbdbc2..8b864ff6b0a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization +- [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements - [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice - [#6440](https://github.com/blockscout/blockscout/pull/6440) - Add support for base64 encoded NFT metadata - [#6407](https://github.com/blockscout/blockscout/pull/6407) - Indexed ratio for int txs fetching stage diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 86e9f64cd6e2..63b350a958f8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -131,7 +131,22 @@
    <% end)%> - <%= if !is_nil(target_contract.abi) do %>> + <%= if !is_nil(target_contract.compiler_settings) do %> +
    +
    +

    <%= gettext "Compiler Settings" %>

    + +
    +
    +
    <%= format_smart_contract_abi(target_contract.compiler_settings) %>
    +              
    +
    +
    + <% end %> + + <%= if !is_nil(target_contract.abi) do %>

    <%= gettext "Contract ABI" %>

    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_compiler_field.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_compiler_field.html.eex index fd98aaf149e9..bd2a179d80ee 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_compiler_field.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_compiler_field.html.eex @@ -1,6 +1,6 @@
    - <%= label @f, :compiler_version, gettext("Compiler") %> + <%= label :smart_contract, :compiler_version, gettext("Compiler") %>
    <%= select @f, :compiler_version, @compiler_versions, class: "form-control border-rounded", "aria-describedby": "compiler-help-block", id: "smart_contract_compiler_version" %> <%= error_tag @f, :compiler_version, id: "compiler-help-block", class: "text-danger form-error" %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex index fcc2109fc373..c269a84e79a1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex @@ -1,17 +1,17 @@
    - <%= label @f, "Try to fetch constructor arguments automatically" %> + <%= label @f, :autodetect_constructor_args, gettext("Try to fetch constructor arguments automatically") %>
    <%= radio_button @f, :autodetect_constructor_args, false, class: "form-check-input autodetectfalse" %>
    - <%= label :autodetect_constructor_args, :false, gettext("No"), class: "radio-text" %> + <%= label @f, :autodetect_constructor_args_false, gettext("No"), class: "radio-text" %>
    <%= radio_button @f, :autodetect_constructor_args, true, class: "form-check-input autodetecttrue", "aria-describedby": "autodetect_constructor_args-help-block" %>
    - <%= label :autodetect_constructor_args, :true, gettext("Yes"), class: "radio-text" %> + <%= label @f, :autodetect_constructor_args_true, gettext("Yes"), class: "radio-text" %>
    <%= error_tag @f, :autodetect_constructor_args, id: "autodetect_constructor_args-help-block", class: "text-danger form-error" %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex index 275de35cbec9..c452549a7069 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex @@ -1,21 +1,21 @@
    -
    - <%= label @f, "Include nightly builds" %> -
    -
    -
    - <%= radio_button @f, :nightly_builds, false, checked: true, class: "form-check-input nightly-builds-false" %> -
    - <%= label :nightly_builds, :false, gettext("No"), class: "radio-text" %> -
    -
    - <%= radio_button @f, :nightly_builds, true, class: "form-check-input nightly-builds-true", "aria-describedby": "nightly_builds-help-block" %> -
    - <%= label :nightly_builds, :true, gettext("Yes"), class: "radio-text" %> -
    -
    - <%= error_tag @f, :nightly_builds, id: "nightly_builds-help-block", class: "text-danger form-error" %> +
    + <%= label @f, :nightly_builds, gettext("Include nightly builds") %> +
    +
    +
    + <%= radio_button @f, :nightly_builds, false, checked: true, class: "form-check-input nightly-builds-false" %> +
    + <%= label @f, :nightly_builds_false, gettext("No"), class: "radio-text" %> +
    +
    + <%= radio_button @f, :nightly_builds, true, class: "form-check-input nightly-builds-true", "aria-describedby": "nightly_builds-help-block" %> +
    + <%= label @f, :nightly_builds_true, gettext("Yes"), class: "radio-text" %>
    -
    Select yes if you want to show nightly builds.
    +
    + <%= error_tag @f, :nightly_builds, id: "nightly_builds-help-block", class: "text-danger form-error" %>
    +
    <%= gettext("Select yes if you want to show nightly builds.") %>
    +
    \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_libraries_other.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_libraries_other.html.eex index 7c6af84faf51..104730d49a27 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_libraries_other.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_libraries_other.html.eex @@ -1,8 +1,7 @@ <%= for library_index <- 2..Application.get_env(:block_scout_web, :verification_max_libraries) do %> - <% library = "library" <> to_string(library_index) |> String.to_atom() %> -
    - <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_name.html", library: library, index: library_index %> +
    + <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_name.html", index: library_index %> - <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_address.html", library: library, index: library_index %> -
    + <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_address.html", index: library_index %> +
    <% end %> \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex index e86bb67efad3..914518876a72 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_address.html.eex @@ -1,10 +1,10 @@ <% library_address = "library" <> to_string(@index) <> "_address" |> String.to_atom() %>
    -
    - <%= label :external_libraries, @library, gettext("Library") <> " " <> to_string(@index) <> " " <> gettext("Address") %> +
    + <%= label :external_libraries, library_address, gettext("Library") <> " " <> to_string(@index) <> " " <> gettext("Address") %>
    - <%= text_input :external_libraries, library_address, class: "form-control border-rounded", "aria-describedby": "contract-name-help-block" %> + <%= text_input :external_libraries, library_address, class: "form-control border-rounded", "aria-describedby": "contract-name-help-block" %>
    <%= if assigns[:tooltip_text] do @tooltip_text end %>
    -
    +
    \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex index 995d86cf9cc0..adb38c4d7c16 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex @@ -1,13 +1,11 @@
    - <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_name.html", - library: :library1, - index: 1, - tooltip_text: gettext("A library name called in the .sol file. Multiple libraries (up to ") <> to_string(Application.get_env(:block_scout_web, :verification_max_libraries)) <> gettext(") may be added for each contract. Click the Add Library button to add an additional one.") - %> + <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_name.html", + index: 1, + tooltip_text: gettext("A library name called in the .sol file. Multiple libraries (up to ") <> to_string(Application.get_env(:block_scout_web, :verification_max_libraries)) <> gettext(") may be added for each contract. Click the Add Library button to add an additional one.") + %> - <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_address.html", - library: :library1, - index: 1, - tooltip_text: gettext "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." - %> + <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_library_address.html", + index: 1, + tooltip_text: gettext "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." + %>
    \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex index b1e0a7a5e0a3..fc15114a6294 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_library_name.html.eex @@ -1,10 +1,10 @@ <% library_name = "library" <> to_string(@index) <> "_name" |> String.to_atom() %>
    -
    - <%= label :external_libraries, @library, gettext("Library") <> " " <> to_string(@index) <> " " <> gettext("Name") %> -
    - <%= text_input :external_libraries, library_name, class: "form-control border-rounded", "aria-describedby": "contract-name-help-block" %> -
    -
    <%= if assigns[:tooltip_text] do @tooltip_text end %>
    -
    +
    + <%= label :external_libraries, library_name, gettext("Library") <> " " <> to_string(@index) <> " " <> gettext("Name") %> +
    + <%= text_input :external_libraries, library_name, class: "form-control border-rounded", "aria-describedby": "contract-name-help-block" %> +
    +
    <%= if assigns[:tooltip_text] do @tooltip_text end %>
    +
    \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex index ce83d4d47e5d..8dd4bdebf564 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_common_fields/_yul_contracts_switcher.html.eex @@ -6,12 +6,12 @@
    <%= radio_button @f, :is_yul, false, class: "form-check-input autodetectfalse" %>
    - <%= label :is_yul, :false, gettext("No"), class: "radio-text" %> + <%= label @f, :is_yul_false, gettext("No"), class: "radio-text" %>
    <%= radio_button @f, :is_yul, true, class: "form-check-input autodetecttrue", "aria-describedby": "is_yul-help-block" %>
    - <%= label :is_yul, :true, gettext("Yes"), class: "radio-text" %> + <%= label @f, :is_yul_true, gettext("Yes"), class: "radio-text" %>
    <%= error_tag @f, :is_yul, id: "is_yul-help-block", class: "text-danger form-error" %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex index 9eec8b7d7ba0..383aa4584d4c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex @@ -1,6 +1,6 @@ <% metadata_for_verification = if assigns[:retrying], do: nil, else: Chain.get_address_verified_twin_contract(@address_hash).verified_contract %> <% changeset = (if assigns[:retrying], do: @changeset, else: SmartContract.merge_twin_contract_with_changeset(metadata_for_verification, @changeset)) |> SmartContract.address_to_checksum_address() %> -<% fetch_constructor_arguments_automatically = if metadata_for_verification, do: true, else: changeset.changes.autodetect_constructor_args %> +<% fetch_constructor_arguments_automatically = if metadata_for_verification, do: true, else: changeset.changes[:autodetect_constructor_args] || true %> <% display_constructor_arguments_text_area = if fetch_constructor_arguments_automatically, do: "none", else: "block" %>
    <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %> @@ -27,7 +27,7 @@
    - <%= label :evm_version, :evm_version, gettext("EVM Version") %> + <%= label f, :evm_version, gettext("EVM Version") %>
    <%= select f, :evm_version, @evm_versions, class: "form-control border-rounded", "aria-describedby": "evm-version-help-block" %>
    @@ -37,7 +37,7 @@
    - <%= label f, "Optimization" %> + <%= label f, :optimization, gettext("Optimization") %>
    @@ -59,7 +59,7 @@
    ">
    - <%= label f, :name, gettext("Optimization runs") %> + <%= label f, :optimization_runs, gettext("Optimization runs") %>
    <%= text_input f, :optimization_runs, class: "form-control border-rounded", "aria-describedby": "optimization-runs-help-block", "data-test": "optimization-runs" %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex index c5a9e46819d5..2b2950397e8e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex @@ -19,7 +19,7 @@
    - <%= label :evm_version, :evm_version, gettext("EVM Version") %> + <%= label f, :evm_version, gettext("EVM Version") %>
    <%= select f, :evm_version, @evm_versions, class: "form-control border-rounded", "aria-describedby": "evm-version-help-block" %>
    @@ -29,18 +29,18 @@
    - <%= label f, "Optimization" %> + <%= label f, :optimization, gettext("Optimization") %>
    <%= radio_button f, :optimization, false, class: "form-check-input optimization-false" %>
    - <%= label :smart_contract_optimization, :false, gettext("No"), class: "radio-text" %> + <%= label f, :optimization_false, gettext("No"), class: "radio-text" %>
    <%= radio_button f, :optimization, true, class: "form-check-input optimization-true", "aria-describedby": "optimization-help-block" %>
    - <%= label :smart_contract_optimization, :true, gettext("Yes"), class: "radio-text" %> + <%= label f, :optimization_true, gettext("Yes"), class: "radio-text" %>
    <%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger form-error" %> @@ -51,7 +51,7 @@
    ">
    - <%= label f, :name, gettext("Optimization runs") %> + <%= label f, :optimization_runs, gettext("Optimization runs") %>
    <%= text_input f, :optimization_runs, class: "form-control border-rounded", "aria-describedby": "optimization-runs-help-block", "data-test": "optimization-runs" %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex index e86c15880e60..9eb3c96ea58a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification_via_standard_json_input/new.html.eex @@ -1,6 +1,6 @@ <% metadata_for_verification = Chain.get_address_verified_twin_contract(@address_hash).verified_contract %> <% changeset = (if assigns[:retrying], do: @changeset, else: SmartContract.merge_twin_contract_with_changeset(metadata_for_verification, @changeset)) |> SmartContract.address_to_checksum_address() %> -<% fetch_constructor_arguments_automatically = if metadata_for_verification, do: true, else: changeset.changes.autodetect_constructor_args %> +<% fetch_constructor_arguments_automatically = if metadata_for_verification, do: true, else: changeset.changes[:autodetect_constructor_args] || true %> <% display_constructor_arguments_text_area = if fetch_constructor_arguments_automatically, do: "none", else: "block" %>
    <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %> diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index 50f54e6b2bea..b1d184959862 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -181,9 +181,7 @@ defmodule BlockScoutWeb.AddressView do @doc """ Returns the primary name of an address if available. If there is no names on address function performs preload of names association. """ - def primary_name(_, second_time? \\ false) - - def primary_name(%Address{names: [_ | _] = address_names}, _second_time?) do + def primary_name(%Address{names: [_ | _] = address_names}) do case Enum.find(address_names, &(&1.primary == true)) do nil -> %Address.Name{name: name} = Enum.at(address_names, 0) @@ -194,11 +192,20 @@ defmodule BlockScoutWeb.AddressView do end end - def primary_name(%Address{names: _} = address, false) do - primary_name(Repo.preload(address, [:names]), true) + def primary_name(%Address{names: %Ecto.Association.NotLoaded{}} = address) do + primary_name(Repo.preload(address, [:names])) end - def primary_name(%Address{names: _}, true), do: nil + def primary_name(%Address{names: _} = address) do + with false <- is_nil(address.contract_code), + twin <- Chain.get_verified_twin_contract(address), + false <- is_nil(twin) do + twin.name + else + _ -> + nil + end + end def implementation_name(%Address{smart_contract: %{implementation_name: implementation_name}}), do: implementation_name diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex index ace6af7517b1..d1686cef1565 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/rpc/contract_view.ex @@ -52,6 +52,18 @@ defmodule BlockScoutWeb.API.RPC.ContractView do |> set_external_libraries(contract) |> set_verified_contract_data(contract, address, optimization) |> set_proxy_info(contract) + |> set_compiler_settings(contract) + end + + defp set_compiler_settings(contract_output, contract) when contract == %{}, do: contract_output + + defp set_compiler_settings(contract_output, contract) do + if is_nil(contract.compiler_settings) do + contract_output + else + contract_output + |> Map.put(:CompilerSettings, contract.compiler_settings) + end end defp set_proxy_info(contract_output, contract) when contract == %{} do diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 6cfb1c37a8d3..b1258df630b5 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -76,7 +76,7 @@ msgstr "" msgid "(query)" msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:4 #, elixir-autogen, elixir-format msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgstr "" @@ -97,7 +97,7 @@ msgstr "" msgid "A block producer who successfully included the block onto the blockchain." msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:4 #, elixir-autogen, elixir-format msgid "A library name called in the .sol file. Multiple libraries (up to " msgstr "" @@ -493,7 +493,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 #: lib/block_scout_web/templates/address/overview.html.eex:276 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 -#: lib/block_scout_web/views/address_view.ex:374 +#: lib/block_scout_web/views/address_view.ex:381 #, elixir-autogen, elixir-format msgid "Blocks Validated" msgstr "" @@ -588,13 +588,13 @@ msgstr "" #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:126 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:149 -#: lib/block_scout_web/views/address_view.ex:367 +#: lib/block_scout_web/views/address_view.ex:374 #, elixir-autogen, elixir-format msgid "Code" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:34 -#: lib/block_scout_web/views/address_view.ex:373 +#: lib/block_scout_web/views/address_view.ex:380 #, elixir-autogen, elixir-format msgid "Coin Balance History" msgstr "" @@ -690,7 +690,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#: lib/block_scout_web/templates/address_contract/index.html.eex:152 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -720,8 +720,8 @@ msgstr "" msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #: lib/block_scout_web/templates/address_contract/index.html.eex:169 +#: lib/block_scout_web/templates/address_contract/index.html.eex:184 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -769,7 +769,7 @@ msgstr "" msgid "Contracts" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:160 +#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -779,7 +779,7 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" @@ -811,8 +811,8 @@ msgstr "" msgid "Copy Contract Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:156 -#: lib/block_scout_web/templates/address_contract/index.html.eex:172 +#: lib/block_scout_web/templates/address_contract/index.html.eex:171 +#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" @@ -822,8 +822,8 @@ msgstr "" msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:193 -#: lib/block_scout_web/templates/address_contract/index.html.eex:203 +#: lib/block_scout_web/templates/address_contract/index.html.eex:208 +#: lib/block_scout_web/templates/address_contract/index.html.eex:218 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -1006,7 +1006,7 @@ msgstr "" msgid "Decoded" msgstr "" -#: lib/block_scout_web/views/address_view.ex:368 +#: lib/block_scout_web/views/address_view.ex:375 #, elixir-autogen, elixir-format msgid "Decompiled Code" msgstr "" @@ -1031,8 +1031,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:191 -#: lib/block_scout_web/templates/address_contract/index.html.eex:199 +#: lib/block_scout_web/templates/address_contract/index.html.eex:206 +#: lib/block_scout_web/templates/address_contract/index.html.eex:214 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -1062,7 +1062,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:161 +#: lib/block_scout_web/templates/address_contract/index.html.eex:176 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -1260,7 +1260,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:228 +#: lib/block_scout_web/templates/address_contract/index.html.eex:243 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1515,7 +1515,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 -#: lib/block_scout_web/views/address_view.ex:364 +#: lib/block_scout_web/views/address_view.ex:371 #: lib/block_scout_web/views/transaction_view.ex:510 #, elixir-autogen, elixir-format msgid "Internal Transactions" @@ -1637,7 +1637,7 @@ msgstr "" #: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 -#: lib/block_scout_web/views/address_view.ex:375 +#: lib/block_scout_web/views/address_view.ex:382 #: lib/block_scout_web/views/transaction_view.ex:511 #, elixir-autogen, elixir-format msgid "Logs" @@ -1910,6 +1910,8 @@ msgstr "" msgid "Only the first" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:40 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:32 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 #, elixir-autogen, elixir-format msgid "Optimization" @@ -2111,7 +2113,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:81 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:27 -#: lib/block_scout_web/views/address_view.ex:369 +#: lib/block_scout_web/views/address_view.ex:376 #: lib/block_scout_web/views/tokens/overview_view.ex:41 #, elixir-autogen, elixir-format msgid "Read Contract" @@ -2119,7 +2121,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:88 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:41 -#: lib/block_scout_web/views/address_view.ex:370 +#: lib/block_scout_web/views/address_view.ex:377 #, elixir-autogen, elixir-format msgid "Read Proxy" msgstr "" @@ -2431,7 +2433,7 @@ msgstr "" msgid "Test Networks" msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:11 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:9 #, elixir-autogen, elixir-format msgid "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." msgstr "" @@ -2755,7 +2757,7 @@ msgstr "" #: lib/block_scout_web/templates/tokens/transfer/index.html.eex:15 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 -#: lib/block_scout_web/views/address_view.ex:366 +#: lib/block_scout_web/views/address_view.ex:373 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:197 #: lib/block_scout_web/views/tokens/overview_view.ex:39 #: lib/block_scout_web/views/transaction_view.ex:509 @@ -2779,7 +2781,7 @@ msgstr "" #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:78 #: lib/block_scout_web/templates/tokens/index.html.eex:10 -#: lib/block_scout_web/views/address_view.ex:363 +#: lib/block_scout_web/views/address_view.ex:370 #, elixir-autogen, elixir-format msgid "Tokens" msgstr "" @@ -2941,7 +2943,7 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/layout/_topnav.html.eex:49 -#: lib/block_scout_web/views/address_view.ex:365 +#: lib/block_scout_web/views/address_view.ex:372 #, elixir-autogen, elixir-format msgid "Transactions" msgstr "" @@ -3124,8 +3126,8 @@ msgstr "" #: lib/block_scout_web/templates/address_contract/index.html.eex:28 #: lib/block_scout_web/templates/address_contract/index.html.eex:30 -#: lib/block_scout_web/templates/address_contract/index.html.eex:177 -#: lib/block_scout_web/templates/address_contract/index.html.eex:208 +#: lib/block_scout_web/templates/address_contract/index.html.eex:192 +#: lib/block_scout_web/templates/address_contract/index.html.eex:223 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -3285,14 +3287,14 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:95 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:34 -#: lib/block_scout_web/views/address_view.ex:371 +#: lib/block_scout_web/views/address_view.ex:378 #, elixir-autogen, elixir-format msgid "Write Contract" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:102 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:48 -#: lib/block_scout_web/views/address_view.ex:372 +#: lib/block_scout_web/views/address_view.ex:379 #, elixir-autogen, elixir-format msgid "Write Proxy" msgstr "" @@ -3461,3 +3463,28 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Include nightly builds" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select yes if you want to show nightly builds." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Try to fetch constructor arguments automatically" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#, elixir-autogen, elixir-format +msgid "Compiler Settings" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#, elixir-autogen, elixir-format +msgid "Copy Compiler Settings" +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 6cfb1c37a8d3..b5d53aba9021 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -76,7 +76,7 @@ msgstr "" msgid "(query)" msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:4 #, elixir-autogen, elixir-format msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgstr "" @@ -97,7 +97,7 @@ msgstr "" msgid "A block producer who successfully included the block onto the blockchain." msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:5 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:4 #, elixir-autogen, elixir-format msgid "A library name called in the .sol file. Multiple libraries (up to " msgstr "" @@ -493,7 +493,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 #: lib/block_scout_web/templates/address/overview.html.eex:276 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 -#: lib/block_scout_web/views/address_view.ex:374 +#: lib/block_scout_web/views/address_view.ex:381 #, elixir-autogen, elixir-format msgid "Blocks Validated" msgstr "" @@ -588,13 +588,13 @@ msgstr "" #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:126 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:149 -#: lib/block_scout_web/views/address_view.ex:367 +#: lib/block_scout_web/views/address_view.ex:374 #, elixir-autogen, elixir-format msgid "Code" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:34 -#: lib/block_scout_web/views/address_view.ex:373 +#: lib/block_scout_web/views/address_view.ex:380 #, elixir-autogen, elixir-format msgid "Coin Balance History" msgstr "" @@ -690,7 +690,7 @@ msgstr "" msgid "Contract" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#: lib/block_scout_web/templates/address_contract/index.html.eex:152 #, elixir-autogen, elixir-format msgid "Contract ABI" msgstr "" @@ -720,8 +720,8 @@ msgstr "" msgid "Contract Creation" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #: lib/block_scout_web/templates/address_contract/index.html.eex:169 +#: lib/block_scout_web/templates/address_contract/index.html.eex:184 #, elixir-autogen, elixir-format msgid "Contract Creation Code" msgstr "" @@ -769,7 +769,7 @@ msgstr "" msgid "Contracts" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:160 +#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #, elixir-autogen, elixir-format msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -779,7 +779,7 @@ msgstr "" msgid "Contribute" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #, elixir-autogen, elixir-format msgid "Copy ABI" msgstr "" @@ -811,8 +811,8 @@ msgstr "" msgid "Copy Contract Address" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:156 -#: lib/block_scout_web/templates/address_contract/index.html.eex:172 +#: lib/block_scout_web/templates/address_contract/index.html.eex:171 +#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #, elixir-autogen, elixir-format msgid "Copy Contract Creation Code" msgstr "" @@ -822,8 +822,8 @@ msgstr "" msgid "Copy Decompiled Contract Code" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:193 -#: lib/block_scout_web/templates/address_contract/index.html.eex:203 +#: lib/block_scout_web/templates/address_contract/index.html.eex:208 +#: lib/block_scout_web/templates/address_contract/index.html.eex:218 #, elixir-autogen, elixir-format msgid "Copy Deployed ByteCode" msgstr "" @@ -1006,7 +1006,7 @@ msgstr "" msgid "Decoded" msgstr "" -#: lib/block_scout_web/views/address_view.ex:368 +#: lib/block_scout_web/views/address_view.ex:375 #, elixir-autogen, elixir-format msgid "Decompiled Code" msgstr "" @@ -1031,8 +1031,8 @@ msgstr "" msgid "Delegate Call" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:191 -#: lib/block_scout_web/templates/address_contract/index.html.eex:199 +#: lib/block_scout_web/templates/address_contract/index.html.eex:206 +#: lib/block_scout_web/templates/address_contract/index.html.eex:214 #, elixir-autogen, elixir-format msgid "Deployed ByteCode" msgstr "" @@ -1062,7 +1062,7 @@ msgstr "" msgid "Difficulty" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:161 +#: lib/block_scout_web/templates/address_contract/index.html.eex:176 #, elixir-autogen, elixir-format msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -1260,7 +1260,7 @@ msgstr "" msgid "Export Data" msgstr "" -#: lib/block_scout_web/templates/address_contract/index.html.eex:228 +#: lib/block_scout_web/templates/address_contract/index.html.eex:243 #, elixir-autogen, elixir-format msgid "External libraries" msgstr "" @@ -1515,7 +1515,7 @@ msgstr "" #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 -#: lib/block_scout_web/views/address_view.ex:364 +#: lib/block_scout_web/views/address_view.ex:371 #: lib/block_scout_web/views/transaction_view.ex:510 #, elixir-autogen, elixir-format msgid "Internal Transactions" @@ -1637,7 +1637,7 @@ msgstr "" #: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 -#: lib/block_scout_web/views/address_view.ex:375 +#: lib/block_scout_web/views/address_view.ex:382 #: lib/block_scout_web/views/transaction_view.ex:511 #, elixir-autogen, elixir-format msgid "Logs" @@ -1910,6 +1910,8 @@ msgstr "" msgid "Only the first" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:40 +#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:32 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:69 #, elixir-autogen, elixir-format msgid "Optimization" @@ -2111,7 +2113,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:81 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:27 -#: lib/block_scout_web/views/address_view.ex:369 +#: lib/block_scout_web/views/address_view.ex:376 #: lib/block_scout_web/views/tokens/overview_view.ex:41 #, elixir-autogen, elixir-format msgid "Read Contract" @@ -2119,7 +2121,7 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:88 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:41 -#: lib/block_scout_web/views/address_view.ex:370 +#: lib/block_scout_web/views/address_view.ex:377 #, elixir-autogen, elixir-format msgid "Read Proxy" msgstr "" @@ -2431,7 +2433,7 @@ msgstr "" msgid "Test Networks" msgstr "" -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:11 +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_library_first.html.eex:9 #, elixir-autogen, elixir-format msgid "The 0x library address. This can be found in the generated json file or Truffle output (if using truffle)." msgstr "" @@ -2755,7 +2757,7 @@ msgstr "" #: lib/block_scout_web/templates/tokens/transfer/index.html.eex:15 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:4 #: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7 -#: lib/block_scout_web/views/address_view.ex:366 +#: lib/block_scout_web/views/address_view.ex:373 #: lib/block_scout_web/views/tokens/instance/overview_view.ex:197 #: lib/block_scout_web/views/tokens/overview_view.ex:39 #: lib/block_scout_web/views/transaction_view.ex:509 @@ -2779,7 +2781,7 @@ msgstr "" #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:78 #: lib/block_scout_web/templates/tokens/index.html.eex:10 -#: lib/block_scout_web/views/address_view.ex:363 +#: lib/block_scout_web/views/address_view.ex:370 #, elixir-autogen, elixir-format msgid "Tokens" msgstr "" @@ -2941,7 +2943,7 @@ msgstr "" #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/layout/_topnav.html.eex:49 -#: lib/block_scout_web/views/address_view.ex:365 +#: lib/block_scout_web/views/address_view.ex:372 #, elixir-autogen, elixir-format msgid "Transactions" msgstr "" @@ -3124,8 +3126,8 @@ msgstr "" #: lib/block_scout_web/templates/address_contract/index.html.eex:28 #: lib/block_scout_web/templates/address_contract/index.html.eex:30 -#: lib/block_scout_web/templates/address_contract/index.html.eex:177 -#: lib/block_scout_web/templates/address_contract/index.html.eex:208 +#: lib/block_scout_web/templates/address_contract/index.html.eex:192 +#: lib/block_scout_web/templates/address_contract/index.html.eex:223 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #, elixir-autogen, elixir-format msgid "Verify & Publish" @@ -3285,14 +3287,14 @@ msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:95 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:34 -#: lib/block_scout_web/views/address_view.ex:371 +#: lib/block_scout_web/views/address_view.ex:378 #, elixir-autogen, elixir-format msgid "Write Contract" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:102 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:48 -#: lib/block_scout_web/views/address_view.ex:372 +#: lib/block_scout_web/views/address_view.ex:379 #, elixir-autogen, elixir-format msgid "Write Proxy" msgstr "" @@ -3461,3 +3463,28 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Include nightly builds" +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select yes if you want to show nightly builds." +msgstr "" + +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Try to fetch constructor arguments automatically" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#, elixir-autogen, elixir-format, fuzzy +msgid "Compiler Settings" +msgstr "" + +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#, elixir-autogen, elixir-format +msgid "Copy Compiler Settings" +msgstr "" diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 2ccb300b3e3e..bf4cff852cad 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4203,6 +4203,30 @@ defmodule Explorer.Chain do |> repo.insert(on_conflict: :nothing, conflict_target: [:address_hash, :name]) end + def get_verified_twin_contract(%Explorer.Chain.Address{} = target_address) do + case target_address do + %{contract_code: %Chain.Data{bytes: contract_code_bytes}} -> + target_address_hash = target_address.hash + + contract_code_md5 = Helper.contract_code_md5(contract_code_bytes) + + verified_contract_twin_query = + from( + smart_contract in SmartContract, + where: smart_contract.contract_code_md5 == ^contract_code_md5, + where: smart_contract.address_hash != ^target_address_hash, + select: smart_contract, + limit: 1 + ) + + verified_contract_twin_query + |> Repo.one(timeout: 10_000) + + _ -> + nil + end + end + @doc """ Finds metadata for verification of a contract from verified twins: contracts with the same bytecode which were verified previously, returns a single t:SmartContract.t/0 @@ -4216,24 +4240,8 @@ defmodule Explorer.Chain do def get_address_verified_twin_contract(%Explorer.Chain.Hash{} = address_hash) do with target_address <- Repo.get(Address, address_hash), - false <- is_nil(target_address), - %{contract_code: %Chain.Data{bytes: contract_code_bytes}} <- target_address do - target_address_hash = target_address.hash - - contract_code_md5 = Helper.contract_code_md5(contract_code_bytes) - - verified_contract_twin_query = - from( - smart_contract in SmartContract, - where: smart_contract.contract_code_md5 == ^contract_code_md5, - where: smart_contract.address_hash != ^target_address_hash, - select: smart_contract, - limit: 1 - ) - - verified_contract_twin = - verified_contract_twin_query - |> Repo.one(timeout: 10_000) + false <- is_nil(target_address) do + verified_contract_twin = get_verified_twin_contract(target_address) verified_contract_twin_additional_sources = get_contract_additional_sources(verified_contract_twin) diff --git a/apps/explorer/lib/explorer/chain/smart_contract.ex b/apps/explorer/lib/explorer/chain/smart_contract.ex index 3742f954c16f..0b18c8a3e43c 100644 --- a/apps/explorer/lib/explorer/chain/smart_contract.ex +++ b/apps/explorer/lib/explorer/chain/smart_contract.ex @@ -201,6 +201,7 @@ defmodule Explorer.Chain.SmartContract do * `bytecode_checked_at` - timestamp of the last check of contract's bytecode matching (DB and BlockChain) * `contract_code_md5` - md5(`t:Explorer.Chain.Address.t/0` `contract_code`) * `implementation_name` - name of the proxy implementation + * `settings` - raw compilation parameters * `autodetect_constructor_args` - field was added for storing user's choice * `is_yul` - field was added for storing user's choice """ @@ -222,6 +223,7 @@ defmodule Explorer.Chain.SmartContract do bytecode_checked_at: DateTime.t(), contract_code_md5: String.t(), implementation_name: String.t() | nil, + compiler_settings: map() | nil, autodetect_constructor_args: boolean | nil, is_yul: boolean | nil } @@ -244,6 +246,7 @@ defmodule Explorer.Chain.SmartContract do field(:bytecode_checked_at, :utc_datetime_usec, default: DateTime.add(DateTime.utc_now(), -86400, :second)) field(:contract_code_md5, :string) field(:implementation_name, :string) + field(:compiler_settings, :map) field(:autodetect_constructor_args, :boolean, virtual: true) field(:is_yul, :boolean, virtual: true) @@ -287,7 +290,8 @@ defmodule Explorer.Chain.SmartContract do :is_changed_bytecode, :bytecode_checked_at, :contract_code_md5, - :implementation_name + :implementation_name, + :compiler_settings ]) |> validate_required([ :name, diff --git a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex index ccca2505bc88..34a2eab02dcf 100644 --- a/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex +++ b/apps/explorer/lib/explorer/smart_contract/rust_verifier_interface.ex @@ -48,7 +48,7 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def http_post_request(url, body) do headers = [{"Content-Type", "application/json"}] - case HTTPoison.post(url, Jason.encode!(body), headers, recv_timeout: @post_timeout) do + case HTTPoison.post(url, Jason.encode!(normalize_creation_bytecode(body)), headers, recv_timeout: @post_timeout) do {:ok, %Response{body: body, status_code: 200}} -> proccess_verifier_response(body) @@ -125,6 +125,10 @@ defmodule Explorer.SmartContract.RustVerifierInterface do def proccess_verifier_response(other), do: {:error, other} + def normalize_creation_bytecode(%{"creation_bytecode" => ""} = map), do: Map.replace(map, "creation_bytecode", nil) + + def normalize_creation_bytecode(map), do: map + def multiple_files_verification_url, do: "#{base_api_url()}" <> "/solidity/verify/multiple-files" def vyper_multiple_files_verification_url, do: "#{base_api_url()}" <> "/vyper/verify/multiple-files" diff --git a/apps/explorer/lib/explorer/smart_contract/solidity/publisher.ex b/apps/explorer/lib/explorer/smart_contract/solidity/publisher.ex index d98d8537b5c0..0ff49cb4806e 100644 --- a/apps/explorer/lib/explorer/smart_contract/solidity/publisher.ex +++ b/apps/explorer/lib/explorer/smart_contract/solidity/publisher.ex @@ -50,6 +50,7 @@ defmodule Explorer.SmartContract.Solidity.Publisher do |> Map.put("contract_source_code", contract_source_code) |> Map.put("external_libraries", contract_libraries) |> Map.put("name", contract_name) + |> cast_compiler_settings(false) publish_smart_contract(address_hash, prepared_params, Jason.decode!(abi_string || "null")) @@ -88,7 +89,7 @@ defmodule Explorer.SmartContract.Solidity.Publisher do "optimization_runs" => _, "sources" => _ } = result_params} -> - proccess_rust_verifier_response(result_params, address_hash) + proccess_rust_verifier_response(result_params, address_hash, true) {:ok, %{abi: abi, constructor_arguments: constructor_arguments}, additional_params} -> params_with_constructor_arguments = @@ -153,7 +154,8 @@ defmodule Explorer.SmartContract.Solidity.Publisher do "optimization_runs" => _, "sources" => sources } = result_params, - address_hash + address_hash, + is_standard_json? \\ false ) do secondary_sources = for {file, source} <- sources, @@ -169,10 +171,23 @@ defmodule Explorer.SmartContract.Solidity.Publisher do |> Map.put("name", contract_name) |> Map.put("file_path", file_name) |> Map.put("secondary_sources", secondary_sources) + |> cast_compiler_settings(is_standard_json?) publish_smart_contract(address_hash, prepared_params, Jason.decode!(abi_string)) end + def cast_compiler_settings(params, false), do: Map.put(params, "compiler_settings", nil) + + def cast_compiler_settings(params, true) do + case Jason.decode(params["compiler_settings"]) do + {:ok, map} -> + Map.put(params, "compiler_settings", map) + + _ -> + Map.put(params, "compiler_settings", nil) + end + end + def publish_smart_contract(address_hash, params, abi) do attrs = address_hash |> attributes(params, abi) @@ -217,6 +232,7 @@ defmodule Explorer.SmartContract.Solidity.Publisher do defp attributes(address_hash, params, abi \\ %{}) do constructor_arguments = params["constructor_arguments"] + compiler_settings = params["compiler_settings"] clean_constructor_arguments = if constructor_arguments != nil && constructor_arguments != "" do @@ -225,6 +241,13 @@ defmodule Explorer.SmartContract.Solidity.Publisher do nil end + clean_compiler_settings = + if compiler_settings in ["", nil, %{}] do + nil + else + compiler_settings + end + prepared_external_libraries = prepare_external_libraies(params["external_libraries"]) compiler_version = CompilerVersion.get_strict_compiler_version(:solc, params["compiler_version"]) @@ -246,7 +269,8 @@ defmodule Explorer.SmartContract.Solidity.Publisher do partially_verified: params["partially_verified"], is_vyper_contract: false, autodetect_constructor_args: params["autodetect_constructor_args"], - is_yul: params["is_yul"] || false + is_yul: params["is_yul"] || false, + compiler_settings: clean_compiler_settings } end diff --git a/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex b/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex index 6e5c0e2919c9..eb849469ac58 100644 --- a/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex +++ b/apps/explorer/lib/explorer/smart_contract/solidity/verifier.ex @@ -205,6 +205,7 @@ defmodule Explorer.SmartContract.Solidity.Verifier do |> Map.put("file_path", file_path) |> Map.put("name", contract_name) |> Map.put("secondary_sources", secondary_sources) + |> Map.put("compiler_settings", map_json_input["settings"]) {:halt, {:ok, verified_data, additional_params}} diff --git a/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex b/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex index 7c34aca8e391..5ec6cee8ccd6 100644 --- a/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex +++ b/apps/explorer/lib/explorer/third_party_integrations/sourcify.ex @@ -312,6 +312,7 @@ defmodule Explorer.ThirdPartyIntegrations.Sourcify do |> Map.put("optimization_runs", Map.get(optimizer, "runs")) |> Map.put("external_libraries", Map.get(settings, "libraries")) |> Map.put("verified_via_sourcify", true) + |> Map.put("compiler_settings", settings) %{ "params_to_publish" => params, diff --git a/apps/explorer/priv/repo/migrations/20221120184715_add_json_compiler_settings.exs b/apps/explorer/priv/repo/migrations/20221120184715_add_json_compiler_settings.exs new file mode 100644 index 000000000000..e6f90d78648a --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20221120184715_add_json_compiler_settings.exs @@ -0,0 +1,9 @@ +defmodule Explorer.Repo.Migrations.AddJsonCompilerSettings do + use Ecto.Migration + + def change do + alter table(:smart_contracts) do + add(:compiler_settings, :jsonb, null: true) + end + end +end From 8fdc845e48afbfdef56b770dae6ad6647ef70076 Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Mon, 28 Nov 2022 16:46:38 +0300 Subject: [PATCH 664/723] BS core API V2: /tokens, /main-page/indexing-status (#6515) * Complete /addresses/0x.. endpoint * Add token controller * Add tests for token controller * Fix credo --- .../lib/block_scout_web/api_router.ex | 8 + .../controllers/api/v2/address_controller.ex | 12 +- .../api/v2/main_page_controller.ex | 12 + .../controllers/api/v2/token_controller.ex | 63 +++++ .../controllers/tokens/token_controller.ex | 33 +-- .../views/api/v2/address_view.ex | 37 ++- .../views/api/v2/token_view.ex | 28 ++- .../api/v2/address_controller_test.exs | 22 +- .../api/v2/main_page_controller_test.exs | 12 + .../api/v2/token_controller_test.exs | 228 ++++++++++++++++++ apps/explorer/lib/explorer/chain.ex | 32 ++- .../chain/address/current_token_balance.ex | 2 +- 12 files changed, 440 insertions(+), 49 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex create mode 100644 apps/block_scout_web/test/block_scout_web/controllers/api/v2/token_controller_test.exs diff --git a/apps/block_scout_web/lib/block_scout_web/api_router.ex b/apps/block_scout_web/lib/block_scout_web/api_router.ex index 0d78f6f870c6..99ced87556f9 100644 --- a/apps/block_scout_web/lib/block_scout_web/api_router.ex +++ b/apps/block_scout_web/lib/block_scout_web/api_router.ex @@ -129,9 +129,17 @@ defmodule BlockScoutWeb.ApiRouter do get("/:address_hash/coin-balance-history-by-day", V2.AddressController, :coin_balance_history_by_day) end + scope "/tokens" do + get("/:address_hash", V2.TokenController, :token) + get("/:address_hash/counters", V2.TokenController, :counters) + get("/:address_hash/transfers", V2.TokenController, :transfers) + get("/:address_hash/holders", V2.TokenController, :holders) + end + scope "/main-page" do get("/blocks", V2.MainPageController, :blocks) get("/transactions", V2.MainPageController, :transactions) + get("/indexing-status", V2.MainPageController, :indexing_status) end scope "/stats" do diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex index 5ee15da7ec68..0e677fa567c6 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex @@ -57,10 +57,10 @@ defmodule BlockScoutWeb.API.V2.AddressController do address_gas_usage_from_db = address.gas_used || 0 json(conn, %{ - transaction_count: to_string(transactions_from_db), - token_transfer_count: to_string(token_transfers_from_db), + transactions_count: to_string(transactions_from_db), + token_transfers_count: to_string(token_transfers_from_db), gas_usage_count: to_string(address_gas_usage_from_db), - validation_count: to_string(validation_count) + validations_count: to_string(validation_count) }) end end @@ -119,15 +119,15 @@ defmodule BlockScoutWeb.API.V2.AddressController do options ) - {transactions, next_page} = split_list_by_page(results_plus_one) + {token_transfers, next_page} = split_list_by_page(results_plus_one) next_page_params = - next_page |> next_page_params(transactions, params) |> delete_parameters_from_next_page_params() + next_page |> next_page_params(token_transfers, params) |> delete_parameters_from_next_page_params() conn |> put_status(200) |> put_view(TransactionView) - |> render(:token_transfers, %{token_transfers: transactions, next_page_params: next_page_params}) + |> render(:token_transfers, %{token_transfers: token_transfers, next_page_params: next_page_params}) end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/main_page_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/main_page_controller.ex index 0d49281f7f84..1851cd9a3ea9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/main_page_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/main_page_controller.ex @@ -37,4 +37,16 @@ defmodule BlockScoutWeb.API.V2.MainPageController do |> put_view(TransactionView) |> render(:transactions, %{transactions: recent_transactions}) end + + def indexing_status(conn, _params) do + indexed_ratio_blocks = Chain.indexed_ratio_blocks() + finished_indexing_blocks = Chain.finished_blocks_indexing?(indexed_ratio_blocks) + + json(conn, %{ + finished_indexing_blocks: finished_indexing_blocks, + finished_indexing: Chain.finished_indexing?(indexed_ratio_blocks), + indexed_blocks_ratio: indexed_ratio_blocks, + indexed_inernal_transactions_ratio: if(finished_indexing_blocks, do: Chain.indexed_ratio_internal_transactions()) + }) + end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex new file mode 100644 index 000000000000..79998a4aaa82 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex @@ -0,0 +1,63 @@ +defmodule BlockScoutWeb.API.V2.TokenController do + use BlockScoutWeb, :controller + + alias BlockScoutWeb.API.V2.TransactionView + alias Explorer.Chain + + import BlockScoutWeb.Chain, only: [split_list_by_page: 1, paging_options: 1, next_page_params: 3] + import BlockScoutWeb.PagingHelper, only: [delete_parameters_from_next_page_params: 1] + + action_fallback(BlockScoutWeb.API.V2.FallbackController) + + def token(conn, %{"address_hash" => address_hash_string}) do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:not_found, {:ok, token}} <- {:not_found, Chain.token_from_address_hash(address_hash)} do + conn + |> put_status(200) + |> render(:token, %{token: token}) + end + end + + def counters(conn, %{"address_hash" => address_hash_string}) do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:not_found, {:ok, _}} <- {:not_found, Chain.token_from_address_hash(address_hash)} do + {transfer_count, token_holder_count} = Chain.fetch_token_counters(address_hash, 30_000) + + json(conn, %{transfers_count: to_string(transfer_count), token_holders_count: to_string(token_holder_count)}) + end + end + + def transfers(conn, %{"address_hash" => address_hash_string} = params) do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + results_plus_one = Chain.fetch_token_transfers_from_token_hash(address_hash, paging_options(params)) + + {token_transfers, next_page} = split_list_by_page(results_plus_one) + + next_page_params = + next_page |> next_page_params(token_transfers, params) |> delete_parameters_from_next_page_params() + + conn + |> put_status(200) + |> put_view(TransactionView) + |> render(:token_transfers, %{token_transfers: token_transfers, next_page_params: next_page_params}) + end + end + + def holders(conn, %{"address_hash" => address_hash_string} = params) do + from_api = true + + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:not_found, {:ok, token}, _} <- + {:not_found, Chain.token_from_address_hash(address_hash), :empty_items_with_next_page_params} do + results_plus_one = Chain.fetch_token_holders_from_token_hash(address_hash, from_api, paging_options(params)) + {token_balances, next_page} = split_list_by_page(results_plus_one) + + next_page_params = + next_page |> next_page_params(token_balances, params) |> delete_parameters_from_next_page_params() + + conn + |> put_status(200) + |> render(:token_balances, %{token_balances: token_balances, next_page_params: next_page_params, token: token}) + end + end +end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/token_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/token_controller.ex index 6a1ea07b1730..73739141e7dd 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/tokens/token_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/tokens/token_controller.ex @@ -5,7 +5,6 @@ defmodule BlockScoutWeb.Tokens.TokenController do alias BlockScoutWeb.AccessHelpers alias Explorer.Chain - alias Explorer.Counters.{TokenHoldersCounter, TokenTransfersCounter} def show(conn, %{"id" => address_hash_string}) do redirect(conn, to: AccessHelpers.get_path(conn, :token_transfer_path, :index, address_hash_string)) @@ -14,7 +13,7 @@ defmodule BlockScoutWeb.Tokens.TokenController do def token_counters(conn, %{"id" => address_hash_string}) do case Chain.string_to_address_hash(address_hash_string) do {:ok, address_hash} -> - {transfer_count, token_holder_count} = fetch_token_counters(address_hash, 30_000) + {transfer_count, token_holder_count} = Chain.fetch_token_counters(address_hash, 30_000) json(conn, %{transfer_count: transfer_count, token_holder_count: token_holder_count}) @@ -22,34 +21,4 @@ defmodule BlockScoutWeb.Tokens.TokenController do not_found(conn) end end - - defp fetch_token_counters(address_hash, timeout) do - total_token_transfers_task = - Task.async(fn -> - TokenTransfersCounter.fetch(address_hash) - end) - - total_token_holders_task = - Task.async(fn -> - TokenHoldersCounter.fetch(address_hash) - end) - - [total_token_transfers_task, total_token_holders_task] - |> Task.yield_many(timeout) - |> Enum.map(fn {_task, res} -> - case res do - {:ok, result} -> - result - - {:exit, reason} -> - Logger.warn("Query fetching token counters terminated: #{inspect(reason)}") - 0 - - nil -> - Logger.warn("Query fetching token counters timed out.") - 0 - end - end) - |> List.to_tuple() - end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex index 54511abc0027..7cea8b97ec27 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex @@ -1,8 +1,12 @@ defmodule BlockScoutWeb.API.V2.AddressView do use BlockScoutWeb, :view + alias BlockScoutWeb.AddressView alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView} alias BlockScoutWeb.API.V2.Helper + alias Explorer.{Chain, Market} + alias Explorer.Chain.Address + alias Explorer.ExchangeRates.Token def render("message.json", assigns) do ApiView.render("message.json", assigns) @@ -29,7 +33,38 @@ defmodule BlockScoutWeb.API.V2.AddressView do end def prepare_address(address, conn \\ nil) do - Helper.address_with_info(conn, address, address.hash) + base_info = Helper.address_with_info(conn, address, address.hash) + is_proxy = AddressView.smart_contract_is_proxy?(address) + + {implementation_address, implementation_name} = + with true <- is_proxy, + {address, name} <- Chain.get_implementation_address_hash(address.hash, address.smart_contract.abi), + false <- is_nil(address), + {:ok, address_hash} <- Chain.string_to_address_hash(address), + checksummed_address <- Address.checksum(address_hash) do + {checksummed_address, name} + else + _ -> + {nil, nil} + end + + balance = address.fetched_coin_balance && address.fetched_coin_balance.value + exchange_rate = (Market.get_exchange_rate(Explorer.coin()) || Token.null()).usd_value + + creator_hash = AddressView.from_address_hash(address) + creation_tx = creator_hash && AddressView.transaction_hash(address) + token = address.token && TokenView.render("token.json", %{token: Market.add_price(address.token)}) + + Map.merge(base_info, %{ + "creator_address_hash" => creator_hash && Address.checksum(creator_hash), + "creation_tx_hash" => creation_tx, + "token" => token, + "coin_balance" => balance, + "exchange_rate" => exchange_rate, + "implementation_name" => implementation_name, + "implementation_address" => implementation_address, + "block_number_balance_updated_at" => address.fetched_coin_balance_block_number + }) end def prepare_token_balance({token_balance, token}) do diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex index 1806ec9d3371..66ae64783ffe 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/token_view.ex @@ -1,4 +1,5 @@ defmodule BlockScoutWeb.API.V2.TokenView do + alias BlockScoutWeb.API.V2.Helper alias Explorer.Chain.Address def render("token.json", %{token: token}) do @@ -9,7 +10,32 @@ defmodule BlockScoutWeb.API.V2.TokenView do "decimals" => token.decimals, "type" => token.type, "holders" => token.holder_count && to_string(token.holder_count), - "exchange_rate" => token.usd_value && to_string(token.usd_value) + "exchange_rate" => exchange_rate(token), + "total_supply" => token.total_supply + } + end + + def render("token_balances.json", %{ + token_balances: token_balances, + next_page_params: next_page_params, + conn: conn, + token: token + }) do + %{ + "items" => Enum.map(token_balances, &prepare_token_balance(&1, conn, token)), + "next_page_params" => next_page_params + } + end + + def exchange_rate(%{usd_value: usd_value}) when not is_nil(usd_value), do: to_string(usd_value) + def exchange_rate(_), do: nil + + def prepare_token_balance(token_balance, conn, token) do + %{ + "address" => Helper.address_with_info(conn, token_balance.address, token_balance.address_hash), + "value" => token_balance.value, + "token_id" => token_balance.token_id, + "token" => render("token.json", %{token: token}) } end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs index 7542666ecaad..33fbe54aee77 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs @@ -42,7 +42,15 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do "name" => nil, "private_tags" => [], "public_tags" => [], - "watchlist_names" => [] + "watchlist_names" => [], + "creator_address_hash" => nil, + "creation_tx_hash" => nil, + "token" => nil, + "coin_balance" => nil, + "exchange_rate" => nil, + "implementation_name" => nil, + "implementation_address" => nil, + "block_number_balance_updated_at" => nil } request = get(conn, "/api/v2/addresses/#{Address.checksum(address.hash)}") @@ -74,10 +82,10 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do request = get(conn, "/api/v2/addresses/#{address.hash}/counters") assert %{ - "transaction_count" => "0", - "token_transfer_count" => "0", + "transactions_count" => "0", + "token_transfers_count" => "0", "gas_usage_count" => "0", - "validation_count" => "0" + "validations_count" => "0" } = json_response(request, 200) end @@ -113,10 +121,10 @@ defmodule BlockScoutWeb.API.V2.AddressControllerTest do gas_used = to_string(tx_from.gas_used) assert %{ - "transaction_count" => "2", - "token_transfer_count" => "2", + "transactions_count" => "2", + "token_transfers_count" => "2", "gas_usage_count" => ^gas_used, - "validation_count" => "1" + "validations_count" => "1" } = json_response(request, 200) end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/main_page_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/main_page_controller_test.exs index 75c5e2183926..b1e27673df8c 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/main_page_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/main_page_controller_test.exs @@ -50,6 +50,18 @@ defmodule BlockScoutWeb.API.V2.MainPageControllerTest do end end + describe "/main-page/indexing-status" do + test "get indexing status", %{conn: conn} do + request = get(conn, "/api/v2/main-page/indexing-status") + assert request = json_response(request, 200) + + assert Map.has_key?(request, "finished_indexing_blocks") + assert Map.has_key?(request, "finished_indexing") + assert Map.has_key?(request, "indexed_blocks_ratio") + assert Map.has_key?(request, "indexed_inernal_transactions_ratio") + end + end + defp compare_item(%Block{} = block, json) do assert to_string(block.hash) == json["hash"] assert block.number == json["height"] diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/token_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/token_controller_test.exs new file mode 100644 index 000000000000..a0751c6bfee2 --- /dev/null +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/token_controller_test.exs @@ -0,0 +1,228 @@ +defmodule BlockScoutWeb.API.V2.TokenControllerTest do + use BlockScoutWeb.ConnCase + + alias Explorer.{Chain, Repo} + + alias Explorer.Chain.{Address, Token, TokenTransfer} + + alias Explorer.Chain.Address.CurrentTokenBalance + + describe "/tokens/{address_hash}" do + test "get 404 on non existing address", %{conn: conn} do + token = build(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}") + + assert %{"message" => "Not found"} = json_response(request, 404) + end + + test "get 422 on invalid address", %{conn: conn} do + request = get(conn, "/api/v2/tokens/0x") + + assert %{"message" => "Invalid parameter(s)"} = json_response(request, 422) + end + + test "get token", %{conn: conn} do + token = insert(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}") + + assert response = json_response(request, 200) + + compare_item(token, response) + end + end + + describe "/tokens/{address_hash}/counters" do + test "get 404 on non existing address", %{conn: conn} do + token = build(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/counters") + + assert %{"message" => "Not found"} = json_response(request, 404) + end + + test "get 422 on invalid address", %{conn: conn} do + request = get(conn, "/api/v2/tokens/0x/counters") + + assert %{"message" => "Invalid parameter(s)"} = json_response(request, 422) + end + + test "get counters", %{conn: conn} do + token = insert(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/counters") + + assert response = json_response(request, 200) + + assert response["transfers_count"] == "0" + assert response["token_holders_count"] == "0" + end + + test "get not zero counters", %{conn: conn} do + contract_token_address = insert(:contract_address) + token = insert(:token, contract_address: contract_token_address) + + transaction = + :transaction + |> insert(to_address: contract_token_address) + |> with_block() + + insert_list( + 3, + :token_transfer, + transaction: transaction, + token_contract_address: contract_token_address + ) + + second_page_token_balances = + 1..5 + |> Enum.map( + &insert( + :address_current_token_balance, + token_contract_address_hash: token.contract_address_hash, + value: &1 + 1000 + ) + ) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/counters") + + assert response = json_response(request, 200) + + assert response["transfers_count"] == "3" + assert response["token_holders_count"] == "5" + end + end + + describe "/tokens/{address_hash}/transfers" do + test "get 200 on non existing address", %{conn: conn} do + token = build(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/transfers") + + assert %{"items" => [], "next_page_params" => nil} = json_response(request, 200) + end + + test "get 422 on invalid address", %{conn: conn} do + request = get(conn, "/api/v2/tokens/0x/transfers") + + assert %{"message" => "Invalid parameter(s)"} = json_response(request, 422) + end + + test "get empty list", %{conn: conn} do + token = insert(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/transfers") + + assert %{"items" => [], "next_page_params" => nil} = json_response(request, 200) + end + + test "check pagination", %{conn: conn} do + token = insert(:token) + + token_tranfers = + for _ <- 0..50 do + tx = insert(:transaction) |> with_block() + + insert(:token_transfer, + transaction: tx, + block: tx.block, + block_number: tx.block_number, + token_contract_address: token.contract_address + ) + end + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/transfers") + assert response = json_response(request, 200) + + request_2nd_page = + get(conn, "/api/v2/tokens/#{token.contract_address.hash}/transfers", response["next_page_params"]) + + assert response_2nd_page = json_response(request_2nd_page, 200) + + check_paginated_response(response, response_2nd_page, token_tranfers) + end + end + + describe "/tokens/{address_hash}/holders" do + test "get 200 on non existing address", %{conn: conn} do + token = build(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/holders") + + assert %{"items" => [], "next_page_params" => nil} = json_response(request, 200) + end + + test "get 422 on invalid address", %{conn: conn} do + request = get(conn, "/api/v2/tokens/0x/holders") + + assert %{"message" => "Invalid parameter(s)"} = json_response(request, 422) + end + + test "get empty list", %{conn: conn} do + token = insert(:token) + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/holders") + + assert %{"items" => [], "next_page_params" => nil} = json_response(request, 200) + end + + test "check pagination", %{conn: conn} do + token = insert(:token) + + token_balances = + for i <- 0..50 do + insert( + :address_current_token_balance, + token_contract_address_hash: token.contract_address_hash, + value: i + 1000 + ) + end + + request = get(conn, "/api/v2/tokens/#{token.contract_address.hash}/holders") + assert response = json_response(request, 200) + + request_2nd_page = + get(conn, "/api/v2/tokens/#{token.contract_address.hash}/holders", response["next_page_params"]) + + assert response_2nd_page = json_response(request_2nd_page, 200) + + check_paginated_response(response, response_2nd_page, token_balances) + end + end + + def compare_item(%Token{} = token, json) do + assert Address.checksum(token.contract_address.hash) == json["address"] + assert token.symbol == json["symbol"] + assert token.name == json["name"] + assert to_string(token.decimals) == json["decimals"] + assert token.type == json["type"] + assert token.holder_count == json["holders"] + assert to_string(token.total_supply) == json["total_supply"] + assert Map.has_key?(json, "exchange_rate") + end + + def compare_item(%TokenTransfer{} = token_transfer, json) do + assert Address.checksum(token_transfer.from_address_hash) == json["from"]["hash"] + assert Address.checksum(token_transfer.to_address_hash) == json["to"]["hash"] + assert to_string(token_transfer.transaction_hash) == json["tx_hash"] + end + + def compare_item(%CurrentTokenBalance{} = ctb, json) do + assert Address.checksum(ctb.address_hash) == json["address"]["hash"] + assert ctb.token_id == json["token_id"] + assert to_string(ctb.value) == json["value"] + compare_item(Repo.preload(ctb, [{:token, :contract_address}]).token, json["token"]) + end + + defp check_paginated_response(first_page_resp, second_page_resp, list) do + assert Enum.count(first_page_resp["items"]) == 50 + assert first_page_resp["next_page_params"] != nil + compare_item(Enum.at(list, 50), Enum.at(first_page_resp["items"], 0)) + compare_item(Enum.at(list, 1), Enum.at(first_page_resp["items"], 49)) + + assert Enum.count(second_page_resp["items"]) == 1 + assert second_page_resp["next_page_params"] == nil + compare_item(Enum.at(list, 0), Enum.at(second_page_resp["items"], 0)) + end +end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index bf4cff852cad..ef481b723220 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -36,7 +36,7 @@ defmodule Explorer.Chain do alias EthereumJSONRPC.Contract alias EthereumJSONRPC.Transaction, as: EthereumJSONRPCTransaction - alias Explorer.Counters.LastFetchedCounter + alias Explorer.Counters.{LastFetchedCounter, TokenHoldersCounter, TokenTransfersCounter} alias Explorer.Chain @@ -6638,4 +6638,34 @@ defmodule Explorer.Chain do def gas_usage_count(address) do AddressTransactionsGasUsageCounter.fetch(address) end + + def fetch_token_counters(address_hash, timeout) do + total_token_transfers_task = + Task.async(fn -> + TokenTransfersCounter.fetch(address_hash) + end) + + total_token_holders_task = + Task.async(fn -> + TokenHoldersCounter.fetch(address_hash) + end) + + [total_token_transfers_task, total_token_holders_task] + |> Task.yield_many(timeout) + |> Enum.map(fn {_task, res} -> + case res do + {:ok, result} -> + result + + {:exit, reason} -> + Logger.warn("Query fetching token counters terminated: #{inspect(reason)}") + 0 + + nil -> + Logger.warn("Query fetching token counters timed out.") + 0 + end + end) + |> List.to_tuple() + end end diff --git a/apps/explorer/lib/explorer/chain/address/current_token_balance.ex b/apps/explorer/lib/explorer/chain/address/current_token_balance.ex index 4cf3fbd813d0..93174cb70c5f 100644 --- a/apps/explorer/lib/explorer/chain/address/current_token_balance.ex +++ b/apps/explorer/lib/explorer/chain/address/current_token_balance.ex @@ -23,7 +23,7 @@ defmodule Explorer.Chain.Address.CurrentTokenBalance do * `token_contract_address_hash` - The contract address hash foreign key. * `block_number` - The block's number that the transfer took place. * `value` - The value that's represents the balance. - * `token_id` - The token_id of the transferred token (applicable for ERC-1155 and ERC-721 tokens) + * `token_id` - The token_id of the transferred token (applicable for ERC-1155) * `token_type` - The type of the token """ @type t :: %__MODULE__{ From 708a6b00362689aab50db8f0cd996c2de66013ed Mon Sep 17 00:00:00 2001 From: nikitosing <32202610+nikitosing@users.noreply.github.com> Date: Mon, 28 Nov 2022 19:08:50 +0300 Subject: [PATCH 665/723] Improve working with contracts implementations (#5561) * Fix error on invalid response from node while fetching implementation address; Improve storing the implementation name * Add time out on implementation fetching and storing implementation info in DB * Add tests for contracts implementation fetching; Fixes for SmartContract module * Fixes after rebase * Refactor --- CHANGELOG.md | 1 + .../controllers/smart_contract_controller.ex | 5 +- .../templates/address/overview.html.eex | 35 +- .../lib/block_scout_web/views/address_view.ex | 4 +- .../views/tokens/overview_view.ex | 4 +- apps/block_scout_web/priv/gettext/default.pot | 98 ++--- .../priv/gettext/en/LC_MESSAGES/default.po | 98 ++--- .../lib/ethereum_jsonrpc/http.ex | 14 +- .../ethereum_jsonrpc/request_coordinator.ex | 2 +- apps/explorer/config/test.exs | 6 +- apps/explorer/lib/explorer/chain.ex | 264 ++---------- apps/explorer/lib/explorer/chain/log.ex | 4 +- .../lib/explorer/chain/smart_contract.ex | 384 +++++++++++++++++- .../lib/explorer/chain/transaction.ex | 13 +- .../lib/explorer/etherscan/contracts.ex | 6 +- .../lib/explorer/smart_contract/reader.ex | 9 +- ...220527131249_add_implementation_fields.exs | 10 + .../explorer/chain/smart_contract_test.exs | 237 +++++++++++ apps/explorer/test/explorer/chain_test.exs | 50 ++- config/runtime.exs | 6 +- 20 files changed, 850 insertions(+), 400 deletions(-) create mode 100644 apps/explorer/priv/repo/migrations/20220527131249_add_implementation_fields.exs create mode 100644 apps/explorer/test/explorer/chain/smart_contract_test.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b864ff6b0a9..501d655a9369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- [#5561](https://github.com/blockscout/blockscout/pull/5561) - Improve working with contracts implementations - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization - [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements - [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex index ab3819c4c827..7d9d0964a9f9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex @@ -3,6 +3,7 @@ defmodule BlockScoutWeb.SmartContractController do alias BlockScoutWeb.AddressView alias Explorer.Chain + alias Explorer.Chain.SmartContract alias Explorer.SmartContract.{Reader, Writer} import Explorer.SmartContract.Solidity.Verifier, only: [parse_boolean: 1] @@ -24,8 +25,8 @@ defmodule BlockScoutWeb.SmartContractController do {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do implementation_address_hash_string = if contract_type == "proxy" do - address.hash - |> Chain.get_implementation_address_hash(address.smart_contract.abi) + address.smart_contract + |> SmartContract.get_implementation_address_hash() |> Tuple.to_list() |> List.first() || @burn_address else diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex index 34059b2ed9dd..9a8abc9dd7b2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex @@ -124,24 +124,23 @@ <% end %> <%= if @is_proxy do %> - <% {implementation_address, name} = Chain.get_implementation_address_hash(@address.hash, @address.smart_contract.abi) || "0x0000000000000000000000000000000000000000" %> - <%= if implementation_address do %> -
    -
    - <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", - text: gettext("Implementation address of the proxy contract.") %> - <%= gettext("Implementation") %> -
    -
    - <%= link( - (if name, do: name <> " | " <> implementation_address, else: implementation_address), - to: address_path(@conn, :show, implementation_address), - class: "contract-address" - ) - %> -
    -
    - <% end %> + <% {implementation_address_, name} = SmartContract.get_implementation_address_hash(@address.smart_contract) %> + <% implementation_address = implementation_address_ || "0x0000000000000000000000000000000000000000" %> +
    +
    + <%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", + text: gettext("Implementation address of the proxy contract.") %> + <%= gettext("Implementation") %> +
    +
    + <%= link( + (if name, do: name <> " | " <> implementation_address, else: implementation_address), + to: address_path(@conn, :show, implementation_address), + class: "contract-address" + ) + %> +
    +
    <% end %>
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index b1d184959862..ac75f3e0ddbe 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -261,8 +261,8 @@ defmodule BlockScoutWeb.AddressView do def is_read_function?(function), do: Helper.queriable_method?(function) || Helper.read_with_wallet_method?(function) - def smart_contract_is_proxy?(%Address{smart_contract: %SmartContract{}} = address) do - Chain.proxy_contract?(address.hash, address.smart_contract.abi) + def smart_contract_is_proxy?(%Address{smart_contract: %SmartContract{} = smart_contract}) do + SmartContract.proxy_contract?(smart_contract) end def smart_contract_is_proxy?(%Address{smart_contract: nil}), do: false diff --git a/apps/block_scout_web/lib/block_scout_web/views/tokens/overview_view.ex b/apps/block_scout_web/lib/block_scout_web/views/tokens/overview_view.ex index 473c2df3e2e1..4fc1c6d28ef4 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/tokens/overview_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/tokens/overview_view.ex @@ -53,8 +53,8 @@ defmodule BlockScoutWeb.Tokens.OverviewView do def smart_contract_with_read_only_functions?(%Token{contract_address: %Address{smart_contract: nil}}), do: false - def smart_contract_is_proxy?(%Token{contract_address: %Address{smart_contract: %SmartContract{}} = address}) do - Chain.proxy_contract?(address.hash, address.smart_contract.abi) + def smart_contract_is_proxy?(%Token{contract_address: %Address{smart_contract: %SmartContract{} = smart_contract}}) do + SmartContract.proxy_contract?(smart_contract) end def smart_contract_is_proxy?(%Token{contract_address: %Address{smart_contract: nil}}), do: false diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index b1258df630b5..153f4521d2c3 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -256,7 +256,7 @@ msgstr "" msgid "Address Tags" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" @@ -304,7 +304,7 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:175 +#: lib/block_scout_web/templates/address/overview.html.eex:174 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" @@ -371,7 +371,7 @@ msgid "Back to Watch list (Cancel)" msgstr "" #: lib/block_scout_web/templates/account/watchlist/show.html.eex:24 -#: lib/block_scout_web/templates/address/overview.html.eex:151 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:57 #, elixir-autogen, elixir-format @@ -463,7 +463,7 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:258 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -491,7 +491,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:276 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:381 #, elixir-autogen, elixir-format @@ -620,6 +620,11 @@ msgstr "" msgid "Compiler" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#, elixir-autogen, elixir-format +msgid "Compiler Settings" +msgstr "" + #: lib/block_scout_web/templates/address_contract/index.html.eex:66 #, elixir-autogen, elixir-format msgid "Compiler version" @@ -805,6 +810,11 @@ msgstr "" msgid "Copy Address" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#, elixir-autogen, elixir-format +msgid "Copy Compiler Settings" +msgstr "" + #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:6 #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:6 #, elixir-autogen, elixir-format @@ -1281,7 +1291,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:248 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1296,14 +1306,14 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:195 -#: lib/block_scout_web/templates/address/overview.html.eex:203 +#: lib/block_scout_web/templates/address/overview.html.eex:194 +#: lib/block_scout_web/templates/address/overview.html.eex:202 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:222 -#: lib/block_scout_web/templates/address/overview.html.eex:230 +#: lib/block_scout_web/templates/address/overview.html.eex:221 +#: lib/block_scout_web/templates/address/overview.html.eex:229 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #, elixir-autogen, elixir-format msgid "Fetching transfers..." @@ -1362,7 +1372,7 @@ msgstr "" msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:241 +#: lib/block_scout_web/templates/address/overview.html.eex:240 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format @@ -1380,7 +1390,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:240 +#: lib/block_scout_web/templates/address/overview.html.eex:239 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1474,6 +1484,11 @@ msgstr "" msgid "Implementation address of the proxy contract." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Include nightly builds" +msgstr "" + #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:30 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:43 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:56 @@ -1549,7 +1564,7 @@ msgstr "" msgid "Last 24h" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:259 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1874,7 +1889,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:275 +#: lib/block_scout_web/templates/address/overview.html.eex:274 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1884,7 +1899,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:185 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1894,7 +1909,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:212 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -2240,6 +2255,11 @@ msgstr "" msgid "Select Yes if you want to vefify Yul contract." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select yes if you want to show nightly builds." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:27 #, elixir-autogen, elixir-format msgid "Self-Destruct" @@ -2776,7 +2796,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:176 +#: lib/block_scout_web/templates/address/overview.html.eex:175 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:78 @@ -2935,9 +2955,9 @@ msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:187 -#: lib/block_scout_web/templates/address/overview.html.eex:193 -#: lib/block_scout_web/templates/address/overview.html.eex:201 +#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:200 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 @@ -2958,9 +2978,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:214 -#: lib/block_scout_web/templates/address/overview.html.eex:220 -#: lib/block_scout_web/templates/address/overview.html.eex:228 +#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:219 +#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format @@ -2973,6 +2993,11 @@ msgstr "" msgid "Try it out" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Try to fetch constructor arguments automatically" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:27 #, elixir-autogen, elixir-format msgid "Twitter" @@ -3383,7 +3408,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" @@ -3463,28 +3488,3 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Include nightly builds" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 -#, elixir-autogen, elixir-format -msgid "Select yes if you want to show nightly builds." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Try to fetch constructor arguments automatically" -msgstr "" - -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 -#, elixir-autogen, elixir-format -msgid "Compiler Settings" -msgstr "" - -#: lib/block_scout_web/templates/address_contract/index.html.eex:139 -#, elixir-autogen, elixir-format -msgid "Copy Compiler Settings" -msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index b5d53aba9021..153f4521d2c3 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -256,7 +256,7 @@ msgstr "" msgid "Address Tags" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "Address balance in" msgstr "" @@ -304,7 +304,7 @@ msgstr "" msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:175 +#: lib/block_scout_web/templates/address/overview.html.eex:174 #, elixir-autogen, elixir-format msgid "All tokens in the account and total value." msgstr "" @@ -371,7 +371,7 @@ msgid "Back to Watch list (Cancel)" msgstr "" #: lib/block_scout_web/templates/account/watchlist/show.html.eex:24 -#: lib/block_scout_web/templates/address/overview.html.eex:151 +#: lib/block_scout_web/templates/address/overview.html.eex:150 #: lib/block_scout_web/templates/address_token/overview.html.eex:51 #: lib/block_scout_web/templates/verified_contracts/index.html.eex:57 #, elixir-autogen, elixir-format @@ -463,7 +463,7 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:258 +#: lib/block_scout_web/templates/address/overview.html.eex:257 #, elixir-autogen, elixir-format msgid "Block number in which the address was updated." msgstr "" @@ -491,7 +491,7 @@ msgid "Blocks Indexed" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address/overview.html.eex:276 +#: lib/block_scout_web/templates/address/overview.html.eex:275 #: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/views/address_view.ex:381 #, elixir-autogen, elixir-format @@ -620,6 +620,11 @@ msgstr "" msgid "Compiler" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#, elixir-autogen, elixir-format +msgid "Compiler Settings" +msgstr "" + #: lib/block_scout_web/templates/address_contract/index.html.eex:66 #, elixir-autogen, elixir-format msgid "Compiler version" @@ -805,6 +810,11 @@ msgstr "" msgid "Copy Address" msgstr "" +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#, elixir-autogen, elixir-format +msgid "Copy Compiler Settings" +msgstr "" + #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:6 #: lib/block_scout_web/templates/account/custom_abi/row.html.eex:6 #, elixir-autogen, elixir-format @@ -1281,7 +1291,7 @@ msgstr "" msgid "Fast" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:248 +#: lib/block_scout_web/templates/address/overview.html.eex:247 #, elixir-autogen, elixir-format msgid "Fetching gas used..." msgstr "" @@ -1296,14 +1306,14 @@ msgstr "" msgid "Fetching tokens..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:195 -#: lib/block_scout_web/templates/address/overview.html.eex:203 +#: lib/block_scout_web/templates/address/overview.html.eex:194 +#: lib/block_scout_web/templates/address/overview.html.eex:202 #, elixir-autogen, elixir-format msgid "Fetching transactions..." msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:222 -#: lib/block_scout_web/templates/address/overview.html.eex:230 +#: lib/block_scout_web/templates/address/overview.html.eex:221 +#: lib/block_scout_web/templates/address/overview.html.eex:229 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #, elixir-autogen, elixir-format msgid "Fetching transfers..." @@ -1362,7 +1372,7 @@ msgstr "" msgid "Gas Price" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:241 +#: lib/block_scout_web/templates/address/overview.html.eex:240 #: lib/block_scout_web/templates/block/_tile.html.eex:73 #: lib/block_scout_web/templates/block/overview.html.eex:178 #, elixir-autogen, elixir-format @@ -1380,7 +1390,7 @@ msgstr "" msgid "Gas tracker" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:240 +#: lib/block_scout_web/templates/address/overview.html.eex:239 #, elixir-autogen, elixir-format msgid "Gas used by the address." msgstr "" @@ -1474,6 +1484,11 @@ msgstr "" msgid "Implementation address of the proxy contract." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Include nightly builds" +msgstr "" + #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:30 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:43 #: lib/block_scout_web/templates/account/watchlist_address/form.html.eex:56 @@ -1549,7 +1564,7 @@ msgstr "" msgid "Last 24h" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:259 +#: lib/block_scout_web/templates/address/overview.html.eex:258 #, elixir-autogen, elixir-format msgid "Last Balance Update" msgstr "" @@ -1874,7 +1889,7 @@ msgstr "" msgid "Number of accounts holding the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:275 +#: lib/block_scout_web/templates/address/overview.html.eex:274 #, elixir-autogen, elixir-format msgid "Number of blocks validated by this validator." msgstr "" @@ -1884,7 +1899,7 @@ msgstr "" msgid "Number of digits that come after the decimal place when displaying token value" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:185 #, elixir-autogen, elixir-format msgid "Number of transactions related to this address." msgstr "" @@ -1894,7 +1909,7 @@ msgstr "" msgid "Number of transfers for the token" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:212 #, elixir-autogen, elixir-format msgid "Number of transfers to/from this address." msgstr "" @@ -2240,6 +2255,11 @@ msgstr "" msgid "Select Yes if you want to vefify Yul contract." msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 +#, elixir-autogen, elixir-format +msgid "Select yes if you want to show nightly builds." +msgstr "" + #: lib/block_scout_web/views/internal_transaction_view.ex:27 #, elixir-autogen, elixir-format msgid "Self-Destruct" @@ -2776,7 +2796,7 @@ msgid "Token type" msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address/overview.html.eex:176 +#: lib/block_scout_web/templates/address/overview.html.eex:175 #: lib/block_scout_web/templates/address_token/overview.html.eex:58 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:78 @@ -2935,9 +2955,9 @@ msgid "Transaction type, introduced in EIP-2718." msgstr "" #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address/overview.html.eex:187 -#: lib/block_scout_web/templates/address/overview.html.eex:193 -#: lib/block_scout_web/templates/address/overview.html.eex:201 +#: lib/block_scout_web/templates/address/overview.html.eex:186 +#: lib/block_scout_web/templates/address/overview.html.eex:192 +#: lib/block_scout_web/templates/address/overview.html.eex:200 #: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block/overview.html.eex:80 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 @@ -2958,9 +2978,9 @@ msgstr "" msgid "Transactions sent" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:214 -#: lib/block_scout_web/templates/address/overview.html.eex:220 -#: lib/block_scout_web/templates/address/overview.html.eex:228 +#: lib/block_scout_web/templates/address/overview.html.eex:213 +#: lib/block_scout_web/templates/address/overview.html.eex:219 +#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #, elixir-autogen, elixir-format @@ -2973,6 +2993,11 @@ msgstr "" msgid "Try it out" msgstr "" +#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 +#, elixir-autogen, elixir-format +msgid "Try to fetch constructor arguments automatically" +msgstr "" + #: lib/block_scout_web/templates/layout/_footer.html.eex:27 #, elixir-autogen, elixir-format msgid "Twitter" @@ -3383,7 +3408,7 @@ msgstr "" msgid "custom RPC" msgstr "" -#: lib/block_scout_web/templates/address/overview.html.eex:150 +#: lib/block_scout_web/templates/address/overview.html.eex:149 #, elixir-autogen, elixir-format msgid "doesn't include ERC20, ERC721, ERC1155 tokens)." msgstr "" @@ -3463,28 +3488,3 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Include nightly builds" -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_include_nightly_builds_field.html.eex:19 -#, elixir-autogen, elixir-format -msgid "Select yes if you want to show nightly builds." -msgstr "" - -#: lib/block_scout_web/templates/address_contract_verification_common_fields/_fetch_constructor_args.html.eex:3 -#, elixir-autogen, elixir-format -msgid "Try to fetch constructor arguments automatically" -msgstr "" - -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 -#, elixir-autogen, elixir-format, fuzzy -msgid "Compiler Settings" -msgstr "" - -#: lib/block_scout_web/templates/address_contract/index.html.eex:139 -#, elixir-autogen, elixir-format -msgid "Copy Compiler Settings" -msgstr "" diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex index b8222df2d13e..dc66006f9e80 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex @@ -3,7 +3,7 @@ defmodule EthereumJSONRPC.HTTP do JSONRPC over HTTP """ - alias EthereumJSONRPC.Transport + alias EthereumJSONRPC.{DecodeError, Transport} require Logger @@ -114,7 +114,17 @@ defmodule EthereumJSONRPC.HTTP do {:error, {:bad_gateway, request_url}} _ -> - raise EthereumJSONRPC.DecodeError, named_arguments + named_arguments + |> DecodeError.exception() + |> DecodeError.message() + |> Logger.error() + + request_url = + named_arguments + |> Keyword.fetch!(:request) + |> Keyword.fetch!(:url) + + {:error, {:bad_response, request_url}} end end end diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/request_coordinator.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/request_coordinator.ex index bd491f25fd7f..b63e0971a6d3 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/request_coordinator.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/request_coordinator.ex @@ -109,7 +109,7 @@ defmodule EthereumJSONRPC.RequestCoordinator do defp trace_request(_, fun), do: fun.() - defp handle_transport_response({:error, {:bad_gateway, _}} = error) do + defp handle_transport_response({:error, {error_type, _}} = error) when error_type in [:bad_gateway, :bad_response] do RollingWindow.inc(table(), @error_key) inc_throttle_table() error diff --git a/apps/explorer/config/test.exs b/apps/explorer/config/test.exs index e9174824ce04..cf55e854ca5b 100644 --- a/apps/explorer/config/test.exs +++ b/apps/explorer/config/test.exs @@ -22,7 +22,11 @@ config :explorer, Explorer.Repo.Replica1, # Default of `5_000` was too low for `BlockFetcher` test ownership_timeout: :timer.minutes(1), timeout: :timer.seconds(60), - queue_target: 1000 + queue_target: 1000, + enable_caching_implementation_data_of_proxy: true, + avg_block_time_as_ttl_cached_implementation_data_of_proxy: false, + fallback_ttl_cached_implementation_data_of_proxy: :timer.seconds(20), + implementation_data_fetching_timeout: :timer.seconds(20) # Configure API database config :explorer, Explorer.Repo.Account, diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index ef481b723220..1d83d1b44ef6 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -21,7 +21,6 @@ defmodule Explorer.Chain do select: 3, subquery: 1, union: 2, - update: 2, where: 2, where: 3 ] @@ -33,7 +32,6 @@ defmodule Explorer.Chain do alias ABI.TypeDecoder alias Ecto.{Changeset, Multi} - alias EthereumJSONRPC.Contract alias EthereumJSONRPC.Transaction, as: EthereumJSONRPCTransaction alias Explorer.Counters.{LastFetchedCounter, TokenHoldersCounter, TokenTransfersCounter} @@ -91,7 +89,7 @@ defmodule Explorer.Chain do alias Explorer.Market.MarketHistoryCache alias Explorer.{PagingOptions, Repo} - alias Explorer.SmartContract.{Helper, Reader} + alias Explorer.SmartContract.Helper alias Dataloader.Ecto, as: DataloaderEcto @@ -4334,13 +4332,28 @@ defmodule Explorer.Chain do Chain.get_address_verified_twin_contract(address_hash).verified_contract if address_verified_twin_contract do - Map.put(address_verified_twin_contract, :address_hash, address_hash) + address_verified_twin_contract + |> Map.put(:address_hash, address_hash) + |> Map.put(:implementation_address_hash, current_smart_contract.implementation_address_hash) + |> Map.put(:implementation_name, current_smart_contract.implementation_name) + |> Map.put(:implementation_fetched_at, current_smart_contract.implementation_fetched_at) else current_smart_contract end end end + @spec address_hash_to_smart_contract_without_twin(Hash.Address.t()) :: SmartContract.t() | nil + def address_hash_to_smart_contract_without_twin(address_hash) do + query = + from( + smart_contract in SmartContract, + where: smart_contract.address_hash == ^address_hash + ) + + Repo.one(query) + end + def smart_contract_fully_verified?(address_hash_str) when is_binary(address_hash_str) do case string_to_address_hash(address_hash_str) do {:ok, address_hash} -> @@ -5844,32 +5857,16 @@ defmodule Explorer.Chain do end end - def combine_proxy_implementation_abi(proxy_address_hash, abi) when not is_nil(abi) do - implementation_abi = get_implementation_abi_from_proxy(proxy_address_hash, abi) + def combine_proxy_implementation_abi(%SmartContract{abi: abi} = smart_contract) when not is_nil(abi) do + implementation_abi = get_implementation_abi_from_proxy(smart_contract) if Enum.empty?(implementation_abi), do: abi, else: implementation_abi ++ abi end - def combine_proxy_implementation_abi(_, abi) when is_nil(abi) do + def combine_proxy_implementation_abi(_) do [] end - def proxy_contract?(address_hash, abi) when not is_nil(abi) do - implementation_method_abi = - abi - |> Enum.find(fn method -> - Map.get(method, "name") == "implementation" || - master_copy_pattern?(method) - end) - - if implementation_method_abi || - get_implementation_address_hash_eip_1967(address_hash) !== "0x0000000000000000000000000000000000000000", - do: true, - else: false - end - - def proxy_contract?(_address_hash, abi) when is_nil(abi), do: false - def gnosis_safe_contract?(abi) when not is_nil(abi) do implementation_method_abi = abi @@ -5882,167 +5879,7 @@ defmodule Explorer.Chain do def gnosis_safe_contract?(abi) when is_nil(abi), do: false - @spec get_implementation_address_hash(Hash.Address.t(), list()) :: {String.t() | nil, String.t() | nil} - def get_implementation_address_hash(proxy_address_hash, abi) - when not is_nil(proxy_address_hash) and not is_nil(abi) do - implementation_method_abi = - abi - |> Enum.find(fn method -> - Map.get(method, "name") == "implementation" && Map.get(method, "stateMutability") == "view" - end) - - master_copy_method_abi = - abi - |> Enum.find(fn method -> - master_copy_pattern?(method) - end) - - implementation_address = - cond do - implementation_method_abi -> - get_implementation_address_hash_basic(proxy_address_hash, abi) - - master_copy_method_abi -> - get_implementation_address_hash_from_master_copy_pattern(proxy_address_hash) - - true -> - get_implementation_address_hash_eip_1967(proxy_address_hash) - end - - save_implementation_name(implementation_address, proxy_address_hash) - end - - def get_implementation_address_hash(proxy_address_hash, abi) when is_nil(proxy_address_hash) or is_nil(abi) do - {nil, nil} - end - - defp get_implementation_address_hash_eip_1967(proxy_address_hash) do - json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) - - # https://eips.ethereum.org/EIPS/eip-1967 - storage_slot_logic_contract_address = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" - - {_status, implementation_address} = - case Contract.eth_get_storage_at_request( - proxy_address_hash, - storage_slot_logic_contract_address, - nil, - json_rpc_named_arguments - ) do - {:ok, empty_address} - when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000"] -> - fetch_beacon_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) - - {:ok, implementation_logic_address} -> - {:ok, implementation_logic_address} - - {:error, _} -> - {:ok, "0x"} - end - - abi_decode_address_output(implementation_address) - end - - # changes requested by https://github.com/blockscout/blockscout/issues/4770 - # for support BeaconProxy pattern - defp fetch_beacon_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) do - # https://eips.ethereum.org/EIPS/eip-1967 - storage_slot_beacon_contract_address = "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50" - - implementation_method_abi = [ - %{ - "type" => "function", - "stateMutability" => "view", - "outputs" => [%{"type" => "address", "name" => "", "internalType" => "address"}], - "name" => "implementation", - "inputs" => [] - } - ] - - case Contract.eth_get_storage_at_request( - proxy_address_hash, - storage_slot_beacon_contract_address, - nil, - json_rpc_named_arguments - ) do - {:ok, empty_address} - when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000"] -> - fetch_openzeppelin_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) - - {:ok, beacon_contract_address} -> - case beacon_contract_address - |> abi_decode_address_output() - |> get_implementation_address_hash_basic(implementation_method_abi) do - <> -> - {:ok, implementation_address} - - _ -> - {:ok, beacon_contract_address} - end - - {:error, _} -> - {:ok, "0x"} - end - end - - # changes requested by https://github.com/blockscout/blockscout/issues/5292 - defp fetch_openzeppelin_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) do - # This is the keccak-256 hash of "org.zeppelinos.proxy.implementation" - storage_slot_logic_contract_address = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3" - - case Contract.eth_get_storage_at_request( - proxy_address_hash, - storage_slot_logic_contract_address, - nil, - json_rpc_named_arguments - ) do - {:ok, empty_address} - when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000"] -> - {:ok, "0x"} - - {:ok, logic_contract_address} -> - {:ok, logic_contract_address} - - {:error, _} -> - {:ok, "0x"} - end - end - - defp get_implementation_address_hash_basic(proxy_address_hash, abi) do - # 5c60da1b = keccak256(implementation()) - implementation_address = - case Reader.query_contract( - proxy_address_hash, - abi, - %{ - "5c60da1b" => [] - }, - false - ) do - %{"5c60da1b" => {:ok, [result]}} -> result - _ -> nil - end - - address_to_hex(implementation_address) - end - - defp get_implementation_address_hash_from_master_copy_pattern(proxy_address_hash) do - json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) - - master_copy_storage_pointer = "0x0" - - {:ok, implementation_address} = - Contract.eth_get_storage_at_request( - proxy_address_hash, - master_copy_storage_pointer, - nil, - json_rpc_named_arguments - ) - - abi_decode_address_output(implementation_address) - end - - defp master_copy_pattern?(method) do + def master_copy_pattern?(method) do Map.get(method, "type") == "constructor" && method |> Enum.find(fn item -> @@ -6063,57 +5900,6 @@ defmodule Explorer.Chain do end) end - defp save_implementation_name(empty_address_hash_string, _) - when empty_address_hash_string in [ - "0x", - "0x0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - @burn_address_hash_str - ], - do: {empty_address_hash_string, nil} - - defp save_implementation_name(implementation_address_hash_string, proxy_address_hash) - when is_binary(implementation_address_hash_string) do - with {:ok, address_hash} <- string_to_address_hash(implementation_address_hash_string), - %SmartContract{name: name} <- address_hash_to_smart_contract(address_hash) do - SmartContract - |> where([sc], sc.address_hash == ^proxy_address_hash) - |> update(set: [implementation_name: ^name]) - |> Repo.update_all([]) - - {implementation_address_hash_string, name} - else - _ -> - {implementation_address_hash_string, nil} - end - end - - defp save_implementation_name(other, _), do: {other, nil} - - defp abi_decode_address_output(nil), do: nil - - defp abi_decode_address_output("0x"), do: @burn_address_hash_str - - defp abi_decode_address_output(address) when is_binary(address) do - if String.length(address) > 42 do - "0x" <> String.slice(address, -40, 40) - else - address - end - end - - defp abi_decode_address_output(_), do: nil - - defp address_to_hex(address) do - if address do - if String.starts_with?(address, "0x") do - address - else - "0x" <> Base.encode16(address, case: :lower) - end - end - end - def get_implementation_abi(implementation_address_hash_string) when not is_nil(implementation_address_hash_string) do case Chain.string_to_address_hash(implementation_address_hash_string) do {:ok, implementation_address_hash} -> @@ -6137,15 +5923,13 @@ defmodule Explorer.Chain do [] end - def get_implementation_abi_from_proxy(proxy_address_hash, abi) + def get_implementation_abi_from_proxy(%SmartContract{address_hash: proxy_address_hash, abi: abi} = smart_contract) when not is_nil(proxy_address_hash) and not is_nil(abi) do - {implementation_address_hash_string, _name} = get_implementation_address_hash(proxy_address_hash, abi) + {implementation_address_hash_string, _name} = SmartContract.get_implementation_address_hash(smart_contract) get_implementation_abi(implementation_address_hash_string) end - def get_implementation_abi_from_proxy(proxy_address_hash, abi) when is_nil(proxy_address_hash) or is_nil(abi) do - [] - end + def get_implementation_abi_from_proxy(_), do: [] defp format_tx_first_trace(first_trace, block_hash, json_rpc_named_arguments) do {:ok, to_address_hash} = diff --git a/apps/explorer/lib/explorer/chain/log.ex b/apps/explorer/lib/explorer/chain/log.ex index f9de1eb43d95..4a2381888195 100644 --- a/apps/explorer/lib/explorer/chain/log.ex +++ b/apps/explorer/lib/explorer/chain/log.ex @@ -128,8 +128,8 @@ defmodule Explorer.Chain.Log do ] case Chain.find_contract_address(log.address_hash, address_options, true) do - {:ok, %{smart_contract: %{abi: abi}}} -> - full_abi = Chain.combine_proxy_implementation_abi(log.address_hash, abi) + {:ok, %{smart_contract: smart_contract}} -> + full_abi = Chain.combine_proxy_implementation_abi(smart_contract) with {:ok, selector, mapping} <- find_and_decode(full_abi, log, transaction), identifier <- Base.encode16(selector.method_id, case: :lower), diff --git a/apps/explorer/lib/explorer/chain/smart_contract.ex b/apps/explorer/lib/explorer/chain/smart_contract.ex index 0b18c8a3e43c..bd72f3ad2b86 100644 --- a/apps/explorer/lib/explorer/chain/smart_contract.ex +++ b/apps/explorer/lib/explorer/chain/smart_contract.ex @@ -13,9 +13,15 @@ defmodule Explorer.Chain.SmartContract do use Explorer.Schema alias Ecto.Changeset + alias EthereumJSONRPC.Contract + alias Explorer.Counters.AverageBlockTime alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, ContractMethod, DecompiledSmartContract, Hash} alias Explorer.Chain.SmartContract.ExternalLibrary + alias Explorer.SmartContract.Reader + alias Timex.Duration + + @burn_address_hash_str "0x0000000000000000000000000000000000000000" @typedoc """ The name of a parameter to a function or event. @@ -201,7 +207,9 @@ defmodule Explorer.Chain.SmartContract do * `bytecode_checked_at` - timestamp of the last check of contract's bytecode matching (DB and BlockChain) * `contract_code_md5` - md5(`t:Explorer.Chain.Address.t/0` `contract_code`) * `implementation_name` - name of the proxy implementation - * `settings` - raw compilation parameters + * `compiler_settings` - raw compilation parameters + * `implementation_fetched_at` - timestamp of the last fetching contract's implementation info + * `implementation_address_hash` - address hash of the proxy's implementation if any * `autodetect_constructor_args` - field was added for storing user's choice * `is_yul` - field was added for storing user's choice """ @@ -224,6 +232,8 @@ defmodule Explorer.Chain.SmartContract do contract_code_md5: String.t(), implementation_name: String.t() | nil, compiler_settings: map() | nil, + implementation_fetched_at: DateTime.t(), + implementation_address_hash: Hash.Address.t(), autodetect_constructor_args: boolean | nil, is_yul: boolean | nil } @@ -247,6 +257,8 @@ defmodule Explorer.Chain.SmartContract do field(:contract_code_md5, :string) field(:implementation_name, :string) field(:compiler_settings, :map) + field(:implementation_fetched_at, :utc_datetime_usec, default: nil) + field(:implementation_address_hash, Hash.Address, default: nil) field(:autodetect_constructor_args, :boolean, virtual: true) field(:is_yul, :boolean, virtual: true) @@ -291,7 +303,9 @@ defmodule Explorer.Chain.SmartContract do :bytecode_checked_at, :contract_code_md5, :implementation_name, - :compiler_settings + :compiler_settings, + :implementation_address_hash, + :implementation_fetched_at ]) |> validate_required([ :name, @@ -493,4 +507,370 @@ defmodule Explorer.Chain.SmartContract do end defp to_address_hash(address_hash), do: address_hash + + def proxy_contract?(%__MODULE__{abi: abi} = smart_contract) when not is_nil(abi) do + implementation_method_abi = + abi + |> Enum.find(fn method -> + Map.get(method, "name") == "implementation" || + Chain.master_copy_pattern?(method) + end) + + if implementation_method_abi || + not is_nil( + smart_contract + |> get_implementation_address_hash() + |> Tuple.to_list() + |> List.first() + ), + do: true, + else: false + end + + def proxy_contract?(_), do: false + + def get_implementation_address_hash(%__MODULE__{abi: nil}), do: false + + def get_implementation_address_hash( + %__MODULE__{ + address_hash: address_hash, + implementation_fetched_at: implementation_fetched_at + } = smart_contract + ) do + updated_smart_contract = + if Application.get_env(:explorer, :enable_caching_implementation_data_of_proxy) && + check_implementation_refetch_neccessity(implementation_fetched_at) do + Chain.address_hash_to_smart_contract(address_hash) + else + smart_contract + end + + get_implementation_address_hash({:updated, updated_smart_contract}) + end + + def get_implementation_address_hash( + {:updated, + %__MODULE__{ + address_hash: address_hash, + abi: abi, + implementation_address_hash: implementation_address_hash_from_db, + implementation_name: implementation_name_from_db, + implementation_fetched_at: implementation_fetched_at + }} + ) do + if check_implementation_refetch_neccessity(implementation_fetched_at) do + get_implementation_address_hash_task = Task.async(fn -> get_implementation_address_hash(address_hash, abi) end) + + timeout = Application.get_env(:explorer, :implementation_data_fetching_timeout) + + case Task.yield(get_implementation_address_hash_task, timeout) || + Task.ignore(get_implementation_address_hash_task) do + {:ok, {:empty, :empty}} -> + {nil, nil} + + {:ok, {address_hash, _name} = result} when not is_nil(address_hash) -> + result + + _ -> + {db_implementation_data_converter(implementation_address_hash_from_db), + db_implementation_data_converter(implementation_name_from_db)} + end + else + {db_implementation_data_converter(implementation_address_hash_from_db), + db_implementation_data_converter(implementation_name_from_db)} + end + end + + def get_implementation_address_hash(_), do: {nil, nil} + + defp db_implementation_data_converter(nil), do: nil + defp db_implementation_data_converter(string) when is_binary(string), do: string + defp db_implementation_data_converter(other), do: to_string(other) + + defp check_implementation_refetch_neccessity(nil), do: true + + defp check_implementation_refetch_neccessity(timestamp) do + if Application.get_env(:explorer, :enable_caching_implementation_data_of_proxy) do + now = DateTime.utc_now() + + average_block_time = + if Application.get_env(:explorer, :avg_block_time_as_ttl_cached_implementation_data_of_proxy) do + case AverageBlockTime.average_block_time() do + {:error, :disabled} -> + 0 + + duration -> + duration + |> Duration.to_milliseconds() + end + else + 0 + end + + fresh_time_distance = + case average_block_time do + 0 -> + Application.get_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy) + + time -> + round(time) + end + + timestamp + |> DateTime.add(fresh_time_distance, :millisecond) + |> DateTime.compare(now) != :gt + else + true + end + end + + @spec get_implementation_address_hash(Hash.Address.t(), list()) :: {String.t() | nil, String.t() | nil} + defp get_implementation_address_hash(proxy_address_hash, abi) + when not is_nil(proxy_address_hash) and not is_nil(abi) do + implementation_method_abi = + abi + |> Enum.find(fn method -> + Map.get(method, "name") == "implementation" && Map.get(method, "stateMutability") == "view" + end) + + master_copy_method_abi = + abi + |> Enum.find(fn method -> + Chain.master_copy_pattern?(method) + end) + + implementation_address = + cond do + implementation_method_abi -> + get_implementation_address_hash_basic(proxy_address_hash, abi) + + master_copy_method_abi -> + get_implementation_address_hash_from_master_copy_pattern(proxy_address_hash) + + true -> + get_implementation_address_hash_eip_1967(proxy_address_hash) + end + + save_implementation_data(implementation_address, proxy_address_hash) + end + + defp get_implementation_address_hash(proxy_address_hash, abi) when is_nil(proxy_address_hash) or is_nil(abi) do + {nil, nil} + end + + defp get_implementation_address_hash_eip_1967(proxy_address_hash) do + json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) + + # https://eips.ethereum.org/EIPS/eip-1967 + storage_slot_logic_contract_address = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" + + {_status, implementation_address} = + case Contract.eth_get_storage_at_request( + proxy_address_hash, + storage_slot_logic_contract_address, + nil, + json_rpc_named_arguments + ) do + {:ok, empty_address} + when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000", nil] -> + fetch_beacon_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) + + {:ok, implementation_logic_address} -> + {:ok, implementation_logic_address} + + _ -> + {:ok, nil} + end + + abi_decode_address_output(implementation_address) + end + + # changes requested by https://github.com/blockscout/blockscout/issues/4770 + # for support BeaconProxy pattern + defp fetch_beacon_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) do + # https://eips.ethereum.org/EIPS/eip-1967 + storage_slot_beacon_contract_address = "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50" + + implementation_method_abi = [ + %{ + "type" => "function", + "stateMutability" => "view", + "outputs" => [%{"type" => "address", "name" => "", "internalType" => "address"}], + "name" => "implementation", + "inputs" => [] + } + ] + + case Contract.eth_get_storage_at_request( + proxy_address_hash, + storage_slot_beacon_contract_address, + nil, + json_rpc_named_arguments + ) do + {:ok, empty_address} + when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000", nil] -> + fetch_openzeppelin_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) + + {:ok, beacon_contract_address} -> + case beacon_contract_address + |> abi_decode_address_output() + |> get_implementation_address_hash_basic(implementation_method_abi) do + <> -> + {:ok, implementation_address} + + _ -> + {:ok, beacon_contract_address} + end + + _ -> + {:ok, nil} + end + end + + # changes requested by https://github.com/blockscout/blockscout/issues/5292 + defp fetch_openzeppelin_proxy_implementation(proxy_address_hash, json_rpc_named_arguments) do + # This is the keccak-256 hash of "org.zeppelinos.proxy.implementation" + storage_slot_logic_contract_address = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3" + + case Contract.eth_get_storage_at_request( + proxy_address_hash, + storage_slot_logic_contract_address, + nil, + json_rpc_named_arguments + ) do + {:ok, empty_address} + when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000"] -> + {:ok, "0x"} + + {:ok, logic_contract_address} -> + {:ok, logic_contract_address} + + _ -> + {:ok, nil} + end + end + + defp get_implementation_address_hash_basic(proxy_address_hash, abi) do + # 5c60da1b = keccak256(implementation()) + implementation_address = + case Reader.query_contract( + proxy_address_hash, + abi, + %{ + "5c60da1b" => [] + }, + false + ) do + %{"5c60da1b" => {:ok, [result]}} -> result + _ -> nil + end + + address_to_hex(implementation_address) + end + + defp get_implementation_address_hash_from_master_copy_pattern(proxy_address_hash) do + json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) + + master_copy_storage_pointer = "0x0" + + {:ok, implementation_address} = + case Contract.eth_get_storage_at_request( + proxy_address_hash, + master_copy_storage_pointer, + nil, + json_rpc_named_arguments + ) do + {:ok, empty_address} + when empty_address in ["0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000"] -> + {:ok, "0x"} + + {:ok, logic_contract_address} -> + {:ok, logic_contract_address} + + _ -> + {:ok, nil} + end + + abi_decode_address_output(implementation_address) + end + + defp save_implementation_data(nil, _), do: {nil, nil} + + defp save_implementation_data(empty_address_hash_string, proxy_address_hash) + when empty_address_hash_string in [ + "0x", + "0x0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + @burn_address_hash_str + ] do + proxy_address_hash + |> Chain.address_hash_to_smart_contract_without_twin() + |> changeset(%{ + implementation_name: nil, + implementation_address_hash: nil, + implementation_fetched_at: DateTime.utc_now() + }) + |> Repo.update() + + {:empty, :empty} + end + + defp save_implementation_data(implementation_address_hash_string, proxy_address_hash) + when is_binary(implementation_address_hash_string) do + with {:ok, address_hash} <- Chain.string_to_address_hash(implementation_address_hash_string), + proxy_contract <- Chain.address_hash_to_smart_contract_without_twin(proxy_address_hash), + false <- is_nil(proxy_contract), + %{implementation: %__MODULE__{name: name}, proxy: proxy_contract} <- %{ + implementation: Chain.address_hash_to_smart_contract(address_hash), + proxy: proxy_contract + } do + proxy_contract + |> changeset(%{ + implementation_name: name, + implementation_address_hash: implementation_address_hash_string, + implementation_fetched_at: DateTime.utc_now() + }) + |> Repo.update() + + {implementation_address_hash_string, name} + else + %{implementation: _, proxy: proxy_contract} -> + proxy_contract + |> changeset(%{ + implementation_name: nil, + implementation_address_hash: implementation_address_hash_string, + implementation_fetched_at: DateTime.utc_now() + }) + |> Repo.update() + + {implementation_address_hash_string, nil} + + _ -> + {implementation_address_hash_string, nil} + end + end + + defp address_to_hex(address) do + if address do + if String.starts_with?(address, "0x") do + address + else + "0x" <> Base.encode16(address, case: :lower) + end + end + end + + defp abi_decode_address_output(nil), do: nil + + defp abi_decode_address_output("0x"), do: @burn_address_hash_str + + defp abi_decode_address_output(address) when is_binary(address) do + if String.length(address) > 42 do + "0x" <> String.slice(address, -40, 40) + else + address + end + end + + defp abi_decode_address_output(_), do: nil end diff --git a/apps/explorer/lib/explorer/chain/transaction.ex b/apps/explorer/lib/explorer/chain/transaction.ex index be55eba91d76..0dccd1c90f90 100644 --- a/apps/explorer/lib/explorer/chain/transaction.ex +++ b/apps/explorer/lib/explorer/chain/transaction.ex @@ -23,6 +23,7 @@ defmodule Explorer.Chain.Transaction do Hash, InternalTransaction, Log, + SmartContract, TokenTransfer, Transaction, Wei @@ -493,7 +494,7 @@ defmodule Explorer.Chain.Transaction do candidates_query |> Repo.all() |> Enum.flat_map(fn candidate -> - case do_decoded_input_data(data, [candidate.abi], nil, hash) do + case do_decoded_input_data(data, %SmartContract{abi: [candidate.abi], address_hash: nil}, hash) do {:ok, _, _, _} = decoded -> [decoded] _ -> [] end @@ -508,11 +509,11 @@ defmodule Explorer.Chain.Transaction do def decoded_input_data(%__MODULE__{ input: %{bytes: data}, - to_address: %{smart_contract: %{abi: abi, address_hash: address_hash}}, + to_address: %{smart_contract: smart_contract}, hash: hash }) do - case do_decoded_input_data(data, abi, address_hash, hash) do - # In some cases transactions use methods of some unpredictable contracts, so we can try to look up for method in a whole DB + case do_decoded_input_data(data, smart_contract, hash) do + # In some cases transactions use methods of some unpredictadle contracts, so we can try to look up for method in a whole DB {:error, :could_not_decode} -> case decoded_input_data(%__MODULE__{ to_address: %{smart_contract: nil}, @@ -534,8 +535,8 @@ defmodule Explorer.Chain.Transaction do end end - defp do_decoded_input_data(data, abi, address_hash, hash) do - full_abi = Chain.combine_proxy_implementation_abi(address_hash, abi) + defp do_decoded_input_data(data, smart_contract, hash) do + full_abi = Chain.combine_proxy_implementation_abi(smart_contract) with {:ok, {selector, values}} <- find_and_decode(full_abi, data, hash), {:ok, mapping} <- selector_mapping(selector, values, hash), diff --git a/apps/explorer/lib/explorer/etherscan/contracts.ex b/apps/explorer/lib/explorer/etherscan/contracts.ex index a02f791af7a8..cea04475df1d 100644 --- a/apps/explorer/lib/explorer/etherscan/contracts.ex +++ b/apps/explorer/lib/explorer/etherscan/contracts.ex @@ -60,13 +60,13 @@ defmodule Explorer.Etherscan.Contracts do def append_proxy_info(%Address{smart_contract: smart_contract} = address) when not is_nil(smart_contract) do updated_smart_contract = - if Chain.proxy_contract?(address.hash, smart_contract.abi) do + if SmartContract.proxy_contract?(smart_contract) do smart_contract |> Map.put(:is_proxy, true) |> Map.put( :implementation_address_hash_string, - address.hash - |> Chain.get_implementation_address_hash(smart_contract.abi) + smart_contract + |> SmartContract.get_implementation_address_hash() |> Tuple.to_list() |> List.first() ) diff --git a/apps/explorer/lib/explorer/smart_contract/reader.ex b/apps/explorer/lib/explorer/smart_contract/reader.ex index d83cdc2c4ad3..0d0c8d5b2dce 100644 --- a/apps/explorer/lib/explorer/smart_contract/reader.ex +++ b/apps/explorer/lib/explorer/smart_contract/reader.ex @@ -526,15 +526,12 @@ defmodule Explorer.SmartContract.Reader do end defp get_abi(contract_address_hash, type) do - abi = - contract_address_hash - |> Chain.address_hash_to_smart_contract() - |> Map.get(:abi) + contract = Chain.address_hash_to_smart_contract(contract_address_hash) if type == :proxy do - Chain.get_implementation_abi_from_proxy(contract_address_hash, abi) + Chain.get_implementation_abi_from_proxy(contract) else - abi + contract.abi end end diff --git a/apps/explorer/priv/repo/migrations/20220527131249_add_implementation_fields.exs b/apps/explorer/priv/repo/migrations/20220527131249_add_implementation_fields.exs new file mode 100644 index 000000000000..5f3839dd4a4c --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20220527131249_add_implementation_fields.exs @@ -0,0 +1,10 @@ +defmodule Explorer.Repo.Migrations.AddImplementationFields do + use Ecto.Migration + + def change do + alter table(:smart_contracts) do + add(:implementation_address_hash, :bytea, null: true) + add(:implementation_fetched_at, :"timestamp without time zone", null: true) + end + end +end diff --git a/apps/explorer/test/explorer/chain/smart_contract_test.exs b/apps/explorer/test/explorer/chain/smart_contract_test.exs new file mode 100644 index 000000000000..38ff09e3b1e3 --- /dev/null +++ b/apps/explorer/test/explorer/chain/smart_contract_test.exs @@ -0,0 +1,237 @@ +defmodule Explorer.Chain.SmartContractTest do + use Explorer.DataCase, async: false + + import Mox + alias Explorer.Chain + alias Explorer.Chain.SmartContract + + doctest Explorer.Chain.SmartContract + + setup :verify_on_exit! + setup :set_mox_global + + describe "test fetching implementation" do + test "check proxy_contract/1 function" do + smart_contract = insert(:smart_contract) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + Application.put_env(:explorer, :implementation_data_fetching_timeout, :timer.seconds(20)) + + refute smart_contract.implementation_fetched_at + + # fetch nil implementation and save it to db + get_eip1967_implementation_zero_addresses() + refute SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_empty_implementation(smart_contract.address_hash) + # extract proxy info from db + refute SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_empty_implementation(smart_contract.address_hash) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, 0) + + get_eip1967_implementation_error_response() + refute SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + + get_eip1967_implementation_non_zero_address() + assert SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_implementation_address(smart_contract.address_hash) + + get_eip1967_implementation_non_zero_address() + assert SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_implementation_address(smart_contract.address_hash) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + assert SmartContract.proxy_contract?(smart_contract) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, 0) + get_eip1967_implementation_non_zero_address() + assert SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + + get_eip1967_implementation_error_response() + assert SmartContract.proxy_contract?(smart_contract) + verify!(EthereumJSONRPC.Mox) + end + + test "test get_implementation_adddress_hash/1" do + smart_contract = insert(:smart_contract) + implementation_smart_contract = insert(:smart_contract, name: "proxy") + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + Application.put_env(:explorer, :implementation_data_fetching_timeout, :timer.seconds(20)) + + refute smart_contract.implementation_fetched_at + + # fetch nil implementation and save it to db + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_empty_implementation(smart_contract.address_hash) + + # extract proxy info from db + assert {nil, nil} = SmartContract.get_implementation_address_hash(smart_contract) + assert_empty_implementation(smart_contract.address_hash) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, 0) + + string_implementation_address_hash = to_string(implementation_smart_contract.address_hash) + + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, string_implementation_address_hash} + end) + + assert {^string_implementation_address_hash, "proxy"} = + SmartContract.get_implementation_address_hash(smart_contract) + + verify!(EthereumJSONRPC.Mox) + + assert_exact_name_and_address( + smart_contract.address_hash, + implementation_smart_contract.address_hash, + implementation_smart_contract.name + ) + + get_eip1967_implementation_error_response() + + assert {^string_implementation_address_hash, "proxy"} = + SmartContract.get_implementation_address_hash(smart_contract) + + verify!(EthereumJSONRPC.Mox) + + assert_exact_name_and_address( + smart_contract.address_hash, + implementation_smart_contract.address_hash, + implementation_smart_contract.name + ) + + contract_1 = Chain.address_hash_to_smart_contract(smart_contract.address_hash) + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + + assert {^string_implementation_address_hash, "proxy"} = + SmartContract.get_implementation_address_hash(smart_contract) + + contract_2 = Chain.address_hash_to_smart_contract(smart_contract.address_hash) + + assert contract_1.implementation_fetched_at == contract_2.implementation_fetched_at && + contract_1.updated_at == contract_2.updated_at + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, 0) + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(smart_contract) + verify!(EthereumJSONRPC.Mox) + assert_empty_implementation(smart_contract.address_hash) + end + end + + def get_eip1967_implementation_zero_addresses do + EthereumJSONRPC.Mox + |> expect(:json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + |> expect(:json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + |> expect(:json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end + + def get_eip1967_implementation_non_zero_address do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000001"} + end) + end + + def get_eip1967_implementation_error_response do + EthereumJSONRPC.Mox + |> expect(:json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:error, "error"} + end) + end + + def assert_empty_implementation(address_hash) do + contract = Chain.address_hash_to_smart_contract(address_hash) + assert contract.implementation_fetched_at + refute contract.implementation_name + refute contract.implementation_address_hash + end + + def assert_implementation_address(address_hash) do + contract = Chain.address_hash_to_smart_contract(address_hash) + assert contract.implementation_fetched_at + assert contract.implementation_address_hash + end + + def assert_implementation_name(address_hash) do + contract = Chain.address_hash_to_smart_contract(address_hash) + assert contract.implementation_fetched_at + assert contract.implementation_name + end + + def assert_exact_name_and_address(address_hash, implementation_address_hash, implementation_name) do + contract = Chain.address_hash_to_smart_contract(address_hash) + assert contract.implementation_fetched_at + assert contract.implementation_name == implementation_name + assert to_string(contract.implementation_address_hash) == to_string(implementation_address_hash) + end +end diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index 61b42a0e6002..dfad452986bd 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -5936,26 +5936,36 @@ defmodule Explorer.ChainTest do test "combine_proxy_implementation_abi/2 returns empty [] abi if proxy abi is null" do proxy_contract_address = insert(:contract_address) - assert Chain.combine_proxy_implementation_abi(proxy_contract_address, nil) == [] + + assert Chain.combine_proxy_implementation_abi(%SmartContract{address_hash: proxy_contract_address.hash, abi: nil}) == + [] end test "combine_proxy_implementation_abi/2 returns [] abi for unverified proxy" do proxy_contract_address = insert(:contract_address) + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: [], contract_code_md5: "123") + get_eip1967_implementation() - assert Chain.combine_proxy_implementation_abi(proxy_contract_address, []) == [] + assert Chain.combine_proxy_implementation_abi(smart_contract) == [] end test "combine_proxy_implementation_abi/2 returns proxy abi if implementation is not verified" do proxy_contract_address = insert(:contract_address) - insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") - assert Chain.combine_proxy_implementation_abi(proxy_contract_address, @proxy_abi) == @proxy_abi + + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") + + assert Chain.combine_proxy_implementation_abi(smart_contract) == @proxy_abi end test "combine_proxy_implementation_abi/2 returns proxy + implementation abi if implementation is verified" do proxy_contract_address = insert(:contract_address) - insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") + + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") implementation_contract_address = insert(:contract_address) @@ -5983,7 +5993,7 @@ defmodule Explorer.ChainTest do end ) - combined_abi = Chain.combine_proxy_implementation_abi(proxy_contract_address.hash, @proxy_abi) + combined_abi = Chain.combine_proxy_implementation_abi(smart_contract) assert Enum.any?(@proxy_abi, fn el -> el == Enum.at(@implementation_abi, 0) end) == false assert Enum.any?(@proxy_abi, fn el -> el == Enum.at(@implementation_abi, 1) end) == false @@ -5993,26 +6003,36 @@ defmodule Explorer.ChainTest do test "get_implementation_abi_from_proxy/2 returns empty [] abi if proxy abi is null" do proxy_contract_address = insert(:contract_address) - assert Chain.get_implementation_abi_from_proxy(proxy_contract_address, nil) == [] + + assert Chain.get_implementation_abi_from_proxy(%SmartContract{address_hash: proxy_contract_address.hash, abi: nil}) == + [] end test "get_implementation_abi_from_proxy/2 returns [] abi for unverified proxy" do proxy_contract_address = insert(:contract_address) + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: [], contract_code_md5: "123") + get_eip1967_implementation() - assert Chain.combine_proxy_implementation_abi(proxy_contract_address, []) == [] + assert Chain.combine_proxy_implementation_abi(smart_contract) == [] end test "get_implementation_abi_from_proxy/2 returns [] if implementation is not verified" do proxy_contract_address = insert(:contract_address) - insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") - assert Chain.get_implementation_abi_from_proxy(proxy_contract_address, @proxy_abi) == [] + + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") + + assert Chain.get_implementation_abi_from_proxy(smart_contract) == [] end test "get_implementation_abi_from_proxy/2 returns implementation abi if implementation is verified" do proxy_contract_address = insert(:contract_address) - insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") + + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: @proxy_abi, contract_code_md5: "123") implementation_contract_address = insert(:contract_address) @@ -6040,14 +6060,16 @@ defmodule Explorer.ChainTest do end ) - implementation_abi = Chain.get_implementation_abi_from_proxy(proxy_contract_address.hash, @proxy_abi) + implementation_abi = Chain.get_implementation_abi_from_proxy(smart_contract) assert implementation_abi == @implementation_abi end test "get_implementation_abi_from_proxy/2 returns implementation abi in case of EIP-1967 proxy pattern" do proxy_contract_address = insert(:contract_address) - insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: [], contract_code_md5: "123") + + smart_contract = + insert(:smart_contract, address_hash: proxy_contract_address.hash, abi: [], contract_code_md5: "123") implementation_contract_address = insert(:contract_address) @@ -6077,7 +6099,7 @@ defmodule Explorer.ChainTest do end ) - implementation_abi = Chain.get_implementation_abi_from_proxy(proxy_contract_address.hash, []) + implementation_abi = Chain.get_implementation_abi_from_proxy(smart_contract) assert implementation_abi == @implementation_abi end diff --git a/config/runtime.exs b/config/runtime.exs index d3b31abf7e25..7b9777f13fb0 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -213,7 +213,11 @@ config :explorer, if(disable_webapp != "true", do: Explorer.Chain.Events.SimpleSender, else: Explorer.Chain.Events.DBSender - ) + ), + enable_caching_implementation_data_of_proxy: true, + avg_block_time_as_ttl_cached_implementation_data_of_proxy: true, + fallback_ttl_cached_implementation_data_of_proxy: :timer.seconds(4), + implementation_data_fetching_timeout: :timer.seconds(2) config :explorer, Explorer.Visualize.Sol2uml, service_url: System.get_env("VISUALIZE_SOL2UML_SERVICE_URL"), From 5ec5ec94a9f0b248253ef94f129a62736351d999 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:16:28 +0000 Subject: [PATCH 666/723] Bump photoswipe from 5.3.3 to 5.3.4 in /apps/block_scout_web/assets Bumps [photoswipe](https://github.com/dimsemenov/Photoswipe) from 5.3.3 to 5.3.4. - [Release notes](https://github.com/dimsemenov/Photoswipe/releases) - [Commits](https://github.com/dimsemenov/Photoswipe/compare/v5.3.3...v5.3.4) --- updated-dependencies: - dependency-name: photoswipe dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 19 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index bd616a3a1d1b..aaea3a7dd0df 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -51,7 +51,7 @@ "path-parser": "^6.1.0", "phoenix": "file:../../../deps/phoenix", "phoenix_html": "file:../../../deps/phoenix_html", - "photoswipe": "^5.3.3", + "photoswipe": "^5.3.4", "pikaday": "^1.8.2", "popper.js": "^1.14.7", "reduce-reducers": "^1.0.4", @@ -98,11 +98,10 @@ } }, "../../../deps/phoenix": { - "version": "1.5.13", - "license": "MIT" + "version": "0.0.1" }, "../../../deps/phoenix_html": { - "version": "3.0.4" + "version": "0.0.1" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -14028,9 +14027,9 @@ "link": true }, "node_modules/photoswipe": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.3.tgz", - "integrity": "sha512-BUuulwZwkYFKADSe5xf0dd+wf6dws34ZvqP8R3oYHepRauOXoQHvw600sw1HlWd8K0S3LRCS4jxyR5fTuI383Q==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.4.tgz", + "integrity": "sha512-SN+RWHqxJvdwzXJsh8KrG+ajjPpdTX5HpKglEd0k9o6o5fW+QHPkW8//Bo11MB+NQwTa/hFw8BDv2EdxiDXjNw==", "engines": { "node": ">= 0.12.0" } @@ -29192,9 +29191,9 @@ "version": "file:../../../deps/phoenix_html" }, "photoswipe": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.3.tgz", - "integrity": "sha512-BUuulwZwkYFKADSe5xf0dd+wf6dws34ZvqP8R3oYHepRauOXoQHvw600sw1HlWd8K0S3LRCS4jxyR5fTuI383Q==" + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.4.tgz", + "integrity": "sha512-SN+RWHqxJvdwzXJsh8KrG+ajjPpdTX5HpKglEd0k9o6o5fW+QHPkW8//Bo11MB+NQwTa/hFw8BDv2EdxiDXjNw==" }, "picocolors": { "version": "1.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index b066d3788021..afe71003246c 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -63,7 +63,7 @@ "path-parser": "^6.1.0", "phoenix": "file:../../../deps/phoenix", "phoenix_html": "file:../../../deps/phoenix_html", - "photoswipe": "^5.3.3", + "photoswipe": "^5.3.4", "pikaday": "^1.8.2", "popper.js": "^1.14.7", "reduce-reducers": "^1.0.4", From 4acfd4af642f8de4de2b3139928118782828befd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:17:22 +0000 Subject: [PATCH 667/723] Bump @babel/core from 7.20.2 to 7.20.5 in /apps/block_scout_web/assets Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.2 to 7.20.5. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.20.5/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 123 +++++++++--------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index bd616a3a1d1b..3fe7a6e931ff 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -68,7 +68,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.20.2", + "@babel/core": "^7.20.5", "@babel/preset-env": "^7.20.2", "autoprefixer": "^10.4.13", "babel-loader": "^9.1.0", @@ -98,11 +98,10 @@ } }, "../../../deps/phoenix": { - "version": "1.5.13", - "license": "MIT" + "version": "0.0.1" }, "../../../deps/phoenix_html": { - "version": "3.0.4" + "version": "0.0.1" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -148,20 +147,20 @@ } }, "node_modules/@babel/core": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", - "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz", + "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==", "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.2", + "@babel/generator": "^7.20.5", "@babel/helper-compilation-targets": "^7.20.0", "@babel/helper-module-transforms": "^7.20.2", - "@babel/helpers": "^7.20.1", - "@babel/parser": "^7.20.2", + "@babel/helpers": "^7.20.5", + "@babel/parser": "^7.20.5", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -177,11 +176,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.3.tgz", - "integrity": "sha512-Wl5ilw2UD1+ZYprHVprxHZJCFeBWlzZYOovE4SDYLZnqCOD11j+0QzNeEWKLLTWM7nixrZEh7vNIyb76MyJg3A==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", "dependencies": { - "@babel/types": "^7.20.2", + "@babel/types": "^7.20.5", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -495,13 +494,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", - "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", "dependencies": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.0" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" }, "engines": { "node": ">=6.9.0" @@ -521,9 +520,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1737,18 +1736,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", - "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.1", + "@babel/generator": "^7.20.5", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.1", - "@babel/types": "^7.20.0", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1757,9 +1756,9 @@ } }, "node_modules/@babel/types": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", - "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", "dependencies": { "@babel/helper-string-parser": "^7.19.4", "@babel/helper-validator-identifier": "^7.19.1", @@ -18572,20 +18571,20 @@ "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==" }, "@babel/core": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", - "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz", + "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==", "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.2", + "@babel/generator": "^7.20.5", "@babel/helper-compilation-targets": "^7.20.0", "@babel/helper-module-transforms": "^7.20.2", - "@babel/helpers": "^7.20.1", - "@babel/parser": "^7.20.2", + "@babel/helpers": "^7.20.5", + "@babel/parser": "^7.20.5", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -18594,11 +18593,11 @@ } }, "@babel/generator": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.3.tgz", - "integrity": "sha512-Wl5ilw2UD1+ZYprHVprxHZJCFeBWlzZYOovE4SDYLZnqCOD11j+0QzNeEWKLLTWM7nixrZEh7vNIyb76MyJg3A==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", "requires": { - "@babel/types": "^7.20.2", + "@babel/types": "^7.20.5", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" } @@ -18825,13 +18824,13 @@ } }, "@babel/helpers": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", - "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", "requires": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.0" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" } }, "@babel/highlight": { @@ -18845,9 +18844,9 @@ } }, "@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==" + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -19663,26 +19662,26 @@ } }, "@babel/traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", - "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.1", + "@babel/generator": "^7.20.5", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.1", - "@babel/types": "^7.20.0", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", - "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", "requires": { "@babel/helper-string-parser": "^7.19.4", "@babel/helper-validator-identifier": "^7.19.1", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index b066d3788021..865761c76c45 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -80,7 +80,7 @@ "xss": "^1.0.14" }, "devDependencies": { - "@babel/core": "^7.20.2", + "@babel/core": "^7.20.5", "@babel/preset-env": "^7.20.2", "autoprefixer": "^10.4.13", "babel-loader": "^9.1.0", From e3f9af22de69ca840acaa2aa9ed6b4d02bf4fbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 11:53:20 +0300 Subject: [PATCH 668/723] Fix get_implementation_address_hash call --- .../lib/block_scout_web/views/api/v2/address_view.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex index 7cea8b97ec27..6d43e493e195 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/address_view.ex @@ -5,7 +5,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do alias BlockScoutWeb.API.V2.{ApiView, Helper, TokenView} alias BlockScoutWeb.API.V2.Helper alias Explorer.{Chain, Market} - alias Explorer.Chain.Address + alias Explorer.Chain.{Address, SmartContract} alias Explorer.ExchangeRates.Token def render("message.json", assigns) do @@ -38,7 +38,7 @@ defmodule BlockScoutWeb.API.V2.AddressView do {implementation_address, implementation_name} = with true <- is_proxy, - {address, name} <- Chain.get_implementation_address_hash(address.hash, address.smart_contract.abi), + {address, name} <- SmartContract.get_implementation_address_hash(address.smart_contract), false <- is_nil(address), {:ok, address_hash} <- Chain.string_to_address_hash(address), checksummed_address <- Address.checksum(address_hash) do From 5756d9a04ab7ede3797a8461efa3bba97243995f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 11:55:54 +0300 Subject: [PATCH 669/723] Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 501d655a9369..baae1bb3b478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Features -- [#5561](https://github.com/blockscout/blockscout/pull/5561) - Improve working with contracts implementations +- [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523) - Improve working with contracts implementations - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization - [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements - [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice From ae64af7dabd58c328b8626bf3e57dc7df493c8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 13:37:17 +0300 Subject: [PATCH 670/723] Change create to create_if_not_exists --- .../priv/repo/migrations/20221126103223_add_txs_indexes.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs index c7799819c045..eb439b16fb79 100644 --- a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs +++ b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs @@ -4,7 +4,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do @disable_migration_lock true def change do - create( + create_if_not_exists( index( :transactions, [ @@ -19,7 +19,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do ) ) - create( + create_if_not_exists( index( :transactions, [:to_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", "hash DESC"], @@ -28,7 +28,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do ) ) - create( + create_if_not_exists( index( :transactions, [ From 8a52fe6654feb470504289457c92bb705861832b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 14:19:48 +0300 Subject: [PATCH 671/723] Change order for pending txs --- apps/explorer/lib/explorer/chain.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index a731bdea1642..0522e31259b5 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -3450,7 +3450,7 @@ defmodule Explorer.Chain do |> pending_transactions_query() |> apply_filter_by_method_id_to_transactions(method_id_filter) |> apply_filter_by_tx_type_to_transactions(type_filter) - |> order_by([transaction], desc: transaction.inserted_at, desc: transaction.hash) + |> order_by([transaction], desc: transaction.inserted_at, asc: transaction.hash) |> join_associations(necessity_by_association) |> (&if(old_ui?, do: preload(&1, [{:token_transfers, [:token, :from_address, :to_address]}]), else: &1)).() |> Repo.all() @@ -4396,7 +4396,7 @@ defmodule Explorer.Chain do desc: transaction.block_number, desc: transaction.index, desc: transaction.inserted_at, - desc: transaction.hash + asc: transaction.hash ) end @@ -4406,7 +4406,7 @@ defmodule Explorer.Chain do desc: transaction.block_number, desc: transaction.index, desc: transaction.inserted_at, - desc: transaction.hash + asc: transaction.hash ) end @@ -4625,7 +4625,7 @@ defmodule Explorer.Chain do [transaction], (is_nil(transaction.block_number) and (transaction.inserted_at < ^inserted_at or - (transaction.inserted_at == ^inserted_at and transaction.hash < ^hash))) or + (transaction.inserted_at == ^inserted_at and transaction.hash > ^hash))) or not is_nil(transaction.block_number) ) end From 82865bba6bf1bfb457d60c75510ef853f6f61258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 14:27:06 +0300 Subject: [PATCH 672/723] Change indexes --- .../priv/repo/migrations/20221126103223_add_txs_indexes.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs index eb439b16fb79..ac0452c54eb6 100644 --- a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs +++ b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs @@ -12,7 +12,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", - "hash DESC" + "hash ASC" ], name: "transactions_from_address_hash_with_pending_index", concurrently: true @@ -22,7 +22,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do create_if_not_exists( index( :transactions, - [:to_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", "hash DESC"], + [:to_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", "hash ASC"], name: "transactions_to_address_hash_with_pending_index", concurrently: true ) @@ -36,7 +36,7 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", "inserted_at DESC", - "hash DESC" + "hash ASC" ], name: "transactions_created_contract_address_hash_with_pending_index", concurrently: true From 0b933447168fe8fe21abafac97283f480d3a9e89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:09:02 +0000 Subject: [PATCH 673/723] Bump mini-css-extract-plugin in /apps/block_scout_web/assets Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 2.7.0 to 2.7.1. - [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) - [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.0...v2.7.1) --- updated-dependencies: - dependency-name: mini-css-extract-plugin dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 73235856dbcf..a124446ce7a1 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -83,7 +83,7 @@ "file-loader": "^6.2.0", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", - "mini-css-extract-plugin": "^2.7.0", + "mini-css-extract-plugin": "^2.7.1", "postcss": "^8.4.19", "postcss-loader": "^7.0.1", "sass": "^1.56.1", @@ -12922,9 +12922,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.0.tgz", - "integrity": "sha512-auqtVo8KhTScMsba7MbijqZTfibbXiBNlPAQbsVt7enQfcDYLdgG57eGxMqwVU3mfeWANY4F1wUg+rMF+ycZgw==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", + "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", "dev": true, "dependencies": { "schema-utils": "^4.0.0" @@ -28340,9 +28340,9 @@ "peer": true }, "mini-css-extract-plugin": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.0.tgz", - "integrity": "sha512-auqtVo8KhTScMsba7MbijqZTfibbXiBNlPAQbsVt7enQfcDYLdgG57eGxMqwVU3mfeWANY4F1wUg+rMF+ycZgw==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", + "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", "dev": true, "requires": { "schema-utils": "^4.0.0" diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index c487857bdaeb..7f6ee12e3852 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -95,7 +95,7 @@ "file-loader": "^6.2.0", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", - "mini-css-extract-plugin": "^2.7.0", + "mini-css-extract-plugin": "^2.7.1", "postcss": "^8.4.19", "postcss-loader": "^7.0.1", "sass": "^1.56.1", From c46e6b72b94226a1d0ccdf84bd303b283b91bcef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:09:55 +0000 Subject: [PATCH 674/723] Bump luxon from 3.1.0 to 3.1.1 in /apps/block_scout_web/assets Bumps [luxon](https://github.com/moment/luxon) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/moment/luxon/releases) - [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md) - [Commits](https://github.com/moment/luxon/compare/3.1.0...3.1.1) --- updated-dependencies: - dependency-name: luxon dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 73235856dbcf..06b59d955eb4 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -43,7 +43,7 @@ "lodash.omit": "^4.5.0", "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", - "luxon": "^3.1.0", + "luxon": "^3.1.1", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", @@ -12527,9 +12527,9 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "node_modules/luxon": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.1.0.tgz", - "integrity": "sha512-7w6hmKC0/aoWnEsmPCu5Br54BmbmUp5GfcqBxQngRcXJ+q5fdfjEzn7dxmJh2YdDhgW8PccYtlWKSv4tQkrTQg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.1.1.tgz", + "integrity": "sha512-Ah6DloGmvseB/pX1cAmjbFvyU/pKuwQMQqz7d0yvuDlVYLTs2WeDHQMpC8tGjm1da+BriHROW/OEIT/KfYg6xw==", "engines": { "node": ">=12" } @@ -28015,9 +28015,9 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "luxon": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.1.0.tgz", - "integrity": "sha512-7w6hmKC0/aoWnEsmPCu5Br54BmbmUp5GfcqBxQngRcXJ+q5fdfjEzn7dxmJh2YdDhgW8PccYtlWKSv4tQkrTQg==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.1.1.tgz", + "integrity": "sha512-Ah6DloGmvseB/pX1cAmjbFvyU/pKuwQMQqz7d0yvuDlVYLTs2WeDHQMpC8tGjm1da+BriHROW/OEIT/KfYg6xw==" }, "make-dir": { "version": "3.1.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index c487857bdaeb..d1ecdcad6a82 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -55,7 +55,7 @@ "lodash.omit": "^4.5.0", "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", - "luxon": "^3.1.0", + "luxon": "^3.1.1", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", From d8a04f5ff66d277f3f9632c9753d413827513644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Wed, 30 Nov 2022 14:42:32 +0300 Subject: [PATCH 675/723] Fix index creation migration --- CHANGELOG.md | 1 + .../repo/migrations/20220919105140_add_method_id_index.exs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baae1bb3b478..6cd0b59f8c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ### Fixes +- [#6532](https://github.com/blockscout/blockscout/pull/6532) - Fix index creation migration - [#6473](https://github.com/blockscout/blockscout/pull/6473) - Fix state changes for contract creation transactions - [#6475](https://github.com/blockscout/blockscout/pull/6475) - Fix token name with unicode graphemes shortening - [#6420](https://github.com/blockscout/blockscout/pull/6420) - Fix address logs search diff --git a/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs b/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs index 24244fd249a7..95ad38588c15 100644 --- a/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs +++ b/apps/explorer/priv/repo/migrations/20220919105140_add_method_id_index.exs @@ -5,11 +5,11 @@ defmodule Explorer.Repo.Migrations.AddMethodIdIndex do def up do execute(""" - CREATE INDEX CONCURRENTLY method_id ON public.transactions USING btree (substring(input for 4)); + CREATE INDEX CONCURRENTLY IF NOT EXISTS method_id ON public.transactions USING btree (substring(input for 4)); """) end def down do - execute("DROP INDEX method_id") + execute("DROP INDEX IF EXISTS method_id") end end From 2dc277ebf08affcf1166dc5affe934bbc2d77dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Tue, 29 Nov 2022 14:54:49 +0300 Subject: [PATCH 676/723] Cast pagination on address to one order_by set --- apps/explorer/lib/explorer/chain.ex | 16 +++-------- .../20221126103223_add_txs_indexes.exs | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 0522e31259b5..5713f5b531cd 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -4385,12 +4385,12 @@ defmodule Explorer.Chain do defp fetch_transactions(paging_options \\ nil, from_block \\ nil, to_block \\ nil, is_address? \\ false) do Transaction - |> order_for_transactions(paging_options, is_address?) + |> order_for_transactions(is_address?) |> where_block_number_in_period(from_block, to_block) |> handle_paging_options(paging_options) end - defp order_for_transactions(query, %PagingOptions{is_pending_tx: true}, true) do + defp order_for_transactions(query, true) do query |> order_by([transaction], desc: transaction.block_number, @@ -4400,17 +4400,7 @@ defmodule Explorer.Chain do ) end - defp order_for_transactions(query, %PagingOptions{key: nil}, true) do - query - |> order_by([transaction], - desc: transaction.block_number, - desc: transaction.index, - desc: transaction.inserted_at, - asc: transaction.hash - ) - end - - defp order_for_transactions(query, _, _) do + defp order_for_transactions(query, _) do query |> order_by([transaction], desc: transaction.block_number, desc: transaction.index) end diff --git a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs index ac0452c54eb6..241ed059688c 100644 --- a/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs +++ b/apps/explorer/priv/repo/migrations/20221126103223_add_txs_indexes.exs @@ -4,6 +4,33 @@ defmodule Explorer.Repo.Migrations.AddTxsIndexes do @disable_migration_lock true def change do + drop_if_exists( + index( + :transactions, + [:from_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", :hash], + name: "transactions_from_address_hash_recent_collated_index", + concurrently: true + ) + ) + + drop_if_exists( + index( + :transactions, + [:to_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", :hash], + name: "transactions_to_address_hash_recent_collated_index", + concurrently: true + ) + ) + + drop_if_exists( + index( + :transactions, + [:created_contract_address_hash, "block_number DESC NULLS FIRST", "index DESC NULLS FIRST", :hash], + name: "transactions_created_contract_address_hash_recent_collated_index", + concurrently: true + ) + ) + create_if_not_exists( index( :transactions, From 11c683f8c647ee1dc9d63e930d79dd05c8ca58ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 18:10:54 +0000 Subject: [PATCH 677/723] Bump postcss-loader from 7.0.1 to 7.0.2 in /apps/block_scout_web/assets Bumps [postcss-loader](https://github.com/webpack-contrib/postcss-loader) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/webpack-contrib/postcss-loader/releases) - [Changelog](https://github.com/webpack-contrib/postcss-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/postcss-loader/compare/v7.0.1...v7.0.2) --- updated-dependencies: - dependency-name: postcss-loader dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 30 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 003fedec8883..6d37ab461298 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -85,7 +85,7 @@ "jest-environment-jsdom": "^29.3.1", "mini-css-extract-plugin": "^2.7.1", "postcss": "^8.4.19", - "postcss-loader": "^7.0.1", + "postcss-loader": "^7.0.2", "sass": "^1.56.1", "sass-loader": "^13.2.0", "style-loader": "^3.3.1", @@ -14211,14 +14211,14 @@ } }, "node_modules/postcss-loader": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.1.tgz", - "integrity": "sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.2.tgz", + "integrity": "sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg==", "dev": true, "dependencies": { "cosmiconfig": "^7.0.0", "klona": "^2.0.5", - "semver": "^7.3.7" + "semver": "^7.3.8" }, "engines": { "node": ">= 14.15.0" @@ -14233,9 +14233,9 @@ } }, "node_modules/postcss-loader/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -29304,20 +29304,20 @@ "requires": {} }, "postcss-loader": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.1.tgz", - "integrity": "sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.2.tgz", + "integrity": "sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg==", "dev": true, "requires": { "cosmiconfig": "^7.0.0", "klona": "^2.0.5", - "semver": "^7.3.7" + "semver": "^7.3.8" }, "dependencies": { "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6169de664243..8bf89bbad101 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -97,7 +97,7 @@ "jest-environment-jsdom": "^29.3.1", "mini-css-extract-plugin": "^2.7.1", "postcss": "^8.4.19", - "postcss-loader": "^7.0.1", + "postcss-loader": "^7.0.2", "sass": "^1.56.1", "sass-loader": "^13.2.0", "style-loader": "^3.3.1", From 0a0cca07f47e7a8180d0d6d16d6ed2eb1398c2ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 18:11:38 +0000 Subject: [PATCH 678/723] Bump sweetalert2 from 11.6.14 to 11.6.15 in /apps/block_scout_web/assets Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 11.6.14 to 11.6.15. - [Release notes](https://github.com/sweetalert2/sweetalert2/releases) - [Changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md) - [Commits](https://github.com/sweetalert2/sweetalert2/compare/v11.6.14...v11.6.15) --- updated-dependencies: - dependency-name: sweetalert2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 003fedec8883..0459d3f0194a 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -58,7 +58,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.6.14", + "sweetalert2": "^11.6.15", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.5", @@ -16811,9 +16811,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "node_modules/sweetalert2": { - "version": "11.6.14", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.6.14.tgz", - "integrity": "sha512-W8+vtsucIJg5BrFhHcqguNZMzmHGvVZVAYHaMGQ9dzrleOMZcHCGmnB46L9qUNdx5snr1GpMUVFjNuki7EBbuQ==", + "version": "11.6.15", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.6.15.tgz", + "integrity": "sha512-FqMy1gRGHEI5G145NE5XSP059TziCJu9Xf9/mkki/aKu5pLNcYzjggOzKO5Ex10EBgAGDXQ99jyGfYYzGCYXRQ==", "funding": { "type": "individual", "url": "https://github.com/sponsors/limonte" @@ -31236,9 +31236,9 @@ } }, "sweetalert2": { - "version": "11.6.14", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.6.14.tgz", - "integrity": "sha512-W8+vtsucIJg5BrFhHcqguNZMzmHGvVZVAYHaMGQ9dzrleOMZcHCGmnB46L9qUNdx5snr1GpMUVFjNuki7EBbuQ==" + "version": "11.6.15", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.6.15.tgz", + "integrity": "sha512-FqMy1gRGHEI5G145NE5XSP059TziCJu9Xf9/mkki/aKu5pLNcYzjggOzKO5Ex10EBgAGDXQ99jyGfYYzGCYXRQ==" }, "symbol-tree": { "version": "3.2.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 6169de664243..50a73c14360b 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -70,7 +70,7 @@ "redux": "^4.2.0", "stream-browserify": "^3.0.0", "stream-http": "^3.1.1", - "sweetalert2": "^11.6.14", + "sweetalert2": "^11.6.15", "urijs": "^1.19.11", "url": "^0.11.0", "util": "^0.12.5", From 340a76d02f7c1bff2689c7a2bd69b8f218e25ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 25 Nov 2022 15:34:01 +0300 Subject: [PATCH 679/723] Allow gasUsed in failed internal txs; Leave error field for staticcall --- CHANGELOG.md | 1 + .../lib/ethereum_jsonrpc/geth/call.ex | 6 ++-- .../test/ethereum_jsonrpc/geth/call_test.exs | 3 +- .../explorer/chain/internal_transaction.ex | 9 ++---- ...074820_drop_required_output_constraint.exs | 31 +++++++++++++++++++ 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 apps/explorer/priv/repo/migrations/20221125074820_drop_required_output_constraint.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index e8cf3d3d74d4..4cf4ac47ef5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ### Fixes +- [#6512](https://github.com/blockscout/blockscout/pull/6512) - Allow gasUsed in failed internal txs; Leave error field for staticcall - [#6532](https://github.com/blockscout/blockscout/pull/6532) - Fix index creation migration - [#6473](https://github.com/blockscout/blockscout/pull/6473) - Fix state changes for contract creation transactions - [#6475](https://github.com/blockscout/blockscout/pull/6475) - Fix token name with unicode graphemes shortening diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex index c83b1573242b..dfdbb965fcd4 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth/call.ex @@ -254,7 +254,8 @@ defmodule EthereumJSONRPC.Geth.Call do gas_used: 1040, input: "0x0f370699", output: "0x", - value: 0 + value: 0, + error: nil } A selfdestruct destroys the calling contract and sends any left over balance to the to address. @@ -416,7 +417,8 @@ defmodule EthereumJSONRPC.Geth.Call do gas_used: gas_used, input: input, output: params["output"], - value: value + value: value, + error: params["error"] } end diff --git a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs index f4a97c07dec4..686ba4f13a1d 100644 --- a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs +++ b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/call_test.exs @@ -41,7 +41,8 @@ defmodule EthereumJSONRPC.Geth.CallTest do transaction_hash: "0xbc38745b826f058ed2f6c93fa5b145323857f06bbb5230b6a6a50e09e0915857", transaction_index: 0, type: "call", - value: 0 + value: 0, + error: "execution reverted" } end end diff --git a/apps/explorer/lib/explorer/chain/internal_transaction.ex b/apps/explorer/lib/explorer/chain/internal_transaction.ex index bb994cee1733..20e999b8aed9 100644 --- a/apps/explorer/lib/explorer/chain/internal_transaction.ex +++ b/apps/explorer/lib/explorer/chain/internal_transaction.ex @@ -281,8 +281,7 @@ defmodule Explorer.Chain.InternalTransaction do false iex> changeset.errors [ - output: {"can't be present for failed call", []}, - gas_used: {"can't be present for failed call", []} + output: {"can't be present for failed call", []} ] Likewise, successful `:call`s require `input`, `gas_used` and `output` to be set. @@ -496,13 +495,11 @@ defmodule Explorer.Chain.InternalTransaction do end) end - @call_success_fields ~w(gas_used output)a - # Validates that :call `type` changeset either has an `error` or both `gas_used` and `output` defp validate_call_error_or_result(changeset) do case get_field(changeset, :error) do - nil -> validate_required(changeset, @call_success_fields, message: "can't be blank for successful call") - _ -> validate_disallowed(changeset, @call_success_fields, message: "can't be present for failed call") + nil -> validate_required(changeset, [:gas_used, :output], message: "can't be blank for successful call") + _ -> validate_disallowed(changeset, [:output], message: "can't be present for failed call") end end diff --git a/apps/explorer/priv/repo/migrations/20221125074820_drop_required_output_constraint.exs b/apps/explorer/priv/repo/migrations/20221125074820_drop_required_output_constraint.exs new file mode 100644 index 000000000000..a524af715fc0 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20221125074820_drop_required_output_constraint.exs @@ -0,0 +1,31 @@ +defmodule Explorer.Repo.Migrations.DropRequiredOutputConstraint do + use Ecto.Migration + + def change do + drop( + constraint( + :internal_transactions, + :call_has_error_or_result, + check: """ + type != 'call' OR + (gas IS NOT NULL AND + ((error IS NULL AND gas_used IS NOT NULL and output IS NOT NULL) OR + (error IS NOT NULL AND gas_used IS NULL and output is NULL))) + """ + ) + ) + + create( + constraint( + :internal_transactions, + :call_has_error_or_result, + check: """ + type != 'call' OR + (gas IS NOT NULL AND + ((error IS NULL AND gas_used IS NOT NULL AND output IS NOT NULL) OR + (error IS NOT NULL AND output is NULL))) + """ + ) + ) + end +end From f206f9a59a145d71e51d60ed5c18b7b201139b25 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 1 Dec 2022 16:55:11 +0400 Subject: [PATCH 680/723] Fix internal transactions query --- apps/explorer/lib/explorer/chain.ex | 33 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 4cfe7a80e03f..3d2b93bc3660 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -255,20 +255,35 @@ defmodule Explorer.Chain do paging_options = Keyword.get(options, :paging_options, @default_paging_options) if direction == nil do - full_query = + query_to_address_hash_wrapped = InternalTransaction |> InternalTransaction.where_nonpending_block() - |> InternalTransaction.where_address_fields_match(hash, nil) + |> InternalTransaction.where_address_fields_match(hash, :to_address_hash) |> InternalTransaction.where_block_number_in_period(from_block, to_block) |> common_where_limit_order(paging_options) + |> wrapped_union_subquery() - full_query - |> order_by( - [q], - desc: q.block_number, - desc: q.transaction_index, - desc: q.index - ) + query_from_address_hash_wrapped = + InternalTransaction + |> InternalTransaction.where_nonpending_block() + |> InternalTransaction.where_address_fields_match(hash, :from_address_hash) + |> InternalTransaction.where_block_number_in_period(from_block, to_block) + |> common_where_limit_order(paging_options) + |> wrapped_union_subquery() + + query_created_contract_address_hash_wrapped = + InternalTransaction + |> InternalTransaction.where_nonpending_block() + |> InternalTransaction.where_address_fields_match(hash, :created_contract_address_hash) + |> InternalTransaction.where_block_number_in_period(from_block, to_block) + |> common_where_limit_order(paging_options) + |> wrapped_union_subquery() + + query_to_address_hash_wrapped + |> union(^query_from_address_hash_wrapped) + |> union(^query_created_contract_address_hash_wrapped) + |> wrapped_union_subquery() + |> common_where_limit_order(paging_options) |> preload(transaction: :block) |> join_associations(necessity_by_association) |> Repo.all() From f8118fcd754d428df5f7cb94fb9d70b60b47338b Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 1 Dec 2022 19:20:50 +0400 Subject: [PATCH 681/723] Added internal transactions paging test --- ...s_internal_transaction_controller_test.exs | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs index a78aff76af6e..5301e0b1c54b 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_internal_transaction_controller_test.exs @@ -328,6 +328,157 @@ defmodule BlockScoutWeb.AddressInternalTransactionControllerTest do end) end + test "next page doesn't miss internal transactions", %{conn: conn} do + address = insert(:address) + + a_block = insert(:block, number: 1000) + b_block = insert(:block, number: 2000) + + transaction_1 = + :transaction + |> insert() + |> with_block(a_block) + + transaction_2 = + :transaction + |> insert() + |> with_block(a_block) + + transaction_3 = + :transaction + |> insert() + |> with_block(b_block) + + from_internal_transactions = + 1..55 + |> Enum.map(fn index -> + insert( + :internal_transaction, + transaction: transaction_1, + from_address: address, + index: index, + block_number: transaction_1.block_number, + transaction_index: transaction_1.index, + block_hash: a_block.hash, + block_index: index + ) + end) + + to_internal_transactions = + 1..55 + |> Enum.map(fn index -> + insert( + :internal_transaction, + transaction: transaction_2, + to_address: address, + index: index, + block_number: transaction_2.block_number, + transaction_index: transaction_2.index, + block_hash: a_block.hash, + block_index: 55 + index + ) + end) + + created_contract_internal_transactions = + 1..55 + |> Enum.map(fn index -> + insert( + :internal_transaction, + transaction: transaction_3, + created_contract_address: address, + index: index, + block_number: transaction_3.block_number, + transaction_index: transaction_3.index, + block_hash: b_block.hash, + block_index: index + ) + end) + + {second_page_contract_items, first_page_items} = Enum.split(created_contract_internal_transactions, 5) + {third_page_to_items, second_page_to_items} = Enum.split(to_internal_transactions, 10) + {fourth_page_items, third_page_from_items} = Enum.split(from_internal_transactions, 15) + + second_page_items = second_page_contract_items ++ second_page_to_items + third_page_items = third_page_to_items ++ third_page_from_items + + path = address_internal_transaction_path(BlockScoutWeb.Endpoint, :index, Address.checksum(address.hash)) + + first_page_response = + conn + |> get(path, %{"type" => "JSON"}) + |> json_response(200) + |> Map.get("items") + + second_page_response = + conn + |> get(path, %{ + "block_number" => Integer.to_string(b_block.number), + "transaction_index" => Integer.to_string(transaction_3.index), + "index" => "6", + "type" => "JSON" + }) + |> json_response(200) + |> Map.get("items") + + third_page_response = + conn + |> get(path, %{ + "block_number" => Integer.to_string(a_block.number), + "transaction_index" => Integer.to_string(transaction_2.index), + "index" => "11", + "type" => "JSON" + }) + |> json_response(200) + |> Map.get("items") + + fourth_page_response = + conn + |> get(path, %{ + "block_number" => Integer.to_string(a_block.number), + "transaction_index" => Integer.to_string(transaction_1.index), + "index" => "16", + "type" => "JSON" + }) + |> json_response(200) + |> Map.get("items") + + assert Enum.count(first_page_response) == 50 + + assert Enum.all?(first_page_items, fn internal_transaction -> + Enum.any?(first_page_response, fn tile -> + String.contains?(tile, to_string(internal_transaction.transaction_hash)) && + String.contains?(tile, "data-internal-transaction-index=\"#{internal_transaction.index}\"") + end) + end) + + assert Enum.count(second_page_response) == 50 + + assert Enum.all?(second_page_items, fn internal_transaction -> + Enum.any?(second_page_response, fn tile -> + String.contains?(tile, to_string(internal_transaction.transaction_hash)) && + String.contains?(tile, "data-internal-transaction-index=\"#{internal_transaction.index}\"") + end) + end) + + assert Enum.count(third_page_response) == 50 + + assert Enum.all?(third_page_items, fn internal_transaction -> + Enum.any?(third_page_response, fn tile -> + String.contains?(tile, to_string(internal_transaction.transaction_hash)) && + String.contains?(tile, "data-internal-transaction-index=\"#{internal_transaction.index}\"") + end) + end) + + assert Enum.count(fourth_page_response) == 15 + + assert Enum.all?(fourth_page_items, fn internal_transaction -> + Enum.any?(fourth_page_response, fn tile -> + String.contains?(tile, to_string(internal_transaction.transaction_hash)) && + String.contains?(tile, "data-internal-transaction-index=\"#{internal_transaction.index}\"") + end) + end) + end + test "next_page_params exist if not on last page", %{conn: conn} do address = insert(:address) block = %Block{number: number} = insert(:block, number: 7000) From 3381487b28c67d561bdcc549a657f772b54fc264 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 1 Dec 2022 19:42:19 +0400 Subject: [PATCH 682/723] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cf4ac47ef5f..75a68b34b87f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - [#6327](https://github.com/blockscout/blockscout/pull/6327) - Fix and refactor address logs page and search - [#6449](https://github.com/blockscout/blockscout/pull/6449) - Search min_missing_block_number from zero - [#6492](https://github.com/blockscout/blockscout/pull/6492) - Remove token instance owner fetching +- [#6536](https://github.com/blockscout/blockscout/pull/6536) - Fix internal transactions query ### Chore From 1474b5786a359056d04f979ebca0ab060c5554c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Dec 2022 09:17:17 +0000 Subject: [PATCH 683/723] Bump decode-uri-component in /apps/block_scout_web/assets Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 581a9f824298..d9a7fae6eb54 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -6368,9 +6368,9 @@ "dev": true }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "engines": { "node": ">=0.10" } @@ -23222,9 +23222,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" }, "decompress-response": { "version": "6.0.0", From 779f89fa5e8e3a01f92b3474f15923a13db2facb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sat, 3 Dec 2022 15:22:11 +0300 Subject: [PATCH 684/723] Add SESSION_COOKIE_DOMAIN env --- apps/block_scout_web/config/config.exs | 3 ++- apps/block_scout_web/lib/block_scout_web/endpoint.ex | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index e165b3d5984b..9bb633641761 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -26,7 +26,8 @@ api_path = # General application configuration config :block_scout_web, namespace: BlockScoutWeb, - ecto_repos: [Explorer.Repo, Explorer.Repo.Account] + ecto_repos: [Explorer.Repo, Explorer.Repo.Account], + cookie_domain: System.get_env("SESSION_COOKIE_DOMAIN") config :block_scout_web, admin_panel_enabled: System.get_env("ADMIN_PANEL_ENABLED", "") == "true" diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index 19c6163dad6b..aaedee900067 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -67,7 +67,8 @@ defmodule BlockScoutWeb.Endpoint do key: "_explorer_key", signing_salt: "iC2ksJHS", same_site: "Lax", - http_only: false + http_only: false, + domain: Application.compile_env(:block_scout_web, :cookie_domain) ) use SpandexPhoenix From 5b30b3ce99ef32e8cd09ee78c268c985e500e7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sat, 3 Dec 2022 19:57:17 +0300 Subject: [PATCH 685/723] Add address struct as in API v2 to account API --- apps/block_scout_web/API blueprint.md | 1898 +++++++++++++---- .../account/api/v1/user_controller.ex | 15 +- .../views/account/api/v1/user_view.ex | 32 +- .../account/api/v1/user_controller_test.exs | 33 +- 4 files changed, 1541 insertions(+), 437 deletions(-) diff --git a/apps/block_scout_web/API blueprint.md b/apps/block_scout_web/API blueprint.md index 9cbc20a71de2..d473b194a930 100644 --- a/apps/block_scout_web/API blueprint.md +++ b/apps/block_scout_web/API blueprint.md @@ -1,5 +1,5 @@ FORMAT: 1A -HOST:http://blockscout.com/xdai/testnet +HOST:http://blockscout.com/poa/core # @@ -22,20 +22,20 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTEzQGJsb2Nrc2NvdXQuY29tZAACaWRh42QABG5hbWVtAAAAC1VzZXIgVGVzdDEwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEwZAAMd2F0Y2hsaXN0X2lkYeM.d_nsIdBT4zP1sObizRp2ufpZ2-HDGFD1puY3eNSvftY; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM3QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABHGQABG5hbWVtAAAAC1VzZXIgVGVzdDIzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIzZAAMd2F0Y2hsaXN0X2lkYgAAARw.E0Sm_2oS5AyE0tua4lSouZRAcWS_F5ZcfGxLWSTUkXA; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gur6Ap5Rc1YAAAYC + x-request-id: Fy1W2a5ilyuHABAAABjC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "nickname": "test_user10", - "name": "User Test10", - "email": "test_user-13@blockscout.com", - "avatar": "https://example.com/avatar/test_user10" + "nickname": "test_user23", + "name": "User Test23", + "email": "test_user-37@blockscout.com", + "avatar": "https://example.com/avatar/test_user23" } ### BlockScoutWeb.Account.Api.V1.UserController create_tag_address [POST /api/account/v1/user/tags/address] @@ -60,10 +60,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYdtkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGHb.XPfo6e6fTpCgSOVWcAgze_SHHkf_6UVp-SfOi2EVKcM; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyN2QABWVtYWlsbQAAABt0ZXN0X3VzZXItMTdAYmxvY2tzY291dC5jb21kAAJpZGIAAAEMZAAEbmFtZW0AAAAKVXNlciBUZXN0N2QACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI3ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDdkAAx3YXRjaGxpc3RfaWRiAAABDA.nTbrGL1cYPUoZ-N2MiHq9YBaqutQsS6G_gJBJmjD_mE; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gt7Hha-gjLUAABDh + x-request-id: Fy1W2Za89gG9wigAABTB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -71,8 +71,18 @@ HOST:http://blockscout.com/xdai/testnet { "name": "MyName", - "id": 65, - "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b" + "id": 66, + "address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b", + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x3E9AC8f16C92bc4F093357933B5BEFBF1E16987B" + } } # Group BlockScoutWeb.Account.Api.V1.TagsController @@ -95,10 +105,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYdtkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGHb.XPfo6e6fTpCgSOVWcAgze_SHHkf_6UVp-SfOi2EVKcM; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyN2QABWVtYWlsbQAAABt0ZXN0X3VzZXItMTdAYmxvY2tzY291dC5jb21kAAJpZGIAAAEMZAAEbmFtZW0AAAAKVXNlciBUZXN0N2QACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI3ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDdkAAx3YXRjaGxpc3RfaWRiAAABDA.nTbrGL1cYPUoZ-N2MiHq9YBaqutQsS6G_gJBJmjD_mE; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gt8j_62gjLUAABFB + x-request-id: Fy1W2ZcSwwK9wigAABMC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -117,19 +127,19 @@ HOST:http://blockscout.com/xdai/testnet } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/72] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/address/70] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_address [PUT /api/account/v1/user/tags/address/{id}] + Parameters - + id: `72` - id: 72 + + id: `70` + id: 70 + Request Edit private address tag -**PUT**  `/api/account/v1/user/tags/address/72` +**PUT**  `/api/account/v1/user/tags/address/70` + Headers @@ -138,17 +148,17 @@ HOST:http://blockscout.com/xdai/testnet { "name": "name3", - "address_hash": "0x0000000000000000000000000000000000000054" + "address_hash": "0x000000000000000000000000000000000000007e" } + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTdkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIxQGJsb2Nrc2NvdXQuY29tZAACaWRh6mQABG5hbWVtAAAAC1VzZXIgVGVzdDE3ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE3ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE3ZAAMd2F0Y2hsaXN0X2lkYeo.SwNPw9upySrwQX8GCp62J924WYWbJY-WNA31fMLjUas; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTMxQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABGGQABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYgAAARg.gpllu6S6EuYQy2GBhhmdrwjWa7uNmRUMz8aoKGDaPQU; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvKquVfUECUAAB4B + x-request-id: Fy1W2aYSywZD3jIAAAQF access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -156,8 +166,18 @@ HOST:http://blockscout.com/xdai/testnet { "name": "name3", - "id": 72, - "address_hash": "0x0000000000000000000000000000000000000054" + "id": 70, + "address_hash": "0x000000000000000000000000000000000000007e", + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007E" + } } ### BlockScoutWeb.Account.Api.V1.UserController tags_address [GET /api/account/v1/user/tags/address] @@ -173,10 +193,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE0QGJsb2Nrc2NvdXQuY29tZAACaWRh5GQABG5hbWVtAAAAC1VzZXIgVGVzdDExZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjExZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDExZAAMd2F0Y2hsaXN0X2lkYeQ.YOpB44xZNsuC9o5OZZQWpH-ijPijlYkT_fApVrfNuhs; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMThkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTMwQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABF2QABG5hbWVtAAAAC1VzZXIgVGVzdDE4ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE4ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE4ZAAMd2F0Y2hsaXN0X2lkYgAAARc.MgpnF7n_gJEhkWphCunY7unXVQWz6NAKdXJtAlCtm-E; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guwn5VVeZtAAABdh + x-request-id: Fy1W2aT84qhvvqoAABfh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -185,18 +205,48 @@ HOST:http://blockscout.com/xdai/testnet [ { "name": "name2", - "id": 71, - "address_hash": "0x000000000000000000000000000000000000003a" + "id": 69, + "address_hash": "0x000000000000000000000000000000000000007c", + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007c" + } }, { "name": "name1", - "id": 70, - "address_hash": "0x0000000000000000000000000000000000000039" + "id": 68, + "address_hash": "0x000000000000000000000000000000000000007b", + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007B" + } }, { "name": "name0", - "id": 69, - "address_hash": "0x0000000000000000000000000000000000000038" + "id": 67, + "address_hash": "0x000000000000000000000000000000000000007a", + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007a" + } } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_address [DELETE /api/account/v1/user/tags/address/{id}] @@ -205,22 +255,22 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `66` - id: 66 + + id: `63` + id: 63 + Request Delete private address tag -**DELETE**  `/api/account/v1/user/tags/address/66` +**DELETE**  `/api/account/v1/user/tags/address/63` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNmQABWVtYWlsbQAAABp0ZXN0X3VzZXItN0BibG9ja3Njb3V0LmNvbWQAAmlkYd9kAARuYW1lbQAAAApVc2VyIFRlc3Q2ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjZkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNmQADHdhdGNobGlzdF9pZGHf.2gy24vcTMAaovCIPA7q8PYmlv1ojuZGzgHCkQ6n_W70; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTRAYmxvY2tzY291dC5jb21kAAJpZGIAAAEJZAAEbmFtZW0AAAAKVXNlciBUZXN0NGQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI0ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDRkAAx3YXRjaGxpc3RfaWRiAAABCQ.3f3SFCRJgY59jb-YfVwAjM-xZEMv78Z1X-yNR03pCOI; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guUM2L0cz9IAABXh + x-request-id: Fy1W2YwZcxcJlUgAABJh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -244,7 +294,7 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", "name": "MyName" } @@ -252,19 +302,19 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI3QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABFGQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYgAAARQ.y7cpDUrwXiGxhgdOS0V14Rsohk8wJHkv940fW0Mw1YQ; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvV7jRTkLOwAACCB + x-request-id: Fy1W2aDXRGevcEwAABYh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006", "name": "MyName", - "id": 72 + "id": 61 } @@ -277,7 +327,7 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000005", "name": "MyName" } @@ -285,10 +335,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI3QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABFGQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYgAAARQ.y7cpDUrwXiGxhgdOS0V14Rsohk8wJHkv940fW0Mw1YQ; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvVV0ZPkLOwAACBh + x-request-id: Fy1W2aCGof2vcEwAAAlk access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -303,29 +353,29 @@ HOST:http://blockscout.com/xdai/testnet } # Group BlockScoutWeb.Account.Api.V1.TagsController -## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009] +## BlockScoutWeb.Account.Api.V1.TagsController [/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006] ### BlockScoutWeb.Account.Api.V1.TagsController tags_transaction [GET /api/account/v1/tags/transaction/{transaction_hash}] + Parameters - + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000009` - transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000009 + + transaction_hash: `0x0000000000000000000000000000000000000000000000000000000000000006` + transaction_hash: 0x0000000000000000000000000000000000000000000000000000000000000006 + Request Get tags for transaction -**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000009` +**GET**  `/api/account/v1/tags/transaction/0x0000000000000000000000000000000000000000000000000000000000000006` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRh7mQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYe4.OALg_k0K4kFbxlwrk2_wILKz3Ojtx5g-lwqsQWUvTHE; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI3QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABFGQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYgAAARQ.y7cpDUrwXiGxhgdOS0V14Rsohk8wJHkv940fW0Mw1YQ; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvWZkx3kLOwAACCh + x-request-id: Fy1W2aEbojKvcEwAABZB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -341,19 +391,19 @@ HOST:http://blockscout.com/xdai/testnet } # Group BlockScoutWeb.Account.Api.V1.UserController -## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/65] +## BlockScoutWeb.Account.Api.V1.UserController [/api/account/v1/user/tags/transaction/57] ### BlockScoutWeb.Account.Api.V1.UserController update_tag_transaction [PUT /api/account/v1/user/tags/transaction/{id}] + Parameters - + id: `65` - id: 65 + + id: `57` + id: 57 + Request Edit private transaction tag -**PUT**  `/api/account/v1/user/tags/transaction/65` +**PUT**  `/api/account/v1/user/tags/transaction/57` + Headers @@ -369,10 +419,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOGQABWVtYWlsbQAAABp0ZXN0X3VzZXItOUBibG9ja3Njb3V0LmNvbWQAAmlkYeFkAARuYW1lbQAAAApVc2VyIFRlc3Q4ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjhkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwOGQADHdhdGNobGlzdF9pZGHh.CybEtb6DRCGrUsJ2qnEERIZwD6pRhUfUSwFugOLA9kg; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQZkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGIAAAEG.K4xvLgb-ji7_yiP-B80J_ItCchTMzzYcgcN7ku9a4B8; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gunOuMiiGZsAAASi + x-request-id: Fy1W2XSUU7NY8y8AAAME access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -381,7 +431,7 @@ HOST:http://blockscout.com/xdai/testnet { "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000001", "name": "name1", - "id": 65 + "id": 57 } ### BlockScoutWeb.Account.Api.V1.UserController tags_transaction [GET /api/account/v1/user/tags/transaction] @@ -397,10 +447,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE4QGJsb2Nrc2NvdXQuY29tZAACaWRh52QABG5hbWVtAAAAC1VzZXIgVGVzdDE0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE0ZAAMd2F0Y2hsaXN0X2lkYec.CDHGLjvSgiNStdl55exaXgWiuAWfGw65IX3_vK5h5dU; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM2QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABG2QABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYgAAARs.O7Ha2Ze8DT1d2yaZbQEy9tZXE6OUDWyuh3yoyB2WNAU; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gu9MDrtpGp0AABnh + x-request-id: Fy1W2a4GFi44x6sAABii access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -408,19 +458,19 @@ HOST:http://blockscout.com/xdai/testnet [ { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000009", "name": "name2", - "id": 68 + "id": 64 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000008", "name": "name1", - "id": 67 + "id": 63 }, { - "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000002", + "transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007", "name": "name0", - "id": 66 + "id": 62 } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_tag_transaction [DELETE /api/account/v1/user/tags/transaction/{id}] @@ -429,22 +479,22 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `69` - id: 69 + + id: `58` + id: 58 + Request Delete private transaction tag -**DELETE**  `/api/account/v1/user/tags/transaction/69` +**DELETE**  `/api/account/v1/user/tags/transaction/58` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTZkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIwQGJsb2Nrc2NvdXQuY29tZAACaWRh6WQABG5hbWVtAAAAC1VzZXIgVGVzdDE2ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE2ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE2ZAAMd2F0Y2hsaXN0X2lkYek.LsY5H_7VsGeJ-WoDRIReTCTZmPTJNCTjme7ZshEuEpQ; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABE2QABG5hbWVtAAAAC1VzZXIgVGVzdDE0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE0ZAAMd2F0Y2hsaXN0X2lkYgAAARM.XN0A5eUbCpZdpnhayHyU-YiQ4jm1-WjwYxvGD6JVCmg; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvGE13QyfYIAAByB + x-request-id: Fy1W2Z9NDKXc1FcAABYC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -483,20 +533,20 @@ HOST:http://blockscout.com/xdai/testnet } }, "notification_methods": { - "email": true + "email": false }, - "name": "test16", - "address_hash": "0x0000000000000000000000000000000000000011" + "name": "test26", + "address_hash": "0x000000000000000000000000000000000000007f" } + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYdxkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHc.ujumccFj98DtF6Rf_O0i31DGgry0eHmykzCC1xvjVfY; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTMyQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABGWQABG5hbWVtAAAAC1VzZXIgVGVzdDIwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIwZAAMd2F0Y2hsaXN0X2lkYgAAARk.vaGEF62HMb-YGk5JNfvq8xH6YkGmQaEEa1gpNIUmjJM; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gt-4UWemyBYAABJB + x-request-id: Fy1W2acnBbQAq20AAARF access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -518,13 +568,23 @@ HOST:http://blockscout.com/xdai/testnet } }, "notification_methods": { - "email": true + "email": false }, - "name": "test16", - "id": 75, + "name": "test26", + "id": 73, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000011", - "address_balance": null + "address_hash": "0x000000000000000000000000000000000000007f", + "address_balance": null, + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007f" + } } ### BlockScoutWeb.Account.Api.V1.UserController watchlist [GET /api/account/v1/user/watchlist] @@ -540,10 +600,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYdxkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGHc.ujumccFj98DtF6Rf_O0i31DGgry0eHmykzCC1xvjVfY; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTMyQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABGWQABG5hbWVtAAAAC1VzZXIgVGVzdDIwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIwZAAMd2F0Y2hsaXN0X2lkYgAAARk.vaGEF62HMb-YGk5JNfvq8xH6YkGmQaEEa1gpNIUmjJM; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guCYRuamyBYAAANj + x-request-id: Fy1W2aiKtdsAq20AABhh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -554,7 +614,7 @@ HOST:http://blockscout.com/xdai/testnet "notification_settings": { "native": { "outcoming": true, - "incoming": false + "incoming": true }, "ERC-721": { "outcoming": true, @@ -562,17 +622,27 @@ HOST:http://blockscout.com/xdai/testnet }, "ERC-20": { "outcoming": false, - "incoming": true + "incoming": false } }, "notification_methods": { - "email": false + "email": true }, - "name": "test17", - "id": 76, + "name": "test27", + "id": 74, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000012", - "address_balance": null + "address_hash": "0x0000000000000000000000000000000000000080", + "address_balance": null, + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000080" + } }, { "notification_settings": { @@ -590,13 +660,23 @@ HOST:http://blockscout.com/xdai/testnet } }, "notification_methods": { - "email": true + "email": false }, - "name": "test16", - "id": 75, + "name": "test26", + "id": 73, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000011", - "address_balance": null + "address_hash": "0x000000000000000000000000000000000000007f", + "address_balance": null, + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000007f" + } } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_watchlist [DELETE /api/account/v1/user/watchlist/{id}] @@ -605,22 +685,22 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `82` - id: 82 + + id: `72` + id: 72 + Request Delete address from watchlist by id -**DELETE**  `/api/account/v1/user/watchlist/82` +**DELETE**  `/api/account/v1/user/watchlist/72` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTlkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRh7GQABG5hbWVtAAAAC1VzZXIgVGVzdDE5ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE5ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE5ZAAMd2F0Y2hsaXN0X2lkYew.slyWFXgdvd78Pwp3lyrU5tmgCtF7VNIPHxnFkfAQ-YQ; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTdkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI5QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABFmQABG5hbWVtAAAAC1VzZXIgVGVzdDE3ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE3ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE3ZAAMd2F0Y2hsaXN0X2lkYgAAARY.bngpdS3ELd9RFd1465ZhfhaitqcUi6xG4s0BoDGWoAw; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvR861_DWHcAAAhC + x-request-id: Fy1W2aNXuJ9GNz0AABch access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -635,12 +715,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `80` - id: 80 + + id: `70` + id: 70 + Request Edit watchlist address -**PUT**  `/api/account/v1/user/watchlist/80` +**PUT**  `/api/account/v1/user/watchlist/70` + Headers @@ -654,29 +734,29 @@ HOST:http://blockscout.com/xdai/testnet "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-20": { "outcoming": false, - "incoming": false + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, "name": "test21", - "address_hash": "0x0000000000000000000000000000000000000023" + "address_hash": "0x0000000000000000000000000000000000000064" } + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyN2QABWVtYWlsbQAAABp0ZXN0X3VzZXItOEBibG9ja3Njb3V0LmNvbWQAAmlkYeBkAARuYW1lbQAAAApVc2VyIFRlc3Q3ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjdkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwN2QADHdhdGNobGlzdF9pZGHg.2IaE2naK_o4H_guVwcTb0JZIp2hs2c4fvtASxCmIWHM; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIxQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABD2QABG5hbWVtAAAAC1VzZXIgVGVzdDEwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEwZAAMd2F0Y2hsaXN0X2lkYgAAAQ8.JqlZQRGTvi6UZy4cEjJW6UYnZgNo0LaoO3R4mxO_fFA; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gugvkSj5PXEAAANi + x-request-id: Fy1W2Zo1KOm2BRoAAAJl access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -689,22 +769,32 @@ HOST:http://blockscout.com/xdai/testnet "incoming": false }, "ERC-721": { - "outcoming": true, + "outcoming": false, "incoming": true }, "ERC-20": { "outcoming": false, - "incoming": false + "incoming": true } }, "notification_methods": { - "email": false + "email": true }, "name": "test21", - "id": 80, + "id": 70, "exchange_rate": null, - "address_hash": "0x0000000000000000000000000000000000000023", - "address_balance": null + "address_hash": "0x0000000000000000000000000000000000000064", + "address_balance": null, + "address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000064" + } } ### BlockScoutWeb.Account.Api.V1.UserController create_watchlist [POST /api/account/v1/user/watchlist] @@ -727,29 +817,29 @@ HOST:http://blockscout.com/xdai/testnet "incoming": false }, "ERC-721": { - "outcoming": true, - "incoming": false + "outcoming": false, + "incoming": true }, "ERC-20": { - "outcoming": true, + "outcoming": false, "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test18", - "address_hash": "0x0000000000000000000000000000000000000013" + "name": "test0", + "address_hash": "0x0000000000000000000000000000000000000001" } + Response 422 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABp0ZXN0X3VzZXItNEBibG9ja3Njb3V0LmNvbWQAAmlkYd1kAARuYW1lbQAAAApVc2VyIFRlc3Q0ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjRkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNGQADHdhdGNobGlzdF9pZGHd.jCNAb9dB6WGIZv9wIVL9tpikIPr056ChTYcDeSWdnG4; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMGQABWVtYWlsbQAAABp0ZXN0X3VzZXItMEBibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQVkAARuYW1lbQAAAApVc2VyIFRlc3QwZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjBkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMGQADHdhdGNobGlzdF9pZGIAAAEF.4CS6L7Ror_vIdEgjt8Mh9y2TJagC83VObHAGZ-ABOI4; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guGsUmFGrIUAABMB + x-request-id: Fy1W2W1ZceoPnWQAAATj access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -768,12 +858,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `79` - id: 79 + + id: `69` + id: 69 + Request Example of error on editing watchlist address -**PUT**  `/api/account/v1/user/watchlist/79` +**PUT**  `/api/account/v1/user/watchlist/69` + Headers @@ -787,29 +877,29 @@ HOST:http://blockscout.com/xdai/testnet "incoming": false }, "ERC-721": { - "outcoming": true, - "incoming": false + "outcoming": false, + "incoming": true }, "ERC-20": { - "outcoming": true, + "outcoming": false, "incoming": true } }, "notification_methods": { - "email": false + "email": true }, - "name": "test18", - "address_hash": "0x0000000000000000000000000000000000000013" + "name": "test0", + "address_hash": "0x0000000000000000000000000000000000000001" } + Response 422 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNGQABWVtYWlsbQAAABp0ZXN0X3VzZXItNEBibG9ja3Njb3V0LmNvbWQAAmlkYd1kAARuYW1lbQAAAApVc2VyIFRlc3Q0ZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjRkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwNGQADHdhdGNobGlzdF9pZGHd.jCNAb9dB6WGIZv9wIVL9tpikIPr056ChTYcDeSWdnG4; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMGQABWVtYWlsbQAAABp0ZXN0X3VzZXItMEBibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQVkAARuYW1lbQAAAApVc2VyIFRlc3QwZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjBkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMGQADHdhdGNobGlzdF9pZGIAAAEF.4CS6L7Ror_vIdEgjt8Mh9y2TJagC83VObHAGZ-ABOI4; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guIKk8ZGrIUAABNB + x-request-id: Fy1W2W6esdoPnWQAAAKE access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -844,10 +934,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjBkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI0QGJsb2Nrc2NvdXQuY29tZAACaWRh7WQABG5hbWVtAAAAC1VzZXIgVGVzdDIwZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIwZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIwZAAMd2F0Y2hsaXN0X2lkYe0.hIRgUayy_NKWZARAIxD2-TPy3PaP5kQSHuKGOLxxwz0; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTZkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI4QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABFWQABG5hbWVtAAAAC1VzZXIgVGVzdDE2ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE2ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE2ZAAMd2F0Y2hsaXN0X2lkYgAAARU.bIr9Nod33f3ivryxZfzUGzSN34H8R1h_oOPJvRdulDY; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvTjkbFZ2PwAACBB + x-request-id: Fy1W2aGwztUoK_8AAAnk access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -855,7 +945,7 @@ HOST:http://blockscout.com/xdai/testnet { "name": "test", - "api_key": "05b65dfd-0d08-4aa1-b22b-95e3fc8a55e5" + "api_key": "5dcfeb7d-6a73-47ed-8001-130692ebdf30" } @@ -875,10 +965,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE5QGJsb2Nrc2NvdXQuY29tZAACaWRh6GQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYeg.M4suuaCnSncg5sgQepwyEGrDqMcSle2BvUjGq5qw0Q8; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM4QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABHWQABG5hbWVtAAAAC1VzZXIgVGVzdDI0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjI0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDI0ZAAMd2F0Y2hsaXN0X2lkYgAAAR0.K_0yxkRjZq43jcCKzlzgHFNjm7aB_BmvBzlTVbpDUYI; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gu_KXoEIU2IAABrh + x-request-id: Fy1W2a-lcgwKyxIAAAuk access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -905,10 +995,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTVkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE5QGJsb2Nrc2NvdXQuY29tZAACaWRh6GQABG5hbWVtAAAAC1VzZXIgVGVzdDE1ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE1ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE1ZAAMd2F0Y2hsaXN0X2lkYeg.M4suuaCnSncg5sgQepwyEGrDqMcSle2BvUjGq5qw0Q8; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM4QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABHWQABG5hbWVtAAAAC1VzZXIgVGVzdDI0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjI0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDI0ZAAMd2F0Y2hsaXN0X2lkYgAAAR0.K_0yxkRjZq43jcCKzlzgHFNjm7aB_BmvBzlTVbpDUYI; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gu_ZqjIIU2IAABsB + x-request-id: Fy1W2a-2qPMKyxIAABki access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -917,15 +1007,15 @@ HOST:http://blockscout.com/xdai/testnet [ { "name": "test", - "api_key": "3d07da0e-428e-4410-bc54-43ab544e20f4" + "api_key": "00c90b31-db68-4de5-8022-32b6d9bdfaf2" }, { "name": "test", - "api_key": "92036fb5-a22a-418d-ac3a-0415e731d55a" + "api_key": "936f1623-4cfb-4581-badf-ff82193cc55e" }, { "name": "test", - "api_key": "0262ffe5-6d6a-4f79-8444-479e8be85d0e" + "api_key": "8af19684-7d84-4fa5-bc5e-98391204fa21" } ] ### BlockScoutWeb.Account.Api.V1.UserController update_api_key [PUT /api/account/v1/user/api_keys/{api_key}] @@ -934,12 +1024,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + api_key: `6bcec727-d945-4785-99b6-c6094bbf0452` - api_key: 6bcec727-d945-4785-99b6-c6094bbf0452 + + api_key: `e6fcab8c-d092-415d-a64e-caeebdab7e0a` + api_key: e6fcab8c-d092-415d-a64e-caeebdab7e0a + Request Edit api key -**PUT**  `/api/account/v1/user/api_keys/6bcec727-d945-4785-99b6-c6094bbf0452` +**PUT**  `/api/account/v1/user/api_keys/e6fcab8c-d092-415d-a64e-caeebdab7e0a` + Headers @@ -954,10 +1044,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMGQABWVtYWlsbQAAABp0ZXN0X3VzZXItMEBibG9ja3Njb3V0LmNvbWQAAmlkYdlkAARuYW1lbQAAAApVc2VyIFRlc3QwZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjBkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMGQADHdhdGNobGlzdF9pZGHZ.eNhiwGmTdeNAVqQGfVgtac9gGTsoXnysChIBQN75BQk; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI1QGJsb2Nrc2NvdXQuY29tZAACaWRiAAABEmQABG5hbWVtAAAAC1VzZXIgVGVzdDEzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEzZAAMd2F0Y2hsaXN0X2lkYgAAARI.oCXF9HRta7QoX4kvCCJGwXim8h2PvKmQnL3qC-BrYT0; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gtunEs8BJMYAABCE + x-request-id: Fy1W2ZxOPw0OLVMAABTC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -965,7 +1055,7 @@ HOST:http://blockscout.com/xdai/testnet { "name": "test_1", - "api_key": "6bcec727-d945-4785-99b6-c6094bbf0452" + "api_key": "e6fcab8c-d092-415d-a64e-caeebdab7e0a" } ### BlockScoutWeb.Account.Api.V1.UserController delete_api_key [DELETE /api/account/v1/user/api_keys/{api_key}] @@ -973,22 +1063,22 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + api_key: `0e26955f-5431-4652-84da-d08aded97a28` - api_key: 0e26955f-5431-4652-84da-d08aded97a28 + + api_key: `ed840181-ee0a-49e7-931c-ed12c44c3c5c` + api_key: ed840181-ee0a-49e7-931c-ed12c44c3c5c + Request Delete api key -**DELETE**  `/api/account/v1/user/api_keys/0e26955f-5431-4652-84da-d08aded97a28` +**DELETE**  `/api/account/v1/user/api_keys/ed840181-ee0a-49e7-931c-ed12c44c3c5c` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMThkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIyQGJsb2Nrc2NvdXQuY29tZAACaWRh62QABG5hbWVtAAAAC1VzZXIgVGVzdDE4ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjE4ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDE4ZAAMd2F0Y2hsaXN0X2lkYes.NYp71-Be73f-HTquq2QWWCa70c169Rd9GXDOOSCdC34; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOGQABWVtYWlsbQAAABt0ZXN0X3VzZXItMThAYmxvY2tzY291dC5jb21kAAJpZGIAAAENZAAEbmFtZW0AAAAKVXNlciBUZXN0OGQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI4ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDhkAAx3YXRjaGxpc3RfaWRiAAABDQ.N8IAT9JlprYQcjF97-2AwyvKRZ2pWrOhPA-piu_yjxY; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvMpP3rEvHcAAAei + x-request-id: Fy1W2ZeeHae-W7UAABPi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1012,8 +1102,8 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "name": "test26", - "contract_address_hash": "0x0000000000000000000000000000000000000089", + "name": "test3", + "contract_address_hash": "0x0000000000000000000000000000000000000049", "abi": [ { "type": "function", @@ -1050,19 +1140,29 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM3QGJsb2Nrc2NvdXQuY29tZAACaWRh8GQABG5hbWVtAAAAC1VzZXIgVGVzdDIzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIzZAAMd2F0Y2hsaXN0X2lkYfA.EgDkDw8R9zBMVjqsTcEWr77klYQVx6QOCcxXyN7EAqg; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNWQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTVAYmxvY2tzY291dC5jb21kAAJpZGIAAAEKZAAEbmFtZW0AAAAKVXNlciBUZXN0NWQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI1ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDVkAAx3YXRjaGxpc3RfaWRiAAABCg.Ed2YB-WoqETtu1WlAOdX7KJi6sFIJ1SGIeS89Aie2pg; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvk62Sj0d-gAAArC + x-request-id: Fy1W2Y2Ja_DGUGwAAAWE access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "name": "test26", - "id": 161, - "contract_address_hash": "0x0000000000000000000000000000000000000089", + "name": "test3", + "id": 146, + "contract_address_hash": "0x0000000000000000000000000000000000000049", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000049" + }, "abi": [ { "type": "function", @@ -1105,8 +1205,8 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "name": "test15", - "contract_address_hash": "0x0000000000000000000000000000000000000010", + "name": "test19", + "contract_address_hash": "0x0000000000000000000000000000000000000059", "abi": [ { "type": "function", @@ -1143,10 +1243,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYdpkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGHa.ynGrz6gad7RIkTh1lopco9xXNhiI-y6Bm6ecAnv3Usg; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNmQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTZAYmxvY2tzY291dC5jb21kAAJpZGIAAAELZAAEbmFtZW0AAAAKVXNlciBUZXN0NmQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI2ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDZkAAx3YXRjaGxpc3RfaWRiAAABCw.SNgNlsqLtHPQ2HgJTPlyNjbvKw2FlW_U6_cJXTD-ZE4; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gt5BIL0fpssAABCB + x-request-id: Fy1W2ZR-dhCywD0AABJC access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1173,10 +1273,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMWQABWVtYWlsbQAAABp0ZXN0X3VzZXItMUBibG9ja3Njb3V0LmNvbWQAAmlkYdpkAARuYW1lbQAAAApVc2VyIFRlc3QxZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjFkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMWQADHdhdGNobGlzdF9pZGHa.ynGrz6gad7RIkTh1lopco9xXNhiI-y6Bm6ecAnv3Usg; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyNmQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTZAYmxvY2tzY291dC5jb21kAAJpZGIAAAELZAAEbmFtZW0AAAAKVXNlciBUZXN0NmQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI2ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDZkAAx3YXRjaGxpc3RfaWRiAAABCw.SNgNlsqLtHPQ2HgJTPlyNjbvKw2FlW_U6_cJXTD-ZE4; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gt5U3pwfpssAABCh + x-request-id: Fy1W2ZSytrGywD0AABJi access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1184,9 +1284,19 @@ HOST:http://blockscout.com/xdai/testnet [ { - "name": "test14", - "id": 159, - "contract_address_hash": "0x000000000000000000000000000000000000000f", + "name": "test18", + "id": 161, + "contract_address_hash": "0x0000000000000000000000000000000000000058", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000058" + }, "abi": [ { "type": "function", @@ -1219,9 +1329,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test13", - "id": 158, - "contract_address_hash": "0x000000000000000000000000000000000000000e", + "name": "test17", + "id": 160, + "contract_address_hash": "0x0000000000000000000000000000000000000057", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000057" + }, "abi": [ { "type": "function", @@ -1254,9 +1374,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test12", - "id": 157, - "contract_address_hash": "0x000000000000000000000000000000000000000d", + "name": "test16", + "id": 159, + "contract_address_hash": "0x0000000000000000000000000000000000000056", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000056" + }, "abi": [ { "type": "function", @@ -1289,9 +1419,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test11", - "id": 156, - "contract_address_hash": "0x000000000000000000000000000000000000000c", + "name": "test15", + "id": 158, + "contract_address_hash": "0x0000000000000000000000000000000000000055", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000055" + }, "abi": [ { "type": "function", @@ -1324,9 +1464,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test10", - "id": 155, - "contract_address_hash": "0x000000000000000000000000000000000000000b", + "name": "test14", + "id": 157, + "contract_address_hash": "0x0000000000000000000000000000000000000054", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000054" + }, "abi": [ { "type": "function", @@ -1359,9 +1509,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test9", - "id": 154, - "contract_address_hash": "0x000000000000000000000000000000000000000a", + "name": "test13", + "id": 156, + "contract_address_hash": "0x0000000000000000000000000000000000000053", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000053" + }, "abi": [ { "type": "function", @@ -1394,9 +1554,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test8", - "id": 153, - "contract_address_hash": "0x0000000000000000000000000000000000000009", + "name": "test12", + "id": 155, + "contract_address_hash": "0x0000000000000000000000000000000000000052", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000052" + }, "abi": [ { "type": "function", @@ -1429,9 +1599,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test7", - "id": 152, - "contract_address_hash": "0x0000000000000000000000000000000000000008", + "name": "test11", + "id": 154, + "contract_address_hash": "0x0000000000000000000000000000000000000051", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000051" + }, "abi": [ { "type": "function", @@ -1464,9 +1644,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test6", - "id": 151, - "contract_address_hash": "0x0000000000000000000000000000000000000007", + "name": "test10", + "id": 153, + "contract_address_hash": "0x0000000000000000000000000000000000000050", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000050" + }, "abi": [ { "type": "function", @@ -1499,9 +1689,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test5", - "id": 150, - "contract_address_hash": "0x0000000000000000000000000000000000000006", + "name": "test9", + "id": 152, + "contract_address_hash": "0x000000000000000000000000000000000000004f", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004f" + }, "abi": [ { "type": "function", @@ -1534,9 +1734,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test4", - "id": 149, - "contract_address_hash": "0x0000000000000000000000000000000000000005", + "name": "test8", + "id": 151, + "contract_address_hash": "0x000000000000000000000000000000000000004e", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004e" + }, "abi": [ { "type": "function", @@ -1569,9 +1779,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test3", - "id": 148, - "contract_address_hash": "0x0000000000000000000000000000000000000004", + "name": "test7", + "id": 150, + "contract_address_hash": "0x000000000000000000000000000000000000004d", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004D" + }, "abi": [ { "type": "function", @@ -1604,9 +1824,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test2", - "id": 147, - "contract_address_hash": "0x0000000000000000000000000000000000000003", + "name": "test6", + "id": 149, + "contract_address_hash": "0x000000000000000000000000000000000000004c", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004C" + }, "abi": [ { "type": "function", @@ -1639,9 +1869,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test1", - "id": 146, - "contract_address_hash": "0x0000000000000000000000000000000000000002", + "name": "test5", + "id": 148, + "contract_address_hash": "0x000000000000000000000000000000000000004b", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004B" + }, "abi": [ { "type": "function", @@ -1674,9 +1914,19 @@ HOST:http://blockscout.com/xdai/testnet ] }, { - "name": "test0", - "id": 145, - "contract_address_hash": "0x0000000000000000000000000000000000000001", + "name": "test4", + "id": 147, + "contract_address_hash": "0x000000000000000000000000000000000000004a", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000004A" + }, "abi": [ { "type": "function", @@ -1715,12 +1965,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `160` - id: 160 + + id: `162` + id: 162 + Request Edit custom abi -**PUT**  `/api/account/v1/user/custom_abis/160` +**PUT**  `/api/account/v1/user/custom_abis/162` + Headers @@ -1729,7 +1979,7 @@ HOST:http://blockscout.com/xdai/testnet { "name": "test23", - "contract_address_hash": "0x0000000000000000000000000000000000000046", + "contract_address_hash": "0x0000000000000000000000000000000000000066", "abi": [ { "type": "function", @@ -1766,10 +2016,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTNkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE3QGJsb2Nrc2NvdXQuY29tZAACaWRh5mQABG5hbWVtAAAAC1VzZXIgVGVzdDEzZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEzZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEzZAAMd2F0Y2hsaXN0X2lkYeY.sl0nMtxBkMGt3aK7ohM3AYMcNEI-l37Xvqvl9qZ2Tso; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIyQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABEGQABG5hbWVtAAAAC1VzZXIgVGVzdDExZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjExZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDExZAAMd2F0Y2hsaXN0X2lkYgAAARA.M0fGYF6uHlLOsjA-gLmGzzXuTxSr8hQVlDi3jIhAXX0; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gu0y0bFQlB0AAAbi + x-request-id: Fy1W2ZrqXJvdOdEAAAdE access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1777,8 +2027,18 @@ HOST:http://blockscout.com/xdai/testnet { "name": "test23", - "id": 160, - "contract_address_hash": "0x0000000000000000000000000000000000000046", + "id": 162, + "contract_address_hash": "0x0000000000000000000000000000000000000066", + "contract_address": { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": false, + "is_contract": true, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000066" + }, "abi": [ { "type": "function", @@ -1816,22 +2076,22 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `162` - id: 162 + + id: `145` + id: 145 + Request Delete custom abi -**DELETE**  `/api/account/v1/user/custom_abis/162` +**DELETE**  `/api/account/v1/user/custom_abis/145` + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjRkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTM4QGJsb2Nrc2NvdXQuY29tZAACaWRh8WQABG5hbWVtAAAAC1VzZXIgVGVzdDI0ZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjI0ZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDI0ZAAMd2F0Y2hsaXN0X2lkYfE.i0XOrEfBULTfd08Ig4nhy_veB1sWxl2UWYT9kkveABw; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMmQABWVtYWlsbQAAABp0ZXN0X3VzZXItMkBibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQdkAARuYW1lbQAAAApVc2VyIFRlc3QyZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjJkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwMmQADHdhdGNobGlzdF9pZGIAAAEH.xeXAG0XBVkoEw0SR5kJ04tyapR1tY5N9XTrN_nrO63c; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvnkpEhLN3QAACMB + x-request-id: Fy1W2XZv72akD4sAAAQk access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -1855,62 +2115,128 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "website": "website3", - "tags": "Tag5;Tag6", + "website": "website11", + "tags": "Tag17", "is_owner": false, - "full_name": "full name3", - "email": "test_user-16@blockscout.com", - "company": "company3", + "full_name": "full name11", + "email": "test_user-24@blockscout.com", + "company": "company11", "addresses": [ - "0x000000000000000000000000000000000000003b", - "0x000000000000000000000000000000000000003c", - "0x000000000000000000000000000000000000003d", - "0x000000000000000000000000000000000000003e", - "0x000000000000000000000000000000000000003f", - "0x0000000000000000000000000000000000000040", - "0x0000000000000000000000000000000000000041", - "0x0000000000000000000000000000000000000042", - "0x0000000000000000000000000000000000000043", - "0x0000000000000000000000000000000000000044" + "0x0000000000000000000000000000000000000067", + "0x0000000000000000000000000000000000000068", + "0x0000000000000000000000000000000000000069", + "0x000000000000000000000000000000000000006a", + "0x000000000000000000000000000000000000006b", + "0x000000000000000000000000000000000000006c", + "0x000000000000000000000000000000000000006d" ], - "additional_comment": "additional_comment3" + "additional_comment": "additional_comment11" } + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTE1QGJsb2Nrc2NvdXQuY29tZAACaWRh5WQABG5hbWVtAAAAC1VzZXIgVGVzdDEyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEyZAAMd2F0Y2hsaXN0X2lkYeU.8B0VERlCeTBlp1w0Zys_ZGaVIKj0VYi6pV2wMnCjeac; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMTJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTIzQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABEWQABG5hbWVtAAAAC1VzZXIgVGVzdDEyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjEyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDEyZAAMd2F0Y2hsaXN0X2lkYgAAARE.NJjO7QbBKV5g6_hGxLxBb5wlGDmJMKp-bpgLhhrFjLM; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guxmyw_F-rUAAATj + x-request-id: Fy1W2Zt2e1-7YrQAABVh access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "website": "website3", - "tags": "Tag5;Tag6", - "submission_date": "2022-09-03T21:02:22.651943Z", + "website": "website11", + "tags": "Tag17", + "submission_date": "2022-12-03T16:55:29.441979Z", "is_owner": false, - "id": 146, - "full_name": "full name3", - "email": "test_user-16@blockscout.com", - "company": "company3", + "id": 202, + "full_name": "full name11", + "email": "test_user-24@blockscout.com", + "company": "company11", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000067" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000068" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000069" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000006a" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000006b" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000006C" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000006D" + } + ], "addresses": [ - "0x000000000000000000000000000000000000003b", - "0x000000000000000000000000000000000000003c", - "0x000000000000000000000000000000000000003d", - "0x000000000000000000000000000000000000003e", - "0x000000000000000000000000000000000000003f", - "0x0000000000000000000000000000000000000040", - "0x0000000000000000000000000000000000000041", - "0x0000000000000000000000000000000000000042", - "0x0000000000000000000000000000000000000043", - "0x0000000000000000000000000000000000000044" + "0x0000000000000000000000000000000000000067", + "0x0000000000000000000000000000000000000068", + "0x0000000000000000000000000000000000000069", + "0x000000000000000000000000000000000000006a", + "0x000000000000000000000000000000000000006b", + "0x000000000000000000000000000000000000006c", + "0x000000000000000000000000000000000000006d" ], - "additional_comment": "additional_comment3" + "additional_comment": "additional_comment11" } ### BlockScoutWeb.Account.Api.V1.UserController public_tags_requests [GET /api/account/v1/user/public_tags] @@ -1926,191 +2252,847 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh72QABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYe8.oZY96LW6ZLfw1aK-C5TYkrK2GRNQEJCapnUSkd5OjXU; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQhkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGIAAAEI.-a6kcGlCbsFgQtwPNaGA4yaOOpSpyG_54rEROF3a6E0; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvdQvQ8r6iIAAAki + x-request-id: Fy1W2YJiDacnhiAAAA9h access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body [ - { - "website": "website13", - "tags": "Tag18;Tag19", - "submission_date": "2022-09-03T21:02:23.000000Z", - "is_owner": false, - "id": 156, - "full_name": "full name13", - "email": "test_user-36@blockscout.com", - "company": "company13", - "addresses": [ - "0x0000000000000000000000000000000000000084", - "0x0000000000000000000000000000000000000085", - "0x0000000000000000000000000000000000000086", - "0x0000000000000000000000000000000000000087", - "0x0000000000000000000000000000000000000088" - ], - "additional_comment": "additional_comment13" - }, - { - "website": "website12", - "tags": "Tag17", - "submission_date": "2022-09-03T21:02:23.000000Z", - "is_owner": true, - "id": 155, - "full_name": "full name12", - "email": "test_user-35@blockscout.com", - "company": "company12", - "addresses": [ - "0x0000000000000000000000000000000000000083" - ], - "additional_comment": "additional_comment12" - }, - { - "website": "website11", - "tags": "Tag16", - "submission_date": "2022-09-03T21:02:23.000000Z", - "is_owner": false, - "id": 154, - "full_name": "full name11", - "email": "test_user-34@blockscout.com", - "company": "company11", - "addresses": [ - "0x000000000000000000000000000000000000007b", - "0x000000000000000000000000000000000000007c", - "0x000000000000000000000000000000000000007d", - "0x000000000000000000000000000000000000007e", - "0x000000000000000000000000000000000000007f", - "0x0000000000000000000000000000000000000080", - "0x0000000000000000000000000000000000000081", - "0x0000000000000000000000000000000000000082" - ], - "additional_comment": "additional_comment11" - }, - { - "website": "website10", - "tags": "Tag15", - "submission_date": "2022-09-03T21:02:23.000000Z", - "is_owner": false, - "id": 153, - "full_name": "full name10", - "email": "test_user-33@blockscout.com", - "company": "company10", - "addresses": [ - "0x0000000000000000000000000000000000000073", - "0x0000000000000000000000000000000000000074", - "0x0000000000000000000000000000000000000075", - "0x0000000000000000000000000000000000000076", - "0x0000000000000000000000000000000000000077", - "0x0000000000000000000000000000000000000078", - "0x0000000000000000000000000000000000000079", - "0x000000000000000000000000000000000000007a" - ], - "additional_comment": "additional_comment10" - }, { "website": "website9", "tags": "Tag14", - "submission_date": "2022-09-03T21:02:23.000000Z", + "submission_date": "2022-12-03T16:55:29.000000Z", "is_owner": false, - "id": 152, + "id": 200, "full_name": "full name9", - "email": "test_user-32@blockscout.com", + "email": "test_user-13@blockscout.com", "company": "company9", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003D" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003e" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003f" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000040" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000041" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000042" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000043" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000044" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000045" + } + ], "addresses": [ - "0x000000000000000000000000000000000000006d", - "0x000000000000000000000000000000000000006e", - "0x000000000000000000000000000000000000006f", - "0x0000000000000000000000000000000000000070", - "0x0000000000000000000000000000000000000071", - "0x0000000000000000000000000000000000000072" + "0x000000000000000000000000000000000000003d", + "0x000000000000000000000000000000000000003e", + "0x000000000000000000000000000000000000003f", + "0x0000000000000000000000000000000000000040", + "0x0000000000000000000000000000000000000041", + "0x0000000000000000000000000000000000000042", + "0x0000000000000000000000000000000000000043", + "0x0000000000000000000000000000000000000044", + "0x0000000000000000000000000000000000000045" ], "additional_comment": "additional_comment9" }, { "website": "website8", "tags": "Tag13", - "submission_date": "2022-09-03T21:02:23.000000Z", + "submission_date": "2022-12-03T16:55:29.000000Z", "is_owner": false, - "id": 151, + "id": 199, "full_name": "full name8", - "email": "test_user-31@blockscout.com", + "email": "test_user-12@blockscout.com", "company": "company8", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003a" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003b" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000003c" + } + ], "addresses": [ - "0x0000000000000000000000000000000000000064", - "0x0000000000000000000000000000000000000065", - "0x0000000000000000000000000000000000000066", - "0x0000000000000000000000000000000000000067", - "0x0000000000000000000000000000000000000068", - "0x0000000000000000000000000000000000000069", - "0x000000000000000000000000000000000000006a", - "0x000000000000000000000000000000000000006b", - "0x000000000000000000000000000000000000006c" + "0x000000000000000000000000000000000000003a", + "0x000000000000000000000000000000000000003b", + "0x000000000000000000000000000000000000003c" ], "additional_comment": "additional_comment8" }, { "website": "website7", "tags": "Tag11;Tag12", - "submission_date": "2022-09-03T21:02:23.000000Z", + "submission_date": "2022-12-03T16:55:29.000000Z", "is_owner": true, - "id": 150, + "id": 198, "full_name": "full name7", - "email": "test_user-30@blockscout.com", + "email": "test_user-11@blockscout.com", "company": "company7", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000032" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000033" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000034" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000035" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000036" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000037" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000038" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000039" + } + ], "addresses": [ - "0x0000000000000000000000000000000000000063" + "0x0000000000000000000000000000000000000032", + "0x0000000000000000000000000000000000000033", + "0x0000000000000000000000000000000000000034", + "0x0000000000000000000000000000000000000035", + "0x0000000000000000000000000000000000000036", + "0x0000000000000000000000000000000000000037", + "0x0000000000000000000000000000000000000038", + "0x0000000000000000000000000000000000000039" ], "additional_comment": "additional_comment7" }, { "website": "website6", - "tags": "Tag9;Tag10", - "submission_date": "2022-09-03T21:02:23.000000Z", - "is_owner": false, - "id": 149, + "tags": "Tag10", + "submission_date": "2022-12-03T16:55:29.000000Z", + "is_owner": true, + "id": 197, "full_name": "full name6", - "email": "test_user-29@blockscout.com", + "email": "test_user-10@blockscout.com", "company": "company6", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002c" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002D" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002E" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002F" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000030" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000031" + } + ], "addresses": [ - "0x0000000000000000000000000000000000000060", - "0x0000000000000000000000000000000000000061", - "0x0000000000000000000000000000000000000062" + "0x000000000000000000000000000000000000002c", + "0x000000000000000000000000000000000000002d", + "0x000000000000000000000000000000000000002e", + "0x000000000000000000000000000000000000002f", + "0x0000000000000000000000000000000000000030", + "0x0000000000000000000000000000000000000031" ], "additional_comment": "additional_comment6" }, { "website": "website5", - "tags": "Tag8", - "submission_date": "2022-09-03T21:02:23.000000Z", + "tags": "Tag9", + "submission_date": "2022-12-03T16:55:29.000000Z", "is_owner": true, - "id": 148, + "id": 196, "full_name": "full name5", - "email": "test_user-28@blockscout.com", + "email": "test_user-9@blockscout.com", "company": "company5", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000028" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000029" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002A" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000002b" + } + ], "addresses": [ - "0x000000000000000000000000000000000000005e", - "0x000000000000000000000000000000000000005f" + "0x0000000000000000000000000000000000000028", + "0x0000000000000000000000000000000000000029", + "0x000000000000000000000000000000000000002a", + "0x000000000000000000000000000000000000002b" ], "additional_comment": "additional_comment5" }, { "website": "website4", - "tags": "Tag7", - "submission_date": "2022-09-03T21:02:23.000000Z", + "tags": "Tag7;Tag8", + "submission_date": "2022-12-03T16:55:29.000000Z", "is_owner": false, - "id": 147, + "id": 195, "full_name": "full name4", - "email": "test_user-27@blockscout.com", + "email": "test_user-8@blockscout.com", "company": "company4", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000020" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000021" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000022" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000023" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000024" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000025" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000026" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000027" + } + ], "addresses": [ - "0x000000000000000000000000000000000000005b", - "0x000000000000000000000000000000000000005c", - "0x000000000000000000000000000000000000005d" + "0x0000000000000000000000000000000000000020", + "0x0000000000000000000000000000000000000021", + "0x0000000000000000000000000000000000000022", + "0x0000000000000000000000000000000000000023", + "0x0000000000000000000000000000000000000024", + "0x0000000000000000000000000000000000000025", + "0x0000000000000000000000000000000000000026", + "0x0000000000000000000000000000000000000027" ], "additional_comment": "additional_comment4" + }, + { + "website": "website3", + "tags": "Tag5;Tag6", + "submission_date": "2022-12-03T16:55:29.000000Z", + "is_owner": true, + "id": 194, + "full_name": "full name3", + "email": "test_user-7@blockscout.com", + "company": "company3", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001a" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001B" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001c" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001D" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001e" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000001F" + } + ], + "addresses": [ + "0x000000000000000000000000000000000000001a", + "0x000000000000000000000000000000000000001b", + "0x000000000000000000000000000000000000001c", + "0x000000000000000000000000000000000000001d", + "0x000000000000000000000000000000000000001e", + "0x000000000000000000000000000000000000001f" + ], + "additional_comment": "additional_comment3" + }, + { + "website": "website2", + "tags": "Tag3;Tag4", + "submission_date": "2022-12-03T16:55:29.000000Z", + "is_owner": true, + "id": 193, + "full_name": "full name2", + "email": "test_user-6@blockscout.com", + "company": "company2", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000010" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000011" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000012" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000013" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000014" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000015" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000016" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000017" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000018" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000019" + } + ], + "addresses": [ + "0x0000000000000000000000000000000000000010", + "0x0000000000000000000000000000000000000011", + "0x0000000000000000000000000000000000000012", + "0x0000000000000000000000000000000000000013", + "0x0000000000000000000000000000000000000014", + "0x0000000000000000000000000000000000000015", + "0x0000000000000000000000000000000000000016", + "0x0000000000000000000000000000000000000017", + "0x0000000000000000000000000000000000000018", + "0x0000000000000000000000000000000000000019" + ], + "additional_comment": "additional_comment2" + }, + { + "website": "website1", + "tags": "Tag2", + "submission_date": "2022-12-03T16:55:29.000000Z", + "is_owner": false, + "id": 192, + "full_name": "full name1", + "email": "test_user-5@blockscout.com", + "company": "company1", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000E" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000F" + } + ], + "addresses": [ + "0x000000000000000000000000000000000000000e", + "0x000000000000000000000000000000000000000f" + ], + "additional_comment": "additional_comment1" + }, + { + "website": "website0", + "tags": "Tag0;Tag1", + "submission_date": "2022-12-03T16:55:29.000000Z", + "is_owner": true, + "id": 191, + "full_name": "full name0", + "email": "test_user-4@blockscout.com", + "company": "company0", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000008" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000009" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000A" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000b" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000C" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000000d" + } + ], + "addresses": [ + "0x0000000000000000000000000000000000000008", + "0x0000000000000000000000000000000000000009", + "0x000000000000000000000000000000000000000a", + "0x000000000000000000000000000000000000000b", + "0x000000000000000000000000000000000000000c", + "0x000000000000000000000000000000000000000d" + ], + "additional_comment": "additional_comment0" } ] ### BlockScoutWeb.Account.Api.V1.UserController delete_public_tags_request [DELETE /api/account/v1/user/public_tags/{id}] @@ -2119,12 +3101,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `156` - id: 156 + + id: `200` + id: 200 + Request Delete public tags request -**DELETE**  `/api/account/v1/user/public_tags/156` +**DELETE**  `/api/account/v1/user/public_tags/200` + Headers @@ -2139,10 +3121,10 @@ HOST:http://blockscout.com/xdai/testnet + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjJkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTI2QGJsb2Nrc2NvdXQuY29tZAACaWRh72QABG5hbWVtAAAAC1VzZXIgVGVzdDIyZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIyZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIyZAAMd2F0Y2hsaXN0X2lkYe8.oZY96LW6ZLfw1aK-C5TYkrK2GRNQEJCapnUSkd5OjXU; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyM2QABWVtYWlsbQAAABp0ZXN0X3VzZXItM0BibG9ja3Njb3V0LmNvbWQAAmlkYgAAAQhkAARuYW1lbQAAAApVc2VyIFRlc3QzZAAIbmlja25hbWVtAAAACnRlc3RfdXNlcjNkAAN1aWRtAAAAD2Jsb2Nrc2NvdXR8MDAwM2QADHdhdGNobGlzdF9pZGIAAAEI.-a6kcGlCbsFgQtwPNaGA4yaOOpSpyG_54rEROF3a6E0; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1gvdm8H0r6iIAAAlC + x-request-id: Fy1W2YdEq9snhiAAAA-h access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: @@ -2157,12 +3139,12 @@ HOST:http://blockscout.com/xdai/testnet + Parameters - + id: `145` - id: 145 + + id: `203` + id: 203 + Request Edit request to add a public tag -**PUT**  `/api/account/v1/user/public_tags/145` +**PUT**  `/api/account/v1/user/public_tags/203` + Headers @@ -2170,59 +3152,127 @@ HOST:http://blockscout.com/xdai/testnet + Body { - "website": "website2", - "tags": "Tag3;Tag4", + "website": "website13", + "tags": "Tag20;Tag21", "is_owner": false, - "full_name": "full name2", - "email": "test_user-12@blockscout.com", - "company": "company2", + "full_name": "full name13", + "email": "test_user-35@blockscout.com", + "company": "company13", "addresses": [ - "0x000000000000000000000000000000000000002f", - "0x0000000000000000000000000000000000000030", - "0x0000000000000000000000000000000000000031", - "0x0000000000000000000000000000000000000032", - "0x0000000000000000000000000000000000000033", - "0x0000000000000000000000000000000000000034", - "0x0000000000000000000000000000000000000035", - "0x0000000000000000000000000000000000000036", - "0x0000000000000000000000000000000000000037" + "0x0000000000000000000000000000000000000085", + "0x0000000000000000000000000000000000000086", + "0x0000000000000000000000000000000000000087", + "0x0000000000000000000000000000000000000088", + "0x0000000000000000000000000000000000000089", + "0x000000000000000000000000000000000000008a", + "0x000000000000000000000000000000000000008b" ], - "additional_comment": "additional_comment2" + "additional_comment": "additional_comment13" } + Response 200 + Headers - set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAlaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyOWQABWVtYWlsbQAAABt0ZXN0X3VzZXItMTBAYmxvY2tzY291dC5jb21kAAJpZGHiZAAEbmFtZW0AAAAKVXNlciBUZXN0OWQACG5pY2tuYW1lbQAAAAp0ZXN0X3VzZXI5ZAADdWlkbQAAAA9ibG9ja3Njb3V0fDAwMDlkAAx3YXRjaGxpc3RfaWRh4g.cM2caeO_bvTyojrTAKD7Tt4WEPEIsHwTMmWkTEVgSLo; path=/; HttpOnly + set-cookie: _explorer_key=SFMyNTY.g3QAAAABbQAAAAxjdXJyZW50X3VzZXJ0AAAAB2QABmF2YXRhcm0AAAAmaHR0cHM6Ly9leGFtcGxlLmNvbS9hdmF0YXIvdGVzdF91c2VyMjFkAAVlbWFpbG0AAAAbdGVzdF91c2VyLTMzQGJsb2Nrc2NvdXQuY29tZAACaWRiAAABGmQABG5hbWVtAAAAC1VzZXIgVGVzdDIxZAAIbmlja25hbWVtAAAAC3Rlc3RfdXNlcjIxZAADdWlkbQAAABBibG9ja3Njb3V0fDAwMDIxZAAMd2F0Y2hsaXN0X2lkYgAAARo.byLDQXd4VuN-Y1kqWEWSxe5Q_ne42ove8xpm5k_GwHc; path=/; SameSite=Lax content-type: application/json; charset=utf-8 cache-control: max-age=0, private, must-revalidate - x-request-id: FxF1guqVaODqqc8AAAUi + x-request-id: Fy1W2aqpFvr2fxsAABjB access-control-allow-credentials: true access-control-allow-origin: * access-control-expose-headers: + Body { - "website": "website2", - "tags": "Tag3;Tag4", - "submission_date": "2022-09-03T21:02:23.000000Z", + "website": "website13", + "tags": "Tag20;Tag21", + "submission_date": "2022-12-03T16:55:30.000000Z", "is_owner": false, - "id": 145, - "full_name": "full name2", - "email": "test_user-12@blockscout.com", - "company": "company2", + "id": 203, + "full_name": "full name13", + "email": "test_user-35@blockscout.com", + "company": "company13", + "addresses_with_info": [ + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000085" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000086" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000087" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000088" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x0000000000000000000000000000000000000089" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000008A" + }, + { + "watchlist_names": [], + "public_tags": [], + "private_tags": [], + "name": null, + "is_verified": null, + "is_contract": false, + "implementation_name": null, + "hash": "0x000000000000000000000000000000000000008b" + } + ], "addresses": [ - "0x000000000000000000000000000000000000002f", - "0x0000000000000000000000000000000000000030", - "0x0000000000000000000000000000000000000031", - "0x0000000000000000000000000000000000000032", - "0x0000000000000000000000000000000000000033", - "0x0000000000000000000000000000000000000034", - "0x0000000000000000000000000000000000000035", - "0x0000000000000000000000000000000000000036", - "0x0000000000000000000000000000000000000037" + "0x0000000000000000000000000000000000000085", + "0x0000000000000000000000000000000000000086", + "0x0000000000000000000000000000000000000087", + "0x0000000000000000000000000000000000000088", + "0x0000000000000000000000000000000000000089", + "0x000000000000000000000000000000000000008a", + "0x000000000000000000000000000000000000008b" ], - "additional_comment": "additional_comment2" + "additional_comment": "additional_comment13" } diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex index 22ab4e2696ff..837d64771dc8 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/api/v1/user_controller.ex @@ -30,7 +30,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do {:identity, [%Identity{} = identity]} <- {:identity, UserFromAuth.find_identity(uid)}, {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, - watchlist_with_addresses <- preload_watchlist_address_fetched_coin_balance(watchlist) do + watchlist_with_addresses <- preload_watchlist_addresses(watchlist) do conn |> put_status(200) |> render(:watchlist_addresses, %{ @@ -98,12 +98,11 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- - WatchlistAddress.create(Map.put(watchlist_params, :watchlist_id, watchlist.id)), - watchlist_address_preloaded <- WatchlistAddress.preload_address_fetched_coin_balance(watchlist_address) do + WatchlistAddress.create(Map.put(watchlist_params, :watchlist_id, watchlist.id)) do conn |> put_status(200) |> render(:watchlist_address, %{ - watchlist_address: watchlist_address_preloaded, + watchlist_address: watchlist_address, exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null() }) end @@ -156,12 +155,11 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do {:watchlist, %{watchlists: [watchlist | _]}} <- {:watchlist, Repo.account_repo().preload(identity, :watchlists)}, {:ok, watchlist_address} <- - WatchlistAddress.update(Map.put(watchlist_params, :watchlist_id, watchlist.id)), - watchlist_address_preloaded <- WatchlistAddress.preload_address_fetched_coin_balance(watchlist_address) do + WatchlistAddress.update(Map.put(watchlist_params, :watchlist_id, watchlist.id)) do conn |> put_status(200) |> render(:watchlist_address, %{ - watchlist_address: watchlist_address_preloaded, + watchlist_address: watchlist_address, exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null() }) end @@ -468,9 +466,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserController do Map.reject(map, fn {_k, v} -> is_nil(v) end) end - defp preload_watchlist_address_fetched_coin_balance(watchlist) do + defp preload_watchlist_addresses(watchlist) do watchlist |> Repo.account_repo().preload(watchlist_addresses: from(wa in WatchlistAddress, order_by: [desc: wa.id])) - |> WatchlistAddress.preload_address_fetched_coin_balance() end end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex index 91299034a1cb..d769c1032b16 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex @@ -1,6 +1,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do alias BlockScoutWeb.Account.Api.V1.AccountView alias Ecto.Changeset + alias Explorer.Chain + alias BlockScoutWeb.API.V2.Helper def render("message.json", assigns) do AccountView.render("message.json", assigns) @@ -70,11 +72,14 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do end def prepare_watchlist_address(watchlist, exchange_rate) do + address = get_address(watchlist.address_hash) + %{ "id" => watchlist.id, + "address" => Helper.address_with_info(nil, address, watchlist.address_hash), "address_hash" => watchlist.address_hash, "name" => watchlist.name, - "address_balance" => if(watchlist.fetched_coin_balance, do: watchlist.fetched_coin_balance.value), + "address_balance" => if(address && address.fetched_coin_balance, do: address.fetched_coin_balance.value), "exchange_rate" => exchange_rate.usd_value, "notification_settings" => %{ "native" => %{ @@ -102,9 +107,12 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do end def prepare_custom_abi(custom_abi) do + address = get_address(custom_abi.address_hash) + %{ "id" => custom_abi.id, "contract_address_hash" => custom_abi.address_hash, + "contract_address" => Helper.address_with_info(nil, address, custom_abi.address_hash), "name" => custom_abi.name, "abi" => custom_abi.abi } @@ -115,7 +123,14 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do end def prepare_address_tag(address_tag) do - %{"id" => address_tag.id, "address_hash" => address_tag.address_hash, "name" => address_tag.name} + address = get_address(address_tag.address_hash) + + %{ + "id" => address_tag.id, + "address_hash" => address_tag.address_hash, + "address" => Helper.address_with_info(nil, address, address_tag.address_hash), + "name" => address_tag.name + } end def prepare_transaction_tag(nil), do: nil @@ -125,6 +140,11 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do end def prepare_public_tags_request(public_tags_request) do + addresses = + Enum.map(public_tags_request.addresses, fn address_hash -> + Helper.address_with_info(nil, get_address(address_hash), address_hash) + end) + %{ "id" => public_tags_request.id, "full_name" => public_tags_request.full_name, @@ -133,9 +153,17 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do "website" => public_tags_request.website, "tags" => public_tags_request.tags, "addresses" => public_tags_request.addresses, + "addresses_with_info" => addresses, "additional_comment" => public_tags_request.additional_comment, "is_owner" => public_tags_request.is_owner, "submission_date" => public_tags_request.inserted_at } end + + defp get_address(address_hash) do + case Chain.hash_to_address(address_hash, [necessity_by_association: %{:smart_contract => :optional}], false) do + {:ok, address} -> address + _ -> nil + end + end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs index 0f56777af7e2..0081ebdcfb72 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/account/api/v1/user_controller_test.exs @@ -1,6 +1,7 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do use BlockScoutWeb.ConnCase + alias Explorer.Chain.Address alias BlockScoutWeb.Models.UserFromAuth setup %{conn: conn} do @@ -92,7 +93,21 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do |> json_response(200))["id"] {addr, %{"display_name" => name, "label" => name, "address_hash" => addr}, - %{"address_hash" => addr, "id" => id, "name" => name}} + %{ + "address_hash" => addr, + "id" => id, + "name" => name, + "address" => %{ + "hash" => Address.checksum(addr), + "implementation_name" => nil, + "is_contract" => false, + "is_verified" => false, + "name" => nil, + "private_tags" => [], + "public_tags" => [], + "watchlist_names" => [] + } + }} end) assert Enum.all?(created, fn {addr, map_tag, _} -> @@ -129,7 +144,21 @@ defmodule BlockScoutWeb.Account.Api.V1.UserControllerTest do |> json_response(200))["id"] {addr, %{"display_name" => name, "label" => name, "address_hash" => addr}, - %{"address_hash" => addr, "id" => id, "name" => name}} + %{ + "address_hash" => addr, + "id" => id, + "name" => name, + "address" => %{ + "hash" => Address.checksum(addr), + "implementation_name" => nil, + "is_contract" => false, + "is_verified" => false, + "name" => nil, + "private_tags" => [], + "public_tags" => [], + "watchlist_names" => [] + } + }} end) assert Enum.all?(created, fn {addr, map_tag, _} -> From a5bd6b82d74d6e3847c25be6bdbc089469025372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Dec 2022 13:05:02 +0300 Subject: [PATCH 686/723] Add restricted access check to API v2 --- .../controllers/api/v2/address_controller.ex | 36 ++++++++++++------- .../controllers/api/v2/fallback_controller.ex | 7 ++++ .../controllers/api/v2/token_controller.ex | 11 ++++-- .../api/v2/transaction_controller.ex | 29 +++++++++++---- .../api/v2/transaction_controller_test.exs | 18 ++++------ 5 files changed, 68 insertions(+), 33 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex index 0e677fa567c6..806fcd0f374a 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex @@ -12,6 +12,7 @@ defmodule BlockScoutWeb.API.V2.AddressController do import BlockScoutWeb.PagingHelper, only: [delete_parameters_from_next_page_params: 1, token_transfers_types_options: 1] + alias BlockScoutWeb.AccessHelpers alias BlockScoutWeb.API.V2.{AddressView, BlockView, TransactionView} alias Explorer.{Chain, Market} alias Indexer.Fetcher.TokenBalanceOnDemand @@ -38,8 +39,9 @@ defmodule BlockScoutWeb.API.V2.AddressController do action_fallback(BlockScoutWeb.API.V2.FallbackController) - def address(conn, %{"address_hash" => address_hash_string}) do + def address(conn, %{"address_hash" => address_hash_string} = params) do with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, address}} <- {:not_found, Chain.hash_to_address(address_hash)} do conn |> put_status(200) @@ -47,8 +49,9 @@ defmodule BlockScoutWeb.API.V2.AddressController do end end - def counters(conn, %{"address_hash" => address_hash_string}) do + def counters(conn, %{"address_hash" => address_hash_string} = params) do with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, address}} <- {:not_found, Chain.hash_to_address(address_hash)} do {validation_count} = Chain.address_counters(address) @@ -65,8 +68,9 @@ defmodule BlockScoutWeb.API.V2.AddressController do end end - def token_balances(conn, %{"address_hash" => address_hash_string}) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + def token_balances(conn, %{"address_hash" => address_hash_string} = params) do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do token_balances = address_hash |> Chain.fetch_last_token_balances() @@ -86,7 +90,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def transactions(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do options = @transaction_necessity_by_association |> Keyword.merge(paging_options(params)) @@ -106,7 +111,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def token_transfers(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do options = @token_transfer_necessity_by_association |> Keyword.merge(paging_options(params)) @@ -132,7 +138,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def internal_transactions(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do full_options = [ necessity_by_association: %{ @@ -164,7 +171,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def logs(conn, %{"address_hash" => address_hash_string, "topic" => topic} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do prepared_topic = String.trim(topic) formatted_topic = if String.starts_with?(prepared_topic, "0x"), do: prepared_topic, else: "0x" <> prepared_topic @@ -183,7 +191,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def logs(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do results_plus_one = Chain.address_to_logs(address_hash, paging_options(params)) {logs, next_page} = split_list_by_page(results_plus_one) @@ -197,7 +206,8 @@ defmodule BlockScoutWeb.API.V2.AddressController do end def blocks_validated(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do full_options = Keyword.merge( [ @@ -225,6 +235,7 @@ defmodule BlockScoutWeb.API.V2.AddressController do def coin_balance_history(conn, %{"address_hash" => address_hash_string} = params) do with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, _address}, _} <- {:not_found, Chain.hash_to_address(address_hash), :empty_items_with_next_page_params} do full_options = paging_options(params) @@ -243,8 +254,9 @@ defmodule BlockScoutWeb.API.V2.AddressController do end end - def coin_balance_history_by_day(conn, %{"address_hash" => address_hash_string}) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + def coin_balance_history_by_day(conn, %{"address_hash" => address_hash_string} = params) do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do balances_by_day = address_hash |> Chain.address_to_balances_by_day(true) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/fallback_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/fallback_controller.ex index b61ef387772c..d808d6aa0e27 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/fallback_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/fallback_controller.ex @@ -40,4 +40,11 @@ defmodule BlockScoutWeb.API.V2.FallbackController do conn |> call({:not_found, nil}) end + + def call(conn, {:restricted_access, true}) do + conn + |> put_status(:forbidden) + |> put_view(ApiView) + |> render(:message, %{message: "Restricted access"}) + end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex index 79998a4aaa82..b13b265a7e55 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex @@ -1,6 +1,7 @@ defmodule BlockScoutWeb.API.V2.TokenController do use BlockScoutWeb, :controller + alias BlockScoutWeb.AccessHelpers alias BlockScoutWeb.API.V2.TransactionView alias Explorer.Chain @@ -9,8 +10,9 @@ defmodule BlockScoutWeb.API.V2.TokenController do action_fallback(BlockScoutWeb.API.V2.FallbackController) - def token(conn, %{"address_hash" => address_hash_string}) do + def token(conn, %{"address_hash" => address_hash_string} = params) do with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, token}} <- {:not_found, Chain.token_from_address_hash(address_hash)} do conn |> put_status(200) @@ -18,8 +20,9 @@ defmodule BlockScoutWeb.API.V2.TokenController do end end - def counters(conn, %{"address_hash" => address_hash_string}) do + def counters(conn, %{"address_hash" => address_hash_string} = params) do with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, _}} <- {:not_found, Chain.token_from_address_hash(address_hash)} do {transfer_count, token_holder_count} = Chain.fetch_token_counters(address_hash, 30_000) @@ -28,7 +31,8 @@ defmodule BlockScoutWeb.API.V2.TokenController do end def transfers(conn, %{"address_hash" => address_hash_string} = params) do - with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)} do + with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params) do results_plus_one = Chain.fetch_token_transfers_from_token_hash(address_hash, paging_options(params)) {token_transfers, next_page} = split_list_by_page(results_plus_one) @@ -47,6 +51,7 @@ defmodule BlockScoutWeb.API.V2.TokenController do from_api = true with {:format, {:ok, address_hash}} <- {:format, Chain.string_to_address_hash(address_hash_string)}, + {:ok, false} <- AccessHelpers.restricted_access?(address_hash_string, params), {:not_found, {:ok, token}, _} <- {:not_found, Chain.token_from_address_hash(address_hash), :empty_items_with_next_page_params} do results_plus_one = Chain.fetch_token_holders_from_token_hash(address_hash, from_api, paging_options(params)) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex index 4b6a6c95992c..b66c5726cf93 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex @@ -13,6 +13,7 @@ defmodule BlockScoutWeb.API.V2.TransactionController do type_filter_options: 1 ] + alias BlockScoutWeb.AccessHelpers alias Explorer.Chain alias Explorer.Chain.Import alias Explorer.Chain.Import.Runner.InternalTransactions @@ -59,7 +60,7 @@ defmodule BlockScoutWeb.API.V2.TransactionController do } ] - def transaction(conn, %{"transaction_hash" => transaction_hash_string}) do + def transaction(conn, %{"transaction_hash" => transaction_hash_string} = params) do with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)}, {:not_found, {:ok, transaction}} <- {:not_found, @@ -67,6 +68,8 @@ defmodule BlockScoutWeb.API.V2.TransactionController do transaction_hash, necessity_by_association: @transaction_necessity_by_association )}, + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params), preloaded <- Chain.preload_token_transfers(transaction, @token_transfers_in_tx_neccessity_by_association, false) do conn @@ -97,10 +100,12 @@ defmodule BlockScoutWeb.API.V2.TransactionController do |> render(:transactions, %{transactions: transactions, next_page_params: next_page_params}) end - def raw_trace(conn, %{"transaction_hash" => transaction_hash_string}) do + def raw_trace(conn, %{"transaction_hash" => transaction_hash_string} = params) do with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)}, {:not_found, {:ok, transaction}} <- - {:not_found, Chain.hash_to_transaction(transaction_hash)} do + {:not_found, Chain.hash_to_transaction(transaction_hash)}, + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do if is_nil(transaction.block_number) do conn |> put_status(200) @@ -158,7 +163,11 @@ defmodule BlockScoutWeb.API.V2.TransactionController do end def token_transfers(conn, %{"transaction_hash" => transaction_hash_string} = params) do - with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)} do + with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)}, + {:not_found, {:ok, transaction}} <- + {:not_found, Chain.hash_to_transaction(transaction_hash)}, + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do full_options = [necessity_by_association: @token_transfers_neccessity_by_association] |> Keyword.merge(paging_options(params)) @@ -180,7 +189,11 @@ defmodule BlockScoutWeb.API.V2.TransactionController do end def internal_transactions(conn, %{"transaction_hash" => transaction_hash_string} = params) do - with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)} do + with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)}, + {:not_found, {:ok, transaction}} <- + {:not_found, Chain.hash_to_transaction(transaction_hash)}, + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do full_options = Keyword.merge( @internal_transaction_neccessity_by_association, @@ -206,7 +219,11 @@ defmodule BlockScoutWeb.API.V2.TransactionController do end def logs(conn, %{"transaction_hash" => transaction_hash_string} = params) do - with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)} do + with {:format, {:ok, transaction_hash}} <- {:format, Chain.string_to_transaction_hash(transaction_hash_string)}, + {:not_found, {:ok, transaction}} <- + {:not_found, Chain.hash_to_transaction(transaction_hash)}, + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.from_address_hash), params), + {:ok, false} <- AccessHelpers.restricted_access?(to_string(transaction.to_address_hash), params) do full_options = Keyword.merge( [ diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/transaction_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/transaction_controller_test.exs index 036b79dfc946..b7693129ffbc 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/v2/transaction_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/v2/transaction_controller_test.exs @@ -117,13 +117,11 @@ defmodule BlockScoutWeb.API.V2.TransactionControllerTest do end describe "/transactions/{tx_hash}/internal-transactions" do - test "return empty list on non existing tx", %{conn: conn} do + test "return 404 on non existing tx", %{conn: conn} do tx = build(:transaction) request = get(conn, "/api/v2/transactions/#{to_string(tx.hash)}/internal-transactions") - assert response = json_response(request, 200) - assert response["items"] == [] - assert response["next_page_params"] == nil + assert %{"message" => "Not found"} = json_response(request, 404) end test "return 422 on invalid tx hash", %{conn: conn} do @@ -236,13 +234,11 @@ defmodule BlockScoutWeb.API.V2.TransactionControllerTest do end describe "/transactions/{tx_hash}/logs" do - test "return empty list on non existing tx", %{conn: conn} do + test "return 404 on non existing tx", %{conn: conn} do tx = build(:transaction) request = get(conn, "/api/v2/transactions/#{to_string(tx.hash)}/logs") - assert response = json_response(request, 200) - assert response["items"] == [] - assert response["next_page_params"] == nil + assert %{"message" => "Not found"} = json_response(request, 404) end test "return 422 on invalid tx hash", %{conn: conn} do @@ -330,13 +326,11 @@ defmodule BlockScoutWeb.API.V2.TransactionControllerTest do end describe "/transactions/{tx_hash}/token-transfers" do - test "return empty list on non existing tx", %{conn: conn} do + test "return 404 on non existing tx", %{conn: conn} do tx = build(:transaction) request = get(conn, "/api/v2/transactions/#{to_string(tx.hash)}/token-transfers") - assert response = json_response(request, 200) - assert response["items"] == [] - assert response["next_page_params"] == nil + assert %{"message" => "Not found"} = json_response(request, 404) end test "return 422 on invalid tx hash", %{conn: conn} do From ff6914ba91eadad3b144b087432b3216c81ed65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Dec 2022 13:30:55 +0300 Subject: [PATCH 687/723] Add restricted access check to account's watchlist --- .../block_scout_web/views/access_helpers.ex | 25 ++------------- apps/explorer/lib/explorer/access_helpers.ex | 31 +++++++++++++++++++ .../account/notifier/forbidden_address.ex | 8 +++-- config/runtime.exs | 6 ++-- 4 files changed, 42 insertions(+), 28 deletions(-) create mode 100644 apps/explorer/lib/explorer/access_helpers.ex diff --git a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex index ba8960088b07..ad89312b5f4f 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/access_helpers.ex @@ -8,35 +8,14 @@ defmodule BlockScoutWeb.AccessHelpers do alias BlockScoutWeb.API.APILogger alias BlockScoutWeb.API.RPC.RPCView alias BlockScoutWeb.WebRouter.Helpers + alias Explorer.AccessHelpers alias Explorer.Account.Api.Key, as: ApiKey alias Plug.Conn alias RemoteIp def restricted_access?(address_hash, params) do - restricted_list_var = Application.get_env(:block_scout_web, :restricted_list) - restricted_list = (restricted_list_var && String.split(restricted_list_var, ",")) || [] - - if Enum.count(restricted_list) > 0 do - formatted_restricted_list = - restricted_list - |> Enum.map(fn addr -> - String.downcase(addr) - end) - - formatted_address_hash = String.downcase(address_hash) - - address_restricted = - formatted_restricted_list - |> Enum.member?(formatted_address_hash) - - key = if params && Map.has_key?(params, "key"), do: Map.get(params, "key"), else: nil - correct_key = key && key == Application.get_env(:block_scout_web, :restricted_list_key) - - if address_restricted && !correct_key, do: {:restricted_access, true}, else: {:ok, false} - else - {:ok, false} - end + AccessHelpers.restricted_access?(address_hash, params) end def get_path(conn, path, template, address_hash) do diff --git a/apps/explorer/lib/explorer/access_helpers.ex b/apps/explorer/lib/explorer/access_helpers.ex new file mode 100644 index 000000000000..4bb5e3575d2a --- /dev/null +++ b/apps/explorer/lib/explorer/access_helpers.ex @@ -0,0 +1,31 @@ +defmodule Explorer.AccessHelpers do + @moduledoc """ + Helpers to restrict access to some pages filtering by address + """ + + def restricted_access?(address_hash, params) do + restricted_list_var = Application.get_env(:explorer, :restricted_list) + restricted_list = (restricted_list_var && String.split(restricted_list_var, ",")) || [] + + if Enum.count(restricted_list) > 0 do + formatted_restricted_list = + restricted_list + |> Enum.map(fn addr -> + String.downcase(addr) + end) + + formatted_address_hash = String.downcase(address_hash) + + address_restricted = + formatted_restricted_list + |> Enum.member?(formatted_address_hash) + + key = if params && Map.has_key?(params, "key"), do: Map.get(params, "key"), else: nil + correct_key = key && key == Application.get_env(:explorer, :restricted_list_key) + + if address_restricted && !correct_key, do: {:restricted_access, true}, else: {:ok, false} + else + {:ok, false} + end + end +end diff --git a/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex b/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex index f873864ff166..4bc3a7373be7 100644 --- a/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex +++ b/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex @@ -8,6 +8,7 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do "0x000000000000000000000000000000000000dEaD" ] + alias Explorer.AccessHelpers alias Explorer.Chain.Token alias Explorer.Repo @@ -20,11 +21,11 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do {:error, message} address_hash -> - check(address_hash) + check(address_hash, address_string) end end - def check(%Explorer.Chain.Hash{} = address_hash) do + def check(%Explorer.Chain.Hash{} = address_hash, address_hash_string) do cond do address_hash in blacklist() -> {:error, "This address is blacklisted"} @@ -32,6 +33,9 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do is_contract(address_hash) -> {:error, "This address isn't personal"} + match?({:restricted_access, true}, AccessHelpers.restricted_access?(address_hash_string, %{})) -> + {:error, "This address has restricted access"} + address_hash -> {:ok, address_hash} end diff --git a/config/runtime.exs b/config/runtime.exs index 7b9777f13fb0..8ed002d3e4bc 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -89,8 +89,6 @@ config :block_scout_web, apps_menu: if(System.get_env("APPS_MENU", "false") == "true", do: true, else: false), apps: System.get_env("APPS") || System.get_env("EXTERNAL_APPS"), gas_price: System.get_env("GAS_PRICE", nil), - restricted_list: System.get_env("RESTRICTED_LIST", nil), - restricted_list_key: System.get_env("RESTRICTED_LIST_KEY", nil), dark_forest_addresses: System.get_env("CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST"), dark_forest_addresses_v_0_5: System.get_env("CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5"), circles_addresses: System.get_env("CUSTOM_CONTRACT_ADDRESSES_CIRCLES"), @@ -217,7 +215,9 @@ config :explorer, enable_caching_implementation_data_of_proxy: true, avg_block_time_as_ttl_cached_implementation_data_of_proxy: true, fallback_ttl_cached_implementation_data_of_proxy: :timer.seconds(4), - implementation_data_fetching_timeout: :timer.seconds(2) + implementation_data_fetching_timeout: :timer.seconds(2), + restricted_list: System.get_env("RESTRICTED_LIST", nil), + restricted_list_key: System.get_env("RESTRICTED_LIST_KEY", nil) config :explorer, Explorer.Visualize.Sol2uml, service_url: System.get_env("VISUALIZE_SOL2UML_SERVICE_URL"), From 3a480578e8b364bb942486b83ccc60fd7bebb083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Dec 2022 14:44:11 +0300 Subject: [PATCH 688/723] Add path parameter to callback path --- apps/block_scout_web/config/config.exs | 2 +- .../block_scout_web/controllers/account/auth_controller.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 9bb633641761..815116d2752c 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -104,7 +104,7 @@ config :ueberauth, Ueberauth, providers: [ auth0: { Ueberauth.Strategy.Auth0, - [callback_path: "/auth/auth0/callback"] + [callback_path: "/auth/auth0/callback", callback_params: ["path"]] } ] diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 78080afe327c..02b098305450 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -33,14 +33,14 @@ defmodule BlockScoutWeb.Account.AuthController do |> redirect(to: root()) end - def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do + def callback(%{assigns: %{ueberauth_auth: auth}} = conn, params) do case UserFromAuth.find_or_create(auth) do {:ok, user} -> CSRFProtection.get_csrf_token() conn |> put_session(:current_user, user) - |> redirect(to: root()) + |> redirect(to: params["path"] || root()) {:error, reason} -> conn From abf44ecb8f570b97f491a90f5147043788372955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Sun, 4 Dec 2022 16:57:07 +0300 Subject: [PATCH 689/723] Add path parameter validation --- CHANGELOG.md | 1 + .../controllers/account/auth_controller.ex | 17 ++++++++++++++++- .../views/account/api/v1/user_view.ex | 2 +- .../account/notifier/forbidden_address.ex | 9 ++++----- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a68b34b87f..3599cf86a530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- [#6544](https://github.com/blockscout/blockscout/pull/6544) - API improvements - [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523) - Improve working with contracts implementations - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization - [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex index 02b098305450..c97ab5fb3a70 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/account/auth_controller.ex @@ -40,7 +40,7 @@ defmodule BlockScoutWeb.Account.AuthController do conn |> put_session(:current_user, user) - |> redirect(to: params["path"] || root()) + |> redirect(to: redirect_path(params["path"])) {:error, reason} -> conn @@ -71,4 +71,19 @@ defmodule BlockScoutWeb.Account.AuthController do defp root do ConfigHelper.network_path() end + + defp redirect_path(path) when is_binary(path) do + case URI.parse(path) do + %URI{path: "/" <> path} -> + "/" <> path + + %URI{path: path} when is_binary(path) -> + "/" <> path + + _ -> + root() + end + end + + defp redirect_path(_), do: root() end diff --git a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex index d769c1032b16..b2761714ae90 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/account/api/v1/user_view.ex @@ -1,8 +1,8 @@ defmodule BlockScoutWeb.Account.Api.V1.UserView do alias BlockScoutWeb.Account.Api.V1.AccountView + alias BlockScoutWeb.API.V2.Helper alias Ecto.Changeset alias Explorer.Chain - alias BlockScoutWeb.API.V2.Helper def render("message.json", assigns) do AccountView.render("message.json", assigns) diff --git a/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex b/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex index 4bc3a7373be7..0186875147ab 100644 --- a/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex +++ b/apps/explorer/lib/explorer/account/notifier/forbidden_address.ex @@ -8,9 +8,8 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do "0x000000000000000000000000000000000000dEaD" ] - alias Explorer.AccessHelpers + alias Explorer.{AccessHelpers, Repo} alias Explorer.Chain.Token - alias Explorer.Repo import Ecto.Query, only: [from: 2] import Explorer.Chain, only: [string_to_address_hash: 1] @@ -21,11 +20,11 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do {:error, message} address_hash -> - check(address_hash, address_string) + check(address_hash) end end - def check(%Explorer.Chain.Hash{} = address_hash, address_hash_string) do + def check(%Explorer.Chain.Hash{} = address_hash) do cond do address_hash in blacklist() -> {:error, "This address is blacklisted"} @@ -33,7 +32,7 @@ defmodule Explorer.Account.Notifier.ForbiddenAddress do is_contract(address_hash) -> {:error, "This address isn't personal"} - match?({:restricted_access, true}, AccessHelpers.restricted_access?(address_hash_string, %{})) -> + match?({:restricted_access, true}, AccessHelpers.restricted_access?(to_string(address_hash), %{})) -> {:error, "This address has restricted access"} address_hash -> From 9d1dbf8ec46ef28d166e3986102a84a06c5b4c56 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Mon, 5 Dec 2022 16:11:57 +0400 Subject: [PATCH 690/723] Query token transfers before updating --- CHANGELOG.md | 1 + .../worker.ex | 23 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3599cf86a530..49f87e0e87a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ - [#6449](https://github.com/blockscout/blockscout/pull/6449) - Search min_missing_block_number from zero - [#6492](https://github.com/blockscout/blockscout/pull/6492) - Remove token instance owner fetching - [#6536](https://github.com/blockscout/blockscout/pull/6536) - Fix internal transactions query +- [#6550](https://github.com/blockscout/blockscout/pull/6550) - Query token transfers before updating ### Chore diff --git a/apps/explorer/lib/explorer/token_transfer_token_id_migration/worker.ex b/apps/explorer/lib/explorer/token_transfer_token_id_migration/worker.ex index 24a837995123..f7916ed0582a 100644 --- a/apps/explorer/lib/explorer/token_transfer_token_id_migration/worker.ex +++ b/apps/explorer/lib/explorer/token_transfer_token_id_migration/worker.ex @@ -36,7 +36,7 @@ defmodule Explorer.TokenTransferTokenIdMigration.Worker do @impl true def handle_info(:update, %{current_range: {lower_bound, upper_bound}} = state) do case do_update(lower_bound, upper_bound) do - {_total, _result} -> + true -> LowestBlockNumberUpdater.add_range(upper_bound, lower_bound) new_range = calculate_new_range(lower_bound, state.bottom_block, state.batch_size, state.step) schedule_next_update() @@ -60,21 +60,22 @@ defmodule Explorer.TokenTransferTokenIdMigration.Worker do end defp do_update(lower_bound, upper_bound) do - query = + token_transfers_batch_query = from( tt in TokenTransfer, where: tt.block_number >= ^lower_bound, - where: tt.block_number <= ^upper_bound, - where: not is_nil(tt.token_id), - update: [ - set: [ - token_ids: fragment("ARRAY_APPEND(ARRAY[]::decimal[], ?)", tt.token_id), - token_id: nil - ] - ] + where: tt.block_number <= ^upper_bound ) - Repo.update_all(query, [], timeout: :infinity) + token_transfers_batch_query + |> Repo.all() + |> Enum.filter(fn %{token_id: token_id} -> not is_nil(token_id) end) + |> Enum.map(fn token_transfer -> + token_transfer + |> TokenTransfer.changeset(%{token_ids: [token_transfer.token_id], token_id: nil}) + |> Repo.update() + end) + |> Enum.all?(&match?({:ok, _}, &1)) end defp schedule_next_update do From 21381914aa3d7ec15c7e799c2c7dd66cd35a6e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Dec 2022 13:23:56 +0300 Subject: [PATCH 691/723] Fix bug with proxy for twins --- CHANGELOG.md | 2 +- apps/explorer/lib/explorer/chain.ex | 17 ++++-- .../lib/explorer/chain/smart_contract.ex | 54 ++++++++++++------- 3 files changed, 48 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49f87e0e87a0..290d23f844b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Features - [#6544](https://github.com/blockscout/blockscout/pull/6544) - API improvements -- [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523) - Improve working with contracts implementations +- [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523), [#6549](https://github.com/blockscout/blockscout/pull/6549) - Improve working with contracts implementations - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization - [#6481](https://github.com/blockscout/blockscout/pull/6481) - Smart contract verification improvements - [#6444](https://github.com/blockscout/blockscout/pull/6444) - Add support for yul verification via rust microservice diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index 3d2b93bc3660..9e8c46c6a5af 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -1384,7 +1384,10 @@ defmodule Explorer.Chain do address_verified_twin_contract_updated = address_verified_twin_contract |> Map.put(:address_hash, hash) - |> Map.put_new(:metadata_from_verified_twin, true) + |> Map.put(:metadata_from_verified_twin, true) + |> Map.put(:implementation_address_hash, nil) + |> Map.put(:implementation_name, nil) + |> Map.put(:implementation_fetched_at, nil) address_result |> Map.put(:smart_contract, address_verified_twin_contract_updated) @@ -1902,7 +1905,10 @@ defmodule Explorer.Chain do address_verified_twin_contract_updated = address_verified_twin_contract |> Map.put(:address_hash, hash) - |> Map.put_new(:metadata_from_verified_twin, true) + |> Map.put(:metadata_from_verified_twin, true) + |> Map.put(:implementation_address_hash, nil) + |> Map.put(:implementation_name, nil) + |> Map.put(:implementation_fetched_at, nil) address_result |> Map.put(:smart_contract, address_verified_twin_contract_updated) @@ -4349,9 +4355,10 @@ defmodule Explorer.Chain do if address_verified_twin_contract do address_verified_twin_contract |> Map.put(:address_hash, address_hash) - |> Map.put(:implementation_address_hash, current_smart_contract.implementation_address_hash) - |> Map.put(:implementation_name, current_smart_contract.implementation_name) - |> Map.put(:implementation_fetched_at, current_smart_contract.implementation_fetched_at) + |> Map.put(:metadata_from_verified_twin, true) + |> Map.put(:implementation_address_hash, nil) + |> Map.put(:implementation_name, nil) + |> Map.put(:implementation_fetched_at, nil) else current_smart_contract end diff --git a/apps/explorer/lib/explorer/chain/smart_contract.ex b/apps/explorer/lib/explorer/chain/smart_contract.ex index bd72f3ad2b86..043077c1957c 100644 --- a/apps/explorer/lib/explorer/chain/smart_contract.ex +++ b/apps/explorer/lib/explorer/chain/smart_contract.ex @@ -261,6 +261,7 @@ defmodule Explorer.Chain.SmartContract do field(:implementation_address_hash, Hash.Address, default: nil) field(:autodetect_constructor_args, :boolean, virtual: true) field(:is_yul, :boolean, virtual: true) + field(:metadata_from_verified_twin, :boolean, virtual: true) has_many( :decompiled_smart_contracts, @@ -529,7 +530,11 @@ defmodule Explorer.Chain.SmartContract do def proxy_contract?(_), do: false - def get_implementation_address_hash(%__MODULE__{abi: nil}), do: false + def get_implementation_address_hash(%__MODULE__{abi: nil}), do: {nil, nil} + + def get_implementation_address_hash(%__MODULE__{metadata_from_verified_twin: true} = smart_contract) do + get_implementation_address_hash({:updated, smart_contract}) + end def get_implementation_address_hash( %__MODULE__{ @@ -540,7 +545,7 @@ defmodule Explorer.Chain.SmartContract do updated_smart_contract = if Application.get_env(:explorer, :enable_caching_implementation_data_of_proxy) && check_implementation_refetch_neccessity(implementation_fetched_at) do - Chain.address_hash_to_smart_contract(address_hash) + Chain.address_hash_to_smart_contract_without_twin(address_hash) else smart_contract end @@ -555,11 +560,13 @@ defmodule Explorer.Chain.SmartContract do abi: abi, implementation_address_hash: implementation_address_hash_from_db, implementation_name: implementation_name_from_db, - implementation_fetched_at: implementation_fetched_at + implementation_fetched_at: implementation_fetched_at, + metadata_from_verified_twin: metadata_from_verified_twin }} ) do if check_implementation_refetch_neccessity(implementation_fetched_at) do - get_implementation_address_hash_task = Task.async(fn -> get_implementation_address_hash(address_hash, abi) end) + get_implementation_address_hash_task = + Task.async(fn -> get_implementation_address_hash(address_hash, abi, metadata_from_verified_twin) end) timeout = Application.get_env(:explorer, :implementation_data_fetching_timeout) @@ -624,8 +631,9 @@ defmodule Explorer.Chain.SmartContract do end end - @spec get_implementation_address_hash(Hash.Address.t(), list()) :: {String.t() | nil, String.t() | nil} - defp get_implementation_address_hash(proxy_address_hash, abi) + @spec get_implementation_address_hash(Hash.Address.t(), list(), boolean() | nil) :: + {String.t() | nil, String.t() | nil} + defp get_implementation_address_hash(proxy_address_hash, abi, metadata_from_verified_twin) when not is_nil(proxy_address_hash) and not is_nil(abi) do implementation_method_abi = abi @@ -651,10 +659,10 @@ defmodule Explorer.Chain.SmartContract do get_implementation_address_hash_eip_1967(proxy_address_hash) end - save_implementation_data(implementation_address, proxy_address_hash) + save_implementation_data(implementation_address, proxy_address_hash, metadata_from_verified_twin) end - defp get_implementation_address_hash(proxy_address_hash, abi) when is_nil(proxy_address_hash) or is_nil(abi) do + defp get_implementation_address_hash(_proxy_address_hash, _abi, _) do {nil, nil} end @@ -794,28 +802,30 @@ defmodule Explorer.Chain.SmartContract do abi_decode_address_output(implementation_address) end - defp save_implementation_data(nil, _), do: {nil, nil} + defp save_implementation_data(nil, _, _), do: {nil, nil} - defp save_implementation_data(empty_address_hash_string, proxy_address_hash) + defp save_implementation_data(empty_address_hash_string, proxy_address_hash, metadata_from_verified_twin) when empty_address_hash_string in [ "0x", "0x0", "0x0000000000000000000000000000000000000000000000000000000000000000", @burn_address_hash_str ] do - proxy_address_hash - |> Chain.address_hash_to_smart_contract_without_twin() - |> changeset(%{ - implementation_name: nil, - implementation_address_hash: nil, - implementation_fetched_at: DateTime.utc_now() - }) - |> Repo.update() + if is_nil(metadata_from_verified_twin) or !metadata_from_verified_twin do + proxy_address_hash + |> Chain.address_hash_to_smart_contract_without_twin() + |> changeset(%{ + implementation_name: nil, + implementation_address_hash: nil, + implementation_fetched_at: DateTime.utc_now() + }) + |> Repo.update() + end {:empty, :empty} end - defp save_implementation_data(implementation_address_hash_string, proxy_address_hash) + defp save_implementation_data(implementation_address_hash_string, proxy_address_hash, _) when is_binary(implementation_address_hash_string) do with {:ok, address_hash} <- Chain.string_to_address_hash(implementation_address_hash_string), proxy_contract <- Chain.address_hash_to_smart_contract_without_twin(proxy_address_hash), @@ -845,6 +855,12 @@ defmodule Explorer.Chain.SmartContract do {implementation_address_hash_string, nil} + true -> + {:ok, address_hash} = Chain.string_to_address_hash(implementation_address_hash_string) + smart_contract = Chain.address_hash_to_smart_contract(address_hash) + + {implementation_address_hash_string, smart_contract && smart_contract.name} + _ -> {implementation_address_hash_string, nil} end From 373527dbc5b59299c0087eec102e631a47d52b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=BD=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Mon, 5 Dec 2022 17:38:40 +0300 Subject: [PATCH 692/723] Add regression test --- .../explorer/chain/smart_contract_test.exs | 166 ++++++++++++++++++ apps/explorer/test/support/factory.ex | 3 +- 2 files changed, 168 insertions(+), 1 deletion(-) diff --git a/apps/explorer/test/explorer/chain/smart_contract_test.exs b/apps/explorer/test/explorer/chain/smart_contract_test.exs index 38ff09e3b1e3..b0744f9d8328 100644 --- a/apps/explorer/test/explorer/chain/smart_contract_test.exs +++ b/apps/explorer/test/explorer/chain/smart_contract_test.exs @@ -136,6 +136,165 @@ defmodule Explorer.Chain.SmartContractTest do verify!(EthereumJSONRPC.Mox) assert_empty_implementation(smart_contract.address_hash) end + + test "test get_implementation_adddress_hash/1 for twins contract" do + # return nils for nil + assert {nil, nil} = SmartContract.get_implementation_address_hash(nil) + smart_contract = insert(:smart_contract) + another_address = insert(:contract_address) + + twin = Chain.address_hash_to_smart_contract(another_address.hash) + implementation_smart_contract = insert(:smart_contract, name: "proxy") + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + Application.put_env(:explorer, :implementation_data_fetching_timeout, :timer.seconds(20)) + + # fetch nil implementation + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + string_implementation_address_hash = to_string(implementation_smart_contract.address_hash) + + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, string_implementation_address_hash} + end) + + assert {^string_implementation_address_hash, "proxy"} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_error_response() + + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + + {:ok, addr} = Chain.hash_to_address(another_address.hash) + twin = addr.smart_contract + + implementation_smart_contract = insert(:smart_contract, name: "proxy") + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + Application.put_env(:explorer, :implementation_data_fetching_timeout, :timer.seconds(20)) + + # fetch nil implementation + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + string_implementation_address_hash = to_string(implementation_smart_contract.address_hash) + + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, string_implementation_address_hash} + end) + + assert {^string_implementation_address_hash, "proxy"} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_error_response() + + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + + {:ok, addr} = + Chain.find_contract_address( + another_address.hash, + [ + necessity_by_association: %{ + :smart_contract => :optional + } + ], + true + ) + + twin = addr.smart_contract + + implementation_smart_contract = insert(:smart_contract, name: "proxy") + + Application.put_env(:explorer, :fallback_ttl_cached_implementation_data_of_proxy, :timer.seconds(20)) + Application.put_env(:explorer, :implementation_data_fetching_timeout, :timer.seconds(20)) + + # fetch nil implementation + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_zero_addresses() + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + verify!(EthereumJSONRPC.Mox) + assert_implementation_never_fetched(smart_contract.address_hash) + + string_implementation_address_hash = to_string(implementation_smart_contract.address_hash) + + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, string_implementation_address_hash} + end) + + assert {^string_implementation_address_hash, "proxy"} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + + get_eip1967_implementation_error_response() + + assert {nil, nil} = SmartContract.get_implementation_address_hash(twin) + + verify!(EthereumJSONRPC.Mox) + + assert_implementation_never_fetched(smart_contract.address_hash) + end end def get_eip1967_implementation_zero_addresses do @@ -216,6 +375,13 @@ defmodule Explorer.Chain.SmartContractTest do refute contract.implementation_address_hash end + def assert_implementation_never_fetched(address_hash) do + contract = Chain.address_hash_to_smart_contract(address_hash) + refute contract.implementation_fetched_at + refute contract.implementation_name + refute contract.implementation_address_hash + end + def assert_implementation_address(address_hash) do contract = Chain.address_hash_to_smart_contract(address_hash) assert contract.implementation_fetched_at diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index 7da1532025d5..da5e96720643 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -807,7 +807,8 @@ defmodule Explorer.Factory do def smart_contract_factory do contract_code_info = contract_code_info() - bytecode_md5 = Helper.contract_code_md5(contract_code_info.bytecode) + {:ok, data} = Explorer.Chain.Data.cast(contract_code_info.bytecode) + bytecode_md5 = Helper.contract_code_md5(data.bytes) %SmartContract{ address_hash: insert(:address, contract_code: contract_code_info.bytecode, verified: true).hash, From da9433da98bd7dcb1177f9e086f1d399dc99cb55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:08:28 +0000 Subject: [PATCH 693/723] Bump bignumber.js from 9.1.0 to 9.1.1 in /apps/block_scout_web/assets Bumps [bignumber.js](https://github.com/MikeMcl/bignumber.js) from 9.1.0 to 9.1.1. - [Release notes](https://github.com/MikeMcl/bignumber.js/releases) - [Changelog](https://github.com/MikeMcl/bignumber.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/MikeMcl/bignumber.js/compare/v9.1.0...v9.1.1) --- updated-dependencies: - dependency-name: bignumber.js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d9a7fae6eb54..2fdc40c5f88b 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -11,7 +11,7 @@ "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", "assert": "^2.0.0", - "bignumber.js": "^9.1.0", + "bignumber.js": "^9.1.1", "bootstrap": "^4.6.0", "chart.js": "^4.0.1", "chartjs-adapter-luxon": "^1.3.0", @@ -4783,9 +4783,9 @@ } }, "node_modules/bignumber.js": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", - "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", "engines": { "node": "*" } @@ -22018,9 +22018,9 @@ "dev": true }, "bignumber.js": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", - "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==" + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" }, "binary-extensions": { "version": "2.2.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0650bd0f2637..b6ec3921f741 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -23,7 +23,7 @@ "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", "assert": "^2.0.0", - "bignumber.js": "^9.1.0", + "bignumber.js": "^9.1.1", "bootstrap": "^4.6.0", "chart.js": "^4.0.1", "chartjs-adapter-luxon": "^1.3.0", From ea27fb2730b6771e93c2fc27cfb7e934afd96f59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:09:07 +0000 Subject: [PATCH 694/723] Bump mini-css-extract-plugin in /apps/block_scout_web/assets Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 2.7.1 to 2.7.2. - [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) - [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v2.7.1...v2.7.2) --- updated-dependencies: - dependency-name: mini-css-extract-plugin dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d9a7fae6eb54..8561ec477432 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -83,7 +83,7 @@ "file-loader": "^6.2.0", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", - "mini-css-extract-plugin": "^2.7.1", + "mini-css-extract-plugin": "^2.7.2", "postcss": "^8.4.19", "postcss-loader": "^7.0.2", "sass": "^1.56.1", @@ -12922,9 +12922,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", - "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", "dev": true, "dependencies": { "schema-utils": "^4.0.0" @@ -28340,9 +28340,9 @@ "peer": true }, "mini-css-extract-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.1.tgz", - "integrity": "sha512-viOoaUFy+Z2w43VsGPbtfwFrr0tKwDctK9dUofG5MBViYhD1noGFUzzDIVw0KPwCGUP+c7zqLxm+acuQs7zLzw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.2.tgz", + "integrity": "sha512-EdlUizq13o0Pd+uCp+WO/JpkLvHRVGt97RqfeGhXqAcorYo1ypJSpkV+WDT0vY/kmh/p7wRdJNJtuyK540PXDw==", "dev": true, "requires": { "schema-utils": "^4.0.0" diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0650bd0f2637..5745960c1e37 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -95,7 +95,7 @@ "file-loader": "^6.2.0", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", - "mini-css-extract-plugin": "^2.7.1", + "mini-css-extract-plugin": "^2.7.2", "postcss": "^8.4.19", "postcss-loader": "^7.0.2", "sass": "^1.56.1", From c64a85ff77848d64eb662662578563ae04e408e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:09:37 +0000 Subject: [PATCH 695/723] Bump webpack-cli from 5.0.0 to 5.0.1 in /apps/block_scout_web/assets Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/webpack/webpack-cli/releases) - [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.0.0...webpack-cli@5.0.1) --- updated-dependencies: - dependency-name: webpack-cli dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 62 +++++++++---------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d9a7fae6eb54..a7b275751c4e 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -90,7 +90,7 @@ "sass-loader": "^13.2.0", "style-loader": "^3.3.1", "webpack": "^5.75.0", - "webpack-cli": "^5.0.0" + "webpack-cli": "^5.0.1" }, "engines": { "node": "16.x", @@ -3940,9 +3940,9 @@ } }, "node_modules/@webpack-cli/configtest": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.0.tgz", - "integrity": "sha512-war4OU8NGjBqU3DP3bx6ciODXIh7dSXcpQq+P4K2Tqyd8L5OjZ7COx9QXx/QdCIwL2qoX09Wr4Cwf7uS4qdEng==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", + "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", "dev": true, "engines": { "node": ">=14.15.0" @@ -3953,9 +3953,9 @@ } }, "node_modules/@webpack-cli/info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.0.tgz", - "integrity": "sha512-NNxDgbo4VOkNhOlTgY0Elhz3vKpOJq4/PKeKg7r8cmYM+GQA9vDofLYyup8jS6EpUvhNmR30cHTCEIyvXpskwA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", + "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", "dev": true, "engines": { "node": ">=14.15.0" @@ -3966,9 +3966,9 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.0.tgz", - "integrity": "sha512-Rumq5mHvGXamnOh3O8yLk1sjx8dB30qF1OeR6VC00DIR6SLJ4bwwUGKC4pE7qBFoQyyh0H9sAg3fikYgAqVR0w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", + "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", "dev": true, "engines": { "node": ">=14.15.0" @@ -18013,15 +18013,15 @@ } }, "node_modules/webpack-cli": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.0.tgz", - "integrity": "sha512-AACDTo20yG+xn6HPW5xjbn2Be4KUzQPebWXsDMHwPPyKh9OnTOJgZN2Nc+g/FZKV3ObRTYsGvibAvc+5jAUrVA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", + "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.0", - "@webpack-cli/info": "^2.0.0", - "@webpack-cli/serve": "^2.0.0", + "@webpack-cli/configtest": "^2.0.1", + "@webpack-cli/info": "^2.0.1", + "@webpack-cli/serve": "^2.0.1", "colorette": "^2.0.14", "commander": "^9.4.1", "cross-spawn": "^7.0.3", @@ -21386,23 +21386,23 @@ } }, "@webpack-cli/configtest": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.0.tgz", - "integrity": "sha512-war4OU8NGjBqU3DP3bx6ciODXIh7dSXcpQq+P4K2Tqyd8L5OjZ7COx9QXx/QdCIwL2qoX09Wr4Cwf7uS4qdEng==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", + "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.0.tgz", - "integrity": "sha512-NNxDgbo4VOkNhOlTgY0Elhz3vKpOJq4/PKeKg7r8cmYM+GQA9vDofLYyup8jS6EpUvhNmR30cHTCEIyvXpskwA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", + "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", "dev": true, "requires": {} }, "@webpack-cli/serve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.0.tgz", - "integrity": "sha512-Rumq5mHvGXamnOh3O8yLk1sjx8dB30qF1OeR6VC00DIR6SLJ4bwwUGKC4pE7qBFoQyyh0H9sAg3fikYgAqVR0w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", + "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", "dev": true, "requires": {} }, @@ -32243,15 +32243,15 @@ } }, "webpack-cli": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.0.tgz", - "integrity": "sha512-AACDTo20yG+xn6HPW5xjbn2Be4KUzQPebWXsDMHwPPyKh9OnTOJgZN2Nc+g/FZKV3ObRTYsGvibAvc+5jAUrVA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", + "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.0", - "@webpack-cli/info": "^2.0.0", - "@webpack-cli/serve": "^2.0.0", + "@webpack-cli/configtest": "^2.0.1", + "@webpack-cli/info": "^2.0.1", + "@webpack-cli/serve": "^2.0.1", "colorette": "^2.0.14", "commander": "^9.4.1", "cross-spawn": "^7.0.3", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0650bd0f2637..45e79c211673 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -102,7 +102,7 @@ "sass-loader": "^13.2.0", "style-loader": "^3.3.1", "webpack": "^5.75.0", - "webpack-cli": "^5.0.0" + "webpack-cli": "^5.0.1" }, "jest": { "moduleNameMapper": { From c7d1b4cbd67b034ab5fcf66a4e67d8545ea1c650 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:10:36 +0000 Subject: [PATCH 696/723] Bump eslint from 8.28.0 to 8.29.0 in /apps/block_scout_web/assets Bumps [eslint](https://github.com/eslint/eslint) from 8.28.0 to 8.29.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.28.0...v8.29.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index d9a7fae6eb54..0a116001b511 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -75,7 +75,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.2.2", - "eslint": "^8.28.0", + "eslint": "^8.29.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -7032,9 +7032,9 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", @@ -23747,9 +23747,9 @@ } }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", + "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 0650bd0f2637..ea70810ef52d 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -87,7 +87,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^5.2.7", "css-minimizer-webpack-plugin": "^4.2.2", - "eslint": "^8.28.0", + "eslint": "^8.29.0", "eslint-config-standard": "^17.0.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", From ea37b59f2d1d433086199bfb5422417e8e62ada9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 20:09:19 +0000 Subject: [PATCH 697/723] Bump qs from 6.5.2 to 6.5.3 in /apps/block_scout_web/assets Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 58a1e04d8e7c..bd8dee237946 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -14988,9 +14988,9 @@ } }, "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "engines": { "node": ">=0.6" } @@ -29854,9 +29854,9 @@ } }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" }, "query-string": { "version": "5.1.1", From 57cacdcbab2b838e38be3f235237f8396095d3b9 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Wed, 9 Nov 2022 20:14:51 +0300 Subject: [PATCH 698/723] Update 404 and 422 error pages --- .../assets/css/components/_errors.scss | 120 +++++++----------- .../images/errors-img/page-not-found.svg | 4 + .../errors-img/unprocessable-entity.svg | 4 + .../templates/error422/index.html.eex | 12 +- .../templates/page_not_found/index.html.eex | 10 +- 5 files changed, 66 insertions(+), 84 deletions(-) create mode 100644 apps/block_scout_web/assets/static/images/errors-img/page-not-found.svg create mode 100644 apps/block_scout_web/assets/static/images/errors-img/unprocessable-entity.svg diff --git a/apps/block_scout_web/assets/css/components/_errors.scss b/apps/block_scout_web/assets/css/components/_errors.scss index 05a850bc034d..131aa1d55184 100644 --- a/apps/block_scout_web/assets/css/components/_errors.scss +++ b/apps/block_scout_web/assets/css/components/_errors.scss @@ -1,4 +1,18 @@ $error-tablet-breakpoint: 768px; +$error-title-color: #606571; +$error-description-color: #718096; +$error-btn-color: #2B6CB0; +$error-delimiter-color: #D9D9D9; + +// In order to center vertically + +main:has(section.error-container) { + display: flex; +} + +.error-container { + margin: auto; +} // Block Not Found @@ -10,11 +24,12 @@ $error-tablet-breakpoint: 768px; flex-direction: row; align-items: center; justify-content: center; - padding-top: 52px; } + gap: 50px; } .block-not-found-img { + order: -1; margin-bottom: 40px; text-align: center; @media (min-width: $error-tablet-breakpoint) { @@ -27,68 +42,65 @@ $error-tablet-breakpoint: 768px; } } +.block-not-found::before { + align-self: stretch; + border: 1px solid $error-delimiter-color; + border-radius: 10px; + content: ""; +} + .block-not-found-content { text-align: center; @media (min-width: $error-tablet-breakpoint) { text-align: left; - padding-left: 52px; - max-width: 396px; + max-width: 466px; } } .error-title { margin-bottom: 20px !important; + font-weight: 500; + font-size: 48px; + line-height: 58px; + color: $error-title-color; } .error-descr { display: block; - font-size: 14px; - color: #a3a9b5; - line-height: 1.714; + font-size: 16px; + color: $error-description-color; + line-height: 30px; margin-bottom: 22px; word-wrap: break-word; } .error-btn { + @include btn-line($btn-line-bg, $error-btn-color, 16px); + border-width: 2px; background: transparent; display: inline-flex !important; + border-radius: 8px; + font-weight: 600; + line-height: 24px; +} + +.dark-theme-applied .error-btn { + color: $error-btn-color; } // TX Not Found .tx-nf { display: flex; - align-items: center; + align-items: flex-start; justify-content: center; flex-direction: column; - padding-bottom: 50px; - @media (min-width: $error-tablet-breakpoint) { - flex-direction: row; - padding-top: 52px; - } -} + margin: auto; + padding-bottom: 3rem; + max-width: 827px; + gap: 12px; -.tx-nf-content { - margin-top: 52px; - max-width: 700px; - @media (min-width: $error-tablet-breakpoint) { - margin-left: 90px; - margin-top: 0; - } -} - -.tx-nf-blocks { - margin-bottom: 40px; - margin-top: 40px; -} - -.tx-nf-block { - background-color: #fff; - box-shadow: 0px 0px 30px 0px rgba(202, 199, 226, 0.5); - padding: 17px 40px 17px 20px; - position: relative; - border-radius: 6px; - @media (min-width: $error-tablet-breakpoint) { - width: calc(50% - 20px); + .error-title { + margin-bottom: 0 !important; } } @@ -96,42 +108,4 @@ $error-tablet-breakpoint: 768px; .error-descr { margin-bottom: 0; } - & + .tx-nf-block { - margin-top: 30px; - @media (min-width: $error-tablet-breakpoint) { - margin-top: 0; - } - } } - -.tx-nf-blocks-row { - display: flex; - justify-content: space-between; - flex-direction: column; - @media (min-width: $error-tablet-breakpoint) { - flex-direction: row; - } - & + .tx-nf-blocks-row { - margin-top: 30px; - @media (min-width: $error-tablet-breakpoint) { - margin-top: 40px; - } - } -} - -.tx-nf-number { - display: inline-block; - position: absolute; - top: -15px; - left: -15px; - width: 30px; - height: 30px; - border-radius: 15px; - background-color: $secondary; - box-shadow: 0px 3px 5px 0px rgba($secondary, 0.25); - color: #fff; - font-weight: 700; - font-size: 14px; - text-align: center; - line-height: 32px; -} \ No newline at end of file diff --git a/apps/block_scout_web/assets/static/images/errors-img/page-not-found.svg b/apps/block_scout_web/assets/static/images/errors-img/page-not-found.svg new file mode 100644 index 000000000000..77b8bbe8ea25 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/errors-img/page-not-found.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/block_scout_web/assets/static/images/errors-img/unprocessable-entity.svg b/apps/block_scout_web/assets/static/images/errors-img/unprocessable-entity.svg new file mode 100644 index 000000000000..c4c8ff11c88b --- /dev/null +++ b/apps/block_scout_web/assets/static/images/errors-img/unprocessable-entity.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/error422/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/error422/index.html.eex index bbf314d4bb62..fb188f65886c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/error422/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/error422/index.html.eex @@ -1,12 +1,12 @@ -
    +
    - Page Not Found + Request cannot be processed
    -

    Unprocessable Entity

    -

    The request was well-formed but was unable to be followed due to semantic errors. Maybe, you mistype a hash of tx/block/address?

    - Back Home +

    <%= gettext "Request cannot be processed" %>

    +

    <%= gettext "Your request contained an error, perhaps a mistyped tx/block/address hash. Try again, and check the developer tools console for more info." %>

    + <%= gettext "Back to home" %>
    -
    \ No newline at end of file +
    diff --git a/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex index 9d44b7f7dbee..72d19629de38 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/page_not_found/index.html.eex @@ -1,12 +1,12 @@ -
    +
    - Page Not Found + Page not found

    <%= gettext "Page not found" %>

    -

    <%= gettext "The requested path was not found on BlockScout." %>

    - <%= gettext "Back Home" %> +

    <%= gettext "This page is no longer explorable! If you are lost, use the search bar to find what you are looking for." %>

    + <%= gettext "Back to home" %>
    -
    \ No newline at end of file +
    From 911929511826a9b57f1a86fe7338589b2c5461d8 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Wed, 9 Nov 2022 20:46:43 +0300 Subject: [PATCH 699/723] Add 500 error page --- .../images/errors-img/internal-server-error.svg | 4 ++++ .../templates/internal_server_error/index.html.eex | 12 ++++++++++++ .../lib/block_scout_web/views/error_view.ex | 7 +++++++ .../views/internal_server_error_view.ex | 5 +++++ 4 files changed, 28 insertions(+) create mode 100644 apps/block_scout_web/assets/static/images/errors-img/internal-server-error.svg create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/internal_server_error/index.html.eex create mode 100644 apps/block_scout_web/lib/block_scout_web/views/internal_server_error_view.ex diff --git a/apps/block_scout_web/assets/static/images/errors-img/internal-server-error.svg b/apps/block_scout_web/assets/static/images/errors-img/internal-server-error.svg new file mode 100644 index 000000000000..15b5c7911252 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/errors-img/internal-server-error.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/internal_server_error/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/internal_server_error/index.html.eex new file mode 100644 index 000000000000..df7ff8c5a0f5 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/internal_server_error/index.html.eex @@ -0,0 +1,12 @@ +
    +
    +
    + Internal server error +
    +
    +

    <%= gettext "Internal server error" %>

    +

    <%= gettext "An unexpected error has occurred. Try reloading the page, or come back soon and try again." %>

    + <%= gettext "Back to home" %> +
    +
    +
    diff --git a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex index 090159d94684..d800b719b3b2 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/error_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/error_view.ex @@ -22,6 +22,13 @@ defmodule BlockScoutWeb.ErrorView do "Unprocessable entity" end + def render("500.html", %{conn: conn}) do + render(BlockScoutWeb.InternalServerErrorView, "index.html", + layout: {BlockScoutWeb.LayoutView, "app.html"}, + conn: conn + ) + end + def render("500." <> _type, _assigns) do "Internal server error" end diff --git a/apps/block_scout_web/lib/block_scout_web/views/internal_server_error_view.ex b/apps/block_scout_web/lib/block_scout_web/views/internal_server_error_view.ex new file mode 100644 index 000000000000..837ecb3367e0 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/views/internal_server_error_view.ex @@ -0,0 +1,5 @@ +defmodule BlockScoutWeb.InternalServerErrorView do + use BlockScoutWeb, :view + + @dialyzer :no_match +end From b1371c8c52a3cc0675de9760db99087ab9a01348 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Wed, 9 Nov 2022 20:48:11 +0300 Subject: [PATCH 700/723] Replace invalid tx hash page with 422 page --- .../controllers/transaction_controller.ex | 13 +++---------- .../transaction_internal_transaction_controller.ex | 4 ++-- .../controllers/transaction_log_controller.ex | 4 ++-- .../transaction_raw_trace_controller.ex | 2 +- .../controllers/transaction_state_controller.ex | 4 ++-- .../transaction_token_transfer_controller.ex | 4 ++-- .../templates/transaction/invalid.html.eex | 14 -------------- 7 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 apps/block_scout_web/lib/block_scout_web/templates/transaction/invalid.html.eex diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex index 858b7dc115e6..83818de3b5fd 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_controller.ex @@ -180,7 +180,7 @@ defmodule BlockScoutWeb.TransactionController do set_not_found_view(conn, id) :error -> - set_invalid_view(conn, id) + unprocessable_entity(conn) {:error, :not_found} -> set_not_found_view(conn, id) @@ -218,7 +218,7 @@ defmodule BlockScoutWeb.TransactionController do set_not_found_view(conn, id) :error -> - set_invalid_view(conn, id) + unprocessable_entity(conn) {:error, :not_found} -> set_not_found_view(conn, id) @@ -229,7 +229,7 @@ defmodule BlockScoutWeb.TransactionController do end else :error -> - set_invalid_view(conn, id) + unprocessable_entity(conn) :not_found -> set_not_found_view(conn, id) @@ -242,11 +242,4 @@ defmodule BlockScoutWeb.TransactionController do |> put_view(TransactionView) |> render("not_found.html", transaction_hash: transaction_hash_string) end - - def set_invalid_view(conn, transaction_hash_string) do - conn - |> put_status(422) - |> put_view(TransactionView) - |> render("invalid.html", transaction_hash: transaction_hash_string) - end end diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex index 5cc1af7f6fee..155e95d2d714 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_internal_transaction_controller.ex @@ -73,7 +73,7 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) @@ -121,7 +121,7 @@ defmodule BlockScoutWeb.TransactionInternalTransactionController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index bb29f7818f47..ed44e98184e1 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -69,7 +69,7 @@ defmodule BlockScoutWeb.TransactionLogController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) @@ -114,7 +114,7 @@ defmodule BlockScoutWeb.TransactionLogController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex index 49447c639b6f..fc83d0fa1646 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_raw_trace_controller.ex @@ -82,7 +82,7 @@ defmodule BlockScoutWeb.TransactionRawTraceController do TransactionController.set_not_found_view(conn, hash_string) :error -> - TransactionController.set_invalid_view(conn, hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, hash_string) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex index c8e4e19feef8..6bf8c86fd485 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_state_controller.ex @@ -153,7 +153,7 @@ defmodule BlockScoutWeb.TransactionStateController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) @@ -203,7 +203,7 @@ defmodule BlockScoutWeb.TransactionStateController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex index 6ea80b6a0319..d391ed5d13e9 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_token_transfer_controller.ex @@ -76,7 +76,7 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) @@ -124,7 +124,7 @@ defmodule BlockScoutWeb.TransactionTokenTransferController do TransactionController.set_not_found_view(conn, transaction_hash_string) :error -> - TransactionController.set_invalid_view(conn, transaction_hash_string) + unprocessable_entity(conn) {:error, :not_found} -> TransactionController.set_not_found_view(conn, transaction_hash_string) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/invalid.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/invalid.html.eex deleted file mode 100644 index 8ec41880a7ef..000000000000 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/invalid.html.eex +++ /dev/null @@ -1,14 +0,0 @@ -
    -
    -
    -
    -
    -

    <%= gettext "Invalid Transaction Hash" %>

    -
    - <%= @transaction_hash %> <%= gettext "is not a valid transaction hash" %> -
    -
    -
    -
    -
    -
    From ce44069737cab66020bab38a46cc9013d97b8d6d Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Thu, 10 Nov 2022 11:49:03 +0300 Subject: [PATCH 701/723] Add 503 page --- CHANGELOG.md | 1 + apps/block_scout_web/assets/static/503.html | 199 ++++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 apps/block_scout_web/assets/static/503.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c75d2dd914b..27d5a28e1c14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- [#6433](https://github.com/blockscout/blockscout/pull/6433) - Update error pagess - [#6544](https://github.com/blockscout/blockscout/pull/6544) - API improvements - [#5561](https://github.com/blockscout/blockscout/pull/5561), [#6523](https://github.com/blockscout/blockscout/pull/6523), [#6549](https://github.com/blockscout/blockscout/pull/6549) - Improve working with contracts implementations - [#6401](https://github.com/blockscout/blockscout/pull/6401) - Add Sol2Uml contract visualization diff --git a/apps/block_scout_web/assets/static/503.html b/apps/block_scout_web/assets/static/503.html new file mode 100644 index 000000000000..f9ccfb681e7a --- /dev/null +++ b/apps/block_scout_web/assets/static/503.html @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + BlockScout Explorer + + + +
    +
    +
    +
    +
    + + + +
    +
    +

    Service unavailable

    +

    Hang on… we’re working on a fix! Please come back soon to try again.

    + Back to home +
    +
    +
    +
    +
    + + + \ No newline at end of file From d99287ccc1c4642eec8aacd3bfb00aae76a16d63 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 8 Dec 2022 15:13:14 +0400 Subject: [PATCH 702/723] Set restart: :permanent for permanent fetchers --- CHANGELOG.md | 1 + apps/indexer/lib/indexer/fetcher.ex | 5 +++-- apps/indexer/lib/indexer/fetcher/block_reward.ex | 2 +- apps/indexer/lib/indexer/fetcher/coin_balance.ex | 2 +- apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex | 2 +- apps/indexer/lib/indexer/fetcher/contract_code.ex | 2 +- apps/indexer/lib/indexer/fetcher/empty_blocks_sanitizer.ex | 2 +- apps/indexer/lib/indexer/fetcher/internal_transaction.ex | 2 +- apps/indexer/lib/indexer/fetcher/pending_transaction.ex | 2 +- apps/indexer/lib/indexer/fetcher/replaced_transaction.ex | 2 +- apps/indexer/lib/indexer/fetcher/token.ex | 2 +- apps/indexer/lib/indexer/fetcher/token_balance.ex | 2 +- apps/indexer/lib/indexer/fetcher/token_instance.ex | 2 +- .../lib/indexer/fetcher/token_total_supply_on_demand.ex | 2 +- apps/indexer/lib/indexer/fetcher/token_updater.ex | 2 +- apps/indexer/lib/indexer/fetcher/uncle_block.ex | 2 +- 16 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c75d2dd914b..550297233c59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - [#6454](https://github.com/blockscout/blockscout/pull/6454) - INDEXER_RECEIPTS_BATCH_SIZE, INDEXER_RECEIPTS_CONCURRENCY, INDEXER_COIN_BALANCES_BATCH_SIZE, INDEXER_COIN_BALANCES_CONCURRENCY env variables - [#6476](https://github.com/blockscout/blockscout/pull/6476), [#6484](https://github.com/blockscout/blockscout/pull/6484) - Update token balances indexes - [#6510](https://github.com/blockscout/blockscout/pull/6510) - Set consensus: false for blocks on int transaction foreign_key_violation +- [#6565](https://github.com/blockscout/blockscout/pull/6565) - Set restart: :permanent for permanent fetchers ### Fixes diff --git a/apps/indexer/lib/indexer/fetcher.ex b/apps/indexer/lib/indexer/fetcher.ex index bfd992a98648..fc9851da862e 100644 --- a/apps/indexer/lib/indexer/fetcher.ex +++ b/apps/indexer/lib/indexer/fetcher.ex @@ -22,10 +22,11 @@ defmodule Indexer.Fetcher do fetcher = __MODULE__ supervisor = Keyword.get(opts, :supervisor, Module.concat(fetcher, Supervisor)) task_supervisor = Keyword.get(opts, :task_supervisor, Module.concat(fetcher, TaskSupervisor)) + restart = Keyword.get(opts, :restart, :transient) Module.create( supervisor, - quote bind_quoted: [strategy: strategy, fetcher: fetcher, task_supervisor: task_supervisor] do + quote bind_quoted: [strategy: strategy, fetcher: fetcher, task_supervisor: task_supervisor, restart: restart] do use Supervisor def child_spec([]), do: child_spec([[], []]) @@ -35,7 +36,7 @@ defmodule Indexer.Fetcher do default = %{ id: __MODULE__, start: {__MODULE__, :start_link, start_link_arguments}, - restart: :transient, + restart: unquote(restart), type: :supervisor } diff --git a/apps/indexer/lib/indexer/fetcher/block_reward.ex b/apps/indexer/lib/indexer/fetcher/block_reward.ex index d44a7e1f71ae..c473aa00f052 100644 --- a/apps/indexer/lib/indexer/fetcher/block_reward.ex +++ b/apps/indexer/lib/indexer/fetcher/block_reward.ex @@ -6,7 +6,7 @@ defmodule Indexer.Fetcher.BlockReward do retrieved from the database and compared against that returned from `EthereumJSONRPC.` """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/coin_balance.ex b/apps/indexer/lib/indexer/fetcher/coin_balance.ex index 1350e0c7ef7d..de0e03e1f6d7 100644 --- a/apps/indexer/lib/indexer/fetcher/coin_balance.ex +++ b/apps/indexer/lib/indexer/fetcher/coin_balance.ex @@ -4,7 +4,7 @@ defmodule Indexer.Fetcher.CoinBalance do `fetched_coin_balance_block_number` to value at max `t:Explorer.Chain.Address.CoinBalance.t/0` `block_number` for the given `t:Explorer.Chain.Address.t/` `hash`. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex index 68306347ed11..9813047e3921 100644 --- a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex +++ b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex @@ -8,7 +8,7 @@ defmodule Indexer.Fetcher.CoinBalanceOnDemand do """ use GenServer - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent import Ecto.Query, only: [from: 2] import EthereumJSONRPC, only: [integer_to_quantity: 1] diff --git a/apps/indexer/lib/indexer/fetcher/contract_code.ex b/apps/indexer/lib/indexer/fetcher/contract_code.ex index 8f1247410761..908865287bf6 100644 --- a/apps/indexer/lib/indexer/fetcher/contract_code.ex +++ b/apps/indexer/lib/indexer/fetcher/contract_code.ex @@ -3,7 +3,7 @@ defmodule Indexer.Fetcher.ContractCode do Fetches `contract_code` `t:Explorer.Chain.Address.t/0`. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/empty_blocks_sanitizer.ex b/apps/indexer/lib/indexer/fetcher/empty_blocks_sanitizer.ex index d70c5496fffd..06d02264791e 100644 --- a/apps/indexer/lib/indexer/fetcher/empty_blocks_sanitizer.ex +++ b/apps/indexer/lib/indexer/fetcher/empty_blocks_sanitizer.ex @@ -5,7 +5,7 @@ defmodule Indexer.Fetcher.EmptyBlocksSanitizer do """ use GenServer - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent require Logger diff --git a/apps/indexer/lib/indexer/fetcher/internal_transaction.ex b/apps/indexer/lib/indexer/fetcher/internal_transaction.ex index cc29e205cdac..1e53314e8a4b 100644 --- a/apps/indexer/lib/indexer/fetcher/internal_transaction.ex +++ b/apps/indexer/lib/indexer/fetcher/internal_transaction.ex @@ -5,7 +5,7 @@ defmodule Indexer.Fetcher.InternalTransaction do See `async_fetch/1` for details on configuring limits. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/pending_transaction.ex b/apps/indexer/lib/indexer/fetcher/pending_transaction.ex index 907fd74a5e81..946ce0ea28a9 100644 --- a/apps/indexer/lib/indexer/fetcher/pending_transaction.ex +++ b/apps/indexer/lib/indexer/fetcher/pending_transaction.ex @@ -6,7 +6,7 @@ defmodule Indexer.Fetcher.PendingTransaction do validated version that may make it to the database first. """ use GenServer - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent require Logger diff --git a/apps/indexer/lib/indexer/fetcher/replaced_transaction.ex b/apps/indexer/lib/indexer/fetcher/replaced_transaction.ex index 26585cc9aa47..0e0aa33c9717 100644 --- a/apps/indexer/lib/indexer/fetcher/replaced_transaction.ex +++ b/apps/indexer/lib/indexer/fetcher/replaced_transaction.ex @@ -3,7 +3,7 @@ defmodule Indexer.Fetcher.ReplacedTransaction do Finds and updates replaced transactions. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/token.ex b/apps/indexer/lib/indexer/fetcher/token.ex index 8c924e2ad245..3dc3d3dad477 100644 --- a/apps/indexer/lib/indexer/fetcher/token.ex +++ b/apps/indexer/lib/indexer/fetcher/token.ex @@ -3,7 +3,7 @@ defmodule Indexer.Fetcher.Token do Fetches information about a token. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators alias Explorer.Chain diff --git a/apps/indexer/lib/indexer/fetcher/token_balance.ex b/apps/indexer/lib/indexer/fetcher/token_balance.ex index b23978facd60..0da2c471f663 100644 --- a/apps/indexer/lib/indexer/fetcher/token_balance.ex +++ b/apps/indexer/lib/indexer/fetcher/token_balance.ex @@ -13,7 +13,7 @@ defmodule Indexer.Fetcher.TokenBalance do that always raise errors interacting with the Smart Contract. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/token_instance.ex b/apps/indexer/lib/indexer/fetcher/token_instance.ex index 2c77cadf3279..ac4f8499b6d0 100644 --- a/apps/indexer/lib/indexer/fetcher/token_instance.ex +++ b/apps/indexer/lib/indexer/fetcher/token_instance.ex @@ -3,7 +3,7 @@ defmodule Indexer.Fetcher.TokenInstance do Fetches information about a token instance. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger diff --git a/apps/indexer/lib/indexer/fetcher/token_total_supply_on_demand.ex b/apps/indexer/lib/indexer/fetcher/token_total_supply_on_demand.ex index 934e936afa56..bff276c82902 100644 --- a/apps/indexer/lib/indexer/fetcher/token_total_supply_on_demand.ex +++ b/apps/indexer/lib/indexer/fetcher/token_total_supply_on_demand.ex @@ -5,7 +5,7 @@ defmodule Indexer.Fetcher.TokenTotalSupplyOnDemand do """ use GenServer - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent alias Explorer.{Chain, Repo} alias Explorer.Chain.{Address, Token} diff --git a/apps/indexer/lib/indexer/fetcher/token_updater.ex b/apps/indexer/lib/indexer/fetcher/token_updater.ex index 9a685b61d11c..fec2df8d5927 100644 --- a/apps/indexer/lib/indexer/fetcher/token_updater.ex +++ b/apps/indexer/lib/indexer/fetcher/token_updater.ex @@ -2,7 +2,7 @@ defmodule Indexer.Fetcher.TokenUpdater do @moduledoc """ Updates metadata for cataloged tokens """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent require Logger diff --git a/apps/indexer/lib/indexer/fetcher/uncle_block.ex b/apps/indexer/lib/indexer/fetcher/uncle_block.ex index a672711562b3..f9533b8a97fc 100644 --- a/apps/indexer/lib/indexer/fetcher/uncle_block.ex +++ b/apps/indexer/lib/indexer/fetcher/uncle_block.ex @@ -4,7 +4,7 @@ defmodule Indexer.Fetcher.UncleBlock do `uncle_fetched_at` where the `uncle_hash` matches `hash`. """ - use Indexer.Fetcher + use Indexer.Fetcher, restart: :permanent use Spandex.Decorators require Logger From 766488b236ef49f5ea355749b7b28225c3e90c55 Mon Sep 17 00:00:00 2001 From: sl1depengwyn Date: Wed, 7 Dec 2022 21:30:31 +0300 Subject: [PATCH 703/723] Update tx not found page --- .../static/images/errors-img/tx-not-found.svg | 9 ++ .../templates/transaction/not_found.html.eex | 38 ++----- apps/block_scout_web/priv/gettext/default.pot | 104 ++++++++++-------- .../priv/gettext/en/LC_MESSAGES/default.po | 104 ++++++++++-------- 4 files changed, 135 insertions(+), 120 deletions(-) create mode 100644 apps/block_scout_web/assets/static/images/errors-img/tx-not-found.svg diff --git a/apps/block_scout_web/assets/static/images/errors-img/tx-not-found.svg b/apps/block_scout_web/assets/static/images/errors-img/tx-not-found.svg new file mode 100644 index 000000000000..1e6cfb918531 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/errors-img/tx-not-found.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/not_found.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/not_found.html.eex index 97f721ec05da..440206247735 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/not_found.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/not_found.html.eex @@ -1,34 +1,16 @@ -
    +
    - Block Not Found + Transaction not found
    -
    -

    <%= gettext("Sorry, We are unable to locate this transaction Hash") %>

    -
    -
    -
    - 1 -

    <%= gettext("If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page.") %>

    -
    -
    - 2 -

    <%= gettext("It could still be in the TX Pool of a different node, waiting to be broadcasted.") %>

    -
    -
    -
    -
    - 3 -

    <%= gettext("During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it.") %>

    -
    -
    - 4 -

    <%= gettext("If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information.") %>

    -
    -
    -
    - <%= gettext("Back Home") %> +

    <%= gettext("Sorry, we are unable to locate this transaction hash") %>

    +
    +

    <%= gettext("1. If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page.") %>

    +

    <%= gettext("2. It could still be in the TX Pool of a different node, waiting to be broadcasted.") %>

    +

    <%= gettext("3. During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it.") %>

    +

    <%= gettext("4. If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information.") %>

    + <%= gettext("Back to home") %>
    -
    \ No newline at end of file +
    diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 153f4521d2c3..40a12b1f7594 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -339,12 +339,6 @@ msgstr "" msgid "Average block time" msgstr "" -#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 -#: lib/block_scout_web/templates/transaction/not_found.html.eex:30 -#, elixir-autogen, elixir-format -msgid "Back Home" -msgstr "" - #: lib/block_scout_web/templates/account/api_key/form.html.eex:25 #, elixir-autogen, elixir-format msgid "Back to API keys (Cancel)" @@ -1107,11 +1101,6 @@ msgstr "" msgid "Drop the standard input JSON file or click here" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:22 -#, elixir-autogen, elixir-format -msgid "During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it." -msgstr "" - #: lib/block_scout_web/templates/account/public_tags_request/form.html.eex:27 #, elixir-autogen, elixir-format msgid "E-mail*" @@ -1458,22 +1447,12 @@ msgstr "" msgid "IN" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:26 -#, elixir-autogen, elixir-format -msgid "If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information." -msgstr "" - #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:56 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:48 #, elixir-autogen, elixir-format msgid "If you enabled optimization during compilation, select yes." msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:12 -#, elixir-autogen, elixir-format -msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." -msgstr "" - #: lib/block_scout_web/templates/address/overview.html.eex:133 #, elixir-autogen, elixir-format msgid "Implementation" @@ -1536,11 +1515,6 @@ msgstr "" msgid "Internal Transactions" msgstr "" -#: lib/block_scout_web/templates/transaction/invalid.html.eex:6 -#, elixir-autogen, elixir-format -msgid "Invalid Transaction Hash" -msgstr "" - #: lib/block_scout_web/templates/tokens/inventory/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:19 #: lib/block_scout_web/views/tokens/overview_view.ex:42 @@ -1553,11 +1527,6 @@ msgstr "" msgid "Is Yul contract" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:16 -#, elixir-autogen, elixir-format -msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." -msgstr "" - #: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 #: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 #, elixir-autogen, elixir-format @@ -2374,11 +2343,6 @@ msgstr "" msgid "Something went wrong, click to retry." msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Sorry, We are unable to locate this transaction Hash" -msgstr "" - #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 #, elixir-autogen, elixir-format msgid "Sources *.sol files" @@ -2515,11 +2479,6 @@ msgstr "" msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgstr "" -#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 -#, elixir-autogen, elixir-format -msgid "The requested path was not found on BlockScout." -msgstr "" - #: lib/block_scout_web/templates/transaction/overview.html.eex:134 #, elixir-autogen, elixir-format msgid "The revert reason of the transaction." @@ -3440,11 +3399,6 @@ msgstr "" msgid "here." msgstr "" -#: lib/block_scout_web/templates/transaction/invalid.html.eex:8 -#, elixir-autogen, elixir-format -msgid "is not a valid transaction hash" -msgstr "" - #: lib/block_scout_web/templates/smart_contract/_function_response.html.eex:3 #, elixir-autogen, elixir-format msgid "method Response" @@ -3488,3 +3442,61 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:8 +#, elixir-autogen, elixir-format +msgid "1. If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:9 +#, elixir-autogen, elixir-format +msgid "2. It could still be in the TX Pool of a different node, waiting to be broadcasted." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:11 +#, elixir-autogen, elixir-format +msgid "4. If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information." +msgstr "" + +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "An unexpected error has occurred. Try reloading the page, or come back soon and try again." +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:9 +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:9 +#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 +#: lib/block_scout_web/templates/transaction/not_found.html.eex:13 +#, elixir-autogen, elixir-format +msgid "Back to home" +msgstr "" + +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Internal server error" +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Request cannot be processed" +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:6 +#, elixir-autogen, elixir-format +msgid "Sorry, we are unable to locate this transaction hash" +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "This page is no longer explorable! If you are lost, use the search bar to find what you are looking for." +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Your request contained an error, perhaps a mistyped tx/block/address hash. Try again, and check the developer tools console for more info." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:10 +#, elixir-autogen, elixir-format +msgid "3. During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it." +msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 153f4521d2c3..98b4c73061b9 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -339,12 +339,6 @@ msgstr "" msgid "Average block time" msgstr "" -#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 -#: lib/block_scout_web/templates/transaction/not_found.html.eex:30 -#, elixir-autogen, elixir-format -msgid "Back Home" -msgstr "" - #: lib/block_scout_web/templates/account/api_key/form.html.eex:25 #, elixir-autogen, elixir-format msgid "Back to API keys (Cancel)" @@ -1107,11 +1101,6 @@ msgstr "" msgid "Drop the standard input JSON file or click here" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:22 -#, elixir-autogen, elixir-format -msgid "During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it." -msgstr "" - #: lib/block_scout_web/templates/account/public_tags_request/form.html.eex:27 #, elixir-autogen, elixir-format msgid "E-mail*" @@ -1458,22 +1447,12 @@ msgstr "" msgid "IN" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:26 -#, elixir-autogen, elixir-format -msgid "If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information." -msgstr "" - #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:56 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:48 #, elixir-autogen, elixir-format msgid "If you enabled optimization during compilation, select yes." msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:12 -#, elixir-autogen, elixir-format -msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." -msgstr "" - #: lib/block_scout_web/templates/address/overview.html.eex:133 #, elixir-autogen, elixir-format msgid "Implementation" @@ -1536,11 +1515,6 @@ msgstr "" msgid "Internal Transactions" msgstr "" -#: lib/block_scout_web/templates/transaction/invalid.html.eex:6 -#, elixir-autogen, elixir-format -msgid "Invalid Transaction Hash" -msgstr "" - #: lib/block_scout_web/templates/tokens/inventory/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:19 #: lib/block_scout_web/views/tokens/overview_view.ex:42 @@ -1553,11 +1527,6 @@ msgstr "" msgid "Is Yul contract" msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:16 -#, elixir-autogen, elixir-format -msgid "It could still be in the TX Pool of a different node, waiting to be broadcasted." -msgstr "" - #: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:13 #: lib/block_scout_web/templates/verified_contracts/_stats.html.eex:26 #, elixir-autogen, elixir-format @@ -2374,11 +2343,6 @@ msgstr "" msgid "Something went wrong, click to retry." msgstr "" -#: lib/block_scout_web/templates/transaction/not_found.html.eex:7 -#, elixir-autogen, elixir-format -msgid "Sorry, We are unable to locate this transaction Hash" -msgstr "" - #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:63 #, elixir-autogen, elixir-format msgid "Sources *.sol files" @@ -2515,11 +2479,6 @@ msgstr "" msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgstr "" -#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 -#, elixir-autogen, elixir-format -msgid "The requested path was not found on BlockScout." -msgstr "" - #: lib/block_scout_web/templates/transaction/overview.html.eex:134 #, elixir-autogen, elixir-format msgid "The revert reason of the transaction." @@ -3440,11 +3399,6 @@ msgstr "" msgid "here." msgstr "" -#: lib/block_scout_web/templates/transaction/invalid.html.eex:8 -#, elixir-autogen, elixir-format -msgid "is not a valid transaction hash" -msgstr "" - #: lib/block_scout_web/templates/smart_contract/_function_response.html.eex:3 #, elixir-autogen, elixir-format msgid "method Response" @@ -3488,3 +3442,61 @@ msgstr "" #, elixir-autogen, elixir-format msgid "truffle flattener" msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:8 +#, elixir-autogen, elixir-format, fuzzy +msgid "1. If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:9 +#, elixir-autogen, elixir-format, fuzzy +msgid "2. It could still be in the TX Pool of a different node, waiting to be broadcasted." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:11 +#, elixir-autogen, elixir-format, fuzzy +msgid "4. If it still does not show up after 1 hour, please check with your sender/exchange/wallet/transaction provider for additional information." +msgstr "" + +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "An unexpected error has occurred. Try reloading the page, or come back soon and try again." +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:9 +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:9 +#: lib/block_scout_web/templates/page_not_found/index.html.eex:9 +#: lib/block_scout_web/templates/transaction/not_found.html.eex:13 +#, elixir-autogen, elixir-format, fuzzy +msgid "Back to home" +msgstr "" + +#: lib/block_scout_web/templates/internal_server_error/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Internal server error" +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:7 +#, elixir-autogen, elixir-format +msgid "Request cannot be processed" +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:6 +#, elixir-autogen, elixir-format, fuzzy +msgid "Sorry, we are unable to locate this transaction hash" +msgstr "" + +#: lib/block_scout_web/templates/page_not_found/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "This page is no longer explorable! If you are lost, use the search bar to find what you are looking for." +msgstr "" + +#: lib/block_scout_web/templates/error422/index.html.eex:8 +#, elixir-autogen, elixir-format +msgid "Your request contained an error, perhaps a mistyped tx/block/address hash. Try again, and check the developer tools console for more info." +msgstr "" + +#: lib/block_scout_web/templates/transaction/not_found.html.eex:10 +#, elixir-autogen, elixir-format, fuzzy +msgid "3. During times when the network is busy (i.e during ICOs) it can take a while for your transaction to propagate through the network and for us to index it." +msgstr "" From f2c4c7430652e6a24b1747b569f2bcaee77f3579 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Fri, 9 Dec 2022 16:52:45 +0400 Subject: [PATCH 704/723] Drop unfetched_token_balances index --- CHANGELOG.md | 1 + ...9123459_drop_unfetched_token_balances_index.exs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 apps/explorer/priv/repo/migrations/20221209123459_drop_unfetched_token_balances_index.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index f8853c1c9594..5f2536a6c86a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - [#6476](https://github.com/blockscout/blockscout/pull/6476), [#6484](https://github.com/blockscout/blockscout/pull/6484) - Update token balances indexes - [#6510](https://github.com/blockscout/blockscout/pull/6510) - Set consensus: false for blocks on int transaction foreign_key_violation - [#6565](https://github.com/blockscout/blockscout/pull/6565) - Set restart: :permanent for permanent fetchers +- [#6568](https://github.com/blockscout/blockscout/pull/6568) - Drop unfetched_token_balances index ### Fixes diff --git a/apps/explorer/priv/repo/migrations/20221209123459_drop_unfetched_token_balances_index.exs b/apps/explorer/priv/repo/migrations/20221209123459_drop_unfetched_token_balances_index.exs new file mode 100644 index 000000000000..c4e89981297b --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20221209123459_drop_unfetched_token_balances_index.exs @@ -0,0 +1,14 @@ +defmodule Explorer.Repo.Migrations.DropUnfetchedTokenBalancesIndex do + use Ecto.Migration + + def change do + drop_if_exists( + unique_index( + :address_token_balances, + [:address_hash, :token_contract_address_hash, "COALESCE(token_id, -1)", :block_number], + name: :unfetched_token_balances, + where: "value_fetched_at IS NULL" + ) + ) + end +end From 5b24c8c2911084f826c8da6dfd55943a807715b5 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Dec 2022 14:55:51 +0400 Subject: [PATCH 705/723] Allow and manage insecure HTTP connection to the archive node --- apps/explorer/config/dev/geth.exs | 11 ++++++++++- apps/explorer/config/prod/geth.exs | 11 ++++++++++- apps/indexer/config/dev/geth.exs | 11 ++++++++++- apps/indexer/config/prod/geth.exs | 11 ++++++++++- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/apps/explorer/config/dev/geth.exs b/apps/explorer/config/dev/geth.exs index f5ba58f1e4f8..6443b3c8f60a 100644 --- a/apps/explorer/config/dev/geth.exs +++ b/apps/explorer/config/dev/geth.exs @@ -1,12 +1,21 @@ import Config +hackney_opts_base = [pool: :ethereum_jsonrpc] + +hackney_opts = + if System.get_env("ETHEREUM_JSONRPC_HTTP_INSECURE", "") == "true" do + [:insecure] ++ hackney_opts_base + else + hackney_opts_base + end + config :explorer, json_rpc_named_arguments: [ transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545", - http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]] + http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: hackney_opts] ], variant: EthereumJSONRPC.Geth ], diff --git a/apps/explorer/config/prod/geth.exs b/apps/explorer/config/prod/geth.exs index 026c06204749..1b940345a715 100644 --- a/apps/explorer/config/prod/geth.exs +++ b/apps/explorer/config/prod/geth.exs @@ -1,12 +1,21 @@ import Config +hackney_opts_base = [pool: :ethereum_jsonrpc] + +hackney_opts = + if System.get_env("ETHEREUM_JSONRPC_HTTP_INSECURE", "") == "true" do + [:insecure] ++ hackney_opts_base + else + hackney_opts_base + end + config :explorer, json_rpc_named_arguments: [ transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), - http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]] + http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: hackney_opts] ], variant: EthereumJSONRPC.Geth ], diff --git a/apps/indexer/config/dev/geth.exs b/apps/indexer/config/dev/geth.exs index e2f26eca4719..ae3a4b61dc96 100644 --- a/apps/indexer/config/dev/geth.exs +++ b/apps/indexer/config/dev/geth.exs @@ -1,5 +1,14 @@ import Config +hackney_opts_base = [pool: :ethereum_jsonrpc] + +hackney_opts = + if System.get_env("ETHEREUM_JSONRPC_HTTP_INSECURE", "") == "true" do + [:insecure] ++ hackney_opts_base + else + hackney_opts_base + end + config :indexer, block_interval: :timer.seconds(5), json_rpc_named_arguments: [ @@ -11,7 +20,7 @@ config :indexer, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:8545", - http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]] + http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: hackney_opts] ], variant: EthereumJSONRPC.Geth ], diff --git a/apps/indexer/config/prod/geth.exs b/apps/indexer/config/prod/geth.exs index 4de0919c2be4..076abdcb52ec 100644 --- a/apps/indexer/config/prod/geth.exs +++ b/apps/indexer/config/prod/geth.exs @@ -1,5 +1,14 @@ import Config +hackney_opts_base = [pool: :ethereum_jsonrpc] + +hackney_opts = + if System.get_env("ETHEREUM_JSONRPC_HTTP_INSECURE", "") == "true" do + [:insecure] ++ hackney_opts_base + else + hackney_opts_base + end + config :indexer, block_interval: :timer.seconds(5), json_rpc_named_arguments: [ @@ -11,7 +20,7 @@ config :indexer, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), - http_options: [recv_timeout: :timer.minutes(10), timeout: :timer.minutes(10), hackney: [pool: :ethereum_jsonrpc]] + http_options: [recv_timeout: :timer.minutes(10), timeout: :timer.minutes(10), hackney: hackney_opts] ], variant: EthereumJSONRPC.Geth ], From a3b54933500c8e6f5659a57d334f280166ccf011 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Dec 2022 13:27:03 +0400 Subject: [PATCH 706/723] pending_block_operations table: remove fetch_internal_transactions column --- CHANGELOG.md | 1 + .../features/viewing_app_test.exs | 15 +++---- .../views/transaction_view_test.exs | 2 +- apps/explorer/lib/explorer/chain.ex | 12 ++---- .../explorer/chain/import/runner/blocks.ex | 4 +- .../import/runner/internal_transactions.ex | 1 - .../explorer/chain/internal_transaction.ex | 3 +- .../explorer/chain/pending_block_operation.ex | 40 ++----------------- ...nge_index_for_pending_block_operations.exs | 18 +++++++++ .../runner/internal_transactions_test.exs | 32 +++++++-------- .../test/explorer/chain/import_test.exs | 8 ++-- apps/explorer/test/explorer/chain_test.exs | 14 +++---- apps/explorer/test/support/factory.ex | 6 +-- .../fetcher/internal_transaction_test.exs | 13 +++--- .../test/indexer/pending_ops_cleaner_test.exs | 4 +- 15 files changed, 70 insertions(+), 103 deletions(-) create mode 100644 apps/explorer/priv/repo/migrations/20221212093406_change_index_for_pending_block_operations.exs diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f2536a6c86a..3c10289afb90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ ### Chore +- [#6572](https://github.com/blockscout/blockscout/pull/6572) - pending_block_operations table: remove fetch_internal_transactions column - [#6387](https://github.com/blockscout/blockscout/pull/6387) - Fix errors in docker-build and e2e-tests workflows - [#6325](https://github.com/blockscout/blockscout/pull/6325) - Set http_only attribute of account authorization cookie to false - [#6343](https://github.com/blockscout/blockscout/pull/6343) - Docker-compose persistent logs diff --git a/apps/block_scout_web/test/block_scout_web/features/viewing_app_test.exs b/apps/block_scout_web/test/block_scout_web/features/viewing_app_test.exs index ad918984c583..4467f50b8a3f 100644 --- a/apps/block_scout_web/test/block_scout_web/features/viewing_app_test.exs +++ b/apps/block_scout_web/test/block_scout_web/features/viewing_app_test.exs @@ -29,7 +29,7 @@ defmodule BlockScoutWeb.ViewingAppTest do # assert Decimal.compare(Explorer.Chain.indexed_ratio_blocks(), Decimal.from_float(0.5)) == :eq - # insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + # insert(:pending_block_operation, block_hash: block.hash) # session # |> AppPage.visit_page() @@ -48,7 +48,7 @@ defmodule BlockScoutWeb.ViewingAppTest do # assert Decimal.compare(Explorer.Chain.indexed_ratio_blocks(), 1) == :eq - # insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + # insert(:pending_block_operation, block_hash: block.hash) # session # |> AppPage.visit_page() @@ -69,7 +69,7 @@ defmodule BlockScoutWeb.ViewingAppTest do # assert Decimal.compare(Explorer.Chain.indexed_ratio_blocks(), Decimal.from_float(0.5)) == :eq - # insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + # insert(:pending_block_operation, block_hash: block.hash) # session # |> AppPage.visit_page() @@ -96,7 +96,7 @@ defmodule BlockScoutWeb.ViewingAppTest do # assert Decimal.compare(Explorer.Chain.indexed_ratio(), Decimal.from_float(0.9)) == :eq - # insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + # insert(:pending_block_operation, block_hash: block.hash) # session # |> AppPage.visit_page() @@ -121,7 +121,7 @@ defmodule BlockScoutWeb.ViewingAppTest do # block_hash = block.hash - # insert(:pending_block_operation, block_hash: block_hash, fetch_internal_transactions: true) + # insert(:pending_block_operation, block_hash: block_hash) # BlocksIndexedCounter.calculate_blocks_indexed() @@ -131,11 +131,6 @@ defmodule BlockScoutWeb.ViewingAppTest do # |> AppPage.visit_page() # |> assert_has(AppPage.indexed_status("Indexing Internal Transactions")) - # Repo.update_all( - # from(p in PendingBlockOperation, where: p.block_hash == ^block_hash), - # set: [fetch_internal_transactions: false] - # ) - # BlocksIndexedCounter.calculate_blocks_indexed() # refute_has(session, AppPage.still_indexing?()) diff --git a/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs index 62ecf3f747b7..956ef4f3ae8f 100644 --- a/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs @@ -192,7 +192,7 @@ defmodule BlockScoutWeb.TransactionViewTest do |> insert() |> with_block(block, status: :error) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) status = TransactionView.transaction_status(transaction) assert TransactionView.formatted_result(status) == "Error: (Awaiting internal transactions for reason)" diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index aaed3bf99ff7..74cb630f06d4 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -1253,7 +1253,7 @@ defmodule Explorer.Chain do @doc """ Checks to see if the chain is down indexing based on the transaction from the - oldest block and the `fetch_internal_transactions` pending operation + oldest block and the pending operation """ @spec finished_internal_transactions_indexing?() :: boolean() def finished_internal_transactions_indexing? do @@ -1279,7 +1279,6 @@ defmodule Explorer.Chain do from( b in Block, join: pending_ops in assoc(b, :pending_operations), - where: pending_ops.fetch_internal_transactions, where: b.consensus and b.number == ^min_block_number ) @@ -2732,11 +2731,9 @@ defmodule Explorer.Chain do Only blocks with consensus are returned. iex> non_consensus = insert(:block, consensus: false) - iex> insert(:pending_block_operation, block: non_consensus, fetch_internal_transactions: true) + iex> insert(:pending_block_operation, block: non_consensus) iex> unfetched = insert(:block) - iex> insert(:pending_block_operation, block: unfetched, fetch_internal_transactions: true) - iex> fetched = insert(:block) - iex> insert(:pending_block_operation, block: fetched, fetch_internal_transactions: false) + iex> insert(:pending_block_operation, block: unfetched) iex> {:ok, number_set} = Explorer.Chain.stream_blocks_with_unfetched_internal_transactions( ...> MapSet.new(), ...> fn number, acc -> @@ -2747,8 +2744,6 @@ defmodule Explorer.Chain do false iex> unfetched.number in number_set true - iex> fetched.hash in number_set - false """ @spec stream_blocks_with_unfetched_internal_transactions( @@ -2761,7 +2756,6 @@ defmodule Explorer.Chain do from( b in Block, join: pending_ops in assoc(b, :pending_operations), - where: pending_ops.fetch_internal_transactions, where: b.consensus, select: b.number ) diff --git a/apps/explorer/lib/explorer/chain/import/runner/blocks.ex b/apps/explorer/lib/explorer/chain/import/runner/blocks.ex index c57301271f7b..1f300ae27513 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/blocks.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/blocks.ex @@ -436,14 +436,14 @@ defmodule Explorer.Chain.Import.Runner.Blocks do |> MapSet.union(MapSet.new(hashes)) |> Enum.sort() |> Enum.map(fn hash -> - %{block_hash: hash, fetch_internal_transactions: true} + %{block_hash: hash} end) Import.insert_changes_list( repo, sorted_pending_ops, conflict_target: :block_hash, - on_conflict: PendingBlockOperation.default_on_conflict(), + on_conflict: :nothing, for: PendingBlockOperation, returning: true, timeout: timeout, diff --git a/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex b/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex index c873bc62ddbc..557355e836e6 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex @@ -303,7 +303,6 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactions do from( pending_ops in PendingBlockOperation, where: pending_ops.block_hash in ^block_hashes, - where: pending_ops.fetch_internal_transactions, select: pending_ops.block_hash, # Enforce PendingBlockOperation ShareLocks order (see docs: sharelocks.md) order_by: [asc: pending_ops.block_hash], diff --git a/apps/explorer/lib/explorer/chain/internal_transaction.ex b/apps/explorer/lib/explorer/chain/internal_transaction.ex index 20e999b8aed9..0b197ab152c3 100644 --- a/apps/explorer/lib/explorer/chain/internal_transaction.ex +++ b/apps/explorer/lib/explorer/chain/internal_transaction.ex @@ -120,8 +120,7 @@ defmodule Explorer.Chain.InternalTransaction do foreign_key: :block_hash, define_field: false, references: :block_hash, - type: Hash.Full, - where: [fetch_internal_transactions: true] + type: Hash.Full ) end diff --git a/apps/explorer/lib/explorer/chain/pending_block_operation.ex b/apps/explorer/lib/explorer/chain/pending_block_operation.ex index d85cc589b0b4..e5bfc0fc7112 100644 --- a/apps/explorer/lib/explorer/chain/pending_block_operation.ex +++ b/apps/explorer/lib/explorer/chain/pending_block_operation.ex @@ -7,21 +7,17 @@ defmodule Explorer.Chain.PendingBlockOperation do alias Explorer.Chain.{Block, Hash} - @required_attrs ~w(block_hash fetch_internal_transactions)a + @required_attrs ~w(block_hash)a @typedoc """ * `block_hash` - the hash of the block that has pending operations. - * `fetch_internal_transactions` - if the block needs its internal transactions fetched (or not) """ @type t :: %__MODULE__{ - block_hash: Hash.Full.t(), - fetch_internal_transactions: boolean() + block_hash: Hash.Full.t() } @primary_key false schema "pending_block_operations" do - field(:fetch_internal_transactions, :boolean) - timestamps() belongs_to(:block, Block, foreign_key: :block_hash, primary_key: true, references: :hash, type: Hash.Full) @@ -48,40 +44,10 @@ defmodule Explorer.Chain.PendingBlockOperation do ) end - def block_hashes(filter \\ nil) - - def block_hashes(filter) when is_nil(filter) do + def block_hashes do from( pending_ops in __MODULE__, select: pending_ops.block_hash ) end - - def block_hashes(filters) when is_list(filters) do - true_filters = Keyword.new(filters, &{&1, true}) - - from( - pending_ops in __MODULE__, - where: ^true_filters, - select: pending_ops.block_hash - ) - end - - def block_hashes(filter), do: block_hashes([filter]) - - def default_on_conflict do - from( - pending_ops in __MODULE__, - update: [ - set: [ - fetch_internal_transactions: - pending_ops.fetch_internal_transactions or fragment("EXCLUDED.fetch_internal_transactions"), - # Don't update `block_hash` as it is used for the conflict target - inserted_at: pending_ops.inserted_at, - updated_at: fragment("EXCLUDED.updated_at") - ] - ], - where: fragment("EXCLUDED.fetch_internal_transactions <> ?", pending_ops.fetch_internal_transactions) - ) - end end diff --git a/apps/explorer/priv/repo/migrations/20221212093406_change_index_for_pending_block_operations.exs b/apps/explorer/priv/repo/migrations/20221212093406_change_index_for_pending_block_operations.exs new file mode 100644 index 000000000000..550c6ce2b288 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20221212093406_change_index_for_pending_block_operations.exs @@ -0,0 +1,18 @@ +defmodule Explorer.Repo.Migrations.ChangeIndexForPendingBlockOperations do + use Ecto.Migration + + def change do + drop_if_exists( + index( + :pending_block_operations, + [:block_hash], + name: "pending_block_operations_block_hash_index_partial", + where: ~s("fetch_internal_transactions") + ) + ) + + alter table(:pending_block_operations) do + remove(:fetch_internal_transactions) + end + end +end diff --git a/apps/explorer/test/explorer/chain/import/runner/internal_transactions_test.exs b/apps/explorer/test/explorer/chain/import/runner/internal_transactions_test.exs index 6f5b53ac7306..5e41430ed8c7 100644 --- a/apps/explorer/test/explorer/chain/import/runner/internal_transactions_test.exs +++ b/apps/explorer/test/explorer/chain/import/runner/internal_transactions_test.exs @@ -8,7 +8,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do describe "run/1" do test "transaction's status becomes :error when its internal_transaction has an error" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status @@ -24,7 +24,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "transaction's has_error_in_internal_txs become true when its internal_transaction (where index != 0) has an error" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status assert nil == transaction.has_error_in_internal_txs @@ -48,7 +48,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "transaction's has_error_in_internal_txs become false when its internal_transaction (where index == 0) has an error" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status assert nil == transaction.has_error_in_internal_txs @@ -67,7 +67,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "transaction's has_error_in_internal_txs become false when its internal_transaction has no error" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status assert nil == transaction.has_error_in_internal_txs @@ -92,7 +92,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "simple coin transfer's status becomes :error when its internal_transaction has an error" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status @@ -112,7 +112,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do transaction1 = insert(:transaction) |> with_block(a_block, status: :ok) transaction2 = insert(:transaction) |> with_block(a_block, status: :ok) - insert(:pending_block_operation, block_hash: a_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: a_block.hash) assert :ok == transaction1.status assert :ok == transaction2.status @@ -136,7 +136,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do a_block = insert(:block, number: 1000) transaction1 = insert(:transaction) |> with_block(a_block, status: :ok) transaction2 = insert(:transaction) |> with_block(a_block, status: :ok) - insert(:pending_block_operation, block_hash: a_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: a_block.hash) assert :ok == transaction1.status assert :ok == transaction2.status @@ -161,7 +161,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do transaction0 = insert(:transaction) |> with_block(a_block, status: :ok) transaction1 = insert(:transaction) |> with_block(a_block, status: :ok) transaction2 = insert(:transaction) |> with_block(a_block, status: :ok) - insert(:pending_block_operation, block_hash: a_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: a_block.hash) assert :ok == transaction0.status assert :ok == transaction1.status @@ -203,7 +203,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "simple coin transfer has no internal transaction inserted" do transaction = insert(:transaction) |> with_block(status: :ok) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status @@ -221,7 +221,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do transaction = insert(:transaction) |> with_block(status: :ok) pending = insert(:transaction) - insert(:pending_block_operation, block_hash: transaction.block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: transaction.block_hash) assert :ok == transaction.status assert is_nil(pending.block_hash) @@ -246,14 +246,14 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do empty_block = insert(:block) pending = insert(:transaction) - insert(:pending_block_operation, block_hash: empty_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: empty_block.hash) assert is_nil(pending.block_hash) full_block = insert(:block) inserted = insert(:transaction) |> with_block(full_block) - insert(:pending_block_operation, block_hash: full_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: full_block.hash) assert full_block.hash == inserted.block_hash @@ -290,7 +290,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do block_index: 0 ) - insert(:pending_block_operation, block_hash: full_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: full_block.hash) transaction_changes = make_internal_transaction_changes(transaction, 0, nil) @@ -309,7 +309,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do transaction_a = insert(:transaction) |> with_block(full_block) transaction_b = insert(:transaction) |> with_block(full_block) - insert(:pending_block_operation, block_hash: full_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: full_block.hash) transaction_a_changes = make_internal_transaction_changes(transaction_a, 0, nil) @@ -325,12 +325,12 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactionsTest do test "does not remove consensus when block is empty and no transactions are missing" do empty_block = insert(:block) - insert(:pending_block_operation, block_hash: empty_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: empty_block.hash) full_block = insert(:block) inserted = insert(:transaction) |> with_block(full_block) - insert(:pending_block_operation, block_hash: full_block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: full_block.hash) assert full_block.hash == inserted.block_hash diff --git a/apps/explorer/test/explorer/chain/import_test.exs b/apps/explorer/test/explorer/chain/import_test.exs index c5ce4e902402..8078cb33dd9f 100644 --- a/apps/explorer/test/explorer/chain/import_test.exs +++ b/apps/explorer/test/explorer/chain/import_test.exs @@ -648,11 +648,11 @@ defmodule Explorer.Chain.ImportTest do assert {:ok, _} = Import.all(options) {:ok, block_hash_casted} = Explorer.Chain.Hash.Full.cast(block_hash) - assert [^block_hash_casted] = Explorer.Repo.all(PendingBlockOperation.block_hashes(:fetch_internal_transactions)) + assert [^block_hash_casted] = Explorer.Repo.all(PendingBlockOperation.block_hashes()) assert {:ok, _} = Import.all(internal_txs_options) - assert [] == Explorer.Repo.all(PendingBlockOperation.block_hashes(:fetch_internal_transactions)) + assert [] == Explorer.Repo.all(PendingBlockOperation.block_hashes()) end test "blocks with simple coin transfers updates PendingBlockOperation status" do @@ -738,11 +738,11 @@ defmodule Explorer.Chain.ImportTest do assert {:ok, _} = Import.all(options) {:ok, block_hash_casted} = Explorer.Chain.Hash.Full.cast(block_hash) - assert [^block_hash_casted] = Explorer.Repo.all(PendingBlockOperation.block_hashes(:fetch_internal_transactions)) + assert [^block_hash_casted] = Explorer.Repo.all(PendingBlockOperation.block_hashes()) assert {:ok, _} = Import.all(internal_txs_options) - assert [] == Explorer.Repo.all(PendingBlockOperation.block_hashes(:fetch_internal_transactions)) + assert [] == Explorer.Repo.all(PendingBlockOperation.block_hashes()) end test "when the transaction has no to_address and an internal transaction with type create it populates the denormalized created_contract_address_hash" do diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index dfad452986bd..c67c9b16cf39 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -44,10 +44,10 @@ defmodule Explorer.ChainTest do describe "remove_nonconsensus_blocks_from_pending_ops/0" do test "removes pending ops for nonconsensus blocks" do block = insert(:block) - insert(:pending_block_operation, block: block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: block) nonconsensus_block = insert(:block, consensus: false) - insert(:pending_block_operation, block: nonconsensus_block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: nonconsensus_block) :ok = Chain.remove_nonconsensus_blocks_from_pending_ops() @@ -57,13 +57,13 @@ defmodule Explorer.ChainTest do test "removes pending ops for nonconsensus blocks by block hashes" do block = insert(:block) - insert(:pending_block_operation, block: block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: block) nonconsensus_block = insert(:block, consensus: false) - insert(:pending_block_operation, block: nonconsensus_block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: nonconsensus_block) nonconsensus_block1 = insert(:block, consensus: false) - insert(:pending_block_operation, block: nonconsensus_block1, fetch_internal_transactions: true) + insert(:pending_block_operation, block: nonconsensus_block1) :ok = Chain.remove_nonconsensus_blocks_from_pending_ops([nonconsensus_block1.hash]) @@ -1209,7 +1209,7 @@ defmodule Explorer.ChainTest do |> insert() |> with_block(block) - insert(:pending_block_operation, block: block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: block) refute Chain.finished_internal_transactions_indexing?() end @@ -1520,7 +1520,7 @@ defmodule Explorer.ChainTest do block = insert(:block, number: index) if index === 0 || index === 5 || index === 7 do - insert(:pending_block_operation, block: block, fetch_internal_transactions: true) + insert(:pending_block_operation, block: block) end end diff --git a/apps/explorer/test/support/factory.ex b/apps/explorer/test/support/factory.ex index da5e96720643..a181d49ea59b 100644 --- a/apps/explorer/test/support/factory.ex +++ b/apps/explorer/test/support/factory.ex @@ -554,11 +554,7 @@ defmodule Explorer.Factory do end def pending_block_operation_factory do - %PendingBlockOperation{ - # caller MUST supply block - # all operations will default to false - fetch_internal_transactions: false - } + %PendingBlockOperation{} end def internal_transaction_factory() do diff --git a/apps/indexer/test/indexer/fetcher/internal_transaction_test.exs b/apps/indexer/test/indexer/fetcher/internal_transaction_test.exs index f4b615caec8b..1ea2122aa009 100644 --- a/apps/indexer/test/indexer/fetcher/internal_transaction_test.exs +++ b/apps/indexer/test/indexer/fetcher/internal_transaction_test.exs @@ -101,7 +101,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do block_number = 1_000_006 block = insert(:block, number: block_number) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) assert :ok = InternalTransaction.run([block_number], json_rpc_named_arguments) @@ -117,7 +117,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do json_rpc_named_arguments: json_rpc_named_arguments } do block = insert(:block) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) assert InternalTransaction.init( [], @@ -131,7 +131,6 @@ defmodule Indexer.Fetcher.InternalTransactionTest do json_rpc_named_arguments: json_rpc_named_arguments } do block = insert(:block) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: false) assert InternalTransaction.init( [], @@ -170,7 +169,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do block = insert(:block) block_hash = block.hash - insert(:pending_block_operation, block_hash: block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block_hash) assert %{block_hash: block_hash} = Repo.get(PendingBlockOperation, block_hash) @@ -185,7 +184,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do block = insert(:block) transaction = insert(:transaction) |> with_block(block) block_hash = block.hash - insert(:pending_block_operation, block_hash: block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block_hash) if json_rpc_named_arguments[:transport] == EthereumJSONRPC.Mox do case Keyword.fetch!(json_rpc_named_arguments, :variant) do @@ -298,7 +297,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do block = insert(:block) insert(:transaction) |> with_block(block) block_hash = block.hash - insert(:pending_block_operation, block_hash: block_hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block_hash) assert %{block_hash: ^block_hash} = Repo.get(PendingBlockOperation, block_hash) @@ -313,7 +312,7 @@ defmodule Indexer.Fetcher.InternalTransactionTest do block = insert(:block) transaction = :transaction |> insert() |> with_block(block) block_number = block.number - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) if json_rpc_named_arguments[:transport] == EthereumJSONRPC.Mox do case Keyword.fetch!(json_rpc_named_arguments, :variant) do diff --git a/apps/indexer/test/indexer/pending_ops_cleaner_test.exs b/apps/indexer/test/indexer/pending_ops_cleaner_test.exs index f8f1cbdb30b6..ceb5c530f28e 100644 --- a/apps/indexer/test/indexer/pending_ops_cleaner_test.exs +++ b/apps/indexer/test/indexer/pending_ops_cleaner_test.exs @@ -8,7 +8,7 @@ defmodule Indexer.PendingOpsCleanerTest do test "deletes non-consensus pending ops on init" do block = insert(:block, consensus: false) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) assert Repo.one(from(block in PendingBlockOperation, where: block.block_hash == ^block.hash)) @@ -24,7 +24,7 @@ defmodule Indexer.PendingOpsCleanerTest do block = insert(:block, consensus: false) - insert(:pending_block_operation, block_hash: block.hash, fetch_internal_transactions: true) + insert(:pending_block_operation, block_hash: block.hash) Process.sleep(2_000) From accc6f377774adc38d5e15e1400a59d76551e6df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 18:15:15 +0000 Subject: [PATCH 707/723] Bump postcss from 8.4.19 to 8.4.20 in /apps/block_scout_web/assets Bumps [postcss](https://github.com/postcss/postcss) from 8.4.19 to 8.4.20. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.19...8.4.20) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index bd8dee237946..67317506c44f 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -84,7 +84,7 @@ "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "mini-css-extract-plugin": "^2.7.2", - "postcss": "^8.4.19", + "postcss": "^8.4.20", "postcss-loader": "^7.0.2", "sass": "^1.56.1", "sass-loader": "^13.2.0", @@ -14092,9 +14092,9 @@ } }, "node_modules/postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "dev": true, "funding": [ { @@ -29233,9 +29233,9 @@ "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" }, "postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "dev": true, "requires": { "nanoid": "^3.3.4", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 84aa93c1c0b7..c94565fd5193 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -96,7 +96,7 @@ "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "mini-css-extract-plugin": "^2.7.2", - "postcss": "^8.4.19", + "postcss": "^8.4.20", "postcss-loader": "^7.0.2", "sass": "^1.56.1", "sass-loader": "^13.2.0", From eb51dc3f9bca26c711e6ffca22c0fda35747eaa1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 18:15:51 +0000 Subject: [PATCH 708/723] Bump sass from 1.56.1 to 1.56.2 in /apps/block_scout_web/assets Bumps [sass](https://github.com/sass/dart-sass) from 1.56.1 to 1.56.2. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.56.1...1.56.2) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/block_scout_web/assets/package-lock.json | 14 +++++++------- apps/block_scout_web/assets/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index bd8dee237946..9333dc713fe3 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -86,7 +86,7 @@ "mini-css-extract-plugin": "^2.7.2", "postcss": "^8.4.19", "postcss-loader": "^7.0.2", - "sass": "^1.56.1", + "sass": "^1.56.2", "sass-loader": "^13.2.0", "style-loader": "^3.3.1", "webpack": "^5.75.0", @@ -15661,9 +15661,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.56.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz", + "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -30369,9 +30369,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.56.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.2.tgz", + "integrity": "sha512-ciEJhnyCRwzlBCB+h5cCPM6ie/6f8HrhZMQOf5vlU60Y1bI1rx5Zb0vlDZvaycHsg/MqFfF1Eq2eokAa32iw8w==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 84aa93c1c0b7..be0a253e561e 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -98,7 +98,7 @@ "mini-css-extract-plugin": "^2.7.2", "postcss": "^8.4.19", "postcss-loader": "^7.0.2", - "sass": "^1.56.1", + "sass": "^1.56.2", "sass-loader": "^13.2.0", "style-loader": "^3.3.1", "webpack": "^5.75.0", From c8782da37c83d4ee4c4f6a10bcc61128c6eba437 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 13 Dec 2022 13:58:53 +0400 Subject: [PATCH 709/723] Add recent dependabot bumps to the CHANGELOG --- CHANGELOG.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c10289afb90..8b3834a797d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,8 +77,8 @@ - [#6125](https://github.com/blockscout/blockscout/pull/6125) - Rename obsolete "parity" EthereumJSONRPC.Variant to "nethermind" - [#6124](https://github.com/blockscout/blockscout/pull/6124) - Docker compose: add config for Erigon - [#6061](https://github.com/blockscout/blockscout/pull/6061) - Discord badge and updated permalink - -### Dependencies version bumps +
    + Dependencies version bumps - [#6053](https://github.com/blockscout/blockscout/pull/6053) - Bump jest-environment-jsdom from 29.0.1 to 29.0.2 in /apps/block_scout_web/assets - [#6055](https://github.com/blockscout/blockscout/pull/6055) - Bump @babel/core from 7.18.13 to 7.19.0 in /apps/block_scout_web/assets @@ -150,7 +150,73 @@ - [#6305](https://github.com/blockscout/blockscout/pull/6305) - Bump sweetalert2 from 11.5.2 to 11.6.0 in /apps/block_scout_web/assets - [#6312](https://github.com/blockscout/blockscout/pull/6312) - Bump eslint-plugin-promise from 6.1.0 to 6.1.1 in /apps/block_scout_web/assets - [#6318](https://github.com/blockscout/blockscout/pull/6318) - Bump spandex from 3.1.0 to 3.2.0 - +- [#6335](https://github.com/blockscout/blockscout/pull/6335) - Bump eslint from 8.25.0 to 8.26.0 in /apps/block_scout_web/assets +- [#6334](https://github.com/blockscout/blockscout/pull/6334) - Bump ex_cldr_numbers from 2.27.3 to 2.28.0 +- [#6333](https://github.com/blockscout/blockscout/pull/6333) - Bump core-js from 3.25.5 to 3.26.0 in /apps/block_scout_web/assets +- [#6332](https://github.com/blockscout/blockscout/pull/6332) - Bump ex_cldr from 2.33.2 to 2.34.0 +- [#6339](https://github.com/blockscout/blockscout/pull/6339) - Bump sweetalert2 from 11.6.0 to 11.6.2 in /apps/block_scout_web/assets +- [#6330](https://github.com/blockscout/blockscout/pull/6330) - Bump ex_cldr_units from 3.14.0 to 3.15.0 +- [#6341](https://github.com/blockscout/blockscout/pull/6341) - Bump jest-environment-jsdom from 29.2.1 to 29.2.2 in /apps/block_scout_web/assets +- [#6342](https://github.com/blockscout/blockscout/pull/6342) - Bump jest from 29.2.1 to 29.2.2 in /apps/block_scout_web/assets +- [#6359](https://github.com/blockscout/blockscout/pull/6359) - Bump babel-loader from 8.2.5 to 9.0.0 in /apps/block_scout_web/assets +- [#6360](https://github.com/blockscout/blockscout/pull/6360) - Bump sweetalert2 from 11.6.2 to 11.6.4 in /apps/block_scout_web/assets +- [#6363](https://github.com/blockscout/blockscout/pull/6363) - Bump autoprefixer from 10.4.12 to 10.4.13 in /apps/block_scout_web/assets +- [#6364](https://github.com/blockscout/blockscout/pull/6364) - Bump ueberauth_auth0 from 2.0.0 to 2.1.0 +- [#6372](https://github.com/blockscout/blockscout/pull/6372) - Bump babel-loader from 9.0.0 to 9.0.1 in /apps/block_scout_web/assets +- [#6374](https://github.com/blockscout/blockscout/pull/6374) - Bump plug_cowboy from 2.5.2 to 2.6.0 +- [#6373](https://github.com/blockscout/blockscout/pull/6373) - Bump luxon from 3.0.4 to 3.1.0 in /apps/block_scout_web/assets +- [#6375](https://github.com/blockscout/blockscout/pull/6375) - Bump sweetalert2 from 11.6.4 to 11.6.5 in /apps/block_scout_web/assets +- [#6393](https://github.com/blockscout/blockscout/pull/6393) - Bump babel-loader from 9.0.1 to 9.1.0 in /apps/block_scout_web/assets +- [#6417](https://github.com/blockscout/blockscout/pull/6417) - Bump loader-utils from 2.0.2 to 2.0.3 in /apps/block_scout_web/assets +- [#6410](https://github.com/blockscout/blockscout/pull/6410) - Bump sweetalert2 from 11.6.5 to 11.6.7 in /apps/block_scout_web/assets +- [#6411](https://github.com/blockscout/blockscout/pull/6411) - Bump eslint from 8.26.0 to 8.27.0 in /apps/block_scout_web/assets +- [#6412](https://github.com/blockscout/blockscout/pull/6412) - Bump sass from 1.55.0 to 1.56.0 in /apps/block_scout_web/assets +- [#6413](https://github.com/blockscout/blockscout/pull/6413) - Bump jest-environment-jsdom from 29.2.2 to 29.3.0 in /apps/block_scout_web/assets +- [#6414](https://github.com/blockscout/blockscout/pull/6414) - Bump @babel/core from 7.19.6 to 7.20.2 in /apps/block_scout_web/assets +- [#6416](https://github.com/blockscout/blockscout/pull/6416) - Bump @babel/preset-env from 7.19.4 to 7.20.2 in /apps/block_scout_web/assets +- [#6419](https://github.com/blockscout/blockscout/pull/6419) - Bump jest from 29.2.2 to 29.3.1 in /apps/block_scout_web/assets +- [#6421](https://github.com/blockscout/blockscout/pull/6421) - Bump webpack from 5.74.0 to 5.75.0 in /apps/block_scout_web/assets +- [#6423](https://github.com/blockscout/blockscout/pull/6423) - Bump jest-environment-jsdom from 29.3.0 to 29.3.1 in /apps/block_scout_web/assets +- [#6424](https://github.com/blockscout/blockscout/pull/6424) - Bump floki from 0.33.1 to 0.34.0 +- [#6422](https://github.com/blockscout/blockscout/pull/6422) - Bump sass from 1.56.0 to 1.56.1 in /apps/block_scout_web/assets +- [#6430](https://github.com/blockscout/blockscout/pull/6430) - Bump web3 from 1.8.0 to 1.8.1 in /apps/block_scout_web/assets +- [#6431](https://github.com/blockscout/blockscout/pull/6431) - Bump sweetalert2 from 11.6.7 to 11.6.8 in /apps/block_scout_web/assets +- [#6432](https://github.com/blockscout/blockscout/pull/6432) - Bump sass-loader from 13.1.0 to 13.2.0 in /apps/block_scout_web/assets +- [#6445](https://github.com/blockscout/blockscout/pull/6445) - Bump postcss from 8.4.18 to 8.4.19 in /apps/block_scout_web/assets +- [#6446](https://github.com/blockscout/blockscout/pull/6446) - Bump core-js from 3.26.0 to 3.26.1 in /apps/block_scout_web/assets +- [#6452](https://github.com/blockscout/blockscout/pull/6452) - Bump @fortawesome/fontawesome-free from 6.2.0 to 6.2.1 in /apps/block_scout_web/assets +- [#6456](https://github.com/blockscout/blockscout/pull/6456) - Bump loader-utils from 2.0.3 to 2.0.4 in /apps/block_scout_web/assets +- [#6462](https://github.com/blockscout/blockscout/pull/6462) - Bump chartjs-adapter-luxon from 1.2.0 to 1.2.1 in /apps/block_scout_web/assets +- [#6469](https://github.com/blockscout/blockscout/pull/6469) - Bump sweetalert2 from 11.6.8 to 11.6.9 in /apps/block_scout_web/assets +- [#6471](https://github.com/blockscout/blockscout/pull/6471) - Bump mini-css-extract-plugin from 2.6.1 to 2.7.0 in /apps/block_scout_web/assets +- [#6470](https://github.com/blockscout/blockscout/pull/6470) - Bump chart.js from 3.9.1 to 4.0.1 in /apps/block_scout_web/assets +- [#6472](https://github.com/blockscout/blockscout/pull/6472) - Bump webpack-cli from 4.10.0 to 5.0.0 in /apps/block_scout_web/assets +- [#6487](https://github.com/blockscout/blockscout/pull/6487) - Bump eslint from 8.27.0 to 8.28.0 in /apps/block_scout_web/assets +- [#6488](https://github.com/blockscout/blockscout/pull/6488) - Bump ex_doc from 0.29.0 to 0.29.1 +- [#6491](https://github.com/blockscout/blockscout/pull/6491) - Bump minimatch from 3.0.4 to 3.0.8 in /apps/block_scout_web/assets +- [#6479](https://github.com/blockscout/blockscout/pull/6479) - Bump ecto_sql from 3.9.0 to 3.9.1 +- [#6486](https://github.com/blockscout/blockscout/pull/6486) - Bump sweetalert2 from 11.6.9 to 11.6.10 in /apps/block_scout_web/assets +- [#6498](https://github.com/blockscout/blockscout/pull/6498) - Bump sweetalert2 from 11.6.10 to 11.6.13 in /apps/block_scout_web/assets +- [#6506](https://github.com/blockscout/blockscout/pull/6506) - Bump web3modal from 1.9.9 to 1.9.10 in /apps/block_scout_web/assets +- [#6505](https://github.com/blockscout/blockscout/pull/6505) - Bump highlight.js from 11.6.0 to 11.7.0 in /apps/block_scout_web/assets +- [#6504](https://github.com/blockscout/blockscout/pull/6504) - Bump sweetalert2 from 11.6.13 to 11.6.14 in /apps/block_scout_web/assets +- [#6507](https://github.com/blockscout/blockscout/pull/6507) - Bump remote_ip from 1.0.0 to 1.1.0 +- [#6497](https://github.com/blockscout/blockscout/pull/6497) - Bump chartjs-adapter-luxon from 1.2.1 to 1.3.0 in /apps/block_scout_web/assets +- [#6519](https://github.com/blockscout/blockscout/pull/6519) - Bump photoswipe from 5.3.3 to 5.3.4 in /apps/block_scout_web/assets +- [#6520](https://github.com/blockscout/blockscout/pull/6520) - Bump @babel/core from 7.20.2 to 7.20.5 in /apps/block_scout_web/assets +- [#6527](https://github.com/blockscout/blockscout/pull/6527) - Bump luxon from 3.1.0 to 3.1.1 in /apps/block_scout_web/assets +- [#6526](https://github.com/blockscout/blockscout/pull/6526) - Bump mini-css-extract-plugin from 2.7.0 to 2.7.1 in /apps/block_scout_web/assets +- [#6533](https://github.com/blockscout/blockscout/pull/6533) - Bump postcss-loader from 7.0.1 to 7.0.2 in /apps/block_scout_web/assets +- [#6534](https://github.com/blockscout/blockscout/pull/6534) - Bump sweetalert2 from 11.6.14 to 11.6.15 in /apps/block_scout_web/assets +- [#6539](https://github.com/blockscout/blockscout/pull/6539) - Bump decode-uri-component from 0.2.0 to 0.2.2 in /apps/block_scout_web/assets +- [#6555](https://github.com/blockscout/blockscout/pull/6555) - Bump bignumber.js from 9.1.0 to 9.1.1 in /apps/block_scout_web/assets +- [#6557](https://github.com/blockscout/blockscout/pull/6557) - Bump webpack-cli from 5.0.0 to 5.0.1 in /apps/block_scout_web/assets +- [#6558](https://github.com/blockscout/blockscout/pull/6558) - Bump eslint from 8.28.0 to 8.29.0 in /apps/block_scout_web/assets +- [#6556](https://github.com/blockscout/blockscout/pull/6556) - Bump mini-css-extract-plugin from 2.7.1 to 2.7.2 in /apps/block_scout_web/assets +- [#6562](https://github.com/blockscout/blockscout/pull/6562) - Bump qs from 6.5.2 to 6.5.3 in /apps/block_scout_web/assets +- [#6577](https://github.com/blockscout/blockscout/pull/6577) - Bump postcss from 8.4.19 to 8.4.20 in /apps/block_scout_web/assets +- [#6578](https://github.com/blockscout/blockscout/pull/6578) - Bump sass from 1.56.1 to 1.56.2 in /apps/block_scout_web/assets +
    ## 4.1.8-beta From 3aac98ea9c35cd62d428b6c1608b2573263a491d Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Tue, 13 Dec 2022 14:39:52 +0400 Subject: [PATCH 710/723] Dark mode switcher localStorage to cookie in order to support new UI --- CHANGELOG.md | 1 + apps/block_scout_web/assets/js/lib/history_chart.js | 7 ++++--- .../assets/js/pages/dark-mode-switcher.js | 9 +++++---- apps/block_scout_web/assets/package-lock.json | 5 +++-- .../templates/csv_export/index.html.eex | 2 +- .../block_scout_web/templates/layout/app.html.eex | 12 +++++++++--- apps/block_scout_web/priv/gettext/default.pot | 2 +- .../priv/gettext/en/LC_MESSAGES/default.po | 2 +- 8 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3834a797d9..31b876d53922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ ### Chore +- [#6581](https://github.com/blockscout/blockscout/pull/6581) - Dark mode switcher localStorage to cookie in order to support new UI - [#6572](https://github.com/blockscout/blockscout/pull/6572) - pending_block_operations table: remove fetch_internal_transactions column - [#6387](https://github.com/blockscout/blockscout/pull/6387) - Fix errors in docker-build and e2e-tests workflows - [#6325](https://github.com/blockscout/blockscout/pull/6325) - Set http_only attribute of account authorization cookie to false diff --git a/apps/block_scout_web/assets/js/lib/history_chart.js b/apps/block_scout_web/assets/js/lib/history_chart.js index c7c94cbe8463..674c4ef32eec 100644 --- a/apps/block_scout_web/assets/js/lib/history_chart.js +++ b/apps/block_scout_web/assets/js/lib/history_chart.js @@ -1,4 +1,5 @@ import $ from 'jquery' +import Cookies from 'js-cookie' import { Chart, LineController, LineElement, PointElement, LinearScale, TimeScale, Title, Tooltip } from 'chart.js' import 'chartjs-adapter-luxon' import humps from 'humps' @@ -17,7 +18,7 @@ const grid = { } function getTxChartColor () { - if (localStorage.getItem('current-color-mode') === 'dark') { + if (Cookies.get('chakra-ui-color-mode') === 'dark') { return sassVariables.dashboardLineColorTransactionsDarkTheme } else { return sassVariables.dashboardLineColorTransactions @@ -25,7 +26,7 @@ function getTxChartColor () { } function getPriceChartColor () { - if (localStorage.getItem('current-color-mode') === 'dark') { + if (Cookies.get('chakra-ui-color-mode') === 'dark') { return sassVariables.dashboardLineColorPriceDarkTheme } else { return sassVariables.dashboardLineColorPrice @@ -33,7 +34,7 @@ function getPriceChartColor () { } function getMarketCapChartColor () { - if (localStorage.getItem('current-color-mode') === 'dark') { + if (Cookies.get('chakra-ui-color-mode') === 'dark') { return sassVariables.dashboardLineColorMarketDarkTheme } else { return sassVariables.dashboardLineColorMarket diff --git a/apps/block_scout_web/assets/js/pages/dark-mode-switcher.js b/apps/block_scout_web/assets/js/pages/dark-mode-switcher.js index e9e0bdc52452..7f51825a5828 100644 --- a/apps/block_scout_web/assets/js/pages/dark-mode-switcher.js +++ b/apps/block_scout_web/assets/js/pages/dark-mode-switcher.js @@ -1,10 +1,11 @@ import $ from 'jquery' +import Cookies from 'js-cookie' -$('.dark-mode-changer').click(function () { - if (localStorage.getItem('current-color-mode') === 'dark') { - localStorage.setItem('current-color-mode', 'light') +$('.dark-mode-changer').on('click', function () { + if (Cookies.get('chakra-ui-color-mode') === 'dark') { + Cookies.set('chakra-ui-color-mode', 'light') } else { - localStorage.setItem('current-color-mode', 'dark') + Cookies.set('chakra-ui-color-mode', 'dark') } // reload each theme switch document.location.reload(true) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index bf8465e5b509..120991453633 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -98,10 +98,11 @@ } }, "../../../deps/phoenix": { - "version": "0.0.1" + "version": "1.5.13", + "license": "MIT" }, "../../../deps/phoenix_html": { - "version": "0.0.1" + "version": "3.0.4" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", diff --git a/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex index 98293ccd2005..d1b5b394bd9f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/csv_export/index.html.eex @@ -32,7 +32,7 @@ if (reCaptchaClientKey) { widgetId1 = grecaptcha.render('recaptcha', { 'sitekey': reCaptchaClientKey, - 'theme': localStorage.getItem('current-color-mode'), + 'theme': getCookie('chakra-ui-color-mode'), 'callback': function () { document.getElementById('export-csv-button').disabled = false } diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index 2c578cf643bd..60c0754acf5a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -53,8 +53,14 @@