Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/lstolas/agents/lst_agent/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protocols:
- open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm
skills:
- eightballer/prometheus:0.1.0:bafybeicl5i7e467aowfarke4bbyixo2dggar276njmvyuwbsby5pxshhtu
- lstolas/lst_skill:0.1.0:bafybeihfca72nbmpn27wkhgg3q3fdjz3w3cr4byk6m2vyv6dfzebi5hflq
- lstolas/lst_skill:0.1.0:bafybeifsekin3guesvnjxy2npl5k4rerasx2csfeopr3ejuyo4eiiqyegm
customs: []
default_ledger: ethereum
required_ledgers:
Expand Down
7 changes: 4 additions & 3 deletions packages/lstolas/agents/lst_agent_prod/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protocols:
- open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm
skills:
- eightballer/prometheus:0.1.0:bafybeicl5i7e467aowfarke4bbyixo2dggar276njmvyuwbsby5pxshhtu
- lstolas/lst_skill:0.1.0:bafybeihfca72nbmpn27wkhgg3q3fdjz3w3cr4byk6m2vyv6dfzebi5hflq
- lstolas/lst_skill:0.1.0:bafybeifsekin3guesvnjxy2npl5k4rerasx2csfeopr3ejuyo4eiiqyegm
customs: []
default_ledger: ethereum
required_ledgers:
Expand Down Expand Up @@ -99,14 +99,15 @@ models:
args:
l1_starting_block: 23648061
l2_starting_block: 42790245
layer_1_rpc_endpoint: ${LAYER_1_RPC:str:https://0xrpc.io/eth}
layer_1_rpc_endpoint: ${LAYER_1_RPC:str:https://mainnet.gateway.tenderly.co}
layer_1_amb_home: '0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e'
layer_1_olas_address: '0x0001A500A6B18995B03f44bb040A5fFc28E45CB0'
layer_2_rpc_endpoint: ${LAYER_2_RPC:str:https://gnosis.oat.farm}
layer_2_rpc_endpoint: ${LAYER_2_RPC:str:https://gnosis.drpc.org}
layer_2_amb_home: '0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59'
layer_2_amb_helper: '0x7d94ece17e81355326e3359115D4B02411825EdD'
lst_collector_address: '0x64003846B67D66AfdFb03325fa4292b76FCF182F'
lst_unstake_relayer_address: '0xaC7eA9478E0e1186E7D1c82b8d8dc80AEe0F79F6'
lst_distributor_address: '0x64003846B67D66AfdFb03325fa4292b76FCF182F'
lst_staking_manager_address: '0xEfF4A1D9faF5c750d5E32754c40Cf163767C63A4'
lst_staking_processor_l2_address: '0x4A26F79b9dd73a48d57ce4DF70295A875afa006c'
bridging_enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def has_already_run_today(self) -> bool:

def is_triggered(self) -> bool:
"""Check if the state is triggered."""

if not self.strategy.bridging_enabled:
self.log.info("Bridging is disabled in the configuration, skipping bridge trigger.")
return False
if self.has_already_run_today():
self.log.info("Bridge has already been triggered today, skipping.")
return False
Expand Down
4 changes: 4 additions & 0 deletions packages/lstolas/skills/lst_skill/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class LstStrategy(Model):
# token contract address
layer_1_olas_token_address: Address

# configuration
bridging_enabled: bool

def __init__(self, **kwargs):
"""Initialize the strategy of the lst agent."""
self.layer_1_api = EthereumApi(address=kwargs.pop("layer_1_rpc_endpoint"))
Expand All @@ -122,6 +125,7 @@ def __init__(self, **kwargs):
self.layer_2_amb_helper = kwargs.pop("layer_2_amb_helper")

self.layer_1_olas_token_address = kwargs.pop("layer_1_olas_address")
self.bridging_enabled = kwargs.pop("bridging_enabled", True)

super().__init__(**kwargs)

Expand Down
5 changes: 3 additions & 2 deletions packages/lstolas/skills/lst_skill/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ fingerprint:
behaviours_classes/finalize_bridged_tokens_round.py: bafybeifnxckqnez2apllpwlxj6rvrfat732xhorhqle3aut6wl2dr7ekxu
behaviours_classes/redeem_round.py: bafybeiansmwfn7y5gh7kh55brskmh7gpbwevebrelhxooovmrpndm5yagq
behaviours_classes/starting_round.py: bafybeift5drjrtwcbssumcpfm2eczus6z6si4gppokvymhbqkfsajmhun4
behaviours_classes/trigger_l2_to_l1_bridge.py: bafybeiac6nikhnpyveenvtzdzwxqxe5ivtayxlz5enmpcfvtsmtnnpvbwm
behaviours_classes/trigger_l2_to_l1_bridge.py: bafybeiezcju4gpuxoimuijsn6txozfhzsbhjeg7r55bofiis5xnxufyou4
behaviours_classes/waiting_round.py: bafybeiekbnjih5txvpxi75itpjfv7nr65bf7kbgd2f4tdvanbjsewdp2ma
dialogues.py: bafybeigbpewv7jsbyaybassv47sxk7bmvbl5pg25v2inr5gc6djch75rmi
events_processing.py: bafybeihvdc6qwmzk6pizpuwhdjb7whtevt25uicjeghxzem2qtjko2biom
handlers.py: bafybeigxyhzux4czjkaqntqmnjcfidchf2h6sitvxx6dknpwmoucbojqgq
models.py: bafybeibzv5axz7g47km2hyt3tpzypglsqiyzmhb7ddzt2xe5rblqy4r3xe
models.py: bafybeic26c7i6i4boisihgxbnwafphfsmdlttd6loe6dns3svreyjayaxu
tests/test_check_work_behaviour.py: bafybeib45mbpf7ctr5aoyltwh34pljwpsh5zqentdqxerfkqx4tqhsg5h4
tests/test_conditional_behaviours.py: bafybeickfflcj6kw5k72w4a56xbzsiolv34vcfjkgr5o3wm4wluoztxqlm
tests/test_fsm_behaviour.py: bafybeiellmhyw3fupa725t6yirtg3ct25vuttswvyfzwvr5k3l5x3zseby
Expand Down Expand Up @@ -85,6 +85,7 @@ models:
lst_distributor_address: '0x99817C87A9E85E30632365D288e4833cD2003B8b'
lst_staking_manager_address: '0xc6c586763399A5716c91961F0D208928a9950ba2'
lst_staking_processor_l2_address: '0x7341bff68aa4F93E636C9D88AaA7c9E6dceD527d'
bridging_enabled: false
class_name: LstStrategy
tx_settler:
args: {}
Expand Down
6 changes: 3 additions & 3 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"contract/eightballer/amb_gnosis_helper/0.1.0": "bafybeig37p3q4se2it75kt4zvqvrvzk4fqc7eyspspt3txooxxljkurkey",
"contract/eightballer/erc_20/0.1.0": "bafybeig622mhgil3uq34d4l3r6moxisgvxwxtrosds2x7glx3kg5z4yqzq",
"contract/lstolas/lst_staking_token_locked/0.1.0": "bafybeidw4povdmyzpszkzgnw6iv3w4gnbzboqq5dolxegjptcadv26lgyy",
"skill/lstolas/lst_skill/0.1.0": "bafybeihfca72nbmpn27wkhgg3q3fdjz3w3cr4byk6m2vyv6dfzebi5hflq",
"agent/lstolas/lst_agent/0.1.0": "bafybeicuxgbuoectjyloy44nlgxhnxtlscsgrhf4fo5ntyzpoesl3u3lh4",
"agent/lstolas/lst_agent_prod/0.1.0": "bafybeicisavghmxycsljnifw4tx76hjizoy4d2jff3dmxilrsvondu6zqq"
"skill/lstolas/lst_skill/0.1.0": "bafybeifsekin3guesvnjxy2npl5k4rerasx2csfeopr3ejuyo4eiiqyegm",
"agent/lstolas/lst_agent/0.1.0": "bafybeiewyertdnqyblluiprbkm22v2prcaut3mejwocgnbbzuelm6vu3xm",
"agent/lstolas/lst_agent_prod/0.1.0": "bafybeie6hhliu3wcsided5qxh3jxrck7g4vqssgonsxrws5pv2pfwq6vd4"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm",
Expand Down