Comments (2)
function = %{
"abi_outputs" => [
%{
"components" => [
%{"internalType" => "bytes32", "name" => "id", "type" => "bytes32"},
%{
"components" => [
%{
"internalType" => "bytes32",
"name" => "lastMiniblockHash",
"type" => "bytes32"
},
%{
"internalType" => "uint64",
"name" => "lastMiniblockNum",
"type" => "uint64"
},
%{
"internalType" => "uint64",
"name" => "reserved0",
"type" => "uint64"
},
%{
"internalType" => "uint64",
"name" => "flags",
"type" => "uint64"
},
%{
"internalType" => "address[]",
"name" => "nodes",
"type" => "address[]"
}
],
"internalType" => "struct Stream",
"name" => "stream",
"type" => "tuple"
}
],
"internalType" => "struct StreamWithId[]",
"name" => "",
"type" => "tuple[]"
}
],
"inputs" => [],
"method_id" => "3bd84c0c",
"name" => "getAllStreams",
"names" => [
[
"struct StreamWithId[]",
[
"id",
[
"stream",
["lastMiniblockHash", "lastMiniblockNum", "reserved0", "flags",
"nodes"]
]
]
]
],
"outputs" => [
%{
"type" => "tuple[bytes32,tuple[bytes32,uint64,uint64,uint64,address[]]][]",
"value" => []
}
],
"stateMutability" => "view",
"type" => "function"
}
BlockScoutWeb.API.V2.SmartContractView.prepare_read_function(function)
Currently:
iex(blockscout@3ae620ae335c)137> BlockScoutWeb.API.V2.SmartContractView.prepare_read_function(function)
** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['"bytes"']]}}
(ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2
(block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2
(block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:143: BlockScoutWeb.API.V2.SmartContractView.prepare_output/1
(elixir 1.14.5) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:137: BlockScoutWeb.API.V2.SmartContractView.prepare_read_function/1
Old version:
iex(blockscout@blockscout-dfb964499-cmrgs)264> BlockScoutWeb.API.V2.SmartContractView.prepare_read_function(function)
%{
"inputs" => [],
"method_id" => "3bd84c0c",
"name" => "getAllStreams",
"names" => [
[
"struct StreamWithId[]",
[
"id",
[
"stream",
["lastMiniblockHash", "lastMiniblockNum", "reserved0", "flags",
"nodes"]
]
]
]
],
"outputs" => [
%{
"type" => "tuple[bytes32,tuple[bytes32,uint64,uint64,uint64,address[]]][]",
"value" => []
}
],
"stateMutability" => "view",
"type" => "function"
}
from blockscout.
Description
Version : "5.3.1" fonctionne
{:trace, #PID<0.6672.7383>, :call, {BlockScoutWeb.API.V2.SmartContractView, :render_json, [[], "bytes32[]"]}} {:trace, #PID<0.6672.7383>, :return_from, {BlockScoutWeb.API.V2.SmartContractView, :render_json, 2}, []} {:trace, #PID<0.6672.7383>, :call, {BlockScoutWeb.API.V2.SmartContractView, :render_json, [[], "tuple[bytes32,tuple[bytes32,uint64,uint64,uint64,address[]]][]"]}} {:trace, #PID<0.6672.7383>, :return_from, {BlockScoutWeb.API.V2.SmartContractView, :render_json, 2}, []} {:trace, #PID<0.6672.7383>, :call, {BlockScoutWeb.API.V2.SmartContractView, :render_json, [0, "uint256"]}} {:trace, #PID<0.6672.7383>, :return_from, {BlockScoutWeb.API.V2.SmartContractView, :render_json, 2}, 0}
Version : "6.5.0"
{"time":"2024-05-09T18:47:09.713Z","severity":"error","message":"#PID<0.23518.11> running BlockScoutWeb.Endpoint (connection #PID<0.23523.11>, stream id 1) terminated\nServer: localhost:4000 (http)\nRequest: GET /api/v2/smart-contracts/0xbaBD9cc5f81228A7Fcfc4C31B852a106a06272cE/methods-read?is_custom_abi=false\n** (exit) an exception was raised:\n ** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['\"bytes\"']]}}\n (ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:143: BlockScoutWeb.API.V2.SmartContractView.prepare_output/1\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:137: BlockScoutWeb.API.V2.SmartContractView.prepare_read_function/1\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (phoenix 1.5.14) lib/phoenix/view.ex:472: Phoenix.View.render_to_iodata/3","metadata":{"error":{"initial_call":null,"reason":"** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['\"bytes\"']]}}\n (ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:143: BlockScoutWeb.API.V2.SmartContractView.prepare_output/1\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:137: BlockScoutWeb.API.V2.SmartContractView.prepare_read_function/1\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (elixir 1.14.5) lib/enum.ex:1658: Enum.\"-map/2-lists^map/1-0-\"/2\n (phoenix 1.5.14) lib/phoenix/view.ex:472: Phoenix.View.render_to_iodata/3\n"}}}
Le problème:
BlockScoutWeb.API.V2.SmartContractView.render_json(value, type) ** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['"bytes"']]}} (ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2 (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2
value = [] type = "tuple[bytes32,tuple[bytes32,uint64,uint64,uint64,address[]]][]" BlockScoutWeb.API.V2.SmartContractView.render_json(value, type) ** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['"bytes"']]}} (ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2 (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2
Type d'installation
Docker-composer
Type du nœud d'archive JSON RPC
Geth
Type de chaîne
L2
Lien vers la page
Pas de réponse
Étapes pour reproduire
value = [] type = "tuple[bytes32,tuple[bytes32,uint64,uint64,uint64,address[]]][]" BlockScoutWeb.API.V2.SmartContractView.render_json(value, type) ** (MatchError) no match of right hand side value: {:error, {1, :ethereum_abi_parser, ['syntax error before: ', ['"bytes"']]}} (ex_abi 0.7.2) lib/abi/parser.ex:15: ABI.Parser.parse!/2 (block_scout_web 6.5.0) lib/block_scout_web/views/api/v2/smart_contract_view.ex:391: BlockScoutWeb.API.V2.SmartContractView.render_json/2
Version back-end
6.5.0
Version frontale
dernier
Versions Elixir & Erlang/OTP
1.14.5
Système opérateur
Pas de réponse
Informations Complémentaires
Pas de réponse
from blockscout.
Related Issues (20)
- Token transfers shows Something went wrong. Try refreshing the page or come back later HOT 2
- Swap using TokenTrove HOT 1
- Empty additional_sources in API v2 response
- Today VPN server address give me please HOT 1
- Blockscout for Testnet Geth Network HOT 5
- Purchased Sepolia's NFT using Arbitrum One HOT 1
- Backend in Docker crash after build on latest patch HOT 7
- Facing Transaction issue HOT 1
- Contract verify failed on docker smart-contract-verifier HOT 2
- user-ops-indexer not work HOT 1
- Transactions CSV export bug
- Blockscout account improvements
- Unable to fetch block info from Reth execution client HOT 3
- Add contract method name and hash to transactions CSV export
- Put new entries to the front of queue for async fetchers
- Need to force TokenID Metadata refresh HOT 1
- Latest block not fetched and indexed for > 5 hours HOT 1
- Add support of Celestia blobs to `Indexer.Fetcher.Optimism.TxnBatch` module
- Failed to upsert token instance HOT 4
- Bad performance of API v2 address internal transactions endpoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blockscout.