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

Function send_faucet_tx

plugin/python/tutorial/rpc_test.py:306–323  ·  view source on GitHub ↗

Send a faucet transaction.

(
    rpc_url: str,
    signer_key: KeyGroup,
    recipient_addr: str,
    amount: int,
    fee: int,
    network_id: int,
    chain_id: int,
    height: int
)

Source from the content-addressed store, hash-verified

304
305
306def send_faucet_tx(
307 rpc_url: str,
308 signer_key: KeyGroup,
309 recipient_addr: str,
310 amount: int,
311 fee: int,
312 network_id: int,
313 chain_id: int,
314 height: int
315) -> str:
316 """Send a faucet transaction."""
317 faucet_msg = {
318 'signerAddress': hex_to_base64(signer_key.address),
319 'recipientAddress': hex_to_base64(recipient_addr),
320 'amount': amount,
321 }
322
323 return build_sign_and_send_tx(rpc_url, signer_key, 'faucet', faucet_msg, fee, network_id, chain_id, height)
324
325
326def send_send_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