@zoralabs/limit-orders 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$js.log +50 -51
- package/CHANGELOG.md +12 -0
- package/abis/ISetLimitOrderConfig.json +27 -0
- package/abis/{SimpleAccessManaged.json → Ownable.json} +29 -10
- package/abis/Ownable2Step.json +115 -0
- package/abis/PermittedCallers.json +181 -0
- package/abis/SwapWithLimitOrders.json +116 -3
- package/abis/ZoraLimitOrderBook.json +159 -35
- package/cache/solidity-files-cache.json +1 -1
- package/dist/index.cjs +191 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +191 -27
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +217 -32
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/out/BalanceDelta.sol/BalanceDeltaLibrary.json +1 -1
- package/out/BeforeSwapDelta.sol/BeforeSwapDeltaLibrary.json +1 -1
- package/out/BitMath.sol/BitMath.json +1 -1
- package/out/BytesLib.sol/BytesLib.json +1 -1
- package/out/CoinCommon.sol/CoinCommon.json +1 -1
- package/out/CoinConfigurationVersions.sol/CoinConfigurationVersions.json +1 -1
- package/out/CoinConstants.sol/CoinConstants.json +1 -1
- package/out/Context.sol/Context.json +1 -1
- package/out/Currency.sol/CurrencyLibrary.json +1 -1
- package/out/CurrencyReserves.sol/CurrencyReserves.json +1 -1
- package/out/CustomRevert.sol/CustomRevert.json +1 -1
- package/out/DopplerMath.sol/DopplerMath.json +1 -1
- package/out/FixedPoint128.sol/FixedPoint128.json +1 -1
- package/out/FixedPoint96.sol/FixedPoint96.json +1 -1
- package/out/FullMath.sol/FullMath.json +1 -1
- package/out/IAllowanceTransfer.sol/IAllowanceTransfer.json +1 -1
- package/out/ICoin.sol/ICoin.json +1 -1
- package/out/ICoin.sol/IHasCoinType.json +1 -1
- package/out/ICoin.sol/IHasPoolKey.json +1 -1
- package/out/ICoin.sol/IHasSwapPath.json +1 -1
- package/out/ICoin.sol/IHasTotalSupplyForPositions.json +1 -1
- package/out/IDeployedCoinVersionLookup.sol/IDeployedCoinVersionLookup.json +1 -1
- package/out/IDopplerErrors.sol/IDopplerErrors.json +1 -1
- package/out/IEIP712.sol/IEIP712.json +1 -1
- package/out/IERC1363.sol/IERC1363.json +1 -1
- package/out/IERC165.sol/IERC165.json +1 -1
- package/out/IERC20.sol/IERC20.json +1 -1
- package/out/IERC20Minimal.sol/IERC20Minimal.json +1 -1
- package/out/IERC6909Claims.sol/IERC6909Claims.json +1 -1
- package/out/IERC7572.sol/IERC7572.json +1 -1
- package/out/IExtsload.sol/IExtsload.json +1 -1
- package/out/IExttload.sol/IExttload.json +1 -1
- package/out/IHasRewardsRecipients.sol/IHasRewardsRecipients.json +1 -1
- package/out/IHooks.sol/IHooks.json +1 -1
- package/out/IMsgSender.sol/IMsgSender.json +1 -1
- package/out/IPoolManager.sol/IPoolManager.json +1 -1
- package/out/IProtocolFees.sol/IProtocolFees.json +1 -1
- package/out/ISetLimitOrderConfig.sol/ISetLimitOrderConfig.json +1 -0
- package/out/ISupportsLimitOrderFill.sol/ISupportsLimitOrderFill.json +1 -1
- package/out/ISwapPathRouter.sol/ISwapPathRouter.json +1 -1
- package/out/ISwapRouter.sol/ISwapRouter.json +1 -1
- package/out/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json +1 -1
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4Hook.json +1 -1
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4HookWithUpdateableFee.json +1 -1
- package/out/IUpgradeableV4Hook.sol/IUpgradeableV4Hook.json +1 -1
- package/out/IWETH.sol/IWETH.json +1 -1
- package/out/IZoraHookRegistry.sol/IZoraHookRegistry.json +1 -1
- package/out/IZoraLimitOrderBook.sol/IZoraLimitOrderBook.json +1 -1
- package/out/IZoraLimitOrderBookCoinsInterface.sol/IZoraLimitOrderBookCoinsInterface.json +1 -1
- package/out/IZoraV4CoinHook.sol/IZoraV4CoinHook.json +1 -1
- package/out/LimitOrderCommon.sol/LimitOrderCommon.json +1 -1
- package/out/LimitOrderCreate.sol/LimitOrderCreate.json +1 -1
- package/out/LimitOrderFill.sol/LimitOrderFill.json +1 -1
- package/out/LimitOrderViews.sol/LimitOrderViews.json +1 -1
- package/out/LimitOrderWithdraw.sol/LimitOrderWithdraw.json +1 -1
- package/out/LiquidityAmounts.sol/LiquidityAmounts.json +1 -1
- package/out/LiquidityMath.sol/LiquidityMath.json +1 -1
- package/out/Lock.sol/Lock.json +1 -1
- package/out/NonzeroDeltaCount.sol/NonzeroDeltaCount.json +1 -1
- package/out/Ownable.sol/Ownable.json +1 -0
- package/out/Ownable2Step.sol/Ownable2Step.json +1 -0
- package/out/Path.sol/Path.json +1 -1
- package/out/PathKey.sol/PathKeyLibrary.json +1 -1
- package/out/PermittedCallers.sol/PermittedCallers.json +1 -0
- package/out/PoolId.sol/PoolIdLibrary.json +1 -1
- package/out/Position.sol/Position.json +1 -1
- package/out/SafeCast.sol/SafeCast.json +1 -1
- package/out/SafeCast160.sol/SafeCast160.json +1 -1
- package/out/SafeERC20.sol/SafeERC20.json +1 -1
- package/out/SqrtPriceMath.sol/SqrtPriceMath.json +1 -1
- package/out/StateLibrary.sol/StateLibrary.json +1 -1
- package/out/SwapWithLimitOrders.sol/SwapWithLimitOrders.json +1 -1
- package/out/TickBitmap.sol/TickBitmap.json +1 -1
- package/out/TickMath.sol/TickMath.json +1 -1
- package/out/TransientSlot.sol/TransientSlot.json +1 -1
- package/out/TransientStateLibrary.sol/TransientStateLibrary.json +1 -1
- package/out/UniV4SwapToCurrency.sol/UniV4SwapToCurrency.json +1 -1
- package/out/UnsafeMath.sol/UnsafeMath.json +1 -1
- package/out/V3ToV4SwapLib.sol/V3ToV4SwapLib.json +1 -1
- package/out/ZoraLimitOrderBook.sol/ZoraLimitOrderBook.json +1 -1
- package/out/build-info/37e0124d88d60569.json +1 -0
- package/out/uniswap/BitMath.sol/BitMath.json +1 -1
- package/out/uniswap/CustomRevert.sol/CustomRevert.json +1 -1
- package/out/uniswap/FullMath.sol/FullMath.json +1 -1
- package/out/uniswap/SafeCast.sol/SafeCast.json +1 -1
- package/out/uniswap/TickMath.sol/TickMath.json +1 -1
- package/package/wagmiGenerated.ts +190 -26
- package/package.json +1 -1
- package/src/IZoraLimitOrderBook.sol +3 -5
- package/src/ZoraLimitOrderBook.sol +14 -45
- package/src/access/PermittedCallers.sol +41 -0
- package/src/router/ISetLimitOrderConfig.sol +12 -0
- package/src/router/SwapWithLimitOrders.sol +8 -9
- package/test/LimitOrderAccessControl.t.sol +173 -156
- package/test/LimitOrderFill.t.sol +0 -5
- package/test/SwapWithLimitOrders.t.sol +0 -2
- package/test/SwapWithLimitOrdersRouter.t.sol +0 -2
- package/test/gas/LimitOrderFillGas.t.sol +0 -7
- package/test/gas/LimitOrderSwapGas.t.sol +0 -6
- package/test/unit/SwapLimitOrdersUnit.t.sol +4 -4
- package/test/unit/SwapLimitOrdersValidation.t.sol +8 -8
- package/test/utils/BaseTest.sol +7 -16
- package/test/utils/TestableZoraLimitOrderBook.sol +2 -2
- package/abis/IAuthority.json +0 -31
- package/abis/SimpleAccessManager.json +0 -351
- package/out/IAuthority.sol/IAuthority.json +0 -1
- package/out/SimpleAccessManaged.sol/SimpleAccessManaged.json +0 -1
- package/out/SimpleAccessManager.sol/SimpleAccessManager.json +0 -1
- package/out/build-info/876cc09bc44cc8a7.json +0 -1
- package/src/access/SimpleAccessManaged.sol +0 -76
- package/src/access/SimpleAccessManager.sol +0 -268
- package/test/SimpleAccessManager.t.sol +0 -420
|
@@ -107,7 +107,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
107
107
|
CreatedOrderLog[] memory preloaded = existingOrders > 0 ? _preloadOrders(creatorKey, isCurrency0, existingOrders) : new CreatedOrderLog[](0);
|
|
108
108
|
emit log_named_uint("PRELOADED_ORDERS", preloaded.length);
|
|
109
109
|
|
|
110
|
-
vm.prank(users.factoryOwner);
|
|
111
110
|
limitOrderBook.setMaxFillCount(existingOrders + 10);
|
|
112
111
|
|
|
113
112
|
PoolKey[] memory v4Route = new PoolKey[](1);
|
|
@@ -152,7 +151,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
152
151
|
emit log_named_uint("PRELOADED_ORDERS", preloaded.length);
|
|
153
152
|
|
|
154
153
|
// allow enough fills (existing + some headroom for newly in-range orders)
|
|
155
|
-
vm.prank(users.factoryOwner);
|
|
156
154
|
limitOrderBook.setMaxFillCount(existingOrders + 10);
|
|
157
155
|
|
|
158
156
|
// build router params (hop2: ZORA -> creator -> content)
|
|
@@ -198,7 +196,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
198
196
|
CreatedOrderLog[] memory preloaded = existingOrders > 0 ? _preloadOrders(contentKey, isCurrency0, existingOrders) : new CreatedOrderLog[](0);
|
|
199
197
|
emit log_named_uint("PRELOADED_ORDERS", preloaded.length);
|
|
200
198
|
|
|
201
|
-
vm.prank(users.factoryOwner);
|
|
202
199
|
limitOrderBook.setMaxFillCount(existingOrders + 10);
|
|
203
200
|
|
|
204
201
|
PoolKey[] memory v4Route = new PoolKey[](2);
|
|
@@ -243,7 +240,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
243
240
|
CreatedOrderLog[] memory preloaded = existingOrders > 0 ? _preloadOrders(contentKey, isCurrency0, existingOrders) : new CreatedOrderLog[](0);
|
|
244
241
|
emit log_named_uint("PRELOADED_ORDERS", preloaded.length);
|
|
245
242
|
|
|
246
|
-
vm.prank(users.factoryOwner);
|
|
247
243
|
limitOrderBook.setMaxFillCount(existingOrders + 10);
|
|
248
244
|
|
|
249
245
|
PoolKey[] memory v4Route = new PoolKey[](2);
|
|
@@ -285,7 +281,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
285
281
|
PoolKey memory creatorKey = creatorCoin.getPoolKey();
|
|
286
282
|
bool isCurrency0 = Currency.unwrap(creatorKey.currency0) == address(creatorCoin);
|
|
287
283
|
|
|
288
|
-
vm.prank(users.factoryOwner);
|
|
289
284
|
limitOrderBook.setMaxFillCount(10);
|
|
290
285
|
|
|
291
286
|
PoolKey[] memory v4Route = new PoolKey[](1);
|
|
@@ -326,7 +321,6 @@ contract LimitOrderSwapGasTest is BaseTest {
|
|
|
326
321
|
PoolKey memory creatorKey = creatorCoin.getPoolKey();
|
|
327
322
|
bool isCurrency0 = Currency.unwrap(creatorKey.currency0) == address(creatorCoin);
|
|
328
323
|
|
|
329
|
-
vm.prank(users.factoryOwner);
|
|
330
324
|
limitOrderBook.setMaxFillCount(10);
|
|
331
325
|
|
|
332
326
|
PoolKey[] memory v4Route = new PoolKey[](1);
|
|
@@ -731,7 +731,7 @@ contract SwapLimitOrdersUnitTest is Test {
|
|
|
731
731
|
}
|
|
732
732
|
|
|
733
733
|
/// @notice Tests computeOrders with various misaligned baseTicks and tick spacings
|
|
734
|
-
function test_computeOrders_variousMisalignments_allProduceValidTicks() public {
|
|
734
|
+
function test_computeOrders_variousMisalignments_allProduceValidTicks() public view {
|
|
735
735
|
LimitOrderConfig memory params;
|
|
736
736
|
params.multiples = new uint256[](1);
|
|
737
737
|
params.percentages = new uint256[](1);
|
|
@@ -765,7 +765,7 @@ contract SwapLimitOrdersUnitTest is Test {
|
|
|
765
765
|
|
|
766
766
|
/// @notice Tests computeOrders with already-aligned baseTicks remain aligned
|
|
767
767
|
/// @dev Verifies that the fix doesn't break the common case where baseTick is already aligned
|
|
768
|
-
function test_computeOrders_alignedBaseTick_remainsAligned() public {
|
|
768
|
+
function test_computeOrders_alignedBaseTick_remainsAligned() public view {
|
|
769
769
|
LimitOrderConfig memory params;
|
|
770
770
|
params.multiples = new uint256[](1);
|
|
771
771
|
params.percentages = new uint256[](1);
|
|
@@ -809,7 +809,7 @@ contract SwapLimitOrdersUnitTest is Test {
|
|
|
809
809
|
|
|
810
810
|
/// @notice Tests fix for MKT-35: skip orders when baseTick at maxTick
|
|
811
811
|
/// @dev Uses baseTick at maxTick to simulate swap exhausting liquidity
|
|
812
|
-
function test_computeOrders_baseTickAtMaxTick_skipsOrders() public {
|
|
812
|
+
function test_computeOrders_baseTickAtMaxTick_skipsOrders() public view {
|
|
813
813
|
LimitOrderConfig memory params;
|
|
814
814
|
params.multiples = new uint256[](1);
|
|
815
815
|
params.percentages = new uint256[](1);
|
|
@@ -839,7 +839,7 @@ contract SwapLimitOrdersUnitTest is Test {
|
|
|
839
839
|
|
|
840
840
|
/// @notice Tests fix for MKT-35: skip orders when baseTick at minTick
|
|
841
841
|
/// @dev Uses baseTick at minTick to simulate swap exhausting liquidity
|
|
842
|
-
function test_computeOrders_baseTickAtMinTick_skipsOrders() public {
|
|
842
|
+
function test_computeOrders_baseTickAtMinTick_skipsOrders() public view {
|
|
843
843
|
LimitOrderConfig memory params;
|
|
844
844
|
params.multiples = new uint256[](1);
|
|
845
845
|
params.percentages = new uint256[](1);
|
|
@@ -167,7 +167,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
167
167
|
wrapper.validate(params);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
function test_validate_UnderOneHundredPercent() public {
|
|
170
|
+
function test_validate_UnderOneHundredPercent() public pure {
|
|
171
171
|
LimitOrderConfig memory params;
|
|
172
172
|
params.multiples = new uint256[](2);
|
|
173
173
|
params.percentages = new uint256[](2);
|
|
@@ -199,7 +199,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
199
199
|
assertEq(unallocated, 0, "unallocated should be zero");
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
function test_computeOrders_SkipsZeroSizeOrders() public {
|
|
202
|
+
function test_computeOrders_SkipsZeroSizeOrders() public view {
|
|
203
203
|
LimitOrderConfig memory params;
|
|
204
204
|
params.multiples = new uint256[](4);
|
|
205
205
|
params.percentages = new uint256[](4);
|
|
@@ -235,7 +235,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
235
235
|
assertEq(orders.sizes.length, orders.ticks.length, "sizes and ticks should match");
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
function test_computeOrders_ClampsToMaxTick() public {
|
|
238
|
+
function test_computeOrders_ClampsToMaxTick() public view {
|
|
239
239
|
LimitOrderConfig memory params;
|
|
240
240
|
params.multiples = new uint256[](1);
|
|
241
241
|
params.percentages = new uint256[](1);
|
|
@@ -257,7 +257,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
257
257
|
assertGt(orders.ticks[0], 0, "should be positive tick for buy orders");
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
function test_computeOrders_ClampsToMinTick() public {
|
|
260
|
+
function test_computeOrders_ClampsToMinTick() public view {
|
|
261
261
|
LimitOrderConfig memory params;
|
|
262
262
|
params.multiples = new uint256[](1);
|
|
263
263
|
params.percentages = new uint256[](1);
|
|
@@ -282,7 +282,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
282
282
|
assertLe(orders.ticks[0], TickMath.maxUsableTick(TICK_SPACING), "should be within valid range");
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
function test_computeOrders_MinimumSeparationCurrency0() public {
|
|
285
|
+
function test_computeOrders_MinimumSeparationCurrency0() public view {
|
|
286
286
|
LimitOrderConfig memory params;
|
|
287
287
|
params.multiples = new uint256[](1);
|
|
288
288
|
params.percentages = new uint256[](1);
|
|
@@ -307,7 +307,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
307
307
|
assertGe(orders.ticks[0], baseTick + TICK_SPACING, "should maintain minimum separation");
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
function test_computeOrders_MinimumSeparationCurrency1() public {
|
|
310
|
+
function test_computeOrders_MinimumSeparationCurrency1() public view {
|
|
311
311
|
LimitOrderConfig memory params;
|
|
312
312
|
params.multiples = new uint256[](1);
|
|
313
313
|
params.percentages = new uint256[](1);
|
|
@@ -332,7 +332,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
332
332
|
assertLe(orders.ticks[0], baseTick - TICK_SPACING, "should maintain minimum separation");
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
function test_computeOrders_MultiplierInversionForCurrency1() public {
|
|
335
|
+
function test_computeOrders_MultiplierInversionForCurrency1() public view {
|
|
336
336
|
LimitOrderConfig memory params;
|
|
337
337
|
params.multiples = new uint256[](1);
|
|
338
338
|
params.percentages = new uint256[](1);
|
|
@@ -358,7 +358,7 @@ contract SwapLimitOrdersValidationTest is Test {
|
|
|
358
358
|
assertLt(orders.ticks[0], baseTick, "inverted multiplier should place tick below base");
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
function test_computeOrders_AllBoundaryClampingBranches() public {
|
|
361
|
+
function test_computeOrders_AllBoundaryClampingBranches() public view {
|
|
362
362
|
LimitOrderConfig memory params;
|
|
363
363
|
|
|
364
364
|
// Test 1: aligned > maxTick (line 167)
|
package/test/utils/BaseTest.sol
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
pragma solidity ^0.8.13;
|
|
3
3
|
|
|
4
4
|
import {Vm} from "forge-std/Vm.sol";
|
|
5
|
-
import {AccessManager} from "@openzeppelin/contracts/access/manager/AccessManager.sol";
|
|
6
5
|
import {V4TestSetup} from "@zoralabs/coins/test/utils/V4TestSetup.sol";
|
|
7
6
|
import {IZoraLimitOrderBook} from "../../src/IZoraLimitOrderBook.sol";
|
|
8
7
|
import {TestableZoraLimitOrderBook} from "./TestableZoraLimitOrderBook.sol";
|
|
@@ -36,8 +35,8 @@ import {MockWETH} from "./MockWETH.sol";
|
|
|
36
35
|
*/
|
|
37
36
|
contract BaseTest is V4TestSetup, IMsgSender {
|
|
38
37
|
using PoolIdLibrary for PoolKey;
|
|
38
|
+
|
|
39
39
|
TestableZoraLimitOrderBook internal limitOrderBook = TestableZoraLimitOrderBook(payable(makeAddr("limitOrderBook")));
|
|
40
|
-
AccessManager internal accessManager;
|
|
41
40
|
SwapWithLimitOrders internal swapWithLimitOrders;
|
|
42
41
|
|
|
43
42
|
function setUp() public virtual {
|
|
@@ -59,32 +58,26 @@ contract BaseTest is V4TestSetup, IMsgSender {
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
function _setupLimitOrderBook() internal {
|
|
62
|
-
// Deploy
|
|
63
|
-
accessManager = new AccessManager(address(this));
|
|
64
|
-
|
|
61
|
+
// Deploy WETH mock if not already set
|
|
65
62
|
if (address(weth) == address(0)) {
|
|
66
63
|
weth = IWETH(address(new MockWETH()));
|
|
67
64
|
}
|
|
68
65
|
|
|
66
|
+
// Deploy ZoraLimitOrderBook with this contract as owner
|
|
69
67
|
deployCodeTo(
|
|
70
68
|
"TestableZoraLimitOrderBook.sol:TestableZoraLimitOrderBook",
|
|
71
|
-
abi.encode(address(poolManager), address(factory), address(zoraHookRegistry), address(
|
|
69
|
+
abi.encode(address(poolManager), address(factory), address(zoraHookRegistry), address(this), address(weth)),
|
|
72
70
|
address(limitOrderBook)
|
|
73
71
|
);
|
|
74
|
-
require(limitOrderBook.
|
|
75
|
-
|
|
76
|
-
// Set create() and setMaxFillCount() functions to PUBLIC_ROLE to allow anyone to call them initially
|
|
77
|
-
bytes4[] memory selectors = new bytes4[](2);
|
|
78
|
-
selectors[0] = IZoraLimitOrderBook.create.selector;
|
|
79
|
-
selectors[1] = IZoraLimitOrderBook.setMaxFillCount.selector;
|
|
80
|
-
accessManager.setTargetFunctionRole(address(limitOrderBook), selectors, accessManager.PUBLIC_ROLE());
|
|
72
|
+
require(limitOrderBook.owner() == address(this), "ZoraLimitOrderBook owner is not this contract");
|
|
81
73
|
|
|
82
74
|
limitOrderBook.setMaxFillCount(50);
|
|
83
75
|
|
|
84
76
|
vm.label(address(limitOrderBook), "LIMIT_ORDER_BOOK");
|
|
85
77
|
|
|
86
|
-
swapWithLimitOrders = new SwapWithLimitOrders(poolManager, limitOrderBook, swapRouter, AddressConstants.getPermit2Address());
|
|
78
|
+
swapWithLimitOrders = new SwapWithLimitOrders(poolManager, limitOrderBook, swapRouter, AddressConstants.getPermit2Address(), address(this));
|
|
87
79
|
vm.label(address(swapWithLimitOrders), "SWAP_WITH_LIMIT_ORDERS");
|
|
80
|
+
|
|
88
81
|
// Now create the real ZoraLimitOrderBook for tests that need it
|
|
89
82
|
_deployTestCoins();
|
|
90
83
|
}
|
|
@@ -803,12 +796,10 @@ contract BaseTest is V4TestSetup, IMsgSender {
|
|
|
803
796
|
|
|
804
797
|
function _disableAutoFill() internal returns (uint256 previousMaxFillCount) {
|
|
805
798
|
previousMaxFillCount = limitOrderBook.getMaxFillCount();
|
|
806
|
-
vm.prank(users.factoryOwner);
|
|
807
799
|
limitOrderBook.setMaxFillCount(0);
|
|
808
800
|
}
|
|
809
801
|
|
|
810
802
|
function _restoreAutoFill(uint256 previousMaxFillCount) internal {
|
|
811
|
-
vm.prank(users.factoryOwner);
|
|
812
803
|
limitOrderBook.setMaxFillCount(previousMaxFillCount);
|
|
813
804
|
}
|
|
814
805
|
}
|
|
@@ -12,9 +12,9 @@ contract TestableZoraLimitOrderBook is ZoraLimitOrderBook {
|
|
|
12
12
|
address poolManager_,
|
|
13
13
|
address zoraCoinVersionLookup_,
|
|
14
14
|
address zoraHookRegistry_,
|
|
15
|
-
address
|
|
15
|
+
address owner_,
|
|
16
16
|
address weth_
|
|
17
|
-
) ZoraLimitOrderBook(poolManager_, zoraCoinVersionLookup_, zoraHookRegistry_,
|
|
17
|
+
) ZoraLimitOrderBook(poolManager_, zoraCoinVersionLookup_, zoraHookRegistry_, owner_, weth_) {}
|
|
18
18
|
|
|
19
19
|
function exposedTickQueue(bytes32 poolKeyHash, address coin, int24 tick) external view returns (LimitOrderTypes.Queue memory) {
|
|
20
20
|
return getTickQueue(poolKeyHash, coin, tick);
|
package/abis/IAuthority.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "function",
|
|
4
|
-
"name": "canCall",
|
|
5
|
-
"inputs": [
|
|
6
|
-
{
|
|
7
|
-
"name": "caller",
|
|
8
|
-
"type": "address",
|
|
9
|
-
"internalType": "address"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "target",
|
|
13
|
-
"type": "address",
|
|
14
|
-
"internalType": "address"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "selector",
|
|
18
|
-
"type": "bytes4",
|
|
19
|
-
"internalType": "bytes4"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"outputs": [
|
|
23
|
-
{
|
|
24
|
-
"name": "allowed",
|
|
25
|
-
"type": "bool",
|
|
26
|
-
"internalType": "bool"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"stateMutability": "view"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "constructor",
|
|
4
|
-
"inputs": [
|
|
5
|
-
{
|
|
6
|
-
"name": "initialAdmin",
|
|
7
|
-
"type": "address",
|
|
8
|
-
"internalType": "address"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "initialFunctionRoles",
|
|
12
|
-
"type": "tuple[]",
|
|
13
|
-
"internalType": "struct SimpleAccessManager.InitialFunctionRole[]",
|
|
14
|
-
"components": [
|
|
15
|
-
{
|
|
16
|
-
"name": "selector",
|
|
17
|
-
"type": "bytes4",
|
|
18
|
-
"internalType": "bytes4"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "roleId",
|
|
22
|
-
"type": "uint64",
|
|
23
|
-
"internalType": "uint64"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"stateMutability": "nonpayable"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"type": "function",
|
|
32
|
-
"name": "ADMIN_ROLE",
|
|
33
|
-
"inputs": [],
|
|
34
|
-
"outputs": [
|
|
35
|
-
{
|
|
36
|
-
"name": "",
|
|
37
|
-
"type": "uint64",
|
|
38
|
-
"internalType": "uint64"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"stateMutability": "view"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"type": "function",
|
|
45
|
-
"name": "PUBLIC_ROLE",
|
|
46
|
-
"inputs": [],
|
|
47
|
-
"outputs": [
|
|
48
|
-
{
|
|
49
|
-
"name": "",
|
|
50
|
-
"type": "uint64",
|
|
51
|
-
"internalType": "uint64"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"stateMutability": "view"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "function",
|
|
58
|
-
"name": "canCall",
|
|
59
|
-
"inputs": [
|
|
60
|
-
{
|
|
61
|
-
"name": "caller",
|
|
62
|
-
"type": "address",
|
|
63
|
-
"internalType": "address"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "",
|
|
67
|
-
"type": "address",
|
|
68
|
-
"internalType": "address"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "selector",
|
|
72
|
-
"type": "bytes4",
|
|
73
|
-
"internalType": "bytes4"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"outputs": [
|
|
77
|
-
{
|
|
78
|
-
"name": "",
|
|
79
|
-
"type": "bool",
|
|
80
|
-
"internalType": "bool"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"stateMutability": "view"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "function",
|
|
87
|
-
"name": "getFunctionRole",
|
|
88
|
-
"inputs": [
|
|
89
|
-
{
|
|
90
|
-
"name": "selector",
|
|
91
|
-
"type": "bytes4",
|
|
92
|
-
"internalType": "bytes4"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"outputs": [
|
|
96
|
-
{
|
|
97
|
-
"name": "",
|
|
98
|
-
"type": "uint64",
|
|
99
|
-
"internalType": "uint64"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"stateMutability": "view"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "function",
|
|
106
|
-
"name": "getRoleAdmin",
|
|
107
|
-
"inputs": [
|
|
108
|
-
{
|
|
109
|
-
"name": "roleId",
|
|
110
|
-
"type": "uint64",
|
|
111
|
-
"internalType": "uint64"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"outputs": [
|
|
115
|
-
{
|
|
116
|
-
"name": "",
|
|
117
|
-
"type": "uint64",
|
|
118
|
-
"internalType": "uint64"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"stateMutability": "view"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"type": "function",
|
|
125
|
-
"name": "grantRole",
|
|
126
|
-
"inputs": [
|
|
127
|
-
{
|
|
128
|
-
"name": "roleId",
|
|
129
|
-
"type": "uint64",
|
|
130
|
-
"internalType": "uint64"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"name": "account",
|
|
134
|
-
"type": "address",
|
|
135
|
-
"internalType": "address"
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"outputs": [],
|
|
139
|
-
"stateMutability": "nonpayable"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"type": "function",
|
|
143
|
-
"name": "hasRole",
|
|
144
|
-
"inputs": [
|
|
145
|
-
{
|
|
146
|
-
"name": "roleId",
|
|
147
|
-
"type": "uint64",
|
|
148
|
-
"internalType": "uint64"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "account",
|
|
152
|
-
"type": "address",
|
|
153
|
-
"internalType": "address"
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"outputs": [
|
|
157
|
-
{
|
|
158
|
-
"name": "",
|
|
159
|
-
"type": "bool",
|
|
160
|
-
"internalType": "bool"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"stateMutability": "view"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"type": "function",
|
|
167
|
-
"name": "renounceRole",
|
|
168
|
-
"inputs": [
|
|
169
|
-
{
|
|
170
|
-
"name": "roleId",
|
|
171
|
-
"type": "uint64",
|
|
172
|
-
"internalType": "uint64"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"name": "callerConfirmation",
|
|
176
|
-
"type": "address",
|
|
177
|
-
"internalType": "address"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"outputs": [],
|
|
181
|
-
"stateMutability": "nonpayable"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"type": "function",
|
|
185
|
-
"name": "revokeRole",
|
|
186
|
-
"inputs": [
|
|
187
|
-
{
|
|
188
|
-
"name": "roleId",
|
|
189
|
-
"type": "uint64",
|
|
190
|
-
"internalType": "uint64"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"name": "account",
|
|
194
|
-
"type": "address",
|
|
195
|
-
"internalType": "address"
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
"outputs": [],
|
|
199
|
-
"stateMutability": "nonpayable"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
"type": "function",
|
|
203
|
-
"name": "setFunctionRole",
|
|
204
|
-
"inputs": [
|
|
205
|
-
{
|
|
206
|
-
"name": "selector",
|
|
207
|
-
"type": "bytes4",
|
|
208
|
-
"internalType": "bytes4"
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"name": "roleId",
|
|
212
|
-
"type": "uint64",
|
|
213
|
-
"internalType": "uint64"
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
"outputs": [],
|
|
217
|
-
"stateMutability": "nonpayable"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"type": "function",
|
|
221
|
-
"name": "setRoleAdmin",
|
|
222
|
-
"inputs": [
|
|
223
|
-
{
|
|
224
|
-
"name": "roleId",
|
|
225
|
-
"type": "uint64",
|
|
226
|
-
"internalType": "uint64"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"name": "admin",
|
|
230
|
-
"type": "uint64",
|
|
231
|
-
"internalType": "uint64"
|
|
232
|
-
}
|
|
233
|
-
],
|
|
234
|
-
"outputs": [],
|
|
235
|
-
"stateMutability": "nonpayable"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"type": "event",
|
|
239
|
-
"name": "FunctionRoleUpdated",
|
|
240
|
-
"inputs": [
|
|
241
|
-
{
|
|
242
|
-
"name": "selector",
|
|
243
|
-
"type": "bytes4",
|
|
244
|
-
"indexed": true,
|
|
245
|
-
"internalType": "bytes4"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "roleId",
|
|
249
|
-
"type": "uint64",
|
|
250
|
-
"indexed": true,
|
|
251
|
-
"internalType": "uint64"
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
"anonymous": false
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"type": "event",
|
|
258
|
-
"name": "RoleAdminChanged",
|
|
259
|
-
"inputs": [
|
|
260
|
-
{
|
|
261
|
-
"name": "roleId",
|
|
262
|
-
"type": "uint64",
|
|
263
|
-
"indexed": true,
|
|
264
|
-
"internalType": "uint64"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"name": "admin",
|
|
268
|
-
"type": "uint64",
|
|
269
|
-
"indexed": true,
|
|
270
|
-
"internalType": "uint64"
|
|
271
|
-
}
|
|
272
|
-
],
|
|
273
|
-
"anonymous": false
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"type": "event",
|
|
277
|
-
"name": "RoleGranted",
|
|
278
|
-
"inputs": [
|
|
279
|
-
{
|
|
280
|
-
"name": "roleId",
|
|
281
|
-
"type": "uint64",
|
|
282
|
-
"indexed": true,
|
|
283
|
-
"internalType": "uint64"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"name": "account",
|
|
287
|
-
"type": "address",
|
|
288
|
-
"indexed": true,
|
|
289
|
-
"internalType": "address"
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
"anonymous": false
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"type": "event",
|
|
296
|
-
"name": "RoleRevoked",
|
|
297
|
-
"inputs": [
|
|
298
|
-
{
|
|
299
|
-
"name": "roleId",
|
|
300
|
-
"type": "uint64",
|
|
301
|
-
"indexed": true,
|
|
302
|
-
"internalType": "uint64"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"name": "account",
|
|
306
|
-
"type": "address",
|
|
307
|
-
"indexed": true,
|
|
308
|
-
"internalType": "address"
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
"anonymous": false
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"type": "error",
|
|
315
|
-
"name": "AccessManagerInvalidInitialAdmin",
|
|
316
|
-
"inputs": [
|
|
317
|
-
{
|
|
318
|
-
"name": "initialAdmin",
|
|
319
|
-
"type": "address",
|
|
320
|
-
"internalType": "address"
|
|
321
|
-
}
|
|
322
|
-
]
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"type": "error",
|
|
326
|
-
"name": "AccessManagerLockedRole",
|
|
327
|
-
"inputs": [
|
|
328
|
-
{
|
|
329
|
-
"name": "roleId",
|
|
330
|
-
"type": "uint64",
|
|
331
|
-
"internalType": "uint64"
|
|
332
|
-
}
|
|
333
|
-
]
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"type": "error",
|
|
337
|
-
"name": "AccessManagerUnauthorizedAccount",
|
|
338
|
-
"inputs": [
|
|
339
|
-
{
|
|
340
|
-
"name": "account",
|
|
341
|
-
"type": "address",
|
|
342
|
-
"internalType": "address"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"name": "roleId",
|
|
346
|
-
"type": "uint64",
|
|
347
|
-
"internalType": "uint64"
|
|
348
|
-
}
|
|
349
|
-
]
|
|
350
|
-
}
|
|
351
|
-
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"abi":[{"type":"function","name":"canCall","inputs":[{"name":"caller","type":"address","internalType":"address"},{"name":"target","type":"address","internalType":"address"},{"name":"selector","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"allowed","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"canCall(address,address,bytes4)":"b7009613"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"}],\"name\":\"canCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Standard interface for permissioning originally defined in Dappsys.\",\"kind\":\"dev\",\"methods\":{\"canCall(address,address,bytes4)\":{\"details\":\"Returns true if the caller can invoke on a target the function identified by a function selector.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol\":\"IAuthority\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":@uniswap/universal-router/contracts/=node_modules/@uniswap/universal-router/contracts/\",\":@uniswap/v4-core/=node_modules/@uniswap/v4-core/\",\":@uniswap/v4-periphery/=node_modules/@uniswap/v4-periphery/\",\":@zoralabs/coins/=node_modules/@zoralabs/coins/\",\":@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\",\":permit2/src/=node_modules/@uniswap/permit2/src/\",\":solady/=node_modules/solady/src/\",\":solmate/=node_modules/solmate/src/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol\":{\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d806b0c87fbcaf0cb827b51203b27f8289b13743aeadb5867fbbe041fcf87a92\",\"dweb:/ipfs/QmfTEGiDGxKDaqBuBJ5wWJockGDrsEBZnW5S7UWrKhAxGc\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"stateMutability":"view","type":"function","name":"canCall","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"canCall(address,address,bytes4)":{"details":"Returns true if the caller can invoke on a target the function identified by a function selector."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","@uniswap/universal-router/contracts/=node_modules/@uniswap/universal-router/contracts/","@uniswap/v4-core/=node_modules/@uniswap/v4-core/","@uniswap/v4-periphery/=node_modules/@uniswap/v4-periphery/","@zoralabs/coins/=node_modules/@zoralabs/coins/","@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/","ds-test/=node_modules/ds-test/src/","forge-std/=node_modules/forge-std/src/","permit2/src/=node_modules/@uniswap/permit2/src/","solady/=node_modules/solady/src/","solmate/=node_modules/solmate/src/"],"optimizer":{"enabled":true,"runs":100},"metadata":{"bytecodeHash":"none","appendCBOR":false},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol":"IAuthority"},"evmVersion":"prague","libraries":{},"viaIR":true},"sources":{"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol":{"keccak256":"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc","urls":["bzz-raw://d806b0c87fbcaf0cb827b51203b27f8289b13743aeadb5867fbbe041fcf87a92","dweb:/ipfs/QmfTEGiDGxKDaqBuBJ5wWJockGDrsEBZnW5S7UWrKhAxGc"],"license":"MIT"}},"version":1},"id":0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"abi":[{"type":"function","name":"authority","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setAuthority","inputs":[{"name":"newAuthority","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorityUpdated","inputs":[{"name":"authority","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessManagedInvalidAuthority","inputs":[{"name":"authority","type":"address","internalType":"address"}]},{"type":"error","name":"AccessManagedUnauthorized","inputs":[]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"authority()":"bf7e214f","setAuthority(address)":"7a9e5e4b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AccessManagedInvalidAuthority\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AccessManagedUnauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract module makes a contract \\\"access managed\\\", allowing an authority contract to control access to specific functions. This is a simplified version of OpenZeppelin's AccessManaged that removes time-based access control features (delays, scheduled operations) and only supports immediate access checks. The authority is set during construction and can only be changed by the current authority.\",\"errors\":{\"AccessManagedInvalidAuthority(address)\":[{\"details\":\"Thrown when trying to set an invalid authority (e.g., not a contract)\"}],\"AccessManagedUnauthorized()\":[{\"details\":\"Thrown when an unauthorized caller attempts to access a restricted function\"}]},\"events\":{\"AuthorityUpdated(address)\":{\"details\":\"Emitted when the authority is updated\"}},\"kind\":\"dev\",\"methods\":{\"authority()\":{\"details\":\"Returns the current authority address.\",\"returns\":{\"_0\":\"The address of the authority contract\"}},\"constructor\":{\"details\":\"Initializes the contract with an initial authority.\",\"params\":{\"initialAuthority\":\"The address of the authority contract\"}},\"setAuthority(address)\":{\"details\":\"Transfers control of the contract to a new authority. Can only be called by the current authority.\",\"params\":{\"newAuthority\":\"The address of the new authority contract\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/access/SimpleAccessManaged.sol\":\"SimpleAccessManaged\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":@uniswap/universal-router/contracts/=node_modules/@uniswap/universal-router/contracts/\",\":@uniswap/v4-core/=node_modules/@uniswap/v4-core/\",\":@uniswap/v4-periphery/=node_modules/@uniswap/v4-periphery/\",\":@zoralabs/coins/=node_modules/@zoralabs/coins/\",\":@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/\",\":ds-test/=node_modules/ds-test/src/\",\":forge-std/=node_modules/forge-std/src/\",\":permit2/src/=node_modules/@uniswap/permit2/src/\",\":solady/=node_modules/solady/src/\",\":solmate/=node_modules/solmate/src/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol\":{\"keccak256\":\"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d806b0c87fbcaf0cb827b51203b27f8289b13743aeadb5867fbbe041fcf87a92\",\"dweb:/ipfs/QmfTEGiDGxKDaqBuBJ5wWJockGDrsEBZnW5S7UWrKhAxGc\"]},\"src/access/SimpleAccessManaged.sol\":{\"keccak256\":\"0xd92f23941a7a5709efdb66928036b6812d6742eca3b4d7d1ff42197a7b8916c8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6ea18ad22ef178f454a65f55fcb29cdbd45396e1da3bab178357c54162be0269\",\"dweb:/ipfs/QmZVGjcJ1v6bFaG3VTkGZHz3Fb32xZ4KBDmAxdJHxdQzBM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"type":"error","name":"AccessManagedInvalidAuthority"},{"inputs":[],"type":"error","name":"AccessManagedUnauthorized"},{"inputs":[{"internalType":"address","name":"authority","type":"address","indexed":false}],"type":"event","name":"AuthorityUpdated","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"authority","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"address","name":"newAuthority","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"setAuthority"}],"devdoc":{"kind":"dev","methods":{"authority()":{"details":"Returns the current authority address.","returns":{"_0":"The address of the authority contract"}},"constructor":{"details":"Initializes the contract with an initial authority.","params":{"initialAuthority":"The address of the authority contract"}},"setAuthority(address)":{"details":"Transfers control of the contract to a new authority. Can only be called by the current authority.","params":{"newAuthority":"The address of the new authority contract"}}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","@uniswap/universal-router/contracts/=node_modules/@uniswap/universal-router/contracts/","@uniswap/v4-core/=node_modules/@uniswap/v4-core/","@uniswap/v4-periphery/=node_modules/@uniswap/v4-periphery/","@zoralabs/coins/=node_modules/@zoralabs/coins/","@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/","ds-test/=node_modules/ds-test/src/","forge-std/=node_modules/forge-std/src/","permit2/src/=node_modules/@uniswap/permit2/src/","solady/=node_modules/solady/src/","solmate/=node_modules/solmate/src/"],"optimizer":{"enabled":true,"runs":100},"metadata":{"bytecodeHash":"none","appendCBOR":false},"compilationTarget":{"src/access/SimpleAccessManaged.sol":"SimpleAccessManaged"},"evmVersion":"prague","libraries":{},"viaIR":true},"sources":{"node_modules/@openzeppelin/contracts/access/manager/IAuthority.sol":{"keccak256":"0x9c9a58dd831b9bb4a0ea47d96b53c13ab9a6e4270a518ea395b1424092fd74dc","urls":["bzz-raw://d806b0c87fbcaf0cb827b51203b27f8289b13743aeadb5867fbbe041fcf87a92","dweb:/ipfs/QmfTEGiDGxKDaqBuBJ5wWJockGDrsEBZnW5S7UWrKhAxGc"],"license":"MIT"},"src/access/SimpleAccessManaged.sol":{"keccak256":"0xd92f23941a7a5709efdb66928036b6812d6742eca3b4d7d1ff42197a7b8916c8","urls":["bzz-raw://6ea18ad22ef178f454a65f55fcb29cdbd45396e1da3bab178357c54162be0269","dweb:/ipfs/QmZVGjcJ1v6bFaG3VTkGZHz3Fb32xZ4KBDmAxdJHxdQzBM"],"license":"MIT"}},"version":1},"id":77}
|