Skip to main content

Mx.NET.SDK.SmartSend

⚡ MultiversX SmartSend Python SDK: Library for interacting with Smart Send contracts on MultiversX blockchain

How to install?

The content is delivered via PyPI package:

remarkabletools_mx_smartsend

Main Features

  • Create EGLD/Token/MetaESDT/NFT/SFT transactions for Smart Send contracts

Quick start guide

Basic example

provider = ProxyNetworkProvider("https://devnet-gateway.multiversx.com")
account = provider.get_account(Address.from_bech32("MY_ADDRESS"))
network_config = provider.get_network_config()
config = DefaultTransactionBuildersConfiguration(network_config.chain_id)

smart_send = SmartSend(account, config, "MY_CONTRACT_BECH32_ADDRESS")

input_transactions: List[TokenAmount] = []
for i in range(1, 10):
    input_transactions.append(TokenAmount("RECEIVER_ADDRESS", TokenPayment.egld_from_amount(f"0.0{i}"))) # TokenPayment can also be fungible_from_amount / meta_esdt_from_amount / non_fungible / semi_fungible

try:
    # You can sync the account before creating transactions (to have the latest nonce)
    # account = provider.get_account(Address.from_bech32("MY_ADDRESS")) # get account data from network
    # smart_send.sync(account) # sync account

    txs = smart_send.create_egld_transactions(input_transactions) # or create_token_transactions / create_metaesdt_transactions / create_nft_transactions / create_sft_transactions
    # sign and send txs
except Exception as ex:
    print(ex)

Advanced example

The following example is using a wallet signer that should not be used in production, only in private!

provider = ProxyNetworkProvider("https://devnet-gateway.multiversx.com")
account = provider.get_account(Address.from_bech32("MY_ADDRESS"))
network_config = provider.get_network_config()
config = DefaultTransactionBuildersConfiguration(network_config.chain_id)

signer = UserSigner.from_pem_file(Path("/path/wallet.pem"))

smart_send = SmartSend(account, config, "MY_CONTRACT_ADDRESS")

input_transactions: List[TokenAmount] = []
for i in range(1, 10):
    input_transactions.append(TokenAmount("RECEIVER_ADDRESS", TokenPayment.egld_from_amount(f"0.0{i}")))

try:
    txs = smart_send.create_egld_transactions(input_transactions)
    for tx in txs:
        tx.signature = signer.sign(tx)

    response = provider.send_transactions(txs)
    print(response)
except Exception as ex:
    print(ex)

Metadata

Release files for remarkabletools-mx-smartsend 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remarkabletools-mx-smartsend 1.0.0
File Size Uploaded
remarkabletools_mx_smartsend-1.0.0.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remarkabletools-mx-smartsend 1.0.0
File Interpreter ABI Platform
remarkabletools_mx_smartsend-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / remarkabletools_mx_smartsend-1.0.0.tar.gz

Download URL remarkabletools_mx_smartsend-1.0.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59b43df8e661fe08285f9a1ac9574b0cb8ba0301bab84cad7af1541538319c8a
BLAKE2b-256 checksum
How to use checksums
77ede2bd952b35eb03e9829c23996e2dfacd54fde99a3e559e26bb725b956824
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / remarkabletools_mx_smartsend-1.0.0-py3-none-any.whl

Download URL remarkabletools_mx_smartsend-1.0.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b745dbccdc186ce9d0c498c34d52feed33ce34c92a398fe1082c16b5022186a7
BLAKE2b-256 checksum
How to use checksums
289b1d67c25309a1bc1b8c0ed9605ed9b6b4df9b0a7342d29be933c01af1978b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page