Send a reward transaction.
(
rpc_url: str,
admin_key: KeyGroup,
admin_addr: str,
recipient_addr: str,
amount: int,
fee: int,
network_id: int,
chain_id: int,
height: int
)
| 345 | |
| 346 | |
| 347 | def send_reward_tx( |
| 348 | rpc_url: str, |
| 349 | admin_key: KeyGroup, |
| 350 | admin_addr: str, |
| 351 | recipient_addr: str, |
| 352 | amount: int, |
| 353 | fee: int, |
| 354 | network_id: int, |
| 355 | chain_id: int, |
| 356 | height: int |
| 357 | ) -> str: |
| 358 | """Send a reward transaction.""" |
| 359 | reward_msg = { |
| 360 | 'adminAddress': hex_to_base64(admin_addr), |
| 361 | 'recipientAddress': hex_to_base64(recipient_addr), |
| 362 | 'amount': amount, |
| 363 | } |
| 364 | |
| 365 | return build_sign_and_send_tx(rpc_url, admin_key, 'reward', reward_msg, fee, network_id, chain_id, height) |
| 366 | |
| 367 | |
| 368 | def test_plugin_transactions() -> None: |
no test coverage detected