hopr_chain_types

Module utils

Source
Expand description

Chain utilities used for testing.

This used in unit and integration tests.

Re-exports§

pub use safe_contract::*;

Modules§

safe_contract
This module was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs

Constants§

ERC_1820_DEPLOYER
ERC1820 deployer wallet
ERC_1820_SIGNED_DEPLOYMENT_TX
Signed tx to create an ERC1820 contract
ETH_VALUE_FOR_ERC1820_DEPLOYER
Amount of ETH to fund ERC_1820_DEPLOYER, to deployer ERC1820 registry ERC1820Registry contract is used by the HOPR token contract (ERC777 token)

Functions§

add_announcement_as_target
Send a Safe transaction to the module to include annoucement to the module
approve_channel_transfer_from_safe
Send a Safe transaction to the token contract, to approve channels on behalf of safe.
create_anvil
Creates local Anvil instance.
create_native_transfer
Creates a transaction that transfers the given amount of native tokens to the given destination.
deploy_one_safe_one_module_and_setup_for_testing
Deploy a safe instance and a module instance.
fund_channel
Funds the channel to the counterparty with the given amount of HOPR tokens. The amount must be present in the wallet of the client.
fund_channel_from_different_client
Funds the channel to the counterparty with the given amount of HOPR tokens, from a different client The amount must be present in the wallet of the client.
fund_node
Funds the given wallet address with specified amount of native tokens and HOPR tokens. These must be present in the client’s wallet.
get_safe_tx
Prepare a safe transaction
include_node_to_module_by_safe
Send a Safe transaction to the module to include node to the module
mint_tokens
Mints specified amount of HOPR tokens to the contract deployer wallet. Assumes that the hopr_token contract is associated with a RPC client that also deployed the contract. Returns the block number at which the minting transaction was confirmed.