Skip to main content

No project description provided

Project description

Rysk Client

Installation

Dev

dependencies are managed with poetry.

For dev build.

!poetry install && poetry run pip install -e .
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: rysk_client (0.1.0)Installing the current project: rysk_client (0.1.0)
Obtaining file:///home/tom/Desktop/Fun/rysk_examples
  Installing build dependencies ... [?25ldone
[?25h  Checking if build backend supports build_editable ... [?25ldone
[?25h  Getting requirements to build editable ... [?25ldone
[?25h  Preparing editable metadata (pyproject.toml) ... [?25ldone
[?25hRequirement already satisfied: web3<6.0.0,>=5.4.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from rysk-client==0.1.0) (5.31.4)
Requirement already satisfied: ccxt<4.0.0,>=3.1.15 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from rysk-client==0.1.0) (3.1.15)
Requirement already satisfied: certifi>=2018.1.18 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (2023.5.7)
Requirement already satisfied: aiohttp>=3.8 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (3.8.4)
Requirement already satisfied: yarl>=1.7.2 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (1.9.2)
Requirement already satisfied: aiodns>=1.1.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (3.0.0)
Requirement already satisfied: requests>=2.18.4 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (2.31.0)
Requirement already satisfied: cryptography>=2.6.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (40.0.2)
Requirement already satisfied: setuptools>=60.9.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (67.8.0)
Requirement already satisfied: lru-dict<2.0.0,>=1.1.6 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (1.2.0)
Requirement already satisfied: eth-utils<2.0.0,>=1.9.5 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (1.10.0)
Requirement already satisfied: jsonschema<5,>=3.2.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (4.17.3)
Requirement already satisfied: protobuf==3.19.5 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (3.19.5)
Requirement already satisfied: websockets<10,>=9.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (9.1)
Requirement already satisfied: ipfshttpclient==0.8.0a2 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.8.0a2)
Requirement already satisfied: hexbytes<1.0.0,>=0.1.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.3.0)
Requirement already satisfied: eth-typing<3.0.0,>=2.0.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (2.3.0)
Requirement already satisfied: eth-abi<3.0.0,>=2.2.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (2.2.0)
Requirement already satisfied: eth-hash[pycryptodome]<1.0.0,>=0.2.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.3.3)
Requirement already satisfied: eth-rlp<0.3 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.2.1)
Requirement already satisfied: eth-account<0.6.0,>=0.5.9 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.5.9)
Requirement already satisfied: multiaddr>=0.0.7 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from ipfshttpclient==0.8.0a2->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.0.9)
Requirement already satisfied: pycares>=4.0.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiodns>=1.1.1->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (4.3.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (4.0.2)
Requirement already satisfied: attrs>=17.3.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (23.1.0)
Requirement already satisfied: aiosignal>=1.1.2 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (1.3.1)
Requirement already satisfied: frozenlist>=1.1.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (1.3.3)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (3.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from aiohttp>=3.8->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (6.0.4)
Requirement already satisfied: cffi>=1.12 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from cryptography>=2.6.1->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (1.15.1)
Requirement already satisfied: parsimonious<0.9.0,>=0.8.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-abi<3.0.0,>=2.2.0->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.8.1)
Requirement already satisfied: rlp<3,>=1.0.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-account<0.6.0,>=0.5.9->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (2.0.1)
Requirement already satisfied: eth-keys<0.4.0,>=0.3.4 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-account<0.6.0,>=0.5.9->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.3.4)
Requirement already satisfied: eth-keyfile<0.6.0,>=0.5.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-account<0.6.0,>=0.5.9->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.5.1)
Requirement already satisfied: bitarray<3,>=1.2.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-account<0.6.0,>=0.5.9->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (2.7.3)
Requirement already satisfied: pycryptodome<4,>=3.6.6 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-hash[pycryptodome]<1.0.0,>=0.2.0->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (3.18.0)
Requirement already satisfied: cytoolz<1.0.0,>=0.10.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from eth-utils<2.0.0,>=1.9.5->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.12.1)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from jsonschema<5,>=3.2.0->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.19.3)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from requests>=2.18.4->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (2.0.2)
Requirement already satisfied: idna<4,>=2.5 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from requests>=2.18.4->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (3.4)
Requirement already satisfied: pycparser in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=2.6.1->ccxt<4.0.0,>=3.1.15->rysk-client==0.1.0) (2.21)
Requirement already satisfied: toolz>=0.8.0 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<2.0.0,>=1.9.5->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.12.0)
Requirement already satisfied: netaddr in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (0.8.0)
Requirement already satisfied: six in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (1.16.0)
Requirement already satisfied: base58 in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (2.1.1)
Requirement already satisfied: varint in /home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3<6.0.0,>=5.4.0->rysk-client==0.1.0) (1.0.2)
Building wheels for collected packages: rysk-client
  Building editable for rysk-client (pyproject.toml) ... [?25ldone
[?25h  Created wheel for rysk-client: filename=rysk_client-0.1.0-py3-none-any.whl size=1115 sha256=302ea12484ef8ca6e503f752bea324ec0937cfed1189ddf795bd971f6ea5953e
  Stored in directory: /tmp/pip-ephem-wheel-cache-iidmqn1u/wheels/d0/5d/c5/06071ec2d9be7dfabf83e13d497e7bd4b06d0041d896c67705
Successfully built rysk-client
Installing collected packages: rysk-client
  Attempting uninstall: rysk-client
    Found existing installation: rysk-client 0.1.0
    Uninstalling rysk-client-0.1.0:
      Successfully uninstalled rysk-client-0.1.0
Successfully installed rysk-client-0.1.0

[notice] A new release of pip available: 22.2.2 -> 23.1.2
[notice] To update, run: pip install --upgrade pip

Usage

from rysk_client.src.utils import get_web3

web3 = get_web3()
web3.isConnected()
True

Creating a Client

Clients can be created from the rysk client module.

from rysk_client.client import RyskClient

client = RyskClient()
client
RyskClient(_markets=[])

Fetching Markets

The client can fetch markets as so;

markets = client.fetch_markets()
markets[0]
{'base': 'ETH',
 'baseId': 'ETH',
 'contract': True,
 'contractSize': 0.1,
 'spot': False,
 'swap': False,
 'future': False,
 'type': 'option',
 'linear': False,
 'inverse': True,
 'active': True,
 'id': 'ETH-30JUN23-1700-P',
 'strike': 1700.0,
 'optionType': 'put',
 'expiry': 1688112000000,
 'expiryDatetime': '2023-06-30T09:00:00.000000Z',
 'info': {'id': '0x01f460be7389b109cc3599941166ea851d0b7c787badf04b1f276d3ce9269a34',
  'expiration': '1688112000',
  'netDHVExposure': '-302750000000000000000',
  'strike': '1700000000000000000000',
  'isPut': True,
  'isBuyable': True,
  'isSellable': True,
  'expiration_datetime': datetime.datetime(2023, 6, 30, 9, 0)},
 'symbol': 'ETH-30JUN23-1700-P',
 'maker': 0.0003,
 'taker': 0.0003}

Fetching Tickers

Tickers can be fetched from the client as so;

tickers = client.fetch_tickers()
tickers[0]
{'ask': 79.375856,
 'bid': 75.910889,
 'info': {'base': 'ETH',
  'baseId': 'ETH',
  'contract': True,
  'contractSize': 0.1,
  'spot': False,
  'swap': False,
  'future': False,
  'type': 'option',
  'linear': False,
  'inverse': True,
  'active': True,
  'id': 'ETH-30JUN23-1700-P',
  'strike': 1700.0,
  'optionType': 'put',
  'expiry': 1688112000000,
  'expiryDatetime': '2023-06-30T09:00:00.000000Z',
  'info': {'id': '0x01f460be7389b109cc3599941166ea851d0b7c787badf04b1f276d3ce9269a34',
   'expiration': '1688112000',
   'netDHVExposure': '-302750000000000000000',
   'strike': '1700000000000000000000',
   'isPut': True,
   'isBuyable': True,
   'isSellable': True,
   'expiration_datetime': datetime.datetime(2023, 6, 30, 9, 0)},
  'symbol': 'ETH-30JUN23-1700-P',
  'maker': 0.0003,
  'taker': 0.0003}}

Fetching Positions

Positions are fetched from the client such that a user can retrieve their positions.

Positions are indicated by a vault id.

The vaultid iterates when a new position is created.

Vaultid can be retrieved from;

#TODO

positions = client.fetch_positions()
positions
[]

Tests

!make test
poetry run adev test -v -p tests
Testing Open Autonomy Packages
[10:34:59] INFO     [1m============================= test     ]8;id=171191;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O72xupT4-py3.10/lib/python3.10/site-packages/auto_dev/cli_executor.py\cli_executor.py]8;;\:]8;id=497266;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O72xupT4-py3.10/lib/python3.10/site-packages/auto_dev/cli_executor.py#36\36]8;;\
                    session starts                                              
                    ==============================[0m                           
                    platform linux -- Python 3.10.4,                            
                    pytest-7.3.1, pluggy-1.0.0                                  
                    rootdir:                                                    
                    /home/tom/Desktop/Fun/rysk_explorations                     
                    configfile: pytest.ini                                      
                    plugins: cov-3.0.0, pylama-8.4.1,                           
                    web3-5.31.4, anyio-3.7.0                                    
                    collected 21 items                                          
                                                                                
                    tests/test_client.py                                        
                    [32m.[0m[32m.[0m[31mF[0m[31m                                
                    [ 14%][0m                                                   
                    tests/test_collateral.py                                    
                    [32m.[0m[32m.[0m[32m.[0m[32m.[0m                            
                    [32m.[0m[32m.[0m[31m                                        
                                   [ 42%][0m                                    
                    tests/test_rysk_option_market.py                            
                    [32m.[0m[32m.[0m[31m                                        
                    [ 52%][0m                                                   
                    tests/test_subgraph.py [32m.[0m[31m                         
                    [ 57%][0m                                                   
                    tests/test_utils.py                                         
                    [31mF[0m[32m.[0m[32m.[0m[31mF[0m                            
                    [32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m                    
                    [31m                                                        
                    [100%][0m                                                   
                                                                                
                    ===================================                         
                    FAILURES                                                    
                    ===================================                         
                    [31m[1m_____________________________                        
                    test_fetch_positions                                        
                    _____________________________[0m                            
                                                                                
                    client = RyskClient(_markets=[])                            
                                                                                
                        [94mdef[39;49;00m                                       
                    [92mtest_fetch_positions[39;49;00m(client                   
                    :[90m[39;49;00m                                             
                        [90m    [39;49;00m[33m"""Test                           
                    fetching                                                    
                    positions."""[39;49;00m[90m[39;49;00m                       
                            positions =                                         
                    client.fetch_positions()[90m[39;49;00m                      
                    >       [94massert[39;49;00m                                
                    [96mlen[39;49;00m(positions) >                              
                    [94m0[39;49;00m[90m[39;49;00m                               
                    [1m[31mE       assert 0 > 0[0m                              
                    [1m[31mE        +  where 0 = len([])[0m                     
                                                                                
                    [1m[31mtests/test_client.py[0m:34:                          
                    AssertionError                                              
                    [31m[1m______________________________                       
                    test_get_contract                                           
                    _______________________________[0m                          
                                                                                
                    web3 = <web3.main.Web3 object at                            
                    0x7f189d5c16f0>                                             
                                                                                
                        [94mdef[39;49;00m                                       
                    [92mtest_get_contract[39;49;00m(web3):[90                   
                    m[39;49;00m                                                 
                        [90m    [39;49;00m[33m"""Test whether                   
                    we can get a contract                                       
                    instance."""[39;49;00m[90m[39;49;00m                        
                    >       contract =                                          
                    get_contract([33m"[39;49;00m[33mopyn_cont                   
                    roller[39;49;00m[33m"[39;49;00m,                            
                    web3)[90m[39;49;00m                                         
                                                                                
                    [1m[31mtests/test_utils.py[0m:19:                           
                    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                   
                    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                       
                                                                                
                    name = 'opyn_controller', w3 =                              
                    <web3.main.Web3 object at 0x7f189d5c16f0>                   
                                                                                
                        [94mdef[39;49;00m                                       
                    [92mget_contract[39;49;00m(name,                            
                    w3):[90m[39;49;00m                                          
                        [90m    [39;49;00m[33m"""Returns a                      
                    web3 contract instance for the given                        
                    contract name"""[39;49;00m[90m[39;49;00m                    
                            spec = ADDRESSES[90m[39;49;00m                      
                    >       [94mwith[39;49;00m                                  
                    [96mopen[39;49;00m(spec[[33m"[39;49;00m[                    
                    33mpath[39;49;00m[33m"[39;49;00m],                          
                    [33m"[39;49;00m[33mr[39;49;00m[33m"[39;                     
                    49;00m) [94mas[39;49;00m abi:[90m[39;49;0                   
                    [1m[31mE       FileNotFoundError: [Errno                    
                    2] No such file or directory:                               
                    'contracts/tmp_controller.json'[0m                          
                                                                                
                    [1m[31mrysk_client/src/utils.py[0m:12:                      
                    FileNotFoundError                                           
                    [31m[1m__________________                                   
                    test_get_contract_address                                   
                    __________________[0m                                       
                                                                                
                    address = 'opyn_controller', web3 =                         
                    <web3.main.Web3 object at 0x7f189d5c16f0>                   
                                                                                
                        [37m@pytest[39;49;00m.mark.parametriz                   
                    [33m"[39;49;00m[33maddress[39;49;00m[33                     
                    m"[39;49;00m,                                               
                    ADDRESSES.keys())[90m[39;49;00m                             
                        [94mdef[39;49;00m                                       
                    [92mtest_get_contract_address[39;49;00m(                    
                    address, web3):[90m[39;49;00m                               
                        [90m    [39;49;00m[33m"""Test whether                   
                    we can get the contract address for a                       
                    given contract                                              
                    name"""[39;49;00m[90m[39;49;00m                             
                    >       contract = get_contract(address,                    
                    web3)[90m[39;49;00m                                         
                                                                                
                    [1m[31mtests/test_utils.py[0m:31:                           
                    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                   
                    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _                       
                                                                                
                    name = 'opyn_controller', w3 =                              
                    <web3.main.Web3 object at 0x7f189d5c16f0>                   
                                                                                
                        [94mdef[39;49;00m                                       
                    [92mget_contract[39;49;00m(name,                            
                    w3):[90m[39;49;00m                                          
                        [90m    [39;49;00m[33m"""Returns a                      
                    web3 contract instance for the given                        
                    contract name"""[39;49;00m[90m[39;49;00m                    
                            spec = ADDRESSES[90m[39;49;00m                      
                    >       [94mwith[39;49;00m                                  
                    [96mopen[39;49;00m(spec[[33m"[39;49;00m[                    
                    33mpath[39;49;00m[33m"[39;49;00m],                          
                    [33m"[39;49;00m[33mr[39;49;00m[33m"[39;                     
                    49;00m) [94mas[39;49;00m abi:[90m[39;49;0                   
                    [1m[31mE       FileNotFoundError: [Errno                    
                    2] No such file or directory:                               
                    'contracts/tmp_controller.json'[0m                          
                                                                                
                    [1m[31mrysk_client/src/utils.py[0m:12:                      
                    FileNotFoundError                                           
                    [36m[1m=========================== short                    
                    test summary info                                           
                    ============================[0m                             
                    [31mFAILED[0m                                               
                    tests/test_client.py::[1mtest_fetch_posit                   
                    ons[0m - assert 0 > 0                                       
                    [31mFAILED[0m                                               
                    tests/test_utils.py::[1mtest_get_contract                   
                    [0m - FileNotFoundError: [Errno 2] No                       
                    such file or directory:                                     
                    'contracts/tmp_cont...                                      
                    [31mFAILED[0m                                               
                    tests/test_utils.py::[1mtest_get_contract                   
                    address[0m - FileNotFoundError: [Errno                      
                    2] No such file or directory:                               
                    'contracts/tmp_cont...                                      
                    [31m======================== [31m[1m3                       
                    failed[0m, [32m18 passed[0m[31m in                          
                    12.59s[0m[31m                                               
                    =========================[0m                                
                                                                                
           ERROR    Command failed with return code: 1        ]8;id=829203;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O72xupT4-py3.10/lib/python3.10/site-packages/auto_dev/cli_executor.py\cli_executor.py]8;;\:]8;id=73972;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O72xupT4-py3.10/lib/python3.10/site-packages/auto_dev/cli_executor.py#42\42]8;;\
Testing... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:14
[?25h╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Testing failed!                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
                                                                                
make: *** [Makefile:48: test] Error 1
!make fmt lint
poetry run isort tests rysk_client && poetry run black tests rysk_client
Fixing /home/tom/Desktop/Fun/rysk_examples/rysk_client/src/rysk_option_market.py
reformatted rysk_client/src/rysk_option_market.py

All done! ✨ 🍰 ✨
1 file reformatted, 15 files left unchanged.
poetry run adev lint -v -p tests
[23:54:34] INFO     Linting Open Autonomy Packages                     ]8;id=796249;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages/auto_dev/cli.py\cli.py]8;;\:]8;id=193368;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages/auto_dev/cli.py#47\47]8;;\
Linting... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:14
[?25h[23:54:48] INFO     Linting completed successfully!                    ]8;id=997455;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages/auto_dev/cli.py\cli.py]8;;\:]8;id=911636;file:///home/tom/.cache/pypoetry/virtualenvs/rysk-client-O5czFfvY-py3.10/lib/python3.10/site-packages/auto_dev/cli.py#66\66]8;;\
!make build
poetry run isort tests rysk_client && poetry run black tests rysk_client
Fixing /home/tom/Desktop/Fun/rysk_examples/rysk_client/src/rysk_option_market.py
reformatted rysk_client/src/rysk_option_market.py

All done! ✨ 🍰 ✨
1 file reformatted, 15 files left unchanged.
poetry run jupyter-nbconvert README.ipynb --to markdown && poetry run jupyter-nbconvert README.ipynb --to python
[NbConvertApp] Converting notebook README.ipynb to markdown
[NbConvertApp] Writing 53191 bytes to README.md
[NbConvertApp] Converting notebook README.ipynb to python
[NbConvertApp] Writing 1179 bytes to README.py


          

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rysk_client-0.1.3.tar.gz (366.6 kB view details)

Uploaded Source

Built Distribution

rysk_client-0.1.3-py3-none-any.whl (491.9 kB view details)

Uploaded Python 3

File details

Details for the file rysk_client-0.1.3.tar.gz.

File metadata

  • Download URL: rysk_client-0.1.3.tar.gz
  • Upload date:
  • Size: 366.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for rysk_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 149c2a23e49bc0146bf8706109b6e6592c4357cb5b23f6e935fe7f8de0469379
MD5 680cd0aae5a3b306fdcef6cab1aa28a7
BLAKE2b-256 7aea2defdabb6ebaea7d8923f8fed728dc23656e03145fa8f36c61faaa5867c3

See more details on using hashes here.

Provenance

File details

Details for the file rysk_client-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rysk_client-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 491.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for rysk_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 778dbed924d58b7ede107c3bb101c3ff7c88caac28a2c60922b9bdfbf3018311
MD5 937b37aa34b01424d9a256425325bc19
BLAKE2b-256 ac217c9db2f282d8a6525eb62cb1411f9d62480ef83f5d8425d06cd193cc8c74

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page