NativeCollateral

Git Source

Inherits: BaseCollateral

Implements collateral using native ETH.

Functions

constructor

constructor(address _owner) BaseCollateral(_owner);

deposit

Deposits ETH as collateral. Payable to accept ETH.

function deposit() external payable;

deposit

function deposit(uint256 amount) external pure override;

withdraw

Withdraws ETH from collateral.

function withdraw(uint256 amount) external override;

Parameters

Name
Type
Description

amount

uint256

The amount of ETH to withdraw (in wei).

receive

Fallback function to accept ETH.

receive() external payable;

Last updated

Was this helpful?