Created
April 29, 2024 11:12
-
-
Save welaskez/cbd71e3fa3b37bdfd2656d41610e49e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def main(): | |
provider = LiteBalancer.from_testnet_config(2) | |
await provider.start_up() | |
highload_wallet = await HighloadWallet.from_mnemonic(provider, mnemonics) | |
USER_JETTON_WALLET = (await provider.run_get_method(address=JETTON_MASTER_ADDRESS, | |
method="get_wallet_address", | |
stack=[begin_cell().store_address(highload_wallet.address).end_cell().begin_parse()]))[0] | |
destinations = { | |
ADDRESS1: AMOUNT1, | |
ADDRESS2: AMOUNT2, | |
} | |
bodies = [] | |
forward_payload = (begin_cell() | |
.store_uint(0, 32) | |
.store_snake_string("Token mailing from highload TEST") | |
.end_cell()) | |
for destination, amount in destinations.items(): | |
bodies.append((begin_cell() | |
.store_uint(0xf8a7ea5, 32) | |
.store_uint(0, 64) | |
.store_coins(int(amount*1e9)) | |
.store_address(destination) | |
.store_address(highload_wallet.address) | |
.store_bit(0) | |
.store_coins(1) | |
.store_bit(1) | |
.store_ref(forward_payload) | |
.end_cell())) | |
await highload_wallet.transfer(destinations=[USER_JETTON_WALLET]*len(bodies), amounts=[50000000]*len(bodies), | |
bodies=bodies) | |
await provider.close_all() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment