Skip to main content
The Credit Account is a minimal contract that holds assets and executes operations on behalf of the borrower.

View Functions

factory

function factory() external view returns (address)
Returns the address of the account factory.
factory
address
The account factory contract address

creditManager

function creditManager() external view returns (address)
Returns the address of the credit manager.
creditManager
address
The credit manager contract address

Functions

safeTransfer

function safeTransfer(
    address token,
    address to,
    uint256 amount
) external
Safely transfers tokens from the credit account.
token
address
required
The token to transfer
to
address
required
The recipient address
amount
uint256
required
The amount to transfer

execute

function execute(
    address target,
    bytes calldata data
) external returns (bytes memory result)
Executes a call to an external contract.
target
address
required
The target contract address
data
bytes
required
The call data to send
result
bytes
The result of the external call

rescue

function rescue(
    address target,
    bytes calldata data
) external
Rescues funds from the credit account (emergency function).
target
address
required
The target contract address
data
bytes
required
The call data to send

Build docs developers (and LLMs) love