Hi, i am having some issues with use solgraph. Can you help us? Its seems to be in the function sendvalue (address payable recipient,)
Thank you
.sol (including line with function with error).
**
*Submitted for verification at BscScan.com on 2021-10-15
*/
pragma solidity 0.8.7;
// SPDX-License-Identifier: UNLICENSED
function sendValue(address payable recipient, uint256 amount) internal {
Error:
Parse error
peg$SyntaxError: Expected "!=", "%", "%=", "&", "&&", "&=", "(", "", "=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/", "/=", ";", "<", "<<", "<<=", "<=", "=", "==", ">", ">=", ">>", ">>=", ">>>", "?", "[", "^", "^=", "memory", "storage", "|", "|=", "||", comment, end of line, identifier, or whitespace but "{" found. Line: 265, Column: 34
at peg$buildStructuredError (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/build/parser.js:1376:12)
at Object.peg$parse [as parse] (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/build/parser.js:15723:11)
at Object.parse (/usr/local/lib/node_modules/solgraph/node_modules/solidity-parser-sc/index.js:34:23)
at _default (/usr/local/lib/node_modules/solgraph/dist/index.js:91:21)
at /usr/local/lib/node_modules/solgraph/dist/bin.js:29:37 {
expected: [
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: 'storage', ignoreCase: false },
{ type: 'literal', text: 'memory', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'other', description: 'identifier' },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '=', ignoreCase: false },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: 'storage', ignoreCase: false },
{ type: 'literal', text: 'memory', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'other', description: 'identifier' },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'literal', text: '(', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '=', ignoreCase: false },
{ type: 'literal', text: '/=', ignoreCase: false },
{ type: 'literal', text: '%=', ignoreCase: false },
{ type: 'literal', text: '+=', ignoreCase: false },
{ type: 'literal', text: '-=', ignoreCase: false },
{ type: 'literal', text: '<<=', ignoreCase: false },
{ type: 'literal', text: '>>=', ignoreCase: false },
{ type: 'literal', text: '&=', ignoreCase: false },
{ type: 'literal', text: '^=', ignoreCase: false },
{ type: 'literal', text: '|=', ignoreCase: false },
{ type: 'literal', text: '.', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: '[', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
{ type: 'other', description: 'end of line' },
{ type: 'other', description: 'comment' },
{ type: 'literal', text: 'storage', ignoreCase: false },
{ type: 'literal', text: 'memory', ignoreCase: false },
{ type: 'other', description: 'whitespace' },
... 258 more items
],
found: '{',
location: {
start: { offset: 7775, line: 265, column: 34 },
end: { offset: 7776, line: 265, column: 35 }
}
}