Closed mrx23dot closed 2 years ago
π€ cannot reproduce
you can match the fallback function with:
function.isFallback == 'true'
or function.name == '__fallback__'
(similar for constructor)
Here're some fields you can test for:
β ββ visibility: default
β ββ modifiers
β ββ override
β ββ isConstructor: false
β ββ isReceiveEther: false
β ββ isFallback: false
β ββ isVirtual: false
β ββ stateMutability
I started up a brand new VPS at linode with debian10:
sudo apt update
sudo apt install npm
# npm@7.5.2
sudo npm install solgrep -g
solgrep --version # 0.0.7
nano dummy.sol # added content
sudo solgrep dummy.sol --find="function.name"
same error.
Internet says
"TypeError: replaceAll is not a function" it is likely due to the method not implemented/supported by the browser/npm version
String.prototype.replaceAll() method was added in ES2021/ES12. (2021 jun in npm)
Solution for anything older than 1year, changing:
posNumbString.replaceAll('-', 'i');
to
posNumbString.replace(/-/g, 'i');
https://discourse.threejs.org/t/replaceall-is-not-a-function/14585
Server OSs don't have the latest from everything, but stable versions. Any chance you could swap these?
There is only one instance in the repo :) some solution: https://stackoverflow.com/questions/1144783/how-to-replace-all-occurrences-of-a-string-in-javascript
solgrep dummy.sol --find="function.name"
gives
tested on windows/linux SolGrep v0.0.7
installed with sudo npm install solgrep -g
simple source dummy.zip
stats works, but everything else fails, like --find="function.name == 'fallback'"