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
)
| 324 | |
| 325 | |
| 326 | def 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 | |
| 347 | def send_reward_tx( |
no test coverage detected