<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ahmedkamal6</title>
    <description>The latest articles on DEV Community by ahmedkamal6 (@ahmedkamal).</description>
    <link>https://dev.to/ahmedkamal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1045006%2F29d47338-349b-42d8-9a36-7cd678efc830.jpeg</url>
      <title>DEV Community: ahmedkamal6</title>
      <link>https://dev.to/ahmedkamal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmedkamal"/>
    <language>en</language>
    <item>
      <title>how address transfer tokens to itself and why ?</title>
      <dc:creator>ahmedkamal6</dc:creator>
      <pubDate>Sun, 21 May 2023 05:42:19 +0000</pubDate>
      <link>https://dev.to/ahmedkamal/how-address-transfer-tokens-to-itself-and-why--2jn9</link>
      <guid>https://dev.to/ahmedkamal/how-address-transfer-tokens-to-itself-and-why--2jn9</guid>
      <description></description>
    </item>
    <item>
      <title>add my currency on alchemy pay</title>
      <dc:creator>ahmedkamal6</dc:creator>
      <pubDate>Tue, 04 Apr 2023 09:40:04 +0000</pubDate>
      <link>https://dev.to/ahmedkamal/add-my-currency-on-alchemy-pay-286f</link>
      <guid>https://dev.to/ahmedkamal/add-my-currency-on-alchemy-pay-286f</guid>
      <description>&lt;p&gt;hi everyone i am trying to add my currency on alchemy pay platform and i am facing a problem with the scenario &lt;br&gt;
i made a price query api first as per this page &lt;a href="https://alchemypay.readme.io/docs/price-query-1"&gt;https://alchemypay.readme.io/docs/price-query-1&lt;/a&gt;&lt;br&gt;
user choose amount and fiat and click pay &lt;br&gt;
-&amp;gt; fiat currency is paid from user credit card &lt;br&gt;
-&amp;gt; alchemy pay notify me that the user paid (so i created a web hook to receive that as per this page &lt;a href="https://alchemypay.readme.io/docs/webhook-notification"&gt;https://alchemypay.readme.io/docs/webhook-notification&lt;/a&gt;)&lt;br&gt;
-&amp;gt; i transfer the crypto amount to the user wallet (the logic for this is inside the notification api i just created)&lt;br&gt;
-&amp;gt; says should be 1 more notification but can't understand also there is this page which i don't know should i implement it or not &lt;a href="https://alchemypay.readme.io/docs/callback"&gt;https://alchemypay.readme.io/docs/callback&lt;/a&gt; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>alternative to solc select for nodeJS</title>
      <dc:creator>ahmedkamal6</dc:creator>
      <pubDate>Tue, 14 Mar 2023 11:53:14 +0000</pubDate>
      <link>https://dev.to/ahmedkamal/alternative-to-solc-select-for-nodejs-ff4</link>
      <guid>https://dev.to/ahmedkamal/alternative-to-solc-select-for-nodejs-ff4</guid>
      <description>&lt;p&gt;my goal is to analyze contracts with slither without solc-select&lt;br&gt;
my next goal is to find alternative to slither to make it all nodejs only but for now i will change solc-select first but if u know some good alternative too slither but as good please recommend it, analyzing code with detectors and show theses statistics like slither that's all i need for now&lt;/p&gt;

&lt;p&gt;Number of optimization issues: 0&lt;br&gt;
Number of informational issues: 11&lt;br&gt;
Number of low issues: 2&lt;br&gt;
Number of medium issues: 0&lt;br&gt;
Number of high issues: 0 &lt;/p&gt;

&lt;p&gt;i am using web3 to get source code of a contract then write it into .sol file&lt;br&gt;
and used npm install -g solc@{version of the contract} to download the right version of the compiler for the contract managed to compile it and get the byte code also works in cmd if i type solcjs --version&lt;br&gt;
now i want to use slither on that file written earlier and solc@{version of contract} installed globally&lt;br&gt;
i used child process for that like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function analyze() {
  exec.exec(
    `slither contract.sol --print human-summary`,
    async (error, stdout, stderr) =&amp;gt; {
      if (error) {
        console.log(error);
        return;
      }
      if (stderr) {
        console.log(stderr);
      } else {
        console.log(stdout);
      }
    }
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;however when i run this i get erorr&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Command failed: slither contract.sol --print human-summary
Traceback (most recent call last):
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 380, in get_version
    with subprocess.Popen(
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1440, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\slither\__main__.py", line 834, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\slither\__main__.py", line 87, in process_all
    compilations = compile_all(target, **vars(args))
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 620, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 110, in __init__
    self._compile(**kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 530, in _compile
    self._platform.compile(self, **kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 154, in compile
    targets_json = _get_targets_json(compilation_unit, self._target, **kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 283, in _get_targets_json
    return _run_solc(
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 489, in _run_solc
    compiler="solc", version=get_version(solc, env), optimized=is_optimized(solc_arguments)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 400, in get_version
    raise InvalidCompilation(error)
crytic_compile.platform.exceptions.InvalidCompilation: [WinError 2] The system cannot find the file specified
Error in contract.sol
Traceback (most recent call last):
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 380, in get_version
    with subprocess.Popen(
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1440, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\slither\__main__.py", line 834, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\slither\__main__.py", line 87, in process_all
    compilations = compile_all(target, **vars(args))
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 620, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 110, in __init__
    self._compile(**kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\crytic_compile.py", line 530, in _compile
    self._platform.compile(self, **kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 154, in compile
    targets_json = _get_targets_json(compilation_unit, self._target, **kwargs)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 283, in _get_targets_json
    return _run_solc(
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 489, in _run_solc
    compiler="solc", version=get_version(solc, env), optimized=is_optimized(solc_arguments)
  File "C:\Users\Ahmed\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\crytic_compile\platform\solc.py", line 400, in get_version
    raise InvalidCompilation(error)
crytic_compile.platform.exceptions.InvalidCompilation: [WinError 2] The system cannot find the file specified


    at ChildProcess.exithandler (node:child_process:400:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1093:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 4294967295,
  killed: false,
  signal: null,
  cmd: 'slither contract.sol --print human-summary'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the error says the file is not found after specifying the path to the file i tried running the command from cmd and got same error&lt;/p&gt;

&lt;p&gt;it works well with solc-select but doesn't work with solcjs&lt;/p&gt;

&lt;p&gt;my assumptions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;slither only works with solc-select since it's recommended on their github&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
