From 4eade15965875fd216687251591c4dc59fe16c88 Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 9 Oct 2023 12:38:33 +0200 Subject: [PATCH] fix: make kwargs optional in ledger_dispatcher.py --- docs/package_list.md | 74 +++++++++---------- .../fetchai/skills/erc1155_client/skill.yaml | 2 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 2 +- .../fetchai/skills/generic_buyer/skill.yaml | 2 +- .../fetchai/skills/generic_seller/skill.yaml | 2 +- packages/packages.json | 10 +-- .../valory/connections/ledger/connection.yaml | 2 +- .../connections/ledger/ledger_dispatcher.py | 5 +- 8 files changed, 51 insertions(+), 48 deletions(-) diff --git a/docs/package_list.md b/docs/package_list.md index 763b437573..1be02360c2 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -1,41 +1,41 @@ | Package name | Package hash | | ------------------------------------------------------------- | ------------------------------------------------------------- | -| protocol/fetchai/gym/1.0.0 | `bafybeidsxnr76uiolf4mzj6ttyzzddz3cspckly2gmkiod6b5gocjjfydq` | -| connection/fetchai/gym/0.19.0 | `bafybeie2bjvejryw2vkiyxsvkv3maa6loxim6xlwp7ywobemrzx424tt3i` | -| protocol/fetchai/default/1.0.0 | `bafybeiazamq4mogosgmr77ipita5s6sq6rfowubxf5rybfxikc772befxy` | -| protocol/valory/acn/1.1.0 | `bafybeiapa5ilsobggnspoqhspftwolrx52udrwmaxdxgrk26heuvl4oooa` | -| protocol/valory/contract_api/1.0.0 | `bafybeiasywsvax45qmugus5kxogejj66c5taen27h4voriodz7rgushtqa` | -| protocol/valory/http/1.0.0 | `bafybeia5bxdua2i6chw6pg47bvoljzcpuqxzy4rdrorbdmcbnwmnfdobtu` | -| protocol/valory/ledger_api/1.0.0 | `bafybeigsvceac33asd6ecbqev34meyyjwu3rangenv6xp5rkxyz4krvcby` | -| connection/fetchai/http_server/0.22.0 | `bafybeihp5umafxzx45aad5pj7s3343se2wjkgnbirt4pybrape22swm6de` | -| connection/fetchai/stub/0.21.0 | `bafybeihijtaawc2adyewb3g7kta7hw6jyhyhoi7cotkzgqilves5zz7smm` | -| connection/valory/ledger/0.19.0 | `bafybeiejc7g7ebv3cleiqb4f4h4pspcu6vtr54332szwlqiabfs3sfdh44` | -| connection/valory/p2p_libp2p/0.1.0 | `bafybeigfvt35r5blb3pp43iads6a56jolquvib5unbndkue7cgysazuxuu` | -| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeihdnfdth3qgltefgrem7xyi4b3ejzaz67xglm2hbma2rfvpl2annq` | -| connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeifmmwyfxxb3pbj5nlvk4uj5xb2ot3mfdr6ydkhrqwzvildhbsudae` | -| contract/fetchai/erc1155/0.22.0 | `bafybeidjvb4ojaw2trxu4rlxq3blppfherkldwz4x5spnpvef5n34jvmmm` | -| protocol/fetchai/fipa/1.0.0 | `bafybeicwagyhi3jqncpoon6ellgyun2fjv6z5u6ksn52hrbn3m54xjuswu` | -| protocol/fetchai/oef_search/1.0.0 | `bafybeih7bwei5hvi4nypuk3tgrej4rq63uk324pog3dvamix3gmy2ae2zu` | -| protocol/fetchai/state_update/1.0.0 | `bafybeiamdiu6y4jztw6y46puoc5xxj3yqqyiso37c4xadcn55om73veytm` | -| protocol/open_aea/signing/1.0.0 | `bafybeifuxs7gdg2okbn7uofymenjlmnih2wxwkym44lsgwmklgwuckxm2m` | -| skill/fetchai/echo/0.19.0 | `bafybeibyqdrhpn7ixfxw5tdvu2nwvrupof7sy3eh2ixavri74w24ik4l2i` | +| protocol/fetchai/gym/1.0.0 | `bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke` | +| connection/fetchai/gym/0.19.0 | `bafybeiguq4eduf35lvs3ltmi3jabpokz6raadrje3c274f5dnvfipdl7jm` | +| protocol/fetchai/default/1.0.0 | `bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm` | +| protocol/valory/acn/1.1.0 | `bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu` | +| protocol/valory/contract_api/1.0.0 | `bafybeialhbjvwiwcnqq3ysxcyemobcbie7xza66gaofcvla5njezkvhcka` | +| protocol/valory/http/1.0.0 | `bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe` | +| protocol/valory/ledger_api/1.0.0 | `bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru` | +| connection/fetchai/http_server/0.22.0 | `bafybeihvscddpxjbtqsetngmxo3kiht2wqhosmwiyuh3f6zjti3x3byu5u` | +| connection/fetchai/stub/0.21.0 | `bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi` | +| connection/valory/ledger/0.19.0 | `bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu` | +| connection/valory/p2p_libp2p/0.1.0 | `bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy` | +| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq` | +| connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeieufv6tbei3vza7bg7ggzsvyvwmzps5kghxlar3drhme6d7mxawvy` | +| contract/fetchai/erc1155/0.22.0 | `bafybeiff7a6xncyad53o2r7lekpnhexcspze6ocy55xtpzqeuacnlpunm4` | +| protocol/fetchai/fipa/1.0.0 | `bafybeid6o7dxutkendclxxtxo3pyizrfho3vxyj5j5sowkysmuqamywb24` | +| protocol/fetchai/oef_search/1.0.0 | `bafybeicysyqgag7gsbpvly5mzhlwwiosl7gupgmohx233gynw7xtgsxewy` | +| protocol/fetchai/state_update/1.0.0 | `bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq` | +| protocol/open_aea/signing/1.0.0 | `bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii` | +| skill/fetchai/echo/0.19.0 | `bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | -| skill/fetchai/gym/0.20.0 | `bafybeifoydd7skfcpgbqupqlfijxkvhqudfuunk35ygqj76i42bb2lxnua` | -| skill/fetchai/http_echo/0.20.0 | `bafybeigdwkqdn744ebzmjihwx44ks5ctfvsm35d2aen2rmzodmo7h47inm` | -| agent/fetchai/error_test/0.1.0 | `bafybeifpraanub6fte7vym47gygyoyy7hphvowqlv3iyagimcp5muxt654` | -| agent/fetchai/gym_aea/0.25.0 | `bafybeihi7k2qrjlidvrkc5qrzlapayaguutbo53wsb3dz6whsuxsrpt4ua` | -| agent/fetchai/my_first_aea/0.27.0 | `bafybeifd2c4rh52rk2rpdvhb44sl7el664z4yfwnmxjm6qvd6sfq7bxiy4` | -| agent/open_aea/gym_aea/0.1.0 | `bafybeib72ryduegbgjmdtecirrpu4sm3iii2q7ums62gjikd2rpqpephju` | -| agent/open_aea/http_echo/0.1.0 | `bafybeihhywlpyxvfthjj6z7dzjq77qk6leocrmjtx5w2662dopdsmmw6h4` | -| agent/open_aea/my_first_aea/0.1.0 | `bafybeida2z2lk63dq555g72oio6salsgg36k66zndjius6ujlevomby3l4` | -| connection/fetchai/local/0.20.0 | `bafybeih5qqlgx6wpuahqk5hvsbxny72lmv7cfegoacsi66bouzopyy2y2q` | -| connection/valory/http_client/0.23.0 | `bafybeieoeuy4brzimtnubmokwirhrx27ezls6cdnl5qik4rkykfle3nn2y` | -| connection/valory/test_libp2p/0.1.0 | `bafybeib3zsiy7aaiiflltgkcmmmh5slwlst7fw4gi2nk633ulo22xonntu` | -| protocol/fetchai/tac/1.0.0 | `bafybeicy5whg5lzugw4j47fsbqmfgc5lwvgezikbpnkaalcr3iznex45ky` | -| skill/fetchai/erc1155_client/0.28.0 | `bafybeibcaigq4l6ywe7y4cgpebvdp2fxf7b7ykaw3rad3rx4xl6yu554dy` | -| skill/fetchai/erc1155_deploy/0.30.0 | `bafybeidh4frqplgyoiyyf7xk45gqunwvcuxe6c2egdfzt63gwt643wg624` | -| skill/fetchai/error/0.17.0 | `bafybeighscg5yyaj63tyz5icthjnvwlca5lvpkiw3dni2q45szqyw2blye` | -| skill/fetchai/fipa_dummy_buyer/0.2.0 | `bafybeie5rctzcx6zakshzr3oht57ieu35jkvsj2dt5yghloury2mayusp4` | -| skill/fetchai/generic_buyer/0.26.0 | `bafybeiej57wwwfkxbxsxe57pmnvbtacx37tdhtx2czgi3nh2s5eiljq6bq` | -| skill/fetchai/generic_seller/0.27.0 | `bafybeic34b4bbhfdabuhciqam6mghnpyei2izcz4mngpimkcs2v54ofife` | +| skill/fetchai/gym/0.20.0 | `bafybeifaccpsmby27az6geu4d6m7xcjk2hop7ihtleqeeasphnhn2dp234` | +| skill/fetchai/http_echo/0.20.0 | `bafybeieysvwshmy2rlfzqclcfhl263roy6z3skvmy3ikmfcoioxhnhp67i` | +| agent/fetchai/error_test/0.1.0 | `bafybeif6q4pyu4vvtaljm33rw2fft3f5fu33byhku3qkspy4vhgzczqhwy` | +| agent/fetchai/gym_aea/0.25.0 | `bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m` | +| agent/fetchai/my_first_aea/0.27.0 | `bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4` | +| agent/open_aea/gym_aea/0.1.0 | `bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy` | +| agent/open_aea/http_echo/0.1.0 | `bafybeie6dxx5zbu6bz7at7kqj3thjvvzucj45f3tksbio5dg23ywsbb2ty` | +| agent/open_aea/my_first_aea/0.1.0 | `bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm` | +| connection/fetchai/local/0.20.0 | `bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm` | +| 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/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/task_test_skill/0.1.0 | `bafybeidv77u2xl52mnxakwvh7fuh46aiwfpteyof4eaptfd4agoi6cdble` | diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index ea66f007e5..8089ef1384 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:bafybeifa5wpw4xklaz5v3od26m2bvowv53vhs74jzmg2hi2aer5ry4s3g4 +- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu 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 322a9db4bb..6805c47889 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:bafybeifa5wpw4xklaz5v3od26m2bvowv53vhs74jzmg2hi2aer5ry4s3g4 +- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu 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 fa34307326..9a1a57005c 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:bafybeifa5wpw4xklaz5v3od26m2bvowv53vhs74jzmg2hi2aer5ry4s3g4 +- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu 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 17a439c6b8..b344e84c0b 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:bafybeifa5wpw4xklaz5v3od26m2bvowv53vhs74jzmg2hi2aer5ry4s3g4 +- valory/ledger:0.19.0:bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu contracts: [] protocols: - fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm diff --git a/packages/packages.json b/packages/packages.json index b7ef7abead..e09881330d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -9,7 +9,7 @@ "protocol/valory/ledger_api/1.0.0": "bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru", "connection/fetchai/http_server/0.22.0": "bafybeihvscddpxjbtqsetngmxo3kiht2wqhosmwiyuh3f6zjti3x3byu5u", "connection/fetchai/stub/0.21.0": "bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi", - "connection/valory/ledger/0.19.0": "bafybeifa5wpw4xklaz5v3od26m2bvowv53vhs74jzmg2hi2aer5ry4s3g4", + "connection/valory/ledger/0.19.0": "bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu", "connection/valory/p2p_libp2p/0.1.0": "bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeieufv6tbei3vza7bg7ggzsvyvwmzps5kghxlar3drhme6d7mxawvy", @@ -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": "bafybeibv2aor4xaukskswbnrhghocbwcmcdxpiq6b2ewidisd2jxaltviq", - "skill/fetchai/erc1155_deploy/0.30.0": "bafybeibf7pgvk5yxeiymqmiefkwnd2nrwxzrbt2ahrxzei7ki53l4dd2qq", + "skill/fetchai/erc1155_client/0.28.0": "bafybeibffkywiuz5gwm6yn4v2fhkz35i77zl5ya4tzq4wksvga2mvkeojm", + "skill/fetchai/erc1155_deploy/0.30.0": "bafybeif6dmam4pvsdesvgb6n3ga4uf7dxikaynbqomxpswmhqlvcuz7vti", "skill/fetchai/error/0.17.0": "bafybeignei6feootyjzrqdt5j5yx7r4nrzuy6tdgdgsmrncldt5bud2dri", "skill/fetchai/fipa_dummy_buyer/0.2.0": "bafybeid7rzqruvc3fkesueig2mbzy2qsfplieircyjzwbdl7c6q5eauiky", - "skill/fetchai/generic_buyer/0.26.0": "bafybeiacuo6skoh7erau6qauv7xe4s362ontfjwgalda3vy6nfheeictei", - "skill/fetchai/generic_seller/0.27.0": "bafybeigkcoizxvtug6txcmnt7zkl6257dj7j7b3md5ggoi4vvtn22ddsvq", + "skill/fetchai/generic_buyer/0.26.0": "bafybeiebwhfzs7vbdrnm7cqu5dc4r3wqdaeirmps5pfwexjd3ms5ss7xk4", + "skill/fetchai/generic_seller/0.27.0": "bafybeiapnkdtn3qrh36cxpbhalv2yaunnauieo7sxori46a7ohsp7xuzlq", "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 603e35e45a..7a1b6e1929 100644 --- a/packages/valory/connections/ledger/connection.yaml +++ b/packages/valory/connections/ledger/connection.yaml @@ -11,7 +11,7 @@ fingerprint: base.py: bafybeifuoq2oqlcjlgeg2fg5l2ijiylb23v65xghv7u422helief2cjjuy connection.py: bafybeicydkymhz2feqmihtkiwdfg7pp4pww2elqv4tijuhjcplyvawdk74 contract_dispatcher.py: bafybeifm5n2nh3z7cr47h2ejs4zu47s6uxliuvaacndxwt6sdcvbqwmpqa - ledger_dispatcher.py: bafybeibvvtotspsgt4e4dgevvj3lexzpohr7bha7i7hmlsvq5i2l3qagrm + ledger_dispatcher.py: bafybeigeziwsrriamjycjwu6qri2vervgbta7xkludnae2fzqqegwp6d5e tests/__init__.py: bafybeifku7ttsmbj4gfx6dkgjvwypx7v5ysfqlzof6vh4p7gujakjtuwhe tests/conftest.py: bafybeid7vo7e2m76ey5beeadtbxywxx5ukefd5slwbc362rwmhht6i45ou tests/test_contract_dispatcher.py: bafybeiag5lnpc7h25w23ash4hk4cowxsy5buxgpr474l3tfewnhf56eqyq diff --git a/packages/valory/connections/ledger/ledger_dispatcher.py b/packages/valory/connections/ledger/ledger_dispatcher.py index 50740357e3..46dc2d2719 100644 --- a/packages/valory/connections/ledger/ledger_dispatcher.py +++ b/packages/valory/connections/ledger/ledger_dispatcher.py @@ -464,7 +464,10 @@ def get_chain_id(self, message: Message) -> str: if not isinstance(message, LedgerApiMessage): # pragma: nocover raise ValueError("argument is not a LedgerApiMessage instance.") message = cast(LedgerApiMessage, message) - kwargs = cast(JSONLike, message.kwargs.body) + kwargs = {} + if message.is_set("kwargs"): + # check if kwargs is set + 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)))