MCPcopy Create free account
hub / github.com/canopy-network/canopy / send_send_tx

Function send_send_tx

plugin/python/tutorial/rpc_test.py:326–344  ·  view source on GitHub ↗

Send a send transaction.

(
    rpc_url: str,
    sender_key: KeyGroup,
    from_addr: str,
    to_addr: str,
    amount: int,
    fee: int,
    network_id: int,
    chain_id: int,
    height: int
)

Source from the content-addressed store, hash-verified

324
325
326def send_send_tx(
327 rpc_url: str,
328 sender_key: KeyGroup,
329 from_addr: str,
330 to_addr: str,
331 amount: int,
332 fee: int,
333 network_id: int,
334 chain_id: int,
335 height: int
336) -> str:
337 """Send a send transaction."""
338 send_msg = {
339 'fromAddress': hex_to_base64(from_addr),
340 'toAddress': hex_to_base64(to_addr),
341 'amount': amount,
342 }
343
344 return build_sign_and_send_tx(rpc_url, sender_key, 'send', send_msg, fee, network_id, chain_id, height)
345
346
347def send_reward_tx(

Callers 1

test_plugin_transactionsFunction · 0.85

Calls 2

hex_to_base64Function · 0.85
build_sign_and_send_txFunction · 0.85

Tested by

no test coverage detected