Skip to content

Commit 03b81d6

Browse files
author
abel
committed
(feat) Added support in Composer to create all missing messages from the distribution module. Marked as deprecated old functions not following Python naming standards and created the replacements for them (with the correct name following standards)
1 parent 51a73f4 commit 03b81d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+325
-249
lines changed

examples/chain_client/0_LocalOrderHash.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def main() -> None:
113113
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
114114
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
115115
fee = [
116-
composer.Coin(
116+
composer.coin(
117117
amount=gas_price * gas_limit,
118118
denom=network.fee_denom,
119119
)
@@ -150,7 +150,7 @@ async def main() -> None:
150150
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
151151
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
152152
fee = [
153-
composer.Coin(
153+
composer.coin(
154154
amount=gas_price * gas_limit,
155155
denom=network.fee_denom,
156156
)
@@ -240,7 +240,7 @@ async def main() -> None:
240240
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
241241
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
242242
fee = [
243-
composer.Coin(
243+
composer.coin(
244244
amount=gas_price * gas_limit,
245245
denom=network.fee_denom,
246246
)

examples/chain_client/13_MsgIncreasePositionMargin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def main() -> None:
6666
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
6767
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
6868
fee = [
69-
composer.Coin(
69+
composer.coin(
7070
amount=gas_price * gas_limit,
7171
denom=network.fee_denom,
7272
)

examples/chain_client/15_MsgWithdraw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def main() -> None:
5757
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
5858
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
5959
fee = [
60-
composer.Coin(
60+
composer.coin(
6161
amount=gas_price * gas_limit,
6262
denom=network.fee_denom,
6363
)

examples/chain_client/16_MsgSubaccountTransfer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def main() -> None:
6464
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
6565
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
6666
fee = [
67-
composer.Coin(
67+
composer.coin(
6868
amount=gas_price * gas_limit,
6969
denom=network.fee_denom,
7070
)

examples/chain_client/17_MsgBatchUpdateOrders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async def main() -> None:
153153
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
154154
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
155155
fee = [
156-
composer.Coin(
156+
composer.coin(
157157
amount=gas_price * gas_limit,
158158
denom=network.fee_denom,
159159
)

examples/chain_client/18_MsgBid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async def main() -> None:
5656
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
5757
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
5858
fee = [
59-
composer.Coin(
59+
composer.coin(
6060
amount=gas_price * gas_limit,
6161
denom=network.fee_denom,
6262
)

examples/chain_client/19_MsgGrant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async def main() -> None:
7676
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
7777
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
7878
fee = [
79-
composer.Coin(
79+
composer.coin(
8080
amount=gas_price * gas_limit,
8181
denom=network.fee_denom,
8282
)

examples/chain_client/1_MsgSend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def main() -> None:
6161
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
6262
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
6363
fee = [
64-
composer.Coin(
64+
composer.coin(
6565
amount=gas_price * gas_limit,
6666
denom=network.fee_denom,
6767
)

examples/chain_client/20_MsgExec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async def main() -> None:
8383
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
8484
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
8585
fee = [
86-
composer.Coin(
86+
composer.coin(
8787
amount=gas_price * gas_limit,
8888
denom=network.fee_denom,
8989
)

examples/chain_client/21_MsgRevoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def main() -> None:
6161
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
6262
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
6363
fee = [
64-
composer.Coin(
64+
composer.coin(
6565
amount=gas_price * gas_limit,
6666
denom=network.fee_denom,
6767
)

0 commit comments

Comments
 (0)