You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to call uniswap NFT for LP position where min tick is -887220 instead of this I received very big positive number (115792089237316195423570985008687907853269984665640564039457584007913111975500). I am using this code:
for positions call I receive [0, "0x0000000000000000000000000000000000000000", "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a", 3000, 115792089237316195423570985008687907853269984665640564039457584007913111975500, 887220, 640820570603451914, 10541955816772571196803185866364767643, 641569016979010078464019001567004597581, 0, 0]
Btw, it will be great to add parser for response, something likeabi["outputs"].map.with_index { |func_el, index| [func_el["name"].to_sym, result[index]] }.to_h
I am trying to call uniswap NFT for LP position where min tick is -887220 instead of this I received very big positive number (
115792089237316195423570985008687907853269984665640564039457584007913111975500
). I am using this code:for positions call I receive
[0, "0x0000000000000000000000000000000000000000", "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a", 3000, 115792089237316195423570985008687907853269984665640564039457584007913111975500, 887220, 640820570603451914, 10541955816772571196803185866364767643, 641569016979010078464019001567004597581, 0, 0]
Btw, it will be great to add parser for response, something like
abi["outputs"].map.with_index { |func_el, index| [func_el["name"].to_sym, result[index]] }.to_h
Low level investigation
params:
{:data=>"0x99fbab88000000000000000000000000000000000000000000000000000000000004f10a", :to=>"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"}
rpc response:
{"jsonrpc"=>"2.0", "id"=>2, "result"=>"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000fc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a0000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2764c00000000000000000000000000000000000000000000000000000000000d89b400000000000000000000000000000000000000000000000008e4a6e9eb94f60a0000000000000000000000000000000007ee4e8cef48e37cb007d989b8b94d9b00000000000000000000000000000001e2a9b2b7eedd5e9d48db82ddcf7c1d4d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}
Everywhere else, like etherscan value is displayed as -887220
After some investigation it looks that there is issue with parsing int format especially for negative .
I believe issue is in line https://github.com/q9f/eth.rb/blob/main/lib/eth/abi/decoder.rb#L109
The text was updated successfully, but these errors were encountered: