Skip to content

Commit

Permalink
address cmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill committed Oct 12, 2023
1 parent acd7bf7 commit 370c301
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions v4-client-py/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# IDE
.idea/
6 changes: 3 additions & 3 deletions v4-client-py/v4_client_py/chain/aerial/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from datetime import timedelta
from typing import Any, Callable, List, Optional, Union
from v4_client_py.clients.constants import BroadcastMode
from v4_client_py.clients.constants import BroadcastMode, DEFAULT_TOKEN

from v4_proto.cosmos.base.query.v1beta1.pagination_pb2 import PageRequest

Expand All @@ -18,7 +18,7 @@ def prepare_and_broadcast_basic_transaction(
gas_limit: Optional[int] = None,
memo: Optional[str] = None,
broadcast_mode: BroadcastMode = None,
fee: Optional[str] = "5000dv4tnt",
fee: Optional[int] = 5000,
) -> SubmittedTx:
"""Prepare and broadcast basic transaction.
Expand Down Expand Up @@ -53,7 +53,7 @@ def prepare_and_broadcast_basic_transaction(
# finally, build the final transaction that will be executed with the correct gas and fee values
tx.seal(
SigningCfg.direct(sender.public_key(), account.sequence),
fee=fee,
fee=f"{fee}{DEFAULT_TOKEN}",
gas_limit=gas_limit,
memo=memo,
)
Expand Down
3 changes: 3 additions & 0 deletions v4-client-py/v4_client_py/clients/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@

BECH32_PREFIX = 'dydx'

# ------------ DEFAULT TOKEN ------------
DEFAULT_TOKEN = "dv4tnt"

class BroadcastMode(Enum):
BroadcastTxSync = 0
BroadcastTxCommit = 1
Expand Down
2 changes: 1 addition & 1 deletion v4-client-py/v4_client_py/clients/modules/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def send_message(
gas_limit=gas_limit,
memo=None,
broadcast_mode=broadcast_mode if (broadcast_mode != None) else self.default_broadcast_mode(msg),
fee="0dv4tnt" if zeroFee else "5000dv4tnt",
fee=0 if zeroFee else 5000,
)

def place_order(
Expand Down

0 comments on commit 370c301

Please sign in to comment.