ERC20Collateral
Inherits: BaseCollateral
Implements collateral using an ERC20 token.
State Variables
collateralToken
IERC20 public collateralToken;
Functions
constructor
constructor(address _owner, address _tokenAddress) BaseCollateral(_owner);
deposit
Deposits ERC20 tokens as collateral.
function deposit(uint256 amount) external override;
Parameters
Name
Type
Description
amount
uint256
The amount of tokens to deposit.
withdraw
Withdraws ERC20 tokens from collateral.
function withdraw(uint256 amount) external override;
Parameters
Name
Type
Description
amount
uint256
The amount of tokens to withdraw.
Last updated
Was this helpful?