ProxyWallet

https://github.com/Into-the-Fathom/fathom-stablecoin-smart-contracts/blob/master/contracts/main/proxy-wallet/ProxyWallet.sol

Overview

The ProxyWallet serves as a flexible, owner-controlled wallet that can execute arbitrary transactions. It uses a ProxyActionsStorage to manage state and actions and leverages comprehensive access control via FathomAuth.

Events

  • LogSetAuthority (from FathomAuthEvents):

    • Emitted when the authority for this contract is set.

    • Parameters:

      • _authority (address indexed): The address of the new authority.

  • LogSetOwner (from FathomAuthEvents):

    • Emitted when the owner of the contract is changed.

    • Parameters:

      • _owner (address indexed): The address of the new owner.

  • LogNote (from FathomNote):

    • Emitted for each transaction executed through the proxy wallet, providing details of the operation.

    • Parameters:

      • sig (bytes4 indexed): The signature of the function called.

      • guy (address indexed): The address initiating the call.

      • foo (bytes32 indexed): Part of the call data.

      • bar (bytes32 indexed): Part of the call data.

      • wad (uint256): The value involved in the transaction.

      • fax (bytes): Full call data.

State Variables

  • proxyActionsStorage (ProxyActionsStorage):

    • The storage contract used for managing proxy actions and settings.

  • authority (IAuthority from FathomAuth):

    • The authority contract that checks permissions for actions.

  • owner (address from FathomAuth):

    • The owner of the contract, who has elevated privileges.

Functions

  • execute:

    • Executes a transaction via the proxy, allowing the wallet to interact with other contracts.

    • Parameters:

      • _data (bytes memory): The calldata or transaction data to be executed.

    • Returns:

      • _response (bytes memory): The return data from the executed call.

  • receive:

    • A fallback function to allow the contract to receive Ether directly.

Last updated

Copyright© Fathom App 2024.