Skip to content

Commit

Permalink
fix: devops bot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdummett committed Aug 12, 2024
1 parent 2f53b61 commit b976056
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
49 changes: 49 additions & 0 deletions toolkit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from typing import Generator

from vega_sim.null_service import VegaServiceNull


PROPOSER = "PROPOSER"


def vega():
vega = VegaServiceNull(use_full_vega_wallet=True)
vega.start()

# Create the proposal key
vega.create_key(PROPOSER)
vega.wait_fn(1)
vega.wait_for_total_catchup()
# Mint to the proposal key
vega.mint(PROPOSER, vega.find_asset_id(symbol="VOTE", enabled=True), 10000)
vega.wait_fn(1)
vega.wait_for_total_catchup()

return vega


def usdt(vega: VegaServiceNull) -> str:
vega.create_asset(PROPOSER, "Tether", "USDT", 6, 1000000)
vega.wait_fn(1)
vega.wait_for_total_catchup()
return vega.find_asset_id("USDT")


def futr(vega):
"""Creates a simple future market"""
pass


def spot(vega):
"""Creates a simple spot market"""
pass


def perp(vega):
"""Creates a simple perpetual market"""
pass


def epoch(vega):
"""Creates a simple epoch"""
pass
3 changes: 2 additions & 1 deletion vega_sim/scenario/common/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -3959,7 +3959,8 @@ def _check(self) -> bool:
amm
for amm in self.vega.list_amms(
market_id=self.market_id,
party_id=self._public_key,
key_name=self.key_name,
wallet_name=self.wallet_name,
status=vega_protos_events.AMM.Status.Value("STATUS_ACTIVE"),
)
if amm.status == vega_protos_events.AMM.Status.Value("STATUS_ACTIVE")
Expand Down

0 comments on commit b976056

Please sign in to comment.