change visibility of (un)lock functions for simpler inheritance

This commit is contained in:
h-ivor 2021-10-05 19:36:56 +02:00
parent 280bbbad55
commit 6af010c5eb

View File

@ -104,16 +104,16 @@ contract Governance is Initializable, Configuration, Delegation, EnsResolve {
uint8 v, uint8 v,
bytes32 r, bytes32 r,
bytes32 s bytes32 s
) external virtual { ) public virtual {
torn.permit(owner, address(this), amount, deadline, v, r, s); torn.permit(owner, address(this), amount, deadline, v, r, s);
_transferTokens(owner, amount); _transferTokens(owner, amount);
} }
function lockWithApproval(uint256 amount) external virtual { function lockWithApproval(uint256 amount) public virtual {
_transferTokens(msg.sender, amount); _transferTokens(msg.sender, amount);
} }
function unlock(uint256 amount) external virtual { function unlock(uint256 amount) public virtual {
require(getBlockTimestamp() > canWithdrawAfter[msg.sender], "Governance: tokens are locked"); require(getBlockTimestamp() > canWithdrawAfter[msg.sender], "Governance: tokens are locked");
lockedBalance[msg.sender] = lockedBalance[msg.sender].sub(amount, "Governance: insufficient balance"); lockedBalance[msg.sender] = lockedBalance[msg.sender].sub(amount, "Governance: insufficient balance");
require(torn.transfer(msg.sender, amount), "TORN: transfer failed"); require(torn.transfer(msg.sender, amount), "TORN: transfer failed");