Skip to content

Commit 76c6a68

Browse files
committed
feat: add MsgVote
1 parent 82f5a89 commit 76c6a68

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pyinjective/composer.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
from .proto.cosmos.distribution.v1beta1 import tx_pb2 as cosmos_distribution_tx_pb
2828

29+
from .proto.cosmos.gov.v1beta1 import tx_pb2 as cosmos_gov_tx_pb
30+
2931
from .constant import Denom
3032
from .utils import *
3133
from typing import List
@@ -777,6 +779,19 @@ def MsgWithdrawDelegatorReward(
777779
validator_address=validator_address
778780
)
779781

782+
def MsgVote(
783+
self,
784+
proposal_id: str,
785+
voter: str,
786+
option: int,
787+
):
788+
789+
return cosmos_gov_tx_pb.MsgVote(
790+
proposal_id=proposal_id,
791+
voter=voter,
792+
option=option
793+
)
794+
780795
# data field format: [request-msg-header][raw-byte-msg-response]
781796
# you need to figure out this magic prefix number to trim request-msg-header off the data
782797
# this method handles only exchange responses

0 commit comments

Comments
 (0)