IKashiPair
Functions
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external returns (bytes32)
accrue
function accrue() external
accrueInfo
function accrueInfo() external returns (uint64 interestPerSecond, uint64 lastBlockAccrued, uint128 feesEarnedFraction)
addAsset
function addAsset(
address to,
bool skim,
uint256 share
) external returns (uint256 fraction)
Parameters
Name | Type | Description |
---|---|---|
to | address | |
skim | bool | |
share | uint256 |
addCollateral
function addCollateral(
address to,
bool skim,
uint256 share
) external
Parameters
Name | Type | Description |
---|---|---|
to | address | |
skim | bool | |
share | uint256 |
allowance
function allowance(
address ,
address
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
`` | address | |
`` | address |
approve
function approve(
address spender,
uint256 amount
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
spender | address | |
amount | uint256 |
asset
function asset() external returns (contract IERC20)
balanceOf
function balanceOf(
address
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
`` | address |
borrow
function borrow(
address to,
uint256 amount
) external returns (uint256 part, uint256 share)
Parameters
Name | Type | Description |
---|---|---|
to | address | |
amount | uint256 |
claimOwnership
function claimOwnership() external
collateral
function collateral() external returns (contract IERC20)
cook
function cook(
uint8[] actions,
uint256[] values,
bytes[] datas
) external returns (uint256 value1, uint256 value2)
Parameters
Name | Type | Description |
---|---|---|
actions | uint8[] | |
values | uint256[] | |
datas | bytes[] |
decimals
function decimals() external returns (uint8)
exchangeRate
function exchangeRate() external returns (uint256)
feeTo
function feeTo() external returns (address)
init
function init(
bytes data
) external
Parameters
Name | Type | Description |
---|---|---|
data | bytes |
isSolvent
function isSolvent(
address user,
bool open
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
user | address | |
open | bool |
masterContract
function masterContract() external returns (address)
name
function name() external returns (string)
nonces
function nonces(
address
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
`` | address |
oracleData
function oracleData() external returns (bytes)
owner
function owner() external returns (address)
pendingOwner
function pendingOwner() external returns (address)
permit
function permit(
address owner_,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external
Parameters
Name | Type | Description |
---|---|---|
owner_ | address | |
spender | address | |
value | uint256 | |
deadline | uint256 | |
v | uint8 | |
r | bytes32 | |
s | bytes32 |
removeAsset
function removeAsset(
address to,
uint256 fraction
) external returns (uint256 share)
Parameters
Name | Type | Description |
---|---|---|
to | address | |
fraction | uint256 |
removeCollateral
function removeCollateral(
address to,
uint256 share
) external
Parameters
Name | Type | Description |
---|---|---|
to | address | |
share | uint256 |
repay
function repay(
address to,
bool skim,
uint256 part
) external returns (uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
to | address | |
skim | bool | |
part | uint256 |
setFeeTo
function setFeeTo(
address newFeeTo
) external
Parameters
Name | Type | Description |
---|---|---|
newFeeTo | address |
symbol
function symbol() external returns (string)
totalAsset
function totalAsset() external returns (uint128 elastic, uint128 base)
totalBorrow
function totalBorrow() external returns (uint128 elastic, uint128 base)
totalCollateralShare
function totalCollateralShare() external returns (uint256)
totalSupply
function totalSupply() external returns (uint256)
transfer
function transfer(
address to,
uint256 amount
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
to | address | |
amount | uint256 |
transferFrom
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
amount | uint256 |
transferOwnership
function transferOwnership(
address newOwner,
bool direct,
bool renounce
) external
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | |
direct | bool | |
renounce | bool |
updateExchangeRate
function updateExchangeRate() external returns (bool updated, uint256 rate)
userBorrowPart
function userBorrowPart(
address
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
`` | address |
userCollateralShare
function userCollateralShare(
address
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
`` | address |
withdrawFees
function withdrawFees() external
Events
Approval
event Approval(
address _owner,
address _spender,
uint256 _value
)
Parameters
Name | Type | Description |
---|---|---|
_owner | address | |
_spender | address | |
_value | uint256 |
LogAccrue
event LogAccrue(
uint256 accruedAmount,
uint256 feeFraction,
uint64 rate,
uint256 utilization
)
Parameters
Name | Type | Description |
---|---|---|
accruedAmount | uint256 | |
feeFraction | uint256 | |
rate | uint64 | |
utilization | uint256 |
LogAddAsset
event LogAddAsset(
address from,
address to,
uint256 share,
uint256 fraction
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
share | uint256 | |
fraction | uint256 |
LogAddCollateral
event LogAddCollateral(
address from,
address to,
uint256 share
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
share | uint256 |
LogBorrow
event LogBorrow(
address from,
address to,
uint256 amount,
uint256 part
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
amount | uint256 | |
part | uint256 |
LogExchangeRate
event LogExchangeRate(
uint256 rate
)
Parameters
Name | Type | Description |
---|---|---|
rate | uint256 |
LogFeeTo
event LogFeeTo(
address newFeeTo
)
Parameters
Name | Type | Description |
---|---|---|
newFeeTo | address |
LogRemoveAsset
event LogRemoveAsset(
address from,
address to,
uint256 share,
uint256 fraction
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
share | uint256 | |
fraction | uint256 |
LogRemoveCollateral
event LogRemoveCollateral(
address from,
address to,
uint256 share
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
share | uint256 |
LogRepay
event LogRepay(
address from,
address to,
uint256 amount,
uint256 part
)
Parameters
Name | Type | Description |
---|---|---|
from | address | |
to | address | |
amount | uint256 | |
part | uint256 |
LogWithdrawFees
event LogWithdrawFees(
address feeTo,
uint256 feesEarnedFraction
)
Parameters
Name | Type | Description |
---|---|---|
feeTo | address | |
feesEarnedFraction | uint256 |
OwnershipTransferred
event OwnershipTransferred(
address previousOwner,
address newOwner
)
Parameters
Name | Type | Description |
---|---|---|
previousOwner | address | |
newOwner | address |
Transfer
event Transfer(
address _from,
address _to,
uint256 _value
)
Parameters
Name | Type | Description |
---|---|---|
_from | address | |
_to | address | |
_value | uint256 |