replace_attester_on_fork

Documentation for eth_defi.cctp.testing.replace_attester_on_fork function.

replace_attester_on_fork(web3)

Replace the CCTP attester with a test account on an Anvil fork.

Impersonates the attesterManager on the forked MessageTransmitterV2 contract and adds a new test attester that we control. This allows forging attestations for receiveMessage() calls.

Parameters

web3 (web3.main.Web3) – Web3 connected to an Anvil fork

Returns

The test attester account (use with forge_attestation())

Return type

eth_account.signers.local.LocalAccount