Giter Club home page Giter Club logo

whack-a-mole's People

Contributors

solidquant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

whack-a-mole's Issues

Can't get the code to work

I'm trying to run main.py, but it keeps giving me this error

PS C:\Users\bmd\bmd\OneDrive\Documents\GitHub\whackamole> & c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/venv/Scripts/Activate.ps1
(venv) PS C:\Users\bmd\OneDrive\Documents\GitHub\whackamole> & c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/venv/Scripts/python.exe c:/Users/bmd/OneDrive/Documents/GitHub/whackamole/main.py
Process Process-1:
Traceback (most recent call last):
File "C:\Users\bmd\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "C:\Users\bmd\AppData\Local\Programs\Python\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "c:\Usersbmd\OneDrive\Documents\GitHub\whackamole\main.py", line 18, in dex_stream_process
dex = DEX({chain: RPC_ENDPOINTS[chain]},
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 450, in init
self.load()
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 132, in load
self._load_pool_data()
File "c:\Users\bmd\OneDrive\Documents\GitHub\whackamole\data\dex.py", line 210, in _load_pool_data
sqrt_price = storage_data[0]
TypeError: 'NoneType' object is not subscriptable

Not sure what went wrong, please kindly look into it. Thanks

Multicall Error

After installing all the packages and ran main.py, I get this error in ubuntu 20.04. But it works well in Windows 10.
I think the problem is that MultiCall has another asyncio creation in the package.

Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dev/arbmon/strategies/dex_arb_base.py", line 57, in dex_stream_process
    dex = DEX({chain: RPC_ENDPOINTS[chain]},
  File "/home/dev/arbmon/data/dex.py", line 431, in __init__
    self.load()
  File "/home/dev/arbmon/data/dex.py", line 128, in load
    self._load_pool_data()
  File "/home/dev/arbmon/data/dex.py", line 166, in _load_pool_data
    **multicall()
  File "/home/dev/.local/lib/python3.10/site-packages/multicall/multicall.py", line 58, in __call__
    response = await_awaitable(self)
  File "/home/dev/.local/lib/python3.10/site-packages/multicall/utils.py", line 73, in await_awaitable
    return get_event_loop().run_until_complete(awaitable)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 625, in run_until_complete
    self._check_running()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 584, in _check_running
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running

I can find another way to get values concurrently in web3.js.

var contract = new web3.eth.Contract(abi, address);

var batch = new web3.BatchRequest();
batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
batch.execute();

https://web3js.readthedocs.io/en/v1.7.0/web3.html#id11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.