Skip to content

CollateralErc20

Description

Source: contracts/CollateralErc20.sol

Variables

underlyingContract

Source

Type: address

underlyingContractDecimals

Source

Type: uint256

Constructor

constructor

Source

Details

Signature

constructor(contract CollateralState _state, address _owner, address _manager, address _resolver, bytes32 _collateralKey, uint256 _minCratio, uint256 _minCollateral, address _underlyingContract, uint256 _underlyingDecimals)

Visibility

public

State Mutability

``

Views

scaleDownCollateral

Source

Details

Signature

scaleDownCollateral(uint256 collateral) view returns (uint256 scaledDown)

Visibility

public

State Mutability

view

scaleUpCollateral

Source

Details

Signature

scaleUpCollateral(uint256 collateral) view returns (uint256 scaledUp)

Visibility

public

State Mutability

view

External Functions

close

Source

Details

Signature

close(uint256 id)

Visibility

external

State Mutability

``

deposit

Source

Details

Signature

deposit(address borrower, uint256 id, uint256 amount)

Visibility

external

State Mutability

``

Requires

draw

Source

Details

Signature

draw(uint256 id, uint256 amount)

Visibility

external

State Mutability

``

liquidate

Source

Details

Signature

liquidate(address borrower, uint256 id, uint256 amount)

Visibility

external

State Mutability

``

open

Source

Details

Signature

open(uint256 collateral, uint256 amount, bytes32 currency)

Visibility

external

State Mutability

``

Requires

repay

Source

Details

Signature

repay(address borrower, uint256 id, uint256 amount)

Visibility

external

State Mutability

``

withdraw

Source

Details

Signature

withdraw(uint256 id, uint256 amount)

Visibility

external

State Mutability

``