mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-02 13:23:10 +00:00
try to hook on _funds. fixed required
This commit is contained in:
parent
b5ab3869b9
commit
ae94d1ebf3
28
certora/confs/Vault.conf
Normal file
28
certora/confs/Vault.conf
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"files": [
|
||||
"contracts/Vault.sol",
|
||||
// "certora/harness/MarketplaceHarness.sol",
|
||||
// "contracts/Marketplace.sol",
|
||||
// "contracts/Vault.sol",
|
||||
// "contracts/Groth16Verifier.sol",
|
||||
"certora/helpers/ERC20A.sol",
|
||||
],
|
||||
"parametric_contracts": ["Vault"],
|
||||
"link" : [
|
||||
"Vault:_token=ERC20A",
|
||||
// "MarketplaceHarness:_vault=Vault",
|
||||
// "MarketplaceHarness:_verifier=Groth16Verifier"
|
||||
],
|
||||
"packages": [
|
||||
"@openzeppelin/=node_modules/@openzeppelin/",
|
||||
],
|
||||
"msg": "Verifying Vault",
|
||||
"rule_sanity": "basic",
|
||||
"verify": "Vault:certora/specs/Vault.spec",
|
||||
// "optimistic_loop": true,
|
||||
"loop_iter": "3",
|
||||
// "optimistic_hashing": true,
|
||||
// "hashing_length_bound": "512",
|
||||
|
||||
"solc": "solc8.28",
|
||||
}
|
||||
29
certora/specs/Vault.spec
Normal file
29
certora/specs/Vault.spec
Normal file
@ -0,0 +1,29 @@
|
||||
methods {
|
||||
|
||||
}
|
||||
|
||||
rule sanity(env e, method f) {
|
||||
calldataarg args;
|
||||
f(e, args);
|
||||
satisfy true;
|
||||
}
|
||||
|
||||
// ghost mapping(Vault.Controller => mapping(Vault.FundId => Vault.Timestamp)) ghostName;
|
||||
// init_state axiom forall uint256 a. ghostName[a] == 0;
|
||||
|
||||
ghost mapping(VaultBase.Controller => mapping(VaultBase.FundId => VaultBase.Timestamp)) ghostName {
|
||||
init_state axiom forall VaultBase.Controller controller. forall VaultBase.FundId fundId. ghostName[controller][fundId] == 0;
|
||||
}
|
||||
// mapping(Controller => mapping(FundId => Fund)) private _funds;
|
||||
hook Sload VaultBase.Timestamp defaultValue _funds[KEY VaultBase.Controller Controller][KEY VaultBase.FundId FundId] {
|
||||
require ghostName[Controller][FundId] == require_uint40(defaultValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// (∀ controller ∈ Controller, fundId ∈ FundId:
|
||||
// fund.lockExpiry <= fund.lockMaximum
|
||||
// where fund = _funds[controller][fundId])
|
||||
// STATUS - in progress
|
||||
// invariant lockExpiryLELockMaximum()
|
||||
4
remappings.txt
Normal file
4
remappings.txt
Normal file
@ -0,0 +1,4 @@
|
||||
@ensdomains/=node_modules/@ensdomains/
|
||||
@openzeppelin/=node_modules/@openzeppelin/
|
||||
hardhat-deploy/=node_modules/hardhat-deploy/
|
||||
hardhat/=node_modules/hardhat/
|
||||
Loading…
x
Reference in New Issue
Block a user