From b9732a6f5fbda577e8ce885a0b553da2bebfb05f Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Mon, 23 Oct 2023 11:04:21 +0530 Subject: [PATCH] fix: use `kwargs.pop` instead of `kwargs.get` to avoid extra argument error --- packages/fetchai/skills/erc1155_client/skill.yaml | 2 +- packages/fetchai/skills/erc1155_deploy/skill.yaml | 2 +- packages/fetchai/skills/generic_buyer/skill.yaml | 2 +- packages/fetchai/skills/generic_seller/skill.yaml | 2 +- packages/packages.json | 10 +++++----- packages/valory/connections/ledger/connection.yaml | 4 ++-- .../valory/connections/ledger/contract_dispatcher.py | 2 +- .../valory/connections/ledger/ledger_dispatcher.py | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index 8089ef1384..4d02a9cf39 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -21,7 +21,7 @@ fingerprint: tests/test_strategy.py: bafybeicbxie3v6vue3gcnru6vsvggcgy3shxwrldis5gppizbuhooslcqa fingerprint_ignore_patterns: [] connections: -- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu +- valory/ledger:0.19.0:bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm contracts: - fetchai/erc1155:0.22.0:bafybeiff7a6xncyad53o2r7lekpnhexcspze6ocy55xtpzqeuacnlpunm4 protocols: diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index 6805c47889..89884f61e9 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -21,7 +21,7 @@ fingerprint: tests/test_strategy.py: bafybeigxtw2j2c7vl6xhdwos62jbtmx62xfgdyadptm5eewmkesmcooyea fingerprint_ignore_patterns: [] connections: -- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu +- valory/ledger:0.19.0:bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm contracts: - fetchai/erc1155:0.22.0:bafybeiff7a6xncyad53o2r7lekpnhexcspze6ocy55xtpzqeuacnlpunm4 protocols: diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 9a1a57005c..cf4928dd29 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -19,7 +19,7 @@ fingerprint: tests/test_models.py: bafybeibh72j3n72yseqvmpppucpu5wtidf6ebxbxkfnmrnlh4zv5y5apei fingerprint_ignore_patterns: [] connections: -- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu +- valory/ledger:0.19.0:bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index b344e84c0b..2756536b7a 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -20,7 +20,7 @@ fingerprint: tests/test_models.py: bafybeihabrc22zqssit3fmqhxptosy6qz6mx65ukhf5iayvirfv42xrhoq fingerprint_ignore_patterns: [] connections: -- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu +- valory/ledger:0.19.0:bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index 54f247010b..e0c22c6878 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -8,7 +8,7 @@ "protocol/valory/http/1.0.0": "bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe", "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", - "connection/valory/ledger/0.19.0": "bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu", + "connection/valory/ledger/0.19.0": "bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm", "connection/valory/http_server/0.22.0": "bafybeie3d6tj2kzewced4nnttxdvr7njue2ortvawmwdt67gwf4tcuosom", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", @@ -32,12 +32,12 @@ "connection/valory/http_client/0.23.0": "bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny", "connection/valory/test_libp2p/0.1.0": "bafybeih4vz7pprbjhe5g4tnf52ttkooii66woxbhifjc7wk5xdt6b6asiu", "protocol/fetchai/tac/1.0.0": "bafybeiaukfwe7wbpikztprlmrfpphsxqpdzgamkbhvqyz54tl3k73kzsvi", - "skill/fetchai/erc1155_client/0.28.0": "bafybeibffkywiuz5gwm6yn4v2fhkz35i77zl5ya4tzq4wksvga2mvkeojm", - "skill/fetchai/erc1155_deploy/0.30.0": "bafybeif6dmam4pvsdesvgb6n3ga4uf7dxikaynbqomxpswmhqlvcuz7vti", + "skill/fetchai/erc1155_client/0.28.0": "bafybeid3npgiuvgjyocxtxl6ovihrnicd5ezlim4aq4ytl3atnm5yywxmu", + "skill/fetchai/erc1155_deploy/0.30.0": "bafybeie2lqwsqgpv35uy7nztohtukvogntsxqi74x37qsbsx7drgeajtau", "skill/fetchai/error/0.17.0": "bafybeignei6feootyjzrqdt5j5yx7r4nrzuy6tdgdgsmrncldt5bud2dri", "skill/fetchai/fipa_dummy_buyer/0.2.0": "bafybeid7rzqruvc3fkesueig2mbzy2qsfplieircyjzwbdl7c6q5eauiky", - "skill/fetchai/generic_buyer/0.26.0": "bafybeiebwhfzs7vbdrnm7cqu5dc4r3wqdaeirmps5pfwexjd3ms5ss7xk4", - "skill/fetchai/generic_seller/0.27.0": "bafybeiapnkdtn3qrh36cxpbhalv2yaunnauieo7sxori46a7ohsp7xuzlq", + "skill/fetchai/generic_buyer/0.26.0": "bafybeibiplanh6h2biy27wt26jnzwftfsji77ajp26hcule5q2acjq3fjy", + "skill/fetchai/generic_seller/0.27.0": "bafybeiboyk6q2sl6rdqvcksbg4gnfb766vpexrdcgjmxzm3kjmcsjnsvia", "skill/fetchai/task_test_skill/0.1.0": "bafybeidv77u2xl52mnxakwvh7fuh46aiwfpteyof4eaptfd4agoi6cdble" }, "third_party": {} diff --git a/packages/valory/connections/ledger/connection.yaml b/packages/valory/connections/ledger/connection.yaml index 7a1b6e1929..972d97b552 100644 --- a/packages/valory/connections/ledger/connection.yaml +++ b/packages/valory/connections/ledger/connection.yaml @@ -10,8 +10,8 @@ fingerprint: __init__.py: bafybeia3purd7y4b7tkdt2fcaxkdazos32criq5hx6fhufaislrdefe674 base.py: bafybeifuoq2oqlcjlgeg2fg5l2ijiylb23v65xghv7u422helief2cjjuy connection.py: bafybeicydkymhz2feqmihtkiwdfg7pp4pww2elqv4tijuhjcplyvawdk74 - contract_dispatcher.py: bafybeifm5n2nh3z7cr47h2ejs4zu47s6uxliuvaacndxwt6sdcvbqwmpqa - ledger_dispatcher.py: bafybeigeziwsrriamjycjwu6qri2vervgbta7xkludnae2fzqqegwp6d5e + contract_dispatcher.py: bafybeidf2wu3rsp5pm45qwjlievbpmueeaj6hjw3kdyn67xhbocylwg3d4 + ledger_dispatcher.py: bafybeicartiu3mcavtyd3eveonrbak3uaowqzymtaza6gqtoi5msid75ci tests/__init__.py: bafybeifku7ttsmbj4gfx6dkgjvwypx7v5ysfqlzof6vh4p7gujakjtuwhe tests/conftest.py: bafybeid7vo7e2m76ey5beeadtbxywxx5ukefd5slwbc362rwmhht6i45ou tests/test_contract_dispatcher.py: bafybeiag5lnpc7h25w23ash4hk4cowxsy5buxgpr474l3tfewnhf56eqyq diff --git a/packages/valory/connections/ledger/contract_dispatcher.py b/packages/valory/connections/ledger/contract_dispatcher.py index 0d44263f3c..dfcb425079 100644 --- a/packages/valory/connections/ledger/contract_dispatcher.py +++ b/packages/valory/connections/ledger/contract_dispatcher.py @@ -431,7 +431,7 @@ def get_chain_id(self, message: Message) -> str: kwargs = cast(JSONLike, message.kwargs.body) # if the chain id is specified in the message, use it. # otherwise, use the ledger id. - chain_id = cast(str, kwargs.get("chain_id", self.get_ledger_id(message))) + chain_id = cast(str, kwargs.pop("chain_id", self.get_ledger_id(message))) return chain_id def set_extra_kwargs(self, message: Message) -> None: diff --git a/packages/valory/connections/ledger/ledger_dispatcher.py b/packages/valory/connections/ledger/ledger_dispatcher.py index 46dc2d2719..de927acf70 100644 --- a/packages/valory/connections/ledger/ledger_dispatcher.py +++ b/packages/valory/connections/ledger/ledger_dispatcher.py @@ -470,5 +470,5 @@ def get_chain_id(self, message: Message) -> str: kwargs = cast(JSONLike, message.kwargs.body) # if the chain id is specified in the message, use it. # otherwise, use the ledger id. - chain_id = cast(str, kwargs.get("chain_id", self.get_ledger_id(message))) + chain_id = cast(str, kwargs.pop("chain_id", self.get_ledger_id(message))) return chain_id