TransactionGuard
The TransactionGuard contract enforces delegation and locking rules on transactions within the Unlockd Wallet. It validates transactions based on predefined conditions and allowances, ensuring that only authorized actions are executed.
Key Functions:
Initializes the TransactionGuard contract with the necessary parameters.
Parameters:
_delegationOwner
(address): The address of the DelegationOwner contract.
_protocolOwner
(address): The address of the ProtocolOwner contract.
Performs checks before executing a transaction, enforcing delegation and locking rules.
Parameters:
_to
(address): The destination address of the transaction.
_value
(uint256): The amount of ETH to be sent with the transaction.
_data
(bytes): The data payload of the transaction.
operation
(Enum.Operation): The operation type (Call or DelegateCall).
_safeTxGas
(uint256): The gas limit for the transaction.
_baseGas
(uint256): The base gas cost.
_gasPrice
(uint256): The gas price used for the transaction.
_gasToken
(address): The address of the token used for gas payment (0 for ETH).
_refundReceiver
(address payable): The address that receives the gas payment refund.
_signatures
(bytes): The packed signature data.
_msgSender
(address): The address of the transaction sender.
Performs checks after executing a transaction.
Parameters:
txHash
(bytes32): The hash of the executed transaction.
success
(bool): Indicates the success status of the transaction.
Checks if an asset is locked.
Parameters:
_id
(bytes32): The ID of the asset.
Returns:
(bool): Indicates whether the asset is locked or not.
Returns the delegation expiry of an asset.
Parameters:
_id
(bytes32): The ID of the asset.
Returns:
(uint256): The delegation expiry timestamp of the asset.
Sets the delegation expiry for a group of assets.
Parameters:
_assets
(address[]): An array of asset addresses.
_ids
(uint256[]): An array of asset IDs.
_expiry
(uint256): The delegation expiry timestamp.
Sets the delegation expiry for a specific asset.
Parameters:
_asset
(address): The address of the asset.
_id
(uint256): The ID of the asset.
_expiry
(uint256): The delegation expiry timestamp.
Sets an asset as locked.
Parameters:
_id
(bytes32): The ID of the asset.
Sets an asset as unlocked.
Parameters:
_id
(bytes32): The ID of the asset.
Checks if the contract supports a specific interface.
Parameters:
_interfaceId
(bytes4): The interface ID to check.
Returns:
(bool): Indicates whether the contract supports the specified interface or not.
Interactions:
Interacts with the DelegationOwner, GuardOwner, and ProtocolOwner contracts to enforce specific rules and permissions.
Validates transactions initiated through the GnosisSafe contract based on delegation and locking rules.
Last updated