Skip to content

Commit f7f1fb0

Browse files
authored
Temporarily disable onlyAuthenticatedProperty modifier (#859)
* refactor: remove authentication requirement from deposit function in Lockup contract test: skip unauthenticated property deposit test in LockupTest chore: add packageManager field to package.json * Deployed the new Lockup on Polygon
1 parent 76cc7c7 commit f7f1fb0

File tree

4 files changed

+167
-3
lines changed

4 files changed

+167
-3
lines changed

.openzeppelin/polygon.json

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,169 @@
22382238
}
22392239
}
22402240
}
2241+
},
2242+
"30dc47fdeaf9e32917f7c40b9783337f781a5dd0dfc707190f7bcd4a056b743f": {
2243+
"address": "0x9f34D5240a476779a4F1FbCB3D71fd45138B660C",
2244+
"txHash": "0xf2bd34d8500772ac335f18d2912421914478208ca80286878067cdcecc28f725",
2245+
"layout": {
2246+
"solcVersion": "0.8.9",
2247+
"storage": [
2248+
{
2249+
"contract": "Initializable",
2250+
"label": "_initialized",
2251+
"type": "t_bool",
2252+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:21"
2253+
},
2254+
{
2255+
"contract": "Initializable",
2256+
"label": "_initializing",
2257+
"type": "t_bool",
2258+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:26"
2259+
},
2260+
{
2261+
"contract": "InitializableUsingRegistry",
2262+
"label": "_registry",
2263+
"type": "t_address",
2264+
"src": "../project:/contracts/src/common/registry/InitializableUsingRegistry.sol:11"
2265+
},
2266+
{
2267+
"contract": "Lockup",
2268+
"label": "cap",
2269+
"type": "t_uint256",
2270+
"src": "../project:/contracts/src/lockup/Lockup.sol:45"
2271+
},
2272+
{
2273+
"contract": "Lockup",
2274+
"label": "totalLocked",
2275+
"type": "t_uint256",
2276+
"src": "../project:/contracts/src/lockup/Lockup.sol:46"
2277+
},
2278+
{
2279+
"contract": "Lockup",
2280+
"label": "cumulativeHoldersRewardCap",
2281+
"type": "t_uint256",
2282+
"src": "../project:/contracts/src/lockup/Lockup.sol:47"
2283+
},
2284+
{
2285+
"contract": "Lockup",
2286+
"label": "lastCumulativeHoldersPriceCap",
2287+
"type": "t_uint256",
2288+
"src": "../project:/contracts/src/lockup/Lockup.sol:48"
2289+
},
2290+
{
2291+
"contract": "Lockup",
2292+
"label": "lastLockedChangedCumulativeReward",
2293+
"type": "t_uint256",
2294+
"src": "../project:/contracts/src/lockup/Lockup.sol:49"
2295+
},
2296+
{
2297+
"contract": "Lockup",
2298+
"label": "lastCumulativeHoldersRewardPrice",
2299+
"type": "t_uint256",
2300+
"src": "../project:/contracts/src/lockup/Lockup.sol:50"
2301+
},
2302+
{
2303+
"contract": "Lockup",
2304+
"label": "lastCumulativeRewardPrice",
2305+
"type": "t_uint256",
2306+
"src": "../project:/contracts/src/lockup/Lockup.sol:51"
2307+
},
2308+
{
2309+
"contract": "Lockup",
2310+
"label": "cumulativeGlobalReward",
2311+
"type": "t_uint256",
2312+
"src": "../project:/contracts/src/lockup/Lockup.sol:52"
2313+
},
2314+
{
2315+
"contract": "Lockup",
2316+
"label": "lastSameGlobalRewardAmount",
2317+
"type": "t_uint256",
2318+
"src": "../project:/contracts/src/lockup/Lockup.sol:53"
2319+
},
2320+
{
2321+
"contract": "Lockup",
2322+
"label": "lastSameGlobalRewardTimestamp",
2323+
"type": "t_uint256",
2324+
"src": "../project:/contracts/src/lockup/Lockup.sol:54"
2325+
},
2326+
{
2327+
"contract": "Lockup",
2328+
"label": "lockedupProperties",
2329+
"type": "t_struct(AddressSet)7248_storage",
2330+
"src": "../project:/contracts/src/lockup/Lockup.sol:55"
2331+
},
2332+
{
2333+
"contract": "Lockup",
2334+
"label": "lastCumulativeHoldersRewardPricePerProperty",
2335+
"type": "t_mapping(t_address,t_uint256)",
2336+
"src": "../project:/contracts/src/lockup/Lockup.sol:56"
2337+
},
2338+
{
2339+
"contract": "Lockup",
2340+
"label": "initialCumulativeHoldersRewardCap",
2341+
"type": "t_mapping(t_address,t_uint256)",
2342+
"src": "../project:/contracts/src/lockup/Lockup.sol:58"
2343+
},
2344+
{
2345+
"contract": "Lockup",
2346+
"label": "totalLockedForProperty",
2347+
"type": "t_mapping(t_address,t_uint256)",
2348+
"src": "../project:/contracts/src/lockup/Lockup.sol:59"
2349+
},
2350+
{
2351+
"contract": "Lockup",
2352+
"label": "lastCumulativeHoldersRewardAmountPerProperty",
2353+
"type": "t_mapping(t_address,t_uint256)",
2354+
"src": "../project:/contracts/src/lockup/Lockup.sol:60"
2355+
}
2356+
],
2357+
"types": {
2358+
"t_uint256": {
2359+
"label": "uint256"
2360+
},
2361+
"t_struct(AddressSet)7248_storage": {
2362+
"label": "struct EnumerableSet.AddressSet",
2363+
"members": [
2364+
{
2365+
"label": "_inner",
2366+
"type": "t_struct(Set)6947_storage"
2367+
}
2368+
]
2369+
},
2370+
"t_struct(Set)6947_storage": {
2371+
"label": "struct EnumerableSet.Set",
2372+
"members": [
2373+
{
2374+
"label": "_values",
2375+
"type": "t_array(t_bytes32)dyn_storage"
2376+
},
2377+
{
2378+
"label": "_indexes",
2379+
"type": "t_mapping(t_bytes32,t_uint256)"
2380+
}
2381+
]
2382+
},
2383+
"t_array(t_bytes32)dyn_storage": {
2384+
"label": "bytes32[]"
2385+
},
2386+
"t_mapping(t_bytes32,t_uint256)": {
2387+
"label": "mapping(bytes32 => uint256)"
2388+
},
2389+
"t_bytes32": {
2390+
"label": "bytes32"
2391+
},
2392+
"t_mapping(t_address,t_uint256)": {
2393+
"label": "mapping(address => uint256)"
2394+
},
2395+
"t_address": {
2396+
"label": "address"
2397+
},
2398+
"t_bool": {
2399+
"label": "bool"
2400+
}
2401+
},
2402+
"namespaces": {}
2403+
}
22412404
}
22422405
}
22432406
}

contracts/src/lockup/Lockup.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ contract Lockup is ILockup, InitializableUsingRegistry {
130130
address _property,
131131
uint256 _amount,
132132
bytes32 _payload
133-
) private onlyAuthenticatedProperty(_property) returns (uint256) {
133+
) private returns (uint256) {
134134
/**
135135
* Gets the latest cumulative sum of the interest price.
136136
*/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@
7676
"bugs": {
7777
"url": "https://github.com/dev-protocol/protocol/issues"
7878
},
79-
"homepage": "https://github.com/dev-protocol/protocol#readme"
79+
"homepage": "https://github.com/dev-protocol/protocol#readme",
80+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
8081
}

test/lockup/lockup-s-token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ contract('LockupTest', ([deployer, , user2, user3]) => {
176176
})
177177
})
178178
describe('fail', () => {
179-
it('Attempt to deposit money into an unauthenticated property.', async () => {
179+
it.skip('Attempt to deposit money into an unauthenticated property.', async () => {
180180
const propertyAddress = getPropertyAddress(
181181
await dev.propertyFactory.create('test2', 'TEST2', user2, {
182182
from: user2,

0 commit comments

Comments
 (0)