Questions tagged [parser]
The parser tag has no usage guidance.
43 questions
1
vote
1
answer
33
views
jq and vm fail to parse json
I am working on parsing data returned from a cast call. I have tried using jq with vm.ffi and also vm.parseJson. Both methods fail without any obvious error.
I need the status field in the top level ...
0
votes
1
answer
20
views
How to speed up Ethereum etl blockhain export time?
I am using python module ethereum-etl to parse all specific token transfers from start to end block. As a node I'm running a local snap node with all the receipts being saved parameter (--...
0
votes
0
answers
33
views
ParserError: Source Not Found Despite Correct Path
I'm encountering a ParserError when trying to compile my Solidity contract. The error indicates that the specified path is not found, even though I believe the paths are correct.
Error message:...
1
vote
0
answers
23
views
How do you effectively parsing about 5,000,000 transactions?
I need to parsing VERY many transactions at an address, but I can't find an efficient way to do it, can you tell me how to do it?
5,000,000+ transactions
0
votes
1
answer
161
views
Prettier not detecting solidity
Prettier formatting is working for typescript but not for solidity.
I have tried uninstalling and installing Prettier and Solidity(by JuanBlanco) extension again but still no luck.
Below are my ...
0
votes
1
answer
82
views
How to parse the swap data of a certain wallet?
I am trying to parse swap data of a set of wallets:
I tried to do this by using logs of the transactions – they often include data about swaps, however there is no uniform way to parse it, because ...
0
votes
1
answer
29
views
Expected identifier but got ';' ? I am writing a poker game in Solidity and having problems declaring sortedCards as a state variable. Help:)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract NoLimitPoker {
address public dealer;
address public smallBlind;
address public bigBlind;
uint public minBuyIn;
...
0
votes
2
answers
229
views
Is there any way how to check if transaction contains incoming ETH?
I'm using ethers.js library, I have decoded TX, where I see logs, events, etc.
But is there any way how to check that this transaction contains incoming ETH?
When sending ETH, there is .value ...
1
vote
2
answers
2k
views
How can I check if an Ethereum address is valid by using zod parser?
How to parse an Ethereum address that was provided by a user with the help of zod safeParse() function?
0
votes
0
answers
87
views
Error: Parse error: missing ';' at '{' using SOLHINT, how to fix it?
I have a typical ERC20 contract.
The contract compiles just fine and works, however when using some styling and security check with SOLHINT, it gives me this error for all my lines which have the &...
-1
votes
1
answer
34
views
Can someone please tell me whats the issue i am writing a starter code on remix from solidity: ParserError: Expected ';' but got '-'
pragma solidity ^0.8.6;
contract my_contract{
string public mystring - "hello world!";
}
I have just started coding on solidity I have no previous experience so can someone explain ...
0
votes
2
answers
40
views
Newby learning Solidity - Parser Error
I am getting this error when I try to compile
Airlines.sol:49:5: ParserError: Expected '{' but got 'illegal' ➥
public{
Here is the code:
pragma solidity ^0.6.0;
//SPDX-License-Identifier: ...
4
votes
1
answer
5k
views
How to decode uniswap v3 Router 2 transaction
I am trying to parse uniswap transaction and extract "summary" like what Etherscan does when showing transaction (like this one) below:
Transaction Action:
Swap 2,937.943845 USDC For 1....
1
vote
1
answer
23
views
Parser error expected " but got indentifer
constructor(
address _DEMO,
address _principle,
address _treasury,
address _DAO,
address _bondCalculator
) {
require(_DEMO != address(0));
DEMO = _DEMO;
require(...
1
vote
0
answers
262
views
TRYING TO VERIFY MY SOURCE CODE ON ETHERSCAN ErrorUnable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])
Compiler Warning(s): ParserError: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
--> myc:1:1:
|
1 | "accounts": {
| ^^^^^^^^^^
...
0
votes
1
answer
3k
views
I get a Parser error "Expected identifier but got 'public' "
Removing Public for Muurbloem does not work
pragma solidity ^0.4.13;
contract nietTeveel{
uint public maxbedrag = 50;
uint public restbedrag;
function ...
3
votes
3
answers
6k
views
ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found:
I keep getting this error, would be really cool to get help. I've heard that I need to install a program, forgot which but I'm not so sure that's a great idea to start with and is not the fix to this ...
0
votes
1
answer
13
views
If statements givng parser errors no matter what
Below ive attached a very simple picture of some code that is reciving the same error as my actual code. Ive just made a super simple example for ease.
And here is the error im getting.
Any ideas on ...
0
votes
1
answer
42
views
Error on RemixIDE: "ParserError: Expected pragma. import directive, or contract/library/interface definition" at the last line
I am running my code at RemixIDE and facing the error Remix: ParserError: Expected pragma. import directive, or contract/library/interface definition in the last line of the code (line 157). Does ...
0
votes
0
answers
9
views
ParerError Need help figuring it out
I'm following along a tutorial on this, but the other person is using an older version of solidity and I am super new to the field. I'm not sure where it went wrong but even though our screen matches ...
0
votes
1
answer
190
views
ParserError: Expected primary expression. ( Red at my last line)
when I try to compile my code, I get the ParserError , turns red at my last line.
pragma solidity ^0.4.26;
library Rainforest {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
...
0
votes
0
answers
60
views
ParserError: Expected '(' but got identifier function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
I'm trying to compile a smart contract and I'm facing the following error in line 309.
ParserError: Expected '(' but got identifier function updateX6Referrer(address userAddress, address ...
0
votes
2
answers
97
views
ParseError: Expected ';' but got '(' emit sent(_from, _to, _value);^
I'm currently doing a smart contracts short course and we got the code below but I've swapped out the event for emit. Now I am getting the following error:
ParseError: Expected ';' but got '(' emit ...
0
votes
1
answer
138
views
Issues with using/installing python solidity parser
I am trying to install and use python solidity parser by ConsenSys
I keep on getting the following error
File "<stdin>", line 1, in <module>
File "/home/seed/.local/lib/python3.5/site-...
1
vote
0
answers
47
views
What is Parser Error? [closed]
What is Parser Error? How to solve this problem?
3
votes
1
answer
2k
views
Convert address to string after solidity 0.5.x
After solidity 0.5.x release none of conversions from address to string appear to be working. I've tested all of them on remix and got errors like converting bytes to uint or something like this.
...
0
votes
2
answers
377
views
How can I parse internal transactions with light node?
is that possible to receive all transactions from new block with light node and parse all and even internal transactions with the help of its api?
1
vote
0
answers
126
views
Parsing ethereum chaindata using leveldb
I'm new here :)
I'm writing a c++ program that parses ethereum chain data. As of present I was able to get the key value pairs by using leveldb::ReadOptions command (as illustrated in the below code) ...
1
vote
1
answer
184
views
Parsing the WolframAlpha string result from the Oracalize __callback function into a usable format?
I need to generate 10 unique random numbers between 0 to 100 in my smart contract.
For this I've decided to utilise Oracalize and one of the datasource called WolframAlpha. This is how I use it:
...
2
votes
2
answers
2k
views
Decoding ethereum leveldb keys and values
I've created a simple script to read ethereum data from the leveldb using C++. Basically this testing program would print all keys in leveldb to the console.
#include <cassert>
#include <...
1
vote
1
answer
168
views
Blockchain structure with smart contracts and access data
I found several articles explaining how smart contracts used and stored in blockchain but where does the smart contract actually resides in a blockchain (block or transaction or separate structure in ...
3
votes
0
answers
174
views
Ethereum block chain extracter and parser like blocksci
I'm new to ethereum and I would like to develop an analyzing framework for ethereum. Is there a blockchain extractor and a parser to similar to blocksci available for ethereum and support analyzing of ...
3
votes
1
answer
639
views
Solidity IDE Parser Error on Token Name
Getting this in Solidity:
browser/ballot.sol:121:16: Parser Error: Expected Primary Expression.
Here is my code, says that it is the name line with the parser error
function ERC20Token(
) {
...
4
votes
2
answers
964
views
Is there a current (11/2017) way to parse the Ethereum blockchain?
I understand there exist many (defunct/unsupported to date) blockchain explorer project and rate-limited web APIs exist for culling Ethereum data from the .ldb blockchain files. But what about bulk ...
2
votes
1
answer
318
views
Parsing contract endpoint output
A contract endpoint on Ropsten returns a set like this:
(uint256 _assetId, address _assetOwner, address _issuer, string _content, uint256 _sellPrice, uint256 _status)
The endpoint is getAssetById at ...
7
votes
2
answers
6k
views
Convert ABI to Solidity code
Is there a tool to generate a solidity code from the ABI interface?
const Ballot = [{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"delegate","outputs":[],"payable":false,"type":"...
1
vote
2
answers
352
views
Parsing contract method output as an array of fields
I have a constant method in a Smart Contract that returns this array:
(uint256 _field1, uint256 _field2, uint256 _field3, address _field4, string _field5)
When invoking it I got this hex result:
...
4
votes
1
answer
148
views
Parse contract to retrieve declared identifiers
Node.js Solidity compiler parses contract and returns its ABI, is there any library to retrieve all declared identifiers in a contract?
For example, the following contract:
contract Person {
...
11
votes
5
answers
2k
views
BNF grammar definition for Solidity
I scoured the Mix and Solidity repos for something like a formal definition of the language's grammar, so that one may generate parsers using tools like GrammarKit, but couldn't find anything.
Any ...
16
votes
4
answers
7k
views
How can I easily parse a raw transaction?
In the Bitcoin ecosystem, there are tools like https://blockchain.info/decode-tx to decode a raw transaction. Is there a site that offers the equivalent for Ethereum?
I'm looking for an easy way to ...
15
votes
3
answers
3k
views
How to parse blocks with Python?
I'm building a basic analytics framework for the Ethereum blockchain. As a first step I need to extract the data and I'd like to do this in Python. I've been using Geth as a client on OSX and so, as ...
15
votes
5
answers
6k
views
How to build an AST for Solidity?
I'm trying to build a parser for Solidity, and it would help if I could build a working version off of the existing parser. I've tried looking at the source code on the official git, but I haven't ...
5
votes
1
answer
381
views
Is there available source code for the Ethereum parser (JS/Solidity or Python/Serpent?
I've tried looking at the source code, but I'm unfamiliar with the structure. I can't seem to find a parser module or source code. I'm attempting to understand the parser and perhaps write one from ...