From 89d0594984b7e936433fa5755c3a2e8d0385649a Mon Sep 17 00:00:00 2001
From: Adamantios
Date: Wed, 20 Sep 2023 16:56:15 +0300
Subject: [PATCH] feat: remove mech tool which will not be necessary anymore
[no ci]
---
README.md | 8 --------
packages/valory/agents/trader/aea-config.yaml | 1 -
packages/valory/services/trader/service.yaml | 4 ----
packages/valory/skills/decision_maker_abci/models.py | 1 -
packages/valory/skills/decision_maker_abci/skill.yaml | 1 -
packages/valory/skills/trader_abci/skill.yaml | 1 -
6 files changed, 16 deletions(-)
diff --git a/README.md b/README.md
index ed0edf5e2..9ebefc76c 100644
--- a/README.md
+++ b/README.md
@@ -90,8 +90,6 @@ export ALL_PARTICIPANTS='["YOUR_AGENT_ADDRESS"]'
export SAFE_CONTRACT_ADDRESS="YOUR_SAFE_ADDRESS"
export OMEN_CREATORS='["0x89c5cc945dd550BcFfb72Fe42BfF002429F46Fec"]'
-export MECH_TOOL="prediction-online"
-
export BET_AMOUNT_PER_THRESHOLD_000=0
export BET_AMOUNT_PER_THRESHOLD_010=0
export BET_AMOUNT_PER_THRESHOLD_020=0
@@ -117,12 +115,6 @@ These are the description of the variables used by the Trader service:
- `SAFE_CONTRACT_ADDRESS`: address of the agents multisig wallet created [in the previous section](#prepare-the-keys-and-the-safe).
- `OMEN_CREATORS`: addresses of the market creator(s) that the service will track
for placing bets on Omen. The address `0x89c5cc945dd550BcFfb72Fe42BfF002429F46Fec` corresponds to the Market creator agent for the Hackathon.
-- `MECH_TOOL`: the tool that the service will use to get the prediction when performing requests to the AI Mech.
- You may find all the available Mech scripts [here](https://github.com/valory-xyz/mech/tree/v0.5.0/tools)
- for Mech's version `v0.5.0`.
- Each script contains one or more tools.
- For example, you may find all the `prediction_request` tools
- [here](https://github.com/valory-xyz/mech/blob/v0.5.0/tools/prediction_request.py#L37-L40).
- `BET_AMOUNT_PER_THRESHOLD_X`: amount (wei) to bet when the prediction returned by the AI Mech surpasses a threshold of `X`% confidence for a given prediction market. In the values provided above the amounts vary between 0.03 xDAI (60% confidence) and 0.1 xDAI (100% confidence).
- `BET_THRESHOLD`: threshold (wei) for placing a bet. A bet will only be placed if `potential_net_profit - BET_THRESHOLD >= 0`. [See below](#some-notes-on-the-service).
- `PROMPT_TEMPLATE`: prompt to be used with the prediction AI Mech. Please keep it as a single line including the placeholders `@{question}`, `@{yes}` and `@{no}`.
diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml
index 8f649f839..2e771fc1d 100644
--- a/packages/valory/agents/trader/aea-config.yaml
+++ b/packages/valory/agents/trader/aea-config.yaml
@@ -162,7 +162,6 @@ models:
average_block_time: ${int:5}
abt_error_mult: ${int:5}
mech_agent_address: ${str:0xff82123dfb52ab75c417195c5fdb87630145ae81}
- mech_tool: ${str:prediction-online}
bet_amount_per_threshold:
0.0: ${int:0}
0.1: ${int:0}
diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml
index 346b83031..4081035b4 100644
--- a/packages/valory/services/trader/service.yaml
+++ b/packages/valory/services/trader/service.yaml
@@ -78,7 +78,6 @@ type: skill
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_agent_address: ${MECH_AGENT_ADDRESS:str:0xff82123dfb52ab75c417195c5fdb87630145ae81}
- mech_tool: ${MECH_TOOL:str:prediction-online}
bet_amount_per_threshold: &id004
0.0: ${BET_AMOUNT_PER_THRESHOLD_000:int:0}
0.1: ${BET_AMOUNT_PER_THRESHOLD_010:int:0}
@@ -159,7 +158,6 @@ type: skill
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_agent_address: ${MECH_AGENT_ADDRESS:str:0xff82123dfb52ab75c417195c5fdb87630145ae81}
- mech_tool: ${MECH_TOOL:str:prediction-online}
bet_amount_per_threshold: *id004
bet_threshold: ${BET_THRESHOLD:int:100000000000000000}
blacklisting_duration: ${BLACKLISTING_DURATION:int:3600}
@@ -227,7 +225,6 @@ type: skill
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_agent_address: ${MECH_AGENT_ADDRESS:str:0xff82123dfb52ab75c417195c5fdb87630145ae81}
- mech_tool: ${MECH_TOOL:str:prediction-online}
bet_amount_per_threshold: *id004
bet_threshold: ${BET_THRESHOLD:int:100000000000000000}
blacklisting_duration: ${BLACKLISTING_DURATION:int:3600}
@@ -295,7 +292,6 @@ type: skill
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_agent_address: ${MECH_AGENT_ADDRESS:str:0xff82123dfb52ab75c417195c5fdb87630145ae81}
- mech_tool: ${MECH_TOOL:str:prediction-online}
bet_amount_per_threshold: *id004
bet_threshold: ${BET_THRESHOLD:int:100000000000000000}
blacklisting_duration: ${BLACKLISTING_DURATION:int:3600}
diff --git a/packages/valory/skills/decision_maker_abci/models.py b/packages/valory/skills/decision_maker_abci/models.py
index 3228c33b0..28f948b32 100644
--- a/packages/valory/skills/decision_maker_abci/models.py
+++ b/packages/valory/skills/decision_maker_abci/models.py
@@ -92,7 +92,6 @@ class DecisionMakerParams(MarketManagerParams):
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Initialize the parameters' object."""
self.mech_agent_address: str = self._ensure("mech_agent_address", kwargs, str)
- self.mech_tool: str = self._ensure("mech_tool", kwargs, str)
# this is a mapping from the confidence of a bet's choice to the amount we are willing to bet
self.bet_amount_per_threshold: Dict[float, int] = self._ensure(
"bet_amount_per_threshold", kwargs, Dict[float, int]
diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml
index 830b7ecba..b3f99c667 100644
--- a/packages/valory/skills/decision_maker_abci/skill.yaml
+++ b/packages/valory/skills/decision_maker_abci/skill.yaml
@@ -157,7 +157,6 @@ models:
tx_timeout: 10.0
use_termination: false
mech_agent_address: '0xff82123dfb52ab75c417195c5fdb87630145ae81'
- mech_tool: prediction-online
bet_amount_per_threshold:
0.0: 0
0.1: 0
diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml
index 124fdf2a0..5aa766e5f 100644
--- a/packages/valory/skills/trader_abci/skill.yaml
+++ b/packages/valory/skills/trader_abci/skill.yaml
@@ -144,7 +144,6 @@ models:
average_block_time: 5
abt_error_mult: 5
mech_agent_address: '0xff82123dfb52ab75c417195c5fdb87630145ae81'
- mech_tool: prediction-online
bet_amount_per_threshold:
0.0: 0
0.1: 0