CollateralShort¶
Description¶
Source: contracts/CollateralShort.sol
Constructor¶
constructor
¶
Details
Signature
constructor(address _owner, contract ICollateralManager _manager, address _resolver, bytes32 _collateralKey, uint256 _minCratio, uint256 _minCollateral)
Visibility
public
State Mutability
``
Views¶
getShortAndCollateral
¶
Details
Signature
getShortAndCollateral(address, uint256 id) view returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
view
Internal Functions¶
_closeWithCollateral
¶
Details
Signature
_closeWithCollateral(address borrower, uint256 id) returns (uint256 amount, uint256 collateral)
Visibility
internal
State Mutability
``
Emits
_repayWithCollateral
¶
Details
Signature
_repayWithCollateral(address borrower, uint256 id, uint256 payment) returns (uint256 amount, uint256 collateral)
Visibility
internal
State Mutability
``
Requires
Modifiers
Emits
External Functions¶
close
¶
Details
Signature
close(uint256 id) returns (uint256 amount, uint256 collateral)
Visibility
external
State Mutability
``
closeWithCollateral
¶
Details
Signature
closeWithCollateral(uint256 id) returns (uint256 amount, uint256 collateral)
Visibility
external
State Mutability
``
deposit
¶
Details
Signature
deposit(address borrower, uint256 id, uint256 amount) returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
``
Requires
draw
¶
Details
Signature
draw(uint256 id, uint256 amount) returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
``
liquidate
¶
Details
Signature
liquidate(address borrower, uint256 id, uint256 amount)
Visibility
external
State Mutability
``
open
¶
Details
Signature
open(uint256 collateral, uint256 amount, bytes32 currency) returns (uint256 id)
Visibility
external
State Mutability
``
repay
¶
Details
Signature
repay(address borrower, uint256 id, uint256 amount) returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
``
repayWithCollateral
¶
Details
Signature
repayWithCollateral(uint256 id, uint256 amount) returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
``
withdraw
¶
Details
Signature
withdraw(uint256 id, uint256 amount) returns (uint256 principal, uint256 collateral)
Visibility
external
State Mutability
``