mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-03-04 01:50:28 +00:00
Allow proof ending to be extending once a contract is started, so that all filled slots share an ending time that is equal to the contract end time. Added tests. Add a mapping for proof id to endId so that proof expectations can be extended for all proofs that share a given endId. Add function modifiers that require the request state to allow proofs, with accompanying tests. General clean up of each function’s request state context, with accompanying tests. General clean up of all tests, including state change “wait” functions and normalising the time advancement functions.
28 lines
591 B
Solidity
28 lines
591 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.0;
|
|
|
|
import "./AccountLocks.sol";
|
|
|
|
// exposes internal functions for testing
|
|
contract TestAccountLocks is AccountLocks {
|
|
function createLock(bytes32 id, uint256 expiry) public {
|
|
_createLock(id, expiry);
|
|
}
|
|
|
|
function lock(address account, bytes32 id) public {
|
|
_lock(account, id);
|
|
}
|
|
|
|
function unlock(bytes32 id) public {
|
|
_unlock(id);
|
|
}
|
|
|
|
function unlockAccount() public {
|
|
_unlockAccount();
|
|
}
|
|
|
|
function extendLockExpiryTo(bytes32 lockId, uint256 expiry) public {
|
|
_extendLockExpiryTo(lockId, expiry);
|
|
}
|
|
}
|