diff --git a/Makefile b/Makefile index 5235a487a..b507e4be3 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ security: .PHONY: generators generators: clean-cache fix-abci-app-specs tox -e abci-docstrings - tomte format-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci + tomte format-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci --exclude-part http_server autonomy packages lock tox -e fix-doc-hashes diff --git a/packages/packages.json b/packages/packages.json index 1976e2ac9..fb232b469 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -18,8 +18,8 @@ "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaybhcckjudnmelw3vc4mhw7fmydisyguanvlb2h6kdbhke3kjsvi", "skill/valory/staking_abci/0.1.0": "bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi", - "agent/valory/trader/0.1.0": "bafybeiczhuenxymwnoankdarwogerydxmzkjeefe6anokksaok25dto6nu", - "service/valory/trader/0.1.0": "bafybeih3l6tcadclvaumuvgyle3jgt52d6o7s5rb4r34tfmzsic25bmwje" + "agent/valory/trader/0.1.0": "bafybeif4ssbi37xitim37xrhy3s2udsh3urxz4qcedb4zld5qqhsnyssqm", + "service/valory/trader/0.1.0": "bafybeigjo346bffktt4hyiycvrmx2yjsn26pma2zvycio6bka3vui7g244" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 1aa1eb06b..83937b6ed 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -249,6 +249,77 @@ models: part_prefix_mode: ${bool:true} bet_amount_field: ${str:collateral_amount} results_filename: ${str:benchmarking_results.csv} + network_subgraph: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:POST} + response_key: ${str:data:blocks} + response_index: ${int:0} + response_type: ${str:dict} + retries: ${int:5} + url: ${str:https://api.thegraph.com/subgraphs/name/stakewise/ethereum-gnosis} + omen_subgraph: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:POST} + response_key: ${str:data:fixedProductMarketMakers} + response_type: ${str:list} + retries: ${int:5} + url: ${str:https://api.thegraph.com/subgraphs/name/protofire/omen-xdai} + randomness_api: + args: + method: ${str:GET} + response_key: ${str:null} + response_type: ${str:dict} + retries: ${int:5} + url: ${str:https://drand.cloudflare.com/public/latest} + mech_response: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:GET} + response_key: ${str:result} + response_type: ${str:str} + retries: ${int:5} + url: ${str:''} + agent_tools: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:GET} + response_key: ${str:tools} + response_type: ${str:list} + retries: ${int:5} + url: ${str:''} + trades_subgraph: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:POST} + response_key: ${str:data:fpmmTrades} + response_type: ${str:list} + retries: ${int:5} + url: ${str:https://api.thegraph.com/subgraphs/name/protofire/omen-xdai} + conditional_tokens_subgraph: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:POST} + response_key: ${str:data:user:userPositions} + response_type: ${str:list} + retries: ${int:5} + url: ${str:https://api.thegraph.com/subgraphs/name/gnosis/conditional-tokens-gc} + realitio_subgraph: + args: + headers: + Content-Type: ${str:application/json} + method: ${str:POST} + response_key: ${str:data:answers} + response_type: ${str:list} + retries: ${int:5} + url: ${str:https://api.thegraph.com/subgraphs/name/realityeth/realityeth-gnosis} --- public_id: valory/p2p_libp2p_client:0.1.0 type: connection diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 8c6c2c378..09cd96544 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeiczhuenxymwnoankdarwogerydxmzkjeefe6anokksaok25dto6nu +agent: valory/trader:0.1.0:bafybeif4ssbi37xitim37xrhy3s2udsh3urxz4qcedb4zld5qqhsnyssqm number_of_agents: 4 deployment: agent: @@ -161,6 +161,77 @@ type: skill part_prefix_mode: ${BENCHMARKING_MODE_PART_PREFIX_MODE:bool:true} bet_amount_field: ${BENCHMARKING_MODE_BET_AMOUNT_FIELD:str:collateral_amount} results_filename: ${BENCHMARKING_MODE_RESULTS_FILENAME:str:benchmarking_results.csv} + network_subgraph: &id005 + args: + headers: + Content-Type: ${NETWORK_SUBGRAPH_CONTENT_TYPE:str:application/json} + method: ${NETWORK_SUBGRAPH_METHOD:str:POST} + response_key: ${NETWORK_SUBGRAPH_RESPONSE_KEY:str:data:blocks} + response_index: ${NETWORK_SUBGRAPH_RESPONSE_INDEX:int:0} + response_type: ${NETWORK_SUBGRAPH_RESPONSE_TYPE:str:dict} + retries: ${NETWORK_SUBGRAPH_RETRIES:int:5} + url: ${NETWORK_SUBGRAPH_URL:str:https://api.thegraph.com/subgraphs/name/stakewise/ethereum-gnosis} + omen_subgraph: &id006 + args: + headers: + Content-Type: ${OMEN_SUBGRAPH_CONTENT_TYPE:str:application/json} + method: ${OMEN_SUBGRAPH_METHOD:str:POST} + response_key: ${OMEN_SUBGRAPH_RESPONSE_KEY:str:data:fixedProductMarketMakers} + response_type: ${OMEN_SUBGRAPH_RESPONSE_TYPE:str:list} + retries: ${OMEN_SUBGRAPH_RETRIES:int:5} + url: ${OMEN_SUBGRAPH_URL:str:https://api.thegraph.com/subgraphs/name/protofire/omen-xdai} + randomness_api: &id007 + args: + method: ${RANDOMNESS_API_METHOD:str:GET} + response_key: ${RANDOMNESS_API_RESPONSE_KEY:str:null} + response_type: ${RANDOMNESS_API_RESPONSE_TYPE:str:dict} + retries: ${RANDOMNESS_API_RETRIES:int:5} + url: ${RANDOMNESS_API_URL:str:https://drand.cloudflare.com/public/latest} + mech_response: &id008 + args: + headers: + Content-Type: ${MECH_RESPONSE_API_CONTENT_TYPE:str:application/json} + method: ${MECH_RESPONSE_API_METHOD:str:GET} + response_key: ${MECH_RESPONSE_API_RESPONSE_KEY:str:result} + response_type: ${MECH_RESPONSE_API_RESPONSE_TYPE:str:str} + retries: ${MECH_RESPONSE_API_RETRIES:int:5} + url: ${MECH_RESPONSE_API_URL:str:''} + agent_tools: &id009 + args: + headers: + Content-Type: ${AGENT_TOOLS_API_CONTENT_TYPE:str:application/json} + method: ${AGENT_TOOLS_API_METHOD:str:GET} + response_key: ${AGENT_TOOLS_API_RESPONSE_KEY:str:tools} + response_type: ${AGENT_TOOLS_API_RESPONSE_TYPE:str:list} + retries: ${AGENT_TOOLS_API_RETRIES:int:5} + url: ${AGENT_TOOLS_API_URL:str:''} + trades_subgraph: &id010 + args: + headers: + Content-Type: ${TRADES_SUBGRAPH_CONTENT_TYPE:str:application/json} + method: ${TRADES_SUBGRAPH_METHOD:str:POST} + response_key: ${TRADES_SUBGRAPH_RESPONSE_KEY:str:data:fpmmTrades} + response_type: ${TRADES_SUBGRAPH_RESPONSE_TYPE:str:list} + retries: ${TRADES_SUBGRAPH_RETRIES:int:5} + url: ${TRADES_SUBGRAPH_URL:str:https://api.thegraph.com/subgraphs/name/protofire/omen-xdai} + conditional_tokens_subgraph: &id011 + args: + headers: + Content-Type: ${CONDITIONAL_TOKENS_SUBGRAPH_CONTENT_TYPE:str:application/json} + method: ${CONDITIONAL_TOKENS_SUBGRAPH_METHOD:str:POST} + response_key: ${CONDITIONAL_TOKENS_SUBGRAPH_RESPONSE_KEY:str:data:user:userPositions} + response_type: ${CONDITIONAL_TOKENS_SUBGRAPH_RESPONSE_TYPE:str:list} + retries: ${CONDITIONAL_TOKENS_SUBGRAPH_RETRIES:int:5} + url: ${CONDITIONAL_TOKENS_SUBGRAPH_URL:str:https://api.thegraph.com/subgraphs/name/gnosis/conditional-tokens-gc} + realitio_subgraph: &id012 + args: + headers: + Content-Type: ${REALITIO_SUBGRAPH_CONTENT_TYPE:str:application/json} + method: ${REALITIO_SUBGRAPH_METHOD:str:POST} + response_key: ${REALITIO_SUBGRAPH_RESPONSE_KEY:str:data:answers} + response_type: ${REALITIO_SUBGRAPH_RESPONSE_TYPE:str:list} + retries: ${REALITIO_SUBGRAPH_RETRIES:int:5} + url: ${REALITIO_SUBGRAPH_URL:str:https://api.thegraph.com/subgraphs/name/realityeth/realityeth-gnosis} 1: models: params: @@ -264,6 +335,14 @@ type: skill rpc_sleep_time: ${RPC_SLEEP_TIME:int:10} mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10} benchmark_tool: *id004 + network_subgraph: *id005 + omen_subgraph: *id006 + randomness_api: *id007 + mech_response: *id008 + agent_tools: *id009 + trades_subgraph: *id010 + conditional_tokens_subgraph: *id011 + realitio_subgraph: *id012 2: models: params: @@ -367,6 +446,14 @@ type: skill rpc_sleep_time: ${RPC_SLEEP_TIME:int:10} mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10} benchmark_tool: *id004 + network_subgraph: *id005 + omen_subgraph: *id006 + randomness_api: *id007 + mech_response: *id008 + agent_tools: *id009 + trades_subgraph: *id010 + conditional_tokens_subgraph: *id011 + realitio_subgraph: *id012 3: models: params: @@ -470,6 +557,14 @@ type: skill rpc_sleep_time: ${RPC_SLEEP_TIME:int:10} mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10} benchmark_tool: *id004 + network_subgraph: *id005 + omen_subgraph: *id006 + randomness_api: *id007 + mech_response: *id008 + agent_tools: *id009 + trades_subgraph: *id010 + conditional_tokens_subgraph: *id011 + realitio_subgraph: *id012 --- public_id: valory/ledger:0.19.0 type: connection diff --git a/poetry.lock b/poetry.lock index a6c7e5694..e9b37d7ac 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1688,14 +1688,14 @@ files = [ [[package]] name = "more-itertools" -version = "10.2.0" +version = "10.3.0" description = "More routines for operating on iterables, beyond itertools" category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "more-itertools-10.2.0.tar.gz", hash = "sha256:8fccb480c43d3e99a00087634c06dd02b0d50fbf088b380de5a41a015ec239e1"}, - {file = "more_itertools-10.2.0-py3-none-any.whl", hash = "sha256:686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684"}, + {file = "more-itertools-10.3.0.tar.gz", hash = "sha256:e5d93ef411224fbcef366a6e8ddc4c5781bc6359d43412a65dd5964e46111463"}, + {file = "more_itertools-10.3.0-py3-none-any.whl", hash = "sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320"}, ] [[package]] @@ -2111,14 +2111,14 @@ invoke = ["invoke (>=2.0)"] [[package]] name = "parse" -version = "1.20.1" +version = "1.20.2" description = "parse() is the opposite of format()" category = "main" optional = false python-versions = "*" files = [ - {file = "parse-1.20.1-py2.py3-none-any.whl", hash = "sha256:76ddd5214255ae711db4c512be636151fbabaa948c6f30115aecc440422ca82c"}, - {file = "parse-1.20.1.tar.gz", hash = "sha256:09002ca350ad42e76629995f71f7b518670bcf93548bdde3684fd55d2be51975"}, + {file = "parse-1.20.2-py2.py3-none-any.whl", hash = "sha256:967095588cb802add9177d0c0b6133b5ba33b1ea9007ca800e526f42a85af558"}, + {file = "parse-1.20.2.tar.gz", hash = "sha256:b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce"}, ] [[package]] @@ -2987,14 +2987,14 @@ testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psu [[package]] name = "typing-extensions" -version = "4.12.1" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.12.1-py3-none-any.whl", hash = "sha256:6024b58b69089e5a89c347397254e35f1bf02a907728ec7fee9bf0fe837d203a"}, - {file = "typing_extensions-4.12.1.tar.gz", hash = "sha256:915f5e35ff76f56588223f15fdd5938f9a1cf9195c0de25130c627e4d597f6d1"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]]