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.