diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7217462e..28e2010a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -26,10 +26,10 @@ jobs: - "3.10" - "3.11" os: - - ubuntu-20.04 + - ubuntu-22.04 poetry-version: - 2.0.1 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: PYTHONPATH: . steps: diff --git a/auto_dev/contracts/contract.py b/auto_dev/contracts/contract.py index 96b5a5de..e848e2e5 100644 --- a/auto_dev/contracts/contract.py +++ b/auto_dev/contracts/contract.py @@ -4,6 +4,7 @@ import json from copy import deepcopy from pathlib import Path +from textwrap import dedent import yaml from web3 import Web3 @@ -204,6 +205,7 @@ def update_all(self) -> None: self.update_contract_yaml() self.update_contract_py() self.update_contract_init__() + self.ensure_test_file() # format and lint the contract paths = get_paths(self.path) @@ -211,6 +213,22 @@ def update_all(self) -> None: single_thread_fmt(paths, verbose=True, logger=get_logger()) single_thread_lint(paths, verbose=True, logger=get_logger()) + def ensure_test_file(self) -> None: + """Ensure the test file exists.""" + test_path = self.path / "tests" / f"test_{self.name}.py" + if test_path.exists(): + return + test_path.parent.mkdir(parents=True, exist_ok=True) + + test_template = dedent(f"""{HEADER} +'''This module contains the tests for the {self.name} contract.''' +def test_{self.name.lower()}_contract(): + '''Test the {self.name} contract.''' + assert True + """) + + write_to_file(str(test_path), test_template, FileType.TEXT) + def scaffold_read_function(self, function): """Scaffold a read function.""" return ContractFunction(function, FunctionType.READ) diff --git a/auto_dev/contracts/contract_events.py b/auto_dev/contracts/contract_events.py index 81682b83..72055be3 100644 --- a/auto_dev/contracts/contract_events.py +++ b/auto_dev/contracts/contract_events.py @@ -5,7 +5,7 @@ from auto_dev.utils import camel_to_snake from auto_dev.contracts.utils import SOLIDITY_TO_PYTHON_TYPES from auto_dev.contracts.variable import Variable -from auto_dev.contracts.contract_templates import EVENT_TEMPLATE +from auto_dev.contracts.contract_templates import EVENT_TEMPLATE, GENERIC_EVENT_TEMPLATE @dataclass @@ -35,11 +35,18 @@ def inputs_with_types(self): def to_string(self): """Return the event as a string.""" - return EVENT_TEMPLATE.substitute( - name=camel_to_snake(self.name), - params=("=None,".join([var.to_str_params() for var in self.vars()])) + "=None", + kwargs = {} + if self.vars(): + kwargs=dict(params=("=None,".join([var.to_str_params() for var in self.vars()])) + "=None", args=",".join([var.to_str_arg() for var in self.vars()]), + keywords=", ".join(v.to_key_value() for v in self.vars())) + template = EVENT_TEMPLATE + else: + template = GENERIC_EVENT_TEMPLATE + + return template.substitute( + name=camel_to_snake(self.name), python_names=",".join([var.python_name() for var in self.vars()]), - keywords=", ".join(v.to_key_value() for v in self.vars()), camel_name=self.name, + **kwargs ) diff --git a/auto_dev/contracts/contract_templates.py b/auto_dev/contracts/contract_templates.py index bcd21eb9..03a93691 100644 --- a/auto_dev/contracts/contract_templates.py +++ b/auto_dev/contracts/contract_templates.py @@ -111,6 +111,35 @@ def get_${name}_events( } """ ) +GENERIC_EVENT_TEMPLATE: Template = Template( + """ + @classmethod + def get_${name}_events( + cls, + ledger_api: LedgerApi, + contract_address: str, + look_back: int=1000, + to_block: str="latest", + from_block: int=None + ) -> JSONLike: + \"\"\"Handler method for the '$camel_name' events .\"\"\" + + instance = cls.get_instance(ledger_api, contract_address) + to_block = to_block or "latest" + if to_block == "latest": + to_block = ledger_api.api.eth.block_number + from_block = from_block or (to_block - look_back) + result = instance.events.$camel_name().get_logs( + fromBlock=from_block, + toBlock=to_block, + ) + return { + "events": result, + "from_block": from_block, + "to_block": to_block, + } +""" +) READ_TEST_CASES = [ diff --git a/auto_dev/data/repo/templates/autonomy/install.sh b/auto_dev/data/repo/templates/autonomy/install.sh index d683c406..f48bd0ec 100755 --- a/auto_dev/data/repo/templates/autonomy/install.sh +++ b/auto_dev/data/repo/templates/autonomy/install.sh @@ -161,7 +161,7 @@ function setup_autonomy() { # Extract author from config file with fallback to ci author=$(grep "^author:" ~/.aea/cli_config.yaml 2>/dev/null | sed 's/author:[[:space:]]*//') || author="ci" - poetry run aea init --remote --author $author > /dev/null || exit 1 + poetry run aea init --ipfs --remote --author $author > /dev/null || exit 1 echo 'Done initializing the author and remote for aea using the author: ' $author echo 'To change the author, run the command; `poetry run aea init --remote --author `' diff --git a/contract_list.yaml b/contract_list.yaml deleted file mode 100644 index 0b927dcf..00000000 --- a/contract_list.yaml +++ /dev/null @@ -1,4 +0,0 @@ -block_explorer_url: "https://api-goerli.arbiscan.io" -contracts: - otoken: "0x820348368b5707fD804E98c8286b9af64Eb71A70" - beyond_pricer: "0xc939df369C0Fc240C975A6dEEEE77d87bCFaC259" diff --git a/poetry.lock b/poetry.lock index 6f037f2b..53d803ba 100644 --- a/poetry.lock +++ b/poetry.lock @@ -143,6 +143,7 @@ description = "The Python Anchor client." optional = false python-versions = ">=3.9,<4.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "anchorpy-0.18.0-py3-none-any.whl", hash = "sha256:664672c2de94ed8910173fd3235d918513a927de80612db625f395bc8a0160d1"}, {file = "anchorpy-0.18.0.tar.gz", hash = "sha256:606c49f2dba41046ba60947d19c19eb17587b490b5d1a88642722b42159aa998"}, @@ -177,6 +178,7 @@ description = "Python bindings for Anchor Rust code" optional = false python-versions = ">=3.9" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "anchorpy_core-0.1.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:c9af073115feaab9a7fd14bc9f0d19a87650042bd430e44e9c7714b18f5aeb3a"}, {file = "anchorpy_core-0.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4511a3a9a0425a84305e56087b81969d2929ac642b2c1d6fb2a500c8f987d8d3"}, @@ -226,6 +228,7 @@ description = "High level compatibility layer for multiple asynchronous event lo optional = false python-versions = ">=3.9" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c"}, {file = "anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028"}, @@ -323,6 +326,7 @@ description = "Function decoration for backoff and retry" optional = false python-versions = ">=3.7,<4.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, @@ -387,6 +391,7 @@ description = "A fast Python library for Base58 and Base58Check" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "based58-0.1.1-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:745851792ce5fada615f05ec61d7f360d19c76950d1e86163b2293c63a5d43bc"}, {file = "based58-0.1.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:f8448a71678bd1edc0a464033695686461ab9d6d0bc3282cb29b94f883583572"}, @@ -413,6 +418,7 @@ description = "Modern password hashing for your software and your servers" optional = false python-versions = ">=3.8" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "bcrypt-4.3.0-cp313-cp313t-macosx_10_12_universal2.whl", hash = "sha256:f01e060f14b6b57bbb72fc5b4a83ac21c443c9a2ee708e04a10e9192f90a6281"}, {file = "bcrypt-4.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5eeac541cefd0bb887a371ef73c62c3cd78535e4887b310626036a7c0a817bb"}, @@ -501,6 +507,7 @@ description = "Reference implementation for Bech32 and segwit addresses." optional = false python-versions = ">=3.5" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "bech32-1.2.0-py3-none-any.whl", hash = "sha256:990dc8e5a5e4feabbdf55207b5315fdd9b73db40be294a19b3752cde9e79d981"}, {file = "bech32-1.2.0.tar.gz", hash = "sha256:7d6db8214603bd7871fcfa6c0826ef68b85b0abd90fa21c285a9c5e21d2bd899"}, @@ -709,6 +716,7 @@ description = "Python implementation of Borsh serialization, built on the Constr optional = false python-versions = ">=3.8.3,<4.0.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "borsh-construct-0.1.0.tar.gz", hash = "sha256:c916758ceba70085d8f456a1cc26991b88cb64233d347767766473b651b37263"}, {file = "borsh_construct-0.1.0-py3-none-any.whl", hash = "sha256:f584c791e2a03f8fc36e6c13011a27bcaf028c9c54ba89cd70f485a7d1c687ed"}, @@ -737,6 +745,7 @@ description = "Extensible memoizing collections and decorators" optional = false python-versions = "~=3.5" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "cachetools-4.2.4-py3-none-any.whl", hash = "sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1"}, {file = "cachetools-4.2.4.tar.gz", hash = "sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693"}, @@ -830,7 +839,7 @@ files = [ {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, ] -markers = {dev = "sys_platform == \"linux\" and platform_python_implementation != \"PyPy\""} +markers = {main = "extra == \"all\"", dev = "sys_platform == \"linux\" and platform_python_implementation != \"PyPy\""} [package.dependencies] pycparser = "*" @@ -1085,6 +1094,7 @@ description = "A powerful declarative symmetric parser/builder for binary data" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "construct-2.10.68.tar.gz", hash = "sha256:7b2a3fd8e5f597a5aa1d614c3bd516fa065db01704c72a1efaaeec6ef23d8b45"}, ] @@ -1099,6 +1109,7 @@ description = "Extension for the python package 'construct' that adds typing fea optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "construct-typing-0.5.6.tar.gz", hash = "sha256:0dc501351cd6b308f15ec54e5fe7c0fbc07cc1530a1b77b4303062a0a93c1297"}, {file = "construct_typing-0.5.6-py3-none-any.whl", hash = "sha256:39c948329e880564e33521cba497b21b07967c465b9c9037d6334e2cffa1ced9"}, @@ -1114,6 +1125,7 @@ description = "A library for interacting with the cosmos networks" optional = false python-versions = ">=3.8,<4.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "cosmpy-0.9.2-py3-none-any.whl", hash = "sha256:3591311198b08a0aa75340851ca166669974f17ffaa207a8d2cb26504fb0fa19"}, {file = "cosmpy-0.9.2.tar.gz", hash = "sha256:0f0eb80152f28ef5ee4d846d581d2e34ba2d952900f0e3570cacb84bb376f664"}, @@ -1259,7 +1271,7 @@ files = [ {file = "cryptography-45.0.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bbc505d1dc469ac12a0a064214879eac6294038d6b24ae9f71faae1448a9608d"}, {file = "cryptography-45.0.4.tar.gz", hash = "sha256:7405ade85c83c37682c8fe65554759800a4a8c54b2d96e0f8ad114d31b808d57"}, ] -markers = {dev = "sys_platform == \"linux\""} +markers = {main = "extra == \"all\"", dev = "sys_platform == \"linux\""} [package.dependencies] cffi = {version = ">=1.14", markers = "platform_python_implementation != \"PyPy\""} @@ -1410,6 +1422,7 @@ description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, @@ -1465,6 +1478,7 @@ description = "Python library to use the pseudo-tty of a docker container" optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "dockerpty-0.4.1.tar.gz", hash = "sha256:69a9d69d573a0daa31bcd1c0774eeed5c15c295fe719c61aca550ed1393156ce"}, ] @@ -1479,6 +1493,7 @@ description = "Pythonic argument parser, that will make you smile" optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"}, ] @@ -1787,6 +1802,7 @@ description = "A simple framework for building complex web applications." optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "Flask-2.1.3-py3-none-any.whl", hash = "sha256:9013281a7402ad527f8fd56375164f3aa021ecfaff89bfe3825346c24f87e04c"}, {file = "Flask-2.1.3.tar.gz", hash = "sha256:15972e5017df0575c3d6c090ba168b6db90259e620ac8d7ea813a396bad5b6cb"}, @@ -1941,6 +1957,7 @@ description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8"}, {file = "googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257"}, @@ -1959,6 +1976,7 @@ description = "GraphQL client for Python" optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "gql-3.5.0-py2.py3-none-any.whl", hash = "sha256:70dda5694a5b194a8441f077aa5fb70cc94e4ec08016117523f013680901ecb7"}, {file = "gql-3.5.0.tar.gz", hash = "sha256:ccb9c5db543682b28f577069950488218ed65d4ac70bb03b6929aaadaf636de9"}, @@ -1988,6 +2006,7 @@ description = "GraphQL implementation for Python, a port of GraphQL.js, the Java optional = false python-versions = "<4,>=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "graphql_core-3.2.6-py3-none-any.whl", hash = "sha256:78b016718c161a6fb20a7d97bbf107f331cd1afe53e45566c59f776ed7f0b45f"}, {file = "graphql_core-3.2.6.tar.gz", hash = "sha256:c08eec22f9e40f0bd61d805907e3b3b1b9a320bc606e23dc145eebca07c8fbab"}, @@ -2083,6 +2102,7 @@ description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -2113,6 +2133,7 @@ description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, @@ -2135,6 +2156,7 @@ description = "The next generation HTTP client." optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "httpx-0.23.3-py3-none-any.whl", hash = "sha256:a211fcce9b1254ea24f0cd6af9869b3d29aba40154e947d2a07bb499b3e310d6"}, {file = "httpx-0.23.3.tar.gz", hash = "sha256:9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9"}, @@ -2276,6 +2298,7 @@ description = "Safely pass data to untrusted environments and back." optional = false python-versions = ">=3.8" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, @@ -2370,6 +2393,7 @@ files = [ {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, ] +markers = {main = "extra == \"all\""} [package.dependencies] MarkupSafe = ">=2.0" @@ -2400,6 +2424,7 @@ description = "A microlibrary that defines a Json type alias for Python." optional = false python-versions = ">=3.7,<4.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "jsonalias-0.1.1-py3-none-any.whl", hash = "sha256:a56d2888e6397812c606156504e861e8ec00e188005af149f003c787db3d3f18"}, {file = "jsonalias-0.1.1.tar.gz", hash = "sha256:64f04d935397d579fc94509e1fcb6212f2d081235d9d6395bd10baedf760a769"}, @@ -2412,6 +2437,7 @@ description = "Send JSON-RPC requests" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "jsonrpcclient-4.0.3-py3-none-any.whl", hash = "sha256:3cbb9e27e1be29821becf135ea183144a836215422727e1ffe5056a49a670f0d"}, ] @@ -2675,6 +2701,7 @@ files = [ {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] +markers = {main = "extra == \"all\""} [[package]] name = "mdurl" @@ -2905,6 +2932,7 @@ files = [ {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, ] +markers = {main = "extra == \"all\""} [[package]] name = "morphys" @@ -3174,6 +3202,7 @@ description = "Python package wrapping the public and private key cryptography a optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "open_aea_ledger_cosmos-1.65.0-py3-none-any.whl", hash = "sha256:58a5816c2dc7657cf26a93a934958f3f1b5f7744664770cf182903cd74a0aa22"}, {file = "open_aea_ledger_cosmos-1.65.0.tar.gz", hash = "sha256:8da7f5081ff569eb4caa9a7c2a3afe9c03aa9d0d81f060746f949596ae344304"}, @@ -3211,6 +3240,7 @@ description = "Python package wrapping the public and private key cryptography a optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "open_aea_ledger_solana-1.65.0-py3-none-any.whl", hash = "sha256:d1b01b733b1da655d0b3bc690daa7d26e6dff8135ed41b31c77215f125f915cc"}, {file = "open_aea_ledger_solana-1.65.0.tar.gz", hash = "sha256:0527bed29828616d38438493c14961a60012b3ccbeda2dc7a6bc58f01977009b"}, @@ -3249,6 +3279,7 @@ description = "A framework for the creation of autonomous agent services." optional = false python-versions = ">=3.8" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "open_autonomy-0.19.11-py3-none-any.whl", hash = "sha256:0bf7f7281457092a68995454e985781fb430cd6f01dac076d82d1f874e3417c1"}, {file = "open_autonomy-0.19.11.tar.gz", hash = "sha256:e45dec413ec1005484e315be1ff91914ec1630eb35150e32668beb52bd9b525b"}, @@ -3333,6 +3364,7 @@ description = "SSH2 protocol library" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "paramiko-3.5.1-py3-none-any.whl", hash = "sha256:43b9a0501fc2b5e70680388d9346cf252cfb7d00b0667c39e80eb43a408b8f61"}, {file = "paramiko-3.5.1.tar.gz", hash = "sha256:b2c665bc45b2b215bd7d7f039901b14b067da00f3a11e6640995fd58f2664822"}, @@ -3576,6 +3608,7 @@ description = "Cross-platform lib for process and system monitoring in Python. optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "psutil-7.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25"}, {file = "psutil-7.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da"}, @@ -3689,7 +3722,7 @@ files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -markers = {dev = "sys_platform == \"linux\" and platform_python_implementation != \"PyPy\""} +markers = {main = "extra == \"all\"", dev = "sys_platform == \"linux\" and platform_python_implementation != \"PyPy\""} [[package]] name = "pycryptodome" @@ -3912,6 +3945,7 @@ description = "Python bindings for heck, the Rust case conversion library" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "pyheck-0.1.5-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:44caf2b7a49d71fdeb0469e9f35886987ad815a8638b3c5b5c83f351d6aed413"}, {file = "pyheck-0.1.5-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:316a842b94beff6e59a97dbcc590e9be92a932e59126b0faa9ac750384f27eaf"}, @@ -3973,6 +4007,7 @@ description = "Python binding to the Networking and Cryptography (NaCl) library" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"}, {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"}, @@ -4156,6 +4191,7 @@ description = "A pytest plugin for managing processes across test runs." optional = false python-versions = ">=3.5" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "pytest-xprocess-0.18.1.tar.gz", hash = "sha256:fd9f30ed1584b5833bc34494748adf0fb9de3ca7bacc4e88ad71989c21cba266"}, {file = "pytest_xprocess-0.18.1-py3-none-any.whl", hash = "sha256:6f2aba817d842518d9d9dfb7e9adfe2a6e354a4359f4166bef0822ef4be1c9db"}, @@ -4187,6 +4223,7 @@ files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, ] +markers = {main = "extra == \"all\""} [package.dependencies] six = ">=1.5" @@ -4225,7 +4262,7 @@ description = "Python for Window Extensions" optional = false python-versions = "*" groups = ["main"] -markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" +markers = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "pywin32-310-cp310-cp310-win32.whl", hash = "sha256:6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1"}, {file = "pywin32-310-cp310-cp310-win_amd64.whl", hash = "sha256:c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d"}, @@ -4491,6 +4528,7 @@ files = [ {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, ] +markers = {main = "extra == \"all\""} [package.dependencies] requests = ">=2.0.1,<3.0.0" @@ -4527,6 +4565,7 @@ files = [ {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, ] +markers = {main = "extra == \"all\""} [package.dependencies] idna = {version = "*", optional = true, markers = "extra == \"idna2008\""} @@ -4709,6 +4748,7 @@ description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -4721,6 +4761,7 @@ description = "Solana Python API" optional = false python-versions = ">=3.7,<4.0" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "solana-0.30.2-py3-none-any.whl", hash = "sha256:d7e8295a1f86982ba51e78a65c16ce55f4a9e9caa8938564922a209ddfb2a01f"}, {file = "solana-0.30.2.tar.gz", hash = "sha256:7b16e76cdd1d3024219679cdb73c20324d6d79e3c9766fe0ca52be79ef5ff691"}, @@ -4742,6 +4783,7 @@ description = "Python bindings for Solana Rust tools" optional = false python-versions = ">=3.7" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "solders-0.18.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:1b20230838626fad26d5bdaf8ebe3db3b660ef9f56cc271feca8970d464ea11f"}, {file = "solders-0.18.1-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:3d2503693d0fb0efd37e3f921277327ff664bd04fff551346fad565dd8b9185a"}, @@ -4789,6 +4831,7 @@ description = "Algebraic types for Python (notably providing Sum Types, aka Tagg optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "sumtypes-0.1a6-py2.py3-none-any.whl", hash = "sha256:3e9d71322dd927d25d935072f8be7daec655ea292fd392359a5bb2c1e53dfdc3"}, {file = "sumtypes-0.1a6.tar.gz", hash = "sha256:1a6ff095e06a1885f340ddab803e0f38e3f9bed81f9090164ca9682e04e96b43"}, @@ -4839,6 +4882,7 @@ description = "module to create simple ASCII tables" optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "texttable-1.6.7-py2.py3-none-any.whl", hash = "sha256:b7b68139aa8a6339d2c320ca8b1dc42d13a7831a346b446cb9eb385f0c76310c"}, {file = "texttable-1.6.7.tar.gz", hash = "sha256:290348fb67f7746931bcdfd55ac7584ecd4e5b0846ab164333f0794b121760f2"}, @@ -4958,6 +5002,7 @@ description = "List processing tools and functional utilities" optional = false python-versions = ">=3.5" groups = ["main"] +markers = "implementation_name == \"cpython\" or implementation_name == \"pypy\" or extra == \"all\"" files = [ {file = "toolz-0.11.2-py3-none-any.whl", hash = "sha256:a5700ce83414c64514d82d60bcda8aabfde092d1c1a8663f9200c07fdcc6da8f"}, {file = "toolz-0.11.2.tar.gz", hash = "sha256:6b312d5e15138552f1bda8a4e66c30e236c831b612b2bf0005f8a1df10a4bc33"}, @@ -5019,6 +5064,7 @@ description = "Typing stubs for cachetools" optional = false python-versions = "*" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "types-cachetools-4.2.10.tar.gz", hash = "sha256:b1cb18aaff25d2ad47a060413c660c39fadddb01f72012dd1134584b1fdaada5"}, {file = "types_cachetools-4.2.10-py3-none-any.whl", hash = "sha256:48301115189d4879d0960baac5a8a2b2d31ce6129b2ce3b915000ed337284898"}, @@ -5102,6 +5148,7 @@ description = "Multi-container orchestration for Docker" optional = false python-versions = ">=3.4" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "valory-docker-compose-1.29.3.tar.gz", hash = "sha256:77469ff7493e0317ccc8d92264323d62eee23c810536184d705b833e0cbb6a03"}, {file = "valory_docker_compose-1.29.3-py2.py3-none-any.whl", hash = "sha256:7f5d1eceb080d0512e2f5d16b57eaaf9a742b02da0878b71041217ec7cef53fe"}, @@ -5195,6 +5242,7 @@ files = [ {file = "watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f"}, {file = "watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282"}, ] +markers = {main = "extra == \"all\""} [package.extras] watchmedo = ["PyYAML (>=3.10)"] @@ -5351,6 +5399,7 @@ description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "Werkzeug-2.0.3-py3-none-any.whl", hash = "sha256:1421ebfc7648a39a5c58c601b154165d05cf47a3cd0ccb70857cbdacf6c8f2b8"}, {file = "Werkzeug-2.0.3.tar.gz", hash = "sha256:b863f8ff057c522164b6067c9e28b041161b4be5ba4d0daceeaa50a163822d3c"}, @@ -5505,6 +5554,7 @@ description = "Zstandard bindings for Python" optional = false python-versions = ">=3.6" groups = ["main"] +markers = "extra == \"all\"" files = [ {file = "zstandard-0.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef7e8a200e4c8ac9102ed3c90ed2aa379f6b880f63032200909c1be21951f556"}, {file = "zstandard-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2dc466207016564805e56d28375f4f533b525ff50d6776946980dff5465566ac"}, @@ -5564,4 +5614,4 @@ all = ["isort", "open-aea", "open-aea-ledger-cosmos", "open-aea-ledger-ethereum" [metadata] lock-version = "2.1" python-versions = ">=3.10,<3.13" -content-hash = "5c3b8da8bd889d80ee09b06c5054d79738d97ae11f01a4f9fb205d23debefe8c" +content-hash = "3c3f57e440c946eb9b077f8175e184d0a9e1739ac7035bbe3c1b106a0aac378f" diff --git a/pyproject.toml b/pyproject.toml index 898e701b..7c96a0ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ open-aea-ledger-ethereum = "==1.65.0" open-aea-ledger-solana = "==1.65.0" open-aea-ledger-cosmos = "==1.65.0" open-aea-cli-ipfs = "==1.65.0" -web3 = ">=6.0.0,<7.0.0" +web3 = ">=6.0.0,<8.0.0" ipfshttpclient = "==0.8.0a2" typing_extensions = ">=3.10.0.2" protobuf = ">=3.19.1,<4.25.0" diff --git a/rysk_contracts.yaml b/rysk_contracts.yaml deleted file mode 100644 index 628e72d8..00000000 --- a/rysk_contracts.yaml +++ /dev/null @@ -1,24 +0,0 @@ -block_explorer_url: "https://api.arbiscan.io" -contracts: - USDC: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8" - ArbFiatToken: "0x1eFB3f88Bc88f03FD1804A5C53b7141bbEf5dED8" - # OpynController: "0x11a602a5F5D823c103bb8b7184e22391Aae5F4C2" - # OpynAddressBook: "0xd6e67bF0b1Cdb34C37f31A2652812CB30746a94A" - # OpynOracle: "0x35578F5A49E1f1Cf34ed780B46A0BdABA23D4C0b" - # OpynNewCalculator: "0xcD270e755C2653e806e16dD3f78E16C89B7a1c9e" - # OpynOptionRegistry: "0x48A74b742bd97545ace8B0876F5BA7ED19DF6579" - # priceFeed: "0xDcA6c35228acb82363406CB2e7eee81B40c692aE" - # volFeed: "0x9Fc909273C6aF5b6fFd389Fa2B44492ff88a3be6" - # optionProtocol: "0x865Bd85b7275a33C87E8a7E31a125DD6338e6747" - # liquidityPool: "0x2ceDe96cd46C9B751EeB868A57FEDeD060Dbe6Bf" - # authority: "0xA524f4F9046a243c67A07dDE2D9477bf320Ed89E" - # portfolioValuesFeed: "0xbFC1eDc5c07ada83e0244b37A784486633910cD7" - # optionHandler: "0x8a265fa22aa5AF86fa763dC2cF04661bf06A52E6" - # opynInteractions: "0x5e5A98E2F7c71B159B9Ed771E4138d4B2464708c" - # normDist: "0xf63395764CAA20a54bF33fdCCdbC03b2BDc67453" - # BlackScholes: "0x8D3ac248d2598c0C43e1D48e5ad59093F9Cb1d40" - # optionsCompute: "0x8090b463afd758B59089905dc956300824cb2388" - # accounting: "0xCCc6ebF870aCcD83043e8dafaeB4366A4D1a2836" - # uniswapV3HedgingReactor: "0xE5b8F3b414a80b8C40ba438292Eb37918324d285" - # perpHedgingReactor: "0x34f5c89fC6b053728F264cd7f9F1cdFB887AEf86" - # WETH: "0x53320bE2A35649E9B2a0f244f9E9474929d3B699" \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..06ba2441 --- /dev/null +++ b/shell.nix @@ -0,0 +1,57 @@ +with import {}; + +mkShell { + NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ + nss + sane-backends + nspr + zlib + libglvnd + gcc + openssl + openssl_legacy + bzip2 + libffi + readline + libgcc + ncurses + stdenv.cc + stdenv.cc.libc stdenv.cc.libc_dev + ]; + + buildInputs = [ + pkgs.python311 + pkgs.python311Packages.pip + pkgs.python311Packages.virtualenv + pkgs.python311Packages.unicurses + pkgs.python311Packages.gnureadline + pkgs.python311Packages.pyopenssl + pkgs.python311Packages.cython + pkgs.python311Packages.cytoolz + pkgs.pythonManylinuxPackages.manylinux2014Package + pkgs.cmake + ]; + + # NIX_LD = builtins.readFile "${stdenv.cc}/nix-support/dynamic-linker"; + + shellHook = '' + set -e + export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib.outPath}/lib:${pkgs.pythonManylinuxPackages.manylinux2014Package}/lib:$LD_LIBRARY_PATH"; + echo 'Spinning up Python Virtual Environment in .nix-venv directory 🐍' + ${pkgs.python311.interpreter} -m venv .nix-venv + export PATH=$PWD/.nix-venv/bin:$PATH + + echo "Python version: $(which python) $(python --version)" + echo $(pip show cytoolz) + + + # Check if poetry is installed + if ! command -v poetry &> /dev/null; then + echo 'Installing poetry 🐍' + .nix-venv/bin/pip install poetry==2.0.1 poetry-core + fi + + # Ensure virtual environment dependencies + ''; +} + diff --git a/tests/test_repo.py b/tests/test_repo.py index a2eab91d..1e311ea4 100644 --- a/tests/test_repo.py +++ b/tests/test_repo.py @@ -49,7 +49,7 @@ def test_autonomy_repo(cli_runner, test_clean_filesystem): _test_repo_scaffold( repo_type="autonomy", - make_commands=("fmt", "lint", "test", "hashes"), + make_commands=("fmt", "lint", "test",), cli_runner=cli_runner, test_clean_filesystem=test_clean_filesystem, )