-
Notifications
You must be signed in to change notification settings - Fork 9
Phase 1 #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Phase 1 #204
Changes from 8 commits
dc7cab0
23161aa
13204fd
6356eb5
d636ca1
1de79fa
387b0dd
6638193
328df25
27c6799
f15cee0
effec66
ced1c7c
5261307
7586700
5122d99
1ebf544
8734f15
ca1475a
91d5bc7
9aae799
b7b54e5
93b86a1
aecdd0f
2fb02d3
bde9aa2
e4eacc5
12655a9
6e0adf4
ba5a850
2fba849
101fb60
c41872d
053fd3c
0dac919
337f8cf
554018a
4c55c6a
933900b
5e81fe7
ae5baa7
35ee2b7
ff6dfaf
e1e990b
e7970bf
0ccbc51
8cbd5b7
5dd3770
5b62e53
8672361
3c8f98f
1334556
d5f20eb
ab74592
c07946b
73e6c78
bb20519
475ec42
e6786c6
dd96c9b
f96282e
298783b
fe28064
dc9b920
f5b18cf
853f90e
9121631
493e568
c971705
5624e5e
662a8ca
18e2d06
379275c
1b6a25f
f868907
cfe8264
5ad30ed
a12b0d1
db1a6e0
6a41577
a632474
ebee8b1
c5bd655
b15f143
3f204c7
2595862
cbd73f7
755766a
c3d5101
3d37ef4
b59b03f
42ec35e
e189752
ec4fff4
27f7d70
b2dd857
061c792
bc9c88c
119ab07
02d9556
ed0fd06
e52278b
b6ee980
d58159f
5da9afe
a7eb6f7
a421602
bf52ce1
0dc857f
85762ee
77cf9f0
94f9a2f
f321472
c401b0b
ffe5d62
1e785dc
9f6c81b
f0e5563
7f519e1
0538482
ec62942
179c401
8ac924b
1982776
6f3c65b
e706724
12c5a81
bdc24da
f5bcf07
814ab61
6fa5ee8
7036814
71d33e9
d6b68ca
05d3324
6e9eb50
3d58710
c677a67
d73b94f
d6e83e9
313df96
f0f2e82
084ef6e
63a8b16
85e6f78
0f894b0
22ddd86
f3d6e03
4bb073b
d197ae5
19abff9
9196ddb
5f11f5e
d13219c
9fcd6aa
b643558
fd24c5a
97189b7
5a46089
35ae0f1
09fe7bd
c9bad04
ce04c40
23148ec
8b7ac09
5d7253e
05271d0
1899bd1
4fc2627
2631eda
eac68a0
778abdc
df6c3fd
bad2800
dee69ba
cfc5781
f85269b
9e8caec
7075cb3
8d5d6f4
c7c5ff5
fc13704
426f352
8554de9
abace8f
95952c0
dc293f2
1f3dacc
a7911af
d938896
53dc756
c9757c0
4ff6be6
85e4fa3
07118e6
eefc1d8
5286612
2d82ed0
a6c596a
0de7a83
7eb9683
f2c2251
aefae78
aa04465
ff1ad26
9d4c993
933cb8c
02685f4
ed5263f
b0e4968
59b8b1b
11dfe1a
8beac92
9e5b61f
f137b61
b4b186b
9f2bccf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,11 +10,10 @@ import "solady/tokens/ERC20.sol"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../interfaces/IFeesManager.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../interfaces/IFeesPlug.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../interfaces/IFeesPool.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../interfaces/IReceiver.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {AddressResolverUtil} from "../helpers/AddressResolverUtil.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {NonceUsed, InvalidAmount, InsufficientCreditsAvailable, InsufficientBalance, InvalidChainSlug, NotRequestHandler, InvalidReceiver} from "../../utils/common/Errors.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {WRITE} from "../../utils/common/Constants.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {WRITE, FAST} from "../../utils/common/Constants.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../../utils/RescueFundsLib.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import "../base/AppGatewayBase.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import {toBytes32Format} from "../../utils/common/Converters.sol"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -34,9 +33,9 @@ abstract contract FeesManagerStorage is IFeesManager { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mapping(address => uint256) public userBlockedCredits; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // slot 52 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// @notice Mapping to track request credits details for each request count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// @dev requestCount => RequestFee | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mapping(uint40 => uint256) public requestBlockedCredits; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// @notice Mapping to track request credits details for each payload id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// @dev payloadId => RequestFee | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mapping(bytes32 => uint256) public requestBlockedCredits; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // slot 53 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // token pool balances | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -136,7 +135,6 @@ abstract contract Credit is FeesManagerStorage, Initializable, Ownable, AppGatew | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Mint tokens to the user | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _mint(depositTo_, creditAmount_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (nativeAmount_ > 0) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // if native transfer fails, add to credit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bool success = feesPool.withdraw(depositTo_, nativeAmount_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -201,7 +199,7 @@ abstract contract Credit is FeesManagerStorage, Initializable, Ownable, AppGatew | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint256 amount_ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) public view override returns (bool) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // If consumeFrom_ is not same as spender_ or spender_ is not watcher, check if it is approved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!_isWatcher(spender_) && consumeFrom_ != spender_) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (spender_ != address(watcher__()) && consumeFrom_ != spender_) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (allowance(consumeFrom_, spender_) == 0) return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -224,7 +222,7 @@ abstract contract Credit is FeesManagerStorage, Initializable, Ownable, AppGatew | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) public override returns (bool) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!isCreditSpendable(from_, msg.sender, amount_)) revert InsufficientCreditsAvailable(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (_isWatcher(msg.sender)) _approve(from_, msg.sender, amount_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (msg.sender == address(watcher__())) _approve(from_, msg.sender, amount_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return super.transferFrom(from_, to_, amount_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -268,33 +266,28 @@ abstract contract Credit is FeesManagerStorage, Initializable, Ownable, AppGatew | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uint256 maxFees_, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bytes memory payload_ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) internal async { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _setMaxFees(getMaxFees(chainSlug_)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _setOverrides(consumeFrom_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| QueueParams memory queueParams; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| queueParams.overrideParams = overrideParams; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| queueParams.transaction = Transaction({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // applyOverride( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // OverrideParamsLib.setMaxFees(overrideParams, getMaxFees(chainSlug_)).setConsumeFrom(consumeFrom_) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RawPayload memory rawPayload; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rawPayload.overrideParams = overrideParams; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rawPayload.transaction = Transaction({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chainSlug: chainSlug_, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| target: _getFeesPlugAddress(chainSlug_), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| payload: payload_ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| queueParams.switchboardType = sbType; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| watcher__().queue(queueParams, address(this)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| watcher__().executePayload(rawPayload, address(this)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // applyOverride( | |
| // OverrideParamsLib.setMaxFees(overrideParams, getMaxFees(chainSlug_)).setConsumeFrom(consumeFrom_) | |
| // ); | |
| RawPayload memory rawPayload; | |
| rawPayload.overrideParams = overrideParams; | |
| rawPayload.transaction = Transaction({ | |
| chainSlug: chainSlug_, | |
| target: _getFeesPlugAddress(chainSlug_), | |
| payload: payload_ | |
| }); | |
| queueParams.switchboardType = sbType; | |
| watcher__().queue(queueParams, address(this)); | |
| watcher__().executePayload(rawPayload, address(this)); | |
| } | |
| // Add these at the top of the file: | |
| import {OverrideParams} from "../../utils/common/Structs.sol"; | |
| import "../../utils/OverrideParamsLib.sol"; | |
| RawPayload memory rawPayload; | |
| OverrideParams memory params; | |
| // Populate override params locally to avoid stale/global state | |
| params = OverrideParamsLib | |
| .setMaxFees(params, getMaxFees(chainSlug_)) | |
| .setConsumeFrom(consumeFrom_); | |
| rawPayload.overrideParams = params; | |
| rawPayload.transaction = Transaction({ | |
| chainSlug: chainSlug_, | |
| target: _getFeesPlugAddress(chainSlug_), | |
| payload: payload_ | |
| }); | |
| watcher__().executePayload(rawPayload, address(this)); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,19 +6,21 @@ import "./Credit.sol"; | |||||||||||||||||||||||||||
| /// @title FeesManager | ||||||||||||||||||||||||||||
| /// @notice Contract for managing fees | ||||||||||||||||||||||||||||
| contract FeesManager is Credit { | ||||||||||||||||||||||||||||
| using OverrideParamsLib for OverrideParams; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| /// @notice Emitted when fees are blocked for a batch | ||||||||||||||||||||||||||||
| /// @param requestCount The batch identifier | ||||||||||||||||||||||||||||
| /// @param payloadId The payload id | ||||||||||||||||||||||||||||
| /// @param consumeFrom The consume from address | ||||||||||||||||||||||||||||
| /// @param amount The blocked amount | ||||||||||||||||||||||||||||
| event CreditsBlocked(uint40 indexed requestCount, address indexed consumeFrom, uint256 amount); | ||||||||||||||||||||||||||||
| event CreditsBlocked(bytes32 indexed payloadId, address indexed consumeFrom, uint256 amount); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| /// @notice Emitted when fees are unblocked and assigned to a transmitter | ||||||||||||||||||||||||||||
| /// @param requestCount The batch identifier | ||||||||||||||||||||||||||||
| /// @param payloadId The payload id | ||||||||||||||||||||||||||||
| /// @param consumeFrom The consume from address | ||||||||||||||||||||||||||||
| /// @param transmitter The transmitter address | ||||||||||||||||||||||||||||
| /// @param amount The unblocked amount | ||||||||||||||||||||||||||||
| event CreditsUnblockedAndAssigned( | ||||||||||||||||||||||||||||
| uint40 indexed requestCount, | ||||||||||||||||||||||||||||
| bytes32 indexed payloadId, | ||||||||||||||||||||||||||||
| address indexed consumeFrom, | ||||||||||||||||||||||||||||
| address indexed transmitter, | ||||||||||||||||||||||||||||
| uint256 amount | ||||||||||||||||||||||||||||
|
|
@@ -30,14 +32,9 @@ contract FeesManager is Credit { | |||||||||||||||||||||||||||
| event MaxFeesPerChainSlugSet(uint32 indexed chainSlug, uint256 fees); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| /// @notice Emitted when fees are unblocked | ||||||||||||||||||||||||||||
| /// @param requestCount The batch identifier | ||||||||||||||||||||||||||||
| /// @param payloadId The payload id | ||||||||||||||||||||||||||||
| /// @param consumeFrom The consume from address | ||||||||||||||||||||||||||||
| event CreditsUnblocked(uint40 indexed requestCount, address indexed consumeFrom); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| modifier onlyRequestHandler() { | ||||||||||||||||||||||||||||
| if (msg.sender != address(watcher__().requestHandler__())) revert NotRequestHandler(); | ||||||||||||||||||||||||||||
| _; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| event CreditsUnblocked(bytes32 indexed payloadId, address indexed consumeFrom); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| constructor() { | ||||||||||||||||||||||||||||
| _disableInitializers(); // disable for implementation | ||||||||||||||||||||||||||||
|
|
@@ -56,11 +53,10 @@ contract FeesManager is Credit { | |||||||||||||||||||||||||||
| bytes32 sbType_ | ||||||||||||||||||||||||||||
| ) public reinitializer(2) { | ||||||||||||||||||||||||||||
| evmxSlug = evmxSlug_; | ||||||||||||||||||||||||||||
| sbType = sbType_; | ||||||||||||||||||||||||||||
| feesPool = IFeesPool(feesPool_); | ||||||||||||||||||||||||||||
| maxFeesPerChainSlug[evmxSlug_] = fees_; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| _setMaxFees(fees_); | ||||||||||||||||||||||||||||
| overrideParams = overrideParams.setSwitchboardType(sbType_).setMaxFees(fees_); | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| _initializeOwner(owner_); | ||||||||||||||||||||||||||||
| _initializeAppGateway(addressResolver_); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
@@ -88,39 +84,40 @@ contract FeesManager is Credit { | |||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| function setMaxFees(uint256 fees_) external onlyOwner { | ||||||||||||||||||||||||||||
| _setMaxFees(fees_); | ||||||||||||||||||||||||||||
| overrideParams = overrideParams.setMaxFees(fees_); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| /////////////////////// FEES MANAGEMENT /////////////////////// | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| /// @notice Blocks fees for a request count | ||||||||||||||||||||||||||||
| /// @param requestCount_ The batch identifier | ||||||||||||||||||||||||||||
| /// @param payloadId_ The payload id | ||||||||||||||||||||||||||||
| /// @param consumeFrom_ The fees payer address | ||||||||||||||||||||||||||||
| /// @param credits_ The total fees to block | ||||||||||||||||||||||||||||
| /// @dev Only callable by delivery helper | ||||||||||||||||||||||||||||
| function blockCredits( | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
| /// @notice Blocks fees for a request count | |
| /// @param requestCount_ The batch identifier | |
| /// @param payloadId_ The payload id | |
| /// @param consumeFrom_ The fees payer address | |
| /// @param credits_ The total fees to block | |
| /// @dev Only callable by delivery helper | |
| function blockCredits( | |
| /// @notice Blocks fees for a payload | |
| /// @param payloadId_ The payload id | |
| /// @param consumeFrom_ The fees payer address | |
| /// @param credits_ The total fees to block | |
| /// @dev Only callable by delivery helper | |
| function blockCredits( |
🤖 Prompt for AI Agents
In contracts/evmx/fees/FeesManager.sol around lines 92 to 97, the NatSpec
title/description is incorrect: it currently says "Blocks fees for a request
count" but the function operates on a payloadId; update the docstring to say
"Blocks fees for a payload" (and adjust any other mentions of "request count" to
"payload" or "payloadId" so the documentation matches the function parameters
and behavior).
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,11 +20,6 @@ abstract contract AddressResolverStorage is IAddressResolver { | |||||||||
| // slot 52 | ||||||||||
| IAsyncDeployer public override asyncDeployer__; | ||||||||||
|
|
||||||||||
| // slot 53 | ||||||||||
| IDeployForwarder public override deployForwarder__; | ||||||||||
|
|
||||||||||
| // slot 54 | ||||||||||
| address public override defaultAuctionManager; | ||||||||||
|
|
||||||||||
| // slot 55 | ||||||||||
| mapping(bytes32 => address) public override contractAddresses; | ||||||||||
|
Comment on lines
32
to
33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect storage slot comment. The comment claims Apply this diff: - // slot 55
+ // slot 56
mapping(bytes32 => address) public override contractAddresses;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
@@ -75,20 +70,6 @@ contract AddressResolver is AddressResolverStorage, Initializable, Ownable { | |||||||||
| emit AsyncDeployerUpdated(asyncDeployer_); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// @notice Updates the address of the default auction manager | ||||||||||
| /// @param defaultAuctionManager_ The address of the default auction manager | ||||||||||
| function setDefaultAuctionManager(address defaultAuctionManager_) external override onlyOwner { | ||||||||||
| defaultAuctionManager = defaultAuctionManager_; | ||||||||||
| emit DefaultAuctionManagerUpdated(defaultAuctionManager_); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// @notice Updates the address of the deploy forwarder | ||||||||||
| /// @param deployForwarder_ The address of the deploy forwarder | ||||||||||
| function setDeployForwarder(address deployForwarder_) external override onlyOwner { | ||||||||||
| deployForwarder__ = IDeployForwarder(deployForwarder_); | ||||||||||
| emit DeployForwarderUpdated(deployForwarder_); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// @notice Updates the address of a contract | ||||||||||
| /// @param contractId_ The id of the contract | ||||||||||
| /// @param contractAddress_ The address of the contract | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t clobber user approvals when caller is watcher
Setting allowance to amount_ for watcher overwrites any existing allowance (including infinite). This should bypass allowance entirely for watcher and perform a direct transfer.
📝 Committable suggestion
🤖 Prompt for AI Agents