Skip to content

Commit

Permalink
Merge branch 'main' into finish_refactor
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/valory/agents/trader/aea-config.yaml
#	packages/valory/skills/decision_maker_abci/skill.yaml
  • Loading branch information
Adamantios committed Nov 27, 2023
2 parents eeb10ab + 4bdf566 commit 7256759
Show file tree
Hide file tree
Showing 32 changed files with 647 additions and 609 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/common_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install tomte[tox,cli]==0.2.12
run: pip install tomte[tox,cli]==0.2.14
- name: Check copyright headers
run: tomte check-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
- name: License compatibility check
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install tomte[tox,cli]==0.2.12
pip install tomte[tox,cli]==0.2.14
# Install `mdspell` for spelling checks
sudo npm install -g markdown-spellcheck
Expand Down
54 changes: 27 additions & 27 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"dev": {
"skill/valory/market_manager_abci/0.1.0": "bafybeigesvgfjjtzxnsofhwutsp4pyclxnn62z2luy4xt7yarm64u6pbti",
"skill/valory/decision_maker_abci/0.1.0": "bafybeifr5sqhtsnj2z4jv2lgcridolfbl23plqdbrdjmg2wyltmgr3zsui",
"skill/valory/trader_abci/0.1.0": "bafybeih72cnauzvc4lhpxjwyqxhx2vfxoztucfast7jyl6oqgbaqcctop4",
"contract/valory/market_maker/0.1.0": "bafybeih4r35d3plsjw56ham6xvi6dn4semmuihc53lh3qofpwj242rnjkq",
"agent/valory/trader/0.1.0": "bafybeibxipsj5g6mkgz5p6an6berhl5lqc7mkuqjhb3khzvgnmegmjam2q",
"service/valory/trader/0.1.0": "bafybeida22sohxo25ba5pspp75x6jh53ouhvkozp2ylndfitsd5cqwh5oq",
"contract/valory/erc20/0.1.0": "bafybeidpjppgs7jlig2gdpdr3a6q3etbejpxrifjhzlcufpo5zf23dqv7y",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig6nwyji7tkrpmc227z6p32gu5l3cge3jznjv5j3wzg4jh6x2rj7y",
"contract/valory/mech/0.1.0": "bafybeigjn4q6mxal2hxzjyzldl4t4aykkpxjnbsgnli2c3xwf6binkmn74",
"contract/valory/realitio/0.1.0": "bafybeiamgkwwqhray4fs2hlipwxkq7mosmi7ev7jut4vneetaaycc4ruji",
"skill/valory/market_manager_abci/0.1.0": "bafybeic7o4pclkhnugyn7js5g3asxuqhkxpvunlp3mpup7aovhg2fto22i",
"skill/valory/decision_maker_abci/0.1.0": "bafybeihnjjfzoiihujnjd2gzbvmayz7avo5myslvl24wvyqj7zq4ufkvw4",
"skill/valory/trader_abci/0.1.0": "bafybeihqqz7yvn33iirooeqk7e6iz4dr5grwrfbkavamis6bnfoz6yj5pu",
"contract/valory/market_maker/0.1.0": "bafybeid5jnetbsusgxkpqzwyiqlwut55xktfbeloipxcemcuu5oopmqtl4",
"agent/valory/trader/0.1.0": "bafybeigt6hd5cwuusdbu4u3ieqzvs4v4vihlr344rz55pb6neys55cwlre",
"service/valory/trader/0.1.0": "bafybeiaabwa7whlwpep5j2gpidnfvqgkgyo2vrw655t6epwtbh67umsb5m",
"contract/valory/erc20/0.1.0": "bafybeiepg5ymxhtylgijs3mf3lezz6cwcsougbrv2gr4xcq3bp5wxusi64",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaqh4pujl2o2ginl5lbe7p7en7t2ncs25gohysxdks5kd4lmqav3q",
"contract/valory/mech/0.1.0": "bafybeieo65rtidzgrx22la7z7azoqbisd35hnoqfw7l3xxctotvctjlkju",
"contract/valory/realitio/0.1.0": "bafybeieoily22pasgkzzcyawhqyrsko7b52lghnvwuskhomavb7tlb6pxa",
"contract/valory/realitio_proxy/0.1.0": "bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4",
"contract/valory/conditional_tokens/0.1.0": "bafybeifov35k2ifwagzyfvl7km6je6tmyvcqgrccldob3zmbx2af2wzque",
"contract/valory/agent_registry/0.1.0": "bafybeiekjzqwbhhuev7queedksnsyj6glzwn5ag5youjzv6zdz2xsr427a",
"contract/valory/service_staking_token/0.1.0": "bafybeieytw4rvsddgan2zot2246v7dwy3amif6ghal3b7at4unmxtpmw6y",
"skill/valory/staking_abci/0.1.0": "bafybeifoejd5q6wgmqohhwp46uwk3g4ysr7f5mf2fbmjhxulwzwdy2udui"
"contract/valory/conditional_tokens/0.1.0": "bafybeifu5axib5ifzq6bomfscs7nnx5qknkzymlz6gfn7ohjsb2shghrei",
"contract/valory/agent_registry/0.1.0": "bafybeibezt4xtzgf25eidmwev6moki74eufmb4hx7cpvd6odbyoxo42hxi",
"contract/valory/service_staking_token/0.1.0": "bafybeig2pnb3f4y65hlhhva52fsrwb6k3dqkqttq43sxd5kb4drgob65oy",
"skill/valory/staking_abci/0.1.0": "bafybeia3acxumkjg566dvgagv3swz7htf5xpvwq6ovmecvp5j2zdxdoabe"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii",
Expand All @@ -25,20 +25,20 @@
"protocol/valory/acn/1.1.0": "bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu",
"protocol/valory/tendermint/0.1.0": "bafybeig6g6twajlwssfbfp5rlnu5mwzuu5kgak5cs4fich7rlkx6whesnu",
"protocol/valory/ipfs/0.1.0": "bafybeiedxeismnx3k5ty4mvvhlqideixlhqmi5mtcki4lxqfa7uqh7p33u",
"skill/valory/abstract_abci/0.1.0": "bafybeifmfv4bgt5vzvgawlocksacqeadzg72zs4usvgjaf245hbbptpiki",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiflxcl2dtzayyzzddc4f2astzxunyp66meutornanrgeemicdea5q",
"skill/valory/registration_abci/0.1.0": "bafybeib2whqixp5265d53sa6szkz7woet4awuqr4dekb2hokpgps5codme",
"skill/valory/abstract_round_abci/0.1.0": "bafybeigrqhygo2hl2owisj5rqyh3acdvee773ajije64snlzalcgtaac7q",
"connection/valory/abci/0.1.0": "bafybeigzgupmh6kwwx4jbqkw7qri5vr6vz53xbi4uksulh6oiovdplmviu",
"connection/valory/http_client/0.23.0": "bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny",
"connection/valory/ledger/0.19.0": "bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm",
"skill/valory/abstract_abci/0.1.0": "bafybeiazmtcljyffmxzbiiq7aw6dhsgcbahpwixbtjeqoqfrcqw3ypzrf4",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiencz2uytz6fqj5wg7mcunevxjh4xg5gd6pqcgkshgqywhcimweyi",
"skill/valory/registration_abci/0.1.0": "bafybeif4tgr7zqzguknrjzxr4h766fxp7vr4tod25xii4jzzwsbvyzdzkq",
"skill/valory/abstract_round_abci/0.1.0": "bafybeidau7loztcfy3mxvoqrv7otbpciemd2wf3lsxyjraq4dcvuvib25e",
"connection/valory/abci/0.1.0": "bafybeigrdfpjvfoly6bx2pz2cikdp5ppvmlkhsjvn5p6mgotfaz6m2jtzq",
"connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce",
"connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq",
"connection/valory/ipfs/0.1.0": "bafybeigfmqvlzbp67fttccpl4hsu3zaztbxv6vd7ikzra2hfppfkalgpji",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeigejiv4fkksyjwmr6doo23kfpicfbktuwspbamasyvjusfdyjtrxy",
"contract/valory/gnosis_safe/0.1.0": "bafybeifmsjpgbifvk7y462rhfczvjvpigkdniavghhg5utza3hbnffioq4",
"contract/valory/service_registry/0.1.0": "bafybeic4bgql6x5jotp43ddazybmyb7macifjzudavqll3547ayhawttpi",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeigxkdujugzvve2dszkwr5kgfx4uhz2epofo4lorbcnthmzfjegwzi",
"connection/valory/ipfs/0.1.0": "bafybeihx7wb5hngjobw2salzqqryrhxvmxfuw7o2npjyqd2talmh2flqeq",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeid2dujvxf2aiys65jfbobu7r3p6jgsg3hvjuwtzuwlh2g5elkqg2y",
"contract/valory/gnosis_safe/0.1.0": "bafybeifpl2gaym4osfvqnmpewjr5hx2fbmwf6nomhkr5w2wkdosbynx53a",
"contract/valory/service_registry/0.1.0": "bafybeicwp7b4wrxcko66cfylhnaiwzdupo75ixlcol73ww6vxapx33gtpi",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeigk3debp6dswutqsuls2lqfvyj4ghe6kwjc2zfinnsvj6hujynxtq",
"contract/valory/multisend/0.1.0": "bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y",
"skill/valory/termination_abci/0.1.0": "bafybeifazwrksp756h7z42qqfcgi6lya6wmhbx46l7ghlaooe45gqnju7q"
"skill/valory/termination_abci/0.1.0": "bafybeigainmpy37gb33ogbrpggjbkuasodhthh5oz4vbzjdfjozerpf224"
}
}
35 changes: 18 additions & 17 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ fingerprint:
__init__.py: bafybeighcq4pmuzte6vhvvprrvo563vzghkoit2h6qdqxf2ma5bghevkee
fingerprint_ignore_patterns: []
connections:
- valory/abci:0.1.0:bafybeigzgupmh6kwwx4jbqkw7qri5vr6vz53xbi4uksulh6oiovdplmviu
- valory/http_client:0.23.0:bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny
- valory/ipfs:0.1.0:bafybeigfmqvlzbp67fttccpl4hsu3zaztbxv6vd7ikzra2hfppfkalgpji
- valory/ledger:0.19.0:bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm
- valory/abci:0.1.0:bafybeigrdfpjvfoly6bx2pz2cikdp5ppvmlkhsjvn5p6mgotfaz6m2jtzq
- valory/http_client:0.23.0:bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce
- valory/ipfs:0.1.0:bafybeihx7wb5hngjobw2salzqqryrhxvmxfuw7o2npjyqd2talmh2flqeq
- valory/ledger:0.19.0:bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a
- valory/p2p_libp2p_client:0.1.0:bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq
contracts:
- valory/gnosis_safe:0.1.0:bafybeifmsjpgbifvk7y462rhfczvjvpigkdniavghhg5utza3hbnffioq4
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeigejiv4fkksyjwmr6doo23kfpicfbktuwspbamasyvjusfdyjtrxy
- valory/service_registry:0.1.0:bafybeic4bgql6x5jotp43ddazybmyb7macifjzudavqll3547ayhawttpi
- valory/market_maker:0.1.0:bafybeih4r35d3plsjw56ham6xvi6dn4semmuihc53lh3qofpwj242rnjkq
- valory/erc20:0.1.0:bafybeidpjppgs7jlig2gdpdr3a6q3etbejpxrifjhzlcufpo5zf23dqv7y
- valory/gnosis_safe:0.1.0:bafybeifpl2gaym4osfvqnmpewjr5hx2fbmwf6nomhkr5w2wkdosbynx53a
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeid2dujvxf2aiys65jfbobu7r3p6jgsg3hvjuwtzuwlh2g5elkqg2y
- valory/service_registry:0.1.0:bafybeicwp7b4wrxcko66cfylhnaiwzdupo75ixlcol73ww6vxapx33gtpi
- valory/market_maker:0.1.0:bafybeid5jnetbsusgxkpqzwyiqlwut55xktfbeloipxcemcuu5oopmqtl4
- valory/erc20:0.1.0:bafybeiepg5ymxhtylgijs3mf3lezz6cwcsougbrv2gr4xcq3bp5wxusi64
- valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y
- valory/mech:0.1.0:bafybeigjn4q6mxal2hxzjyzldl4t4aykkpxjnbsgnli2c3xwf6binkmn74
- valory/conditional_tokens:0.1.0:bafybeifov35k2ifwagzyfvl7km6je6tmyvcqgrccldob3zmbx2af2wzque
- valory/realitio:0.1.0:bafybeiamgkwwqhray4fs2hlipwxkq7mosmi7ev7jut4vneetaaycc4ruji
- valory/mech:0.1.0:bafybeieo65rtidzgrx22la7z7azoqbisd35hnoqfw7l3xxctotvctjlkju
- valory/conditional_tokens:0.1.0:bafybeifu5axib5ifzq6bomfscs7nnx5qknkzymlz6gfn7ohjsb2shghrei
- valory/realitio:0.1.0:bafybeieoily22pasgkzzcyawhqyrsko7b52lghnvwuskhomavb7tlb6pxa
- valory/realitio_proxy:0.1.0:bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4
- valory/agent_registry:0.1.0:bafybeiekjzqwbhhuev7queedksnsyj6glzwn5ag5youjzv6zdz2xsr427a
- valory/service_staking_token:0.1.0:bafybeieytw4rvsddgan2zot2246v7dwy3amif6ghal3b7at4unmxtpmw6y
- valory/agent_registry:0.1.0:bafybeibezt4xtzgf25eidmwev6moki74eufmb4hx7cpvd6odbyoxo42hxi
- valory/service_staking_token:0.1.0:bafybeig2pnb3f4y65hlhhva52fsrwb6k3dqkqttq43sxd5kb4drgob65oy
protocols:
- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii
- valory/abci:0.1.0:bafybeihmzlmmb4pdo3zkhg6ehuyaa4lhw7bfpclln2o2z7v3o6fcep26iu
Expand Down Expand Up @@ -80,11 +80,11 @@ logging_config:
propagate: true
dependencies:
open-aea-ledger-cosmos:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-test-autonomy:
version: ==0.13.4
version: ==0.13.6
skill_exception_policy: stop_and_exit
connection_exception_policy: just_log
default_connection: null
Expand Down Expand Up @@ -205,6 +205,7 @@ models:
staking_contract_address: ${str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C}
agent_balance_threshold: ${int:10000000000000000}
refill_check_interval: ${int:10}
tool_punishment_multiplier: ${int:1}
---
public_id: valory/p2p_libp2p_client:0.1.0
type: connection
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/contracts/agent_registry/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ contract_interface_paths:
ethereum: build/AgentRegistry.json
dependencies:
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-test-autonomy:
version: ==0.13.4
version: ==0.13.6
web3:
version: <7,>=6.0.0
4 changes: 3 additions & 1 deletion packages/valory/contracts/conditional_tokens/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def check_redeemed(
except (Urllib3ReadTimeoutError, RequestsReadTimeoutError):
msg = (
"The RPC timed out! This usually happens if the filtering is too wide. "
f"The service tried to filter from block {from_block} to {to_block}."
f"The service tried to filter from block {from_block} to {to_block}. "
f"If this issue persists, please try lowering the `EVENT_FILTERING_BATCH_SIZE`!"
)
return dict(error=msg)
Expand All @@ -79,6 +79,8 @@ def check_redeemed(
condition_id = args.get("conditionId", None)
payout = args.get("payout", 0)
if condition_id is not None and payout > 0:
if isinstance(condition_id, bytes):
condition_id = condition_id.hex()
payouts[condition_id] = payout

return dict(payouts=payouts)
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/contracts/conditional_tokens/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeidhdxio3oq5gqdnxmngumvt3fcd6zyiyrpk5f2k4dwhflbg4e5iky
build/ConditionalTokens.json: bafybeia2ahis7zx2yhhf23kpkcxu56hto6fwg6ptjg5ld46lp4dgz7cz3e
contract.py: bafybeigzlqbxka2fxjt2ho26ppryvf2lcxecorwtcmfybu4bhqnmpfgqri
contract.py: bafybeic34mnydr5m7xncg42tgg5qrjxkltsxxudnvog4jjcs6elg64z5ty
fingerprint_ignore_patterns: []
class_name: ConditionalTokensContract
contract_interface_paths:
Expand All @@ -18,7 +18,7 @@ dependencies:
web3:
version: <7,>=6.0.0
requests:
version: ==2.28.2
version: ==2.28.1
urllib3:
version: ==1.26.16
contracts: []
4 changes: 2 additions & 2 deletions packages/valory/contracts/erc20/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ dependencies:
eth_typing: {}
hexbytes: {}
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-test-autonomy:
version: ==0.13.4
version: ==0.13.6
packaging: {}
py-eth-sig-utils: {}
requests: {}
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/contracts/market_maker/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ dependencies:
eth_typing: {}
hexbytes: {}
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-test-autonomy:
version: ==0.13.4
version: ==0.13.6
packaging: {}
py-eth-sig-utils: {}
requests: {}
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/contracts/mech/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract_interface_paths:
ethereum: build/mech.json
dependencies:
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
web3:
version: <7,>=6.0.0
eth_typing: {}
2 changes: 1 addition & 1 deletion packages/valory/contracts/realitio/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_claim_params(
except (Urllib3ReadTimeoutError, RequestsReadTimeoutError):
msg = (
"The RPC timed out! This usually happens if the filtering is too wide. "
f"The service tried to filter from block {from_block} to {to_block}."
f"The service tried to filter from block {from_block} to {to_block}. "
f"If this issue persists, please try lowering the `EVENT_FILTERING_BATCH_SIZE`!"
)
return dict(error=msg)
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/contracts/realitio/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeictahkgfmlqv5kksvj6klmxtmjdpeq4sp3x7dp2yr5x4kmzbcihse
build/Realitio.json: bafybeiagi7zoeoy5s7duhg4oeuekj2s6z5mad2z6g2pn3n5elsvze25qiu
contract.py: bafybeie4qmxeb3wdok62lsn5eyct25us4qgbgq3qzswnx7a52xfvxo7c6q
contract.py: bafybeicre6tumch2ng7rpgx2qle3cqg65rra6s2otl5agdp7jzweiffxby
fingerprint_ignore_patterns: []
class_name: RealitioContract
contract_interface_paths:
Expand All @@ -19,7 +19,7 @@ dependencies:
web3:
version: <7,>=6.0.0
requests:
version: ==2.28.2
version: ==2.28.1
urllib3:
version: ==1.26.16
contracts: []
4 changes: 2 additions & 2 deletions packages/valory/contracts/service_staking_token/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ contract_interface_paths:
ethereum: build/ServiceStakingToken.json
dependencies:
open-aea-ledger-ethereum:
version: ==1.41.0.post1
version: ==1.42.0
open-aea-test-autonomy:
version: ==0.13.4
version: ==0.13.6
web3:
version: <7,>=6.0.0
6 changes: 5 additions & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeibxipsj5g6mkgz5p6an6berhl5lqc7mkuqjhb3khzvgnmegmjam2q
agent: valory/trader:0.1.0:bafybeigt6hd5cwuusdbu4u3ieqzvs4v4vihlr344rz55pb6neys55cwlre
number_of_agents: 4
deployment: {}
---
Expand Down Expand Up @@ -118,6 +118,7 @@ type: skill
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
benchmark_tool: &id005
args:
log_dir: ${LOG_DIR:str:/benchmarks}
Expand Down Expand Up @@ -196,6 +197,7 @@ type: skill
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
benchmark_tool: *id005
2:
models:
Expand Down Expand Up @@ -272,6 +274,7 @@ type: skill
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
benchmark_tool: *id005
3:
models:
Expand Down Expand Up @@ -348,6 +351,7 @@ type: skill
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
benchmark_tool: *id005
---
public_id: valory/ledger:0.19.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def _blacklist(self) -> Optional[str]:
# impose a penalty equivalent to the mech's price on the tool responsible for blacklisting the market
tool_idx = self.synchronized_data.mech_tool_idx
penalty = -self.wei_to_native(self.synchronized_data.mech_price)
penalty *= self.params.tool_punishment_multiplier
self.policy.add_reward(tool_idx, penalty)

return serialize_bets(bets)
Expand Down
Loading

0 comments on commit 7256759

Please sign in to comment.