2022-02-14 16:19:00 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
import "./Collateral.sol";
|
|
|
|
|
|
|
|
// exposes internal functions for testing
|
|
|
|
contract TestCollateral is Collateral {
|
|
|
|
// solhint-disable-next-line no-empty-blocks
|
|
|
|
constructor(IERC20 token) Collateral(token) {}
|
|
|
|
|
|
|
|
function slash(address account, uint256 percentage) public {
|
|
|
|
_slash(account, percentage);
|
|
|
|
}
|
2022-02-15 16:18:25 +00:00
|
|
|
|
2022-09-29 10:18:02 +00:00
|
|
|
function createLock(LockId id, uint256 expiry) public {
|
2022-02-15 16:18:25 +00:00
|
|
|
_createLock(id, expiry);
|
|
|
|
}
|
|
|
|
|
2022-09-29 10:18:02 +00:00
|
|
|
function lock(address account, LockId id) public {
|
2022-02-15 16:18:25 +00:00
|
|
|
_lock(account, id);
|
|
|
|
}
|
|
|
|
|
2022-09-29 10:18:02 +00:00
|
|
|
function unlock(LockId id) public {
|
2022-02-15 16:18:25 +00:00
|
|
|
_unlock(id);
|
|
|
|
}
|
2022-02-14 16:19:00 +00:00
|
|
|
}
|