Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.3.0] - 2024-02-12
### Changed
- Removed `asyncio` from the dependencies

## [1.2.0] - 2024-01-25
### Changed
- Updated reference gas cost for all messages in the gas estimator
Expand Down
6 changes: 3 additions & 3 deletions examples/chain_client/0_LocalOrderHash.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def main() -> None:
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down Expand Up @@ -150,7 +150,7 @@ async def main() -> None:
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down Expand Up @@ -240,7 +240,7 @@ async def main() -> None:
gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/13_MsgIncreasePositionMargin.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/15_MsgWithdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/16_MsgSubaccountTransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/17_MsgBatchUpdateOrders.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/18_MsgBid.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/19_MsgGrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/1_MsgSend.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/20_MsgExec.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/21_MsgRevoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/22_MsgSendToEth.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/23_MsgRelayPriceFeedPrice.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/24_MsgRewardsOptOut.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/25_MsgDelegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
81 changes: 0 additions & 81 deletions examples/chain_client/26_MsgWithdrawDelegatorReward.py

This file was deleted.

2 changes: 1 addition & 1 deletion examples/chain_client/2_MsgDeposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/30_ExternalTransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/33_MsgCancelBinaryOptionsOrder.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/36_MsgRelayProviderPrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/3_MsgCreateSpotLimitOrder.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
8 changes: 4 additions & 4 deletions examples/chain_client/40_MsgExecuteContract.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ async def main() -> None:
# prepare tx msg
# NOTE: COIN MUST BE SORTED IN ALPHABETICAL ORDER BY DENOMS
funds = [
composer.Coin(
composer.coin(
amount=69,
denom="factory/inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6/inj12ngevx045zpvacus9s6anr258gkwpmthnz80e9",
),
composer.Coin(amount=420, denom="peggy0x44C21afAaF20c270EBbF5914Cfc3b5022173FEB7"),
composer.Coin(amount=1, denom="peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"),
composer.coin(amount=420, denom="peggy0x44C21afAaF20c270EBbF5914Cfc3b5022173FEB7"),
composer.coin(amount=1, denom="peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5"),
]
msg = composer.MsgExecuteContract(
sender=address.to_acc_bech32(),
Expand Down Expand Up @@ -71,7 +71,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/41_MsgCreateInsuranceFund.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/42_MsgUnderwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
2 changes: 1 addition & 1 deletion examples/chain_client/43_MsgRequestRedemption.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def main() -> None:
gas_limit = int(sim_res["gasInfo"]["gasUsed"]) + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation
gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0")
fee = [
composer.Coin(
composer.coin(
amount=gas_price * gas_limit,
denom=network.fee_denom,
)
Expand Down
Loading