mirror of
https://github.com/tornadocash/tornado-governance
synced 2024-02-02 14:53:55 +01:00
Merge pull request #3 from h-ivor/master
Change visibility of lock, lockWithApproval, unlock to public
This commit is contained in:
commit
004f4c9b3a
@ -104,16 +104,16 @@ contract Governance is Initializable, Configuration, Delegation, EnsResolve {
|
||||
uint8 v,
|
||||
bytes32 r,
|
||||
bytes32 s
|
||||
) external virtual {
|
||||
) public virtual {
|
||||
torn.permit(owner, address(this), amount, deadline, v, r, s);
|
||||
_transferTokens(owner, amount);
|
||||
}
|
||||
|
||||
function lockWithApproval(uint256 amount) external virtual {
|
||||
function lockWithApproval(uint256 amount) public virtual {
|
||||
_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");
|
||||
lockedBalance[msg.sender] = lockedBalance[msg.sender].sub(amount, "Governance: insufficient balance");
|
||||
require(torn.transfer(msg.sender, amount), "TORN: transfer failed");
|
||||
|
Loading…
Reference in New Issue
Block a user