Skip to content

Commit

Permalink
Merge pull request #370 from valory-xyz/fix/ledger
Browse files Browse the repository at this point in the history
Fix utilized chain id
  • Loading branch information
Adamantios authored Dec 16, 2024
2 parents 78e9bb2 + 3de6ca6 commit 8ecd287
Show file tree
Hide file tree
Showing 18 changed files with 64 additions and 47 deletions.
16 changes: 8 additions & 8 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"contract/valory/staking_token/0.1.0": "bafybeiaynt6clwbthtbndtocnwul7dp76ctmu4jxinp7fnqks4pxt65yuy",
"contract/valory/relayer/0.1.0": "bafybeicreijhjycqrutdpbdn3vdcpmo233y3p66l3ovmr2goa2y2e6bshy",
"skill/valory/market_manager_abci/0.1.0": "bafybeiaotaepzfcp3mvd7pp2zv6v6bbgfjblk4pzcvjbzbhkc5p463afba",
"skill/valory/decision_maker_abci/0.1.0": "bafybeidx6lsqdgidzfdfspacypheeo7umcdb2wo3qm3kboald5ey52v5rm",
"skill/valory/trader_abci/0.1.0": "bafybeih5e6z5uizeokivepj7c4ghitxpmheb6fuy7mu4bo3vuwudwhkvla",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigxtmifwrcwnt7t22ovopysuapvr37mhmesnlbsab3me25ikdu3om",
"skill/valory/staking_abci/0.1.0": "bafybeigjw6fg4ksurbhpwc4fg366cm4a5qd5j27eos6t4thbfszagmp7ga",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeihhulxg66yxluynp5rkk3o22fe5neti5dvpygoz7pdsu2vxq3r654",
"agent/valory/trader/0.1.0": "bafybeicldgrxjluvccpl4duck5k5kkepyrvq6xf3gib7zbrxykrfofmfd4",
"service/valory/trader/0.1.0": "bafybeibmj355zxlgwrt5odmzj7hglhwzoktjcpw4gdcx7dn7wufk2q643a",
"service/valory/trader_pearl/0.1.0": "bafybeibpdfyplxjzyssnnnbv7i7cdtwvjtvslngykzmfwrwv4zyz4xehpm"
"skill/valory/decision_maker_abci/0.1.0": "bafybeifljwg5jxxhazhopxo6rful5zc5tmghcos3njsldsjhxiqazzvkhu",
"skill/valory/trader_abci/0.1.0": "bafybeia5z6vjanod3hauezhvfemuunwl4cxkil7kowplwmvc2ijp6lw4gi",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicttcqp2n5q3vqdxaoqwawdrqyvh6eq55groaehdarpreufe5agda",
"skill/valory/staking_abci/0.1.0": "bafybeifzayvzmhuu54ut5ke2ohutmoprnw474kk63pmlrmlt5cg46slrji",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeicqcqhmrsswxyob7j2q2yosfu2ruknl2zibl4ewfmmgjsy3x7t6u4",
"agent/valory/trader/0.1.0": "bafybeic3u7sb6rh5vdce7gy2gk32hxnovlx2b2qtotolxfeymovcpsmghm",
"service/valory/trader/0.1.0": "bafybeichaxkntjhyhhkjlg4ljw5b6223wzu3zscgrvozscfi75v4ad76ni",
"service/valory/trader_pearl/0.1.0": "bafybeigqvtghnathe63l6bxxnkaocoirttyqpndc2u4ajx675qcrteshzq"
},
"third_party": {
"protocol/valory/acn_data_share/0.1.0": "bafybeidbvo3jdbt54pqk3foqfso4uim2vaea5abg6jzktomdeklh6sm2rq",
Expand Down
10 changes: 5 additions & 5 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeiezfedmmseox3ce5aucxsiszdmvskrwwbtpb2a3vw3sbmc5jt7nri
- valory/termination_abci:0.1.0:bafybeiea67epwwgngp7b3wavs6hpkaxv6etyaps6g6325bchfnf354mibq
- valory/transaction_settlement_abci:0.1.0:bafybeifmgmwdkx4esemxjacjwzqkqymkuklb5nehkwqkx7v335fllgswcq
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigxtmifwrcwnt7t22ovopysuapvr37mhmesnlbsab3me25ikdu3om
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicttcqp2n5q3vqdxaoqwawdrqyvh6eq55groaehdarpreufe5agda
- valory/market_manager_abci:0.1.0:bafybeiaotaepzfcp3mvd7pp2zv6v6bbgfjblk4pzcvjbzbhkc5p463afba
- valory/decision_maker_abci:0.1.0:bafybeidx6lsqdgidzfdfspacypheeo7umcdb2wo3qm3kboald5ey52v5rm
- valory/trader_abci:0.1.0:bafybeih5e6z5uizeokivepj7c4ghitxpmheb6fuy7mu4bo3vuwudwhkvla
- valory/staking_abci:0.1.0:bafybeigjw6fg4ksurbhpwc4fg366cm4a5qd5j27eos6t4thbfszagmp7ga
- valory/check_stop_trading_abci:0.1.0:bafybeihhulxg66yxluynp5rkk3o22fe5neti5dvpygoz7pdsu2vxq3r654
- valory/decision_maker_abci:0.1.0:bafybeifljwg5jxxhazhopxo6rful5zc5tmghcos3njsldsjhxiqazzvkhu
- valory/trader_abci:0.1.0:bafybeia5z6vjanod3hauezhvfemuunwl4cxkil7kowplwmvc2ijp6lw4gi
- valory/staking_abci:0.1.0:bafybeifzayvzmhuu54ut5ke2ohutmoprnw474kk63pmlrmlt5cg46slrji
- valory/check_stop_trading_abci:0.1.0:bafybeicqcqhmrsswxyob7j2q2yosfu2ruknl2zibl4ewfmmgjsy3x7t6u4
- valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64
customs:
- valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m
Expand Down
18 changes: 9 additions & 9 deletions 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:bafybeicldgrxjluvccpl4duck5k5kkepyrvq6xf3gib7zbrxykrfofmfd4
agent: valory/trader:0.1.0:bafybeic3u7sb6rh5vdce7gy2gk32hxnovlx2b2qtotolxfeymovcpsmghm
number_of_agents: 4
deployment:
agent:
Expand Down Expand Up @@ -616,33 +616,33 @@ type: connection
0:
config:
ledger_apis:
ethereum:
gnosis:
address: ${RPC_0:str:http://host.docker.internal:8545}
chain_id: ${CHAIN_ID:int:1337}
chain_id: ${CHAIN_ID:int:100}
default_gas_price_strategy: ${DEFAULT_GAS_PRICE_STRATEGY:str:eip1559}
poa_chain: ${POA_CHAIN:bool:false}
1:
config:
ledger_apis:
ethereum:
gnosis:
address: ${RPC_1:str:http://host.docker.internal:8545}
chain_id: ${CHAIN_ID:int:1337}
chain_id: ${CHAIN_ID:int:100}
default_gas_price_strategy: ${DEFAULT_GAS_PRICE_STRATEGY:str:eip1559}
poa_chain: ${POA_CHAIN:bool:false}
2:
config:
ledger_apis:
ethereum:
gnosis:
address: ${RPC_2:str:http://host.docker.internal:8545}
chain_id: ${CHAIN_ID:int:1337}
chain_id: ${CHAIN_ID:int:100}
default_gas_price_strategy: ${DEFAULT_GAS_PRICE_STRATEGY:str:eip1559}
poa_chain: ${POA_CHAIN:bool:false}
3:
config:
ledger_apis:
ethereum:
gnosis:
address: ${RPC_3:str:http://host.docker.internal:8545}
chain_id: ${CHAIN_ID:int:1337}
chain_id: ${CHAIN_ID:int:100}
default_gas_price_strategy: ${DEFAULT_GAS_PRICE_STRATEGY:str:eip1559}
poa_chain: ${POA_CHAIN:bool:false}
---
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/services/trader_pearl/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeicldgrxjluvccpl4duck5k5kkepyrvq6xf3gib7zbrxykrfofmfd4
agent: valory/trader:0.1.0:bafybeic3u7sb6rh5vdce7gy2gk32hxnovlx2b2qtotolxfeymovcpsmghm
number_of_agents: 1
deployment:
agent:
Expand Down Expand Up @@ -49,7 +49,7 @@ models:
abt_error_mult: 5
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
mech_request_price: 0
mech_chain_id: ethereum
mech_chain_id: ${MECH_CHAIN_ID:str:gnosis}
mech_wrapped_native_token_address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d'
mech_activity_checker_contract: ${MECH_ACTIVITY_CHECKER_CONTRACT:str:0x155547857680A6D51bebC5603397488988DEb1c8}
sample_bets_closing_days: 10
Expand Down Expand Up @@ -121,7 +121,7 @@ public_id: valory/ledger:0.19.0
type: connection
config:
ledger_apis:
ethereum:
gnosis:
address: ${GNOSIS_LEDGER_RPC:str:http://host.docker.internal:8545}
chain_id: ${GNOSIS_LEDGER_CHAIN_ID:int:100}
default_gas_price_strategy: ${GNOSIS_LEDGER_PRICING:str:eip1559}
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/check_stop_trading_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contracts:
protocols: []
skills:
- valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm
- valory/staking_abci:0.1.0:bafybeigjw6fg4ksurbhpwc4fg366cm4a5qd5j27eos6t4thbfszagmp7ga
- valory/staking_abci:0.1.0:bafybeifzayvzmhuu54ut5ke2ohutmoprnw474kk63pmlrmlt5cg46slrji
behaviours:
main:
args: {}
Expand Down
4 changes: 4 additions & 0 deletions packages/valory/skills/decision_maker_abci/behaviours/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def check_balance(self) -> WaitableConditionType:
contract_id=str(ERC20.contract_id),
contract_callable="check_balance",
account=self.synchronized_data.safe_contract_address,
chain_id=self.params.mech_chain_id,
)
if response_msg.performative != ContractApiMessage.Performative.RAW_TRANSACTION:
self.context.logger.error(
Expand Down Expand Up @@ -514,6 +515,7 @@ def contract_interact(
contract_address,
contract_id,
contract_callable,
chain_id=self.params.mech_chain_id,
**kwargs,
)
if response_msg.performative != ContractApiMessage.Performative.RAW_TRANSACTION:
Expand Down Expand Up @@ -555,6 +557,7 @@ def _build_multisend_data(
contract_id=str(MultiSendContract.contract_id),
contract_callable="get_tx_data",
multi_send_txs=self.multi_send_txs,
chain_id=self.params.mech_chain_id,
)
expected_performative = ContractApiMessage.Performative.RAW_TRANSACTION
if response_msg.performative != expected_performative:
Expand Down Expand Up @@ -589,6 +592,7 @@ def _build_multisend_safe_tx_hash(self) -> WaitableConditionType:
data=self.multisend_data,
safe_tx_gas=SAFE_GAS,
operation=SafeOperation.DELEGATE_CALL.value,
chain_id=self.params.mech_chain_id,
)

if response_msg.performative != ContractApiMessage.Performative.STATE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def _build_exchange_tx(self) -> WaitableConditionType:
contract_address=WXDAI,
contract_id=str(ERC20.contract_id),
contract_callable="build_deposit_tx",
chain_id=self.params.mech_chain_id,
)

if response_msg.performative != ContractApiMessage.Performative.STATE:
Expand Down Expand Up @@ -106,6 +107,7 @@ def _build_approval_tx(self) -> WaitableConditionType:
contract_callable="build_approval_tx",
spender=self.market_maker_contract_address,
amount=self.investment_amount,
chain_id=self.params.mech_chain_id,
)

if response_msg.performative != ContractApiMessage.Performative.STATE:
Expand Down Expand Up @@ -133,6 +135,7 @@ def _calc_buy_amount(self) -> WaitableConditionType:
contract_callable="calc_buy_amount",
investment_amount=self.investment_amount,
outcome_index=self.outcome_index,
chain_id=self.params.mech_chain_id,
)
if response_msg.performative != ContractApiMessage.Performative.RAW_TRANSACTION:
self.context.logger.error(
Expand Down Expand Up @@ -160,6 +163,7 @@ def _build_buy_tx(self) -> WaitableConditionType:
investment_amount=self.investment_amount,
outcome_index=self.outcome_index,
min_outcome_tokens_to_buy=self.buy_amount,
chain_id=self.params.mech_chain_id,
)
if response_msg.performative != ContractApiMessage.Performative.STATE:
self.context.logger.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _build_withdraw_wxdai_tx(self, amount: int) -> WaitableConditionType:
contract_id=str(ERC20.contract_id),
contract_callable="build_withdraw_tx",
amount=amount,
chain_id=self.params.mech_chain_id,
)

if response_msg.performative != ContractApiMessage.Performative.STATE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ def _get_latest_block(self) -> WaitableConditionType:
performative=LedgerApiMessage.Performative.GET_STATE, # type: ignore
ledger_callable="get_block",
block_identifier=DEFAULT_TO_BLOCK,
chain_id=self.params.mech_chain_id,
)
if ledger_api_response.performative != LedgerApiMessage.Performative.STATE:
self.context.logger.error(f"Failed to get block: {ledger_api_response}")
Expand Down
10 changes: 5 additions & 5 deletions packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ fingerprint:
README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i
__init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a
behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky
behaviours/base.py: bafybeifjgxzhwzxiky3okgtv4ojumm7fj7bom6qe3ysdvs3cpu32w446g4
behaviours/bet_placement.py: bafybeia4listbfzsk4n4wkc4ycaftxgywjnl3mmpcqhuo3nwwia4n3oufu
behaviours/base.py: bafybeicmwroadqz2lgznxzkfyhqmyg6rwfjdwtxfhp4qo6csj4kiuhcogm
behaviours/bet_placement.py: bafybeidyucxomadfzr6eyfywlc4satl4vqb6qhdkyzdp76zkxbfjfyzai4
behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku
behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci
behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e
behaviours/decision_receive.py: bafybeiaph3ft4j3br4k7bddymzv5ffcexmlup2l4prk5rvhqlilxtq57oa
behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y
behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm
behaviours/order_subscription.py: bafybeib3maqohhx35wzryy4otdcjp5thkr4sbp27ksvwidy3pwm444itra
behaviours/order_subscription.py: bafybeihwuhgykptokmeam5sacnfzedk5puvrxbjo7iypaqhsrqg5nk7psm
behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce
behaviours/reedem.py: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy
behaviours/reedem.py: bafybeiais2fd233xfb65ft6ztpgvocyooomzaxvou4a5rvd3qwjiyvriga
behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i
behaviours/sampling.py: bafybeihlpkinxgewpyazax2qlwzlo5iwpxcce6g5juybn6qinstzku27fi
behaviours/storage_manager.py: bafybeigiesjbq5rniesnfrhxxlo55rztzzcfkhztz6eaabbp4pe7f4yeaa
Expand Down Expand Up @@ -104,7 +104,7 @@ skills:
- valory/market_manager_abci:0.1.0:bafybeiaotaepzfcp3mvd7pp2zv6v6bbgfjblk4pzcvjbzbhkc5p463afba
- valory/transaction_settlement_abci:0.1.0:bafybeifmgmwdkx4esemxjacjwzqkqymkuklb5nehkwqkx7v335fllgswcq
- valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64
- valory/staking_abci:0.1.0:bafybeigjw6fg4ksurbhpwc4fg366cm4a5qd5j27eos6t4thbfszagmp7ga
- valory/staking_abci:0.1.0:bafybeifzayvzmhuu54ut5ke2ohutmoprnw474kk63pmlrmlt5cg46slrji
behaviours:
main:
args: {}
Expand Down
1 change: 1 addition & 0 deletions packages/valory/skills/staking_abci/behaviours.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def contract_interact(
contract_address,
contract_id,
contract_callable,
chain_id=self.params.mech_chain_id,
**kwargs,
)
if response_msg.performative != ContractApiMessage.Performative.RAW_TRANSACTION:
Expand Down
4 changes: 3 additions & 1 deletion packages/valory/skills/staking_abci/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

"""Models for the Staking ABCI application."""

from typing import Any
from typing import Any, Optional

from packages.valory.skills.abstract_round_abci.models import BaseParams
from packages.valory.skills.abstract_round_abci.models import (
Expand All @@ -40,6 +40,8 @@
class StakingParams(BaseParams):
"""Staking parameters."""

mech_chain_id: Optional[str]

def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Initialize the parameters' object."""
self.staking_contract_address: str = self._ensure(
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/staking_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
README.md: bafybeifrpl36fddmgvniwvghqtxdzc44ry6l2zvqy37vu3y2xvwyd23ugy
__init__.py: bafybeiageyes36ujnvvodqd5vlnihgz44rupysrk2ebbhskjkueetj6dai
behaviours.py: bafybeib5rcg26usohcbf2suahk5jticruzzdl2hdakchwsf6bptksi32oy
behaviours.py: bafybeifbfelfwlys6bsdhbqkbm26racle4sjdvkcelfvcw3ypy3qpremgu
dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm
fsm_specification.yaml: bafybeicuoejmaks3ndwhbflp64kkfdkrdyn74a2fplarg4l3gxlonfmeoq
handlers.py: bafybeichsi2y5zvzffupj2vhgagocwvnm7cbzr6jmavp656mfrzsdvkfnu
models.py: bafybeidc6aghkskpy5ze62xpjbinwgsyvtzvyrlsfckrygcnj4cts54zpa
models.py: bafybeif6j6fad3o2zit4wuwcs6mowgnj4nxzrtbqf7tdnxpsfyst33k6oa
payloads.py: bafybeibnub5ehb2mvpcoan3x23pp5oz4azpofwrtcl32abswcfl4cmjlwq
rounds.py: bafybeiemfytlrp7uhz7x6cc7e434f5xckg7awa5bybh7hiehjkjzr6rrqu
tests/__init__.py: bafybeid7m6ynosqeb4mvsss2hqg75aly5o2d47r7yfg2xtgwzkkilv2d2m
Expand Down
3 changes: 2 additions & 1 deletion packages/valory/skills/trader_abci/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ class RandomnessApi(ApiSpecs):
class TraderParams(
# also contains the `StakingParams`. Must be before `MechInteractParams` because of the mech's contract address
CheckStopTradingParams,
# must be before `MechInteractParams` because of the mech's chain id
TxSettlementMultiplexerParams,
# also contains the `MechInteractParams`
DecisionMakerParams,
TerminationParams,
TxSettlementMultiplexerParams,
):
"""A model to represent the trader params."""

Expand Down
10 changes: 5 additions & 5 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fingerprint:
dialogues.py: bafybeihouxm2nl2r6h3vlymmtrge43tcnwphtzhc2q3vludpgytigggguy
fsm_specification.yaml: bafybeibq4d3ol4ccz55yot3nzrvua4zn5y5xk7xuen7acewdw5dr7m473e
handlers.py: bafybeigrqsgqupy6kds2vqieacsymx3eucntwl52rlgi4cu4lrb6bglhti
models.py: bafybeih2vkf4ln7n7ar27iemho7w7sdr4clmhbnhbcznmsri6mc2skkky4
models.py: bafybeigbnyvpuh7qq3bsgmcb27e6fz2kirp74eios55acar4352opv4ggm
tests/__init__.py: bafybeiadatapyjh3e7ucg2ehz77oms3ihrbutwb2cs2tkjehy54utwvuyi
tests/tests_handlers.py: bafybeifxvd63qblqpsmyvj7k4dbqubab2pshao5zd2zs2srs7rt32zvciu
fingerprint_ignore_patterns: []
Expand All @@ -27,10 +27,10 @@ skills:
- valory/transaction_settlement_abci:0.1.0:bafybeifmgmwdkx4esemxjacjwzqkqymkuklb5nehkwqkx7v335fllgswcq
- valory/termination_abci:0.1.0:bafybeiea67epwwgngp7b3wavs6hpkaxv6etyaps6g6325bchfnf354mibq
- valory/market_manager_abci:0.1.0:bafybeiaotaepzfcp3mvd7pp2zv6v6bbgfjblk4pzcvjbzbhkc5p463afba
- valory/decision_maker_abci:0.1.0:bafybeidx6lsqdgidzfdfspacypheeo7umcdb2wo3qm3kboald5ey52v5rm
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigxtmifwrcwnt7t22ovopysuapvr37mhmesnlbsab3me25ikdu3om
- valory/staking_abci:0.1.0:bafybeigjw6fg4ksurbhpwc4fg366cm4a5qd5j27eos6t4thbfszagmp7ga
- valory/check_stop_trading_abci:0.1.0:bafybeihhulxg66yxluynp5rkk3o22fe5neti5dvpygoz7pdsu2vxq3r654
- valory/decision_maker_abci:0.1.0:bafybeifljwg5jxxhazhopxo6rful5zc5tmghcos3njsldsjhxiqazzvkhu
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicttcqp2n5q3vqdxaoqwawdrqyvh6eq55groaehdarpreufe5agda
- valory/staking_abci:0.1.0:bafybeifzayvzmhuu54ut5ke2ohutmoprnw474kk63pmlrmlt5cg46slrji
- valory/check_stop_trading_abci:0.1.0:bafybeicqcqhmrsswxyob7j2q2yosfu2ruknl2zibl4ewfmmgjsy3x7t6u4
- valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64
behaviours:
main:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2023 Valory AG
# Copyright 2023-2024 Valory AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,6 +62,7 @@ def _get_balance(self, agent: str) -> Generator[None, None, Optional[int]]:
performative=LedgerApiMessage.Performative.GET_STATE, # type: ignore
ledger_callable="get_balance",
account=agent,
chain_id=self.params.mech_chain_id,
)

try:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2023 Valory AG
# Copyright 2023-2024 Valory AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@

"""Custom objects for the TxSettlementMultiplexer ABCI application."""

from typing import Any
from typing import Any, Optional

from packages.valory.skills.abstract_round_abci.models import BaseParams
from packages.valory.skills.abstract_round_abci.models import (
Expand All @@ -42,6 +42,8 @@
class TxSettlementMultiplexerParams(BaseParams):
"""Staking parameters."""

mech_chain_id: Optional[str]

def __init__(self, *args: Any, **kwargs: Any) -> None:
"""Initialize the parameters' object."""
self.agent_balance_threshold: int = self._ensure(
Expand Down
Loading

0 comments on commit 8ecd287

Please sign in to comment.