BaseCollateral

Git Source

Abstract contract defining the basic interface for collateral assets.

State Variables

owner

address public owner;

Functions

constructor

constructor(address _owner);

deposit

Deposits collateral into the contract.

function deposit(uint256 amount) external virtual;

Parameters

Name
Type
Description

amount

uint256

The amount of collateral to deposit.

withdraw

Withdraws collateral from the contract.

function withdraw(uint256 amount) external virtual;

Parameters

Name
Type
Description

amount

uint256

The amount of collateral to withdraw.

Events

CollateralDeposited

event CollateralDeposited(address indexed depositor, uint256 amount);

CollateralWithdrawn

event CollateralWithdrawn(address indexed withdrawer, uint256 amount);

Last updated

Was this helpful?