diff --git a/src/SyncSafeModule.sol b/src/SyncSafeModule.sol index 79b8ac6..9faaebf 100644 --- a/src/SyncSafeModule.sol +++ b/src/SyncSafeModule.sol @@ -19,7 +19,7 @@ using SyncSafeAddress for SafeProxyFactory; contract SyncSafeModule is OApp, HoldsBalance { SafeProxyFactory public immutable factory; SyncSafeModule internal immutable _syncModule; - uint32[] internal _chainIds; + mapping(SafeProxy proxy => uint32[] chainIds) internal _chainIds; mapping(SafeProxy proxy => SafeCreationParams) public proxyCreationParams; @@ -73,11 +73,11 @@ contract SyncSafeModule is OApp, HoldsBalance { SafeCreationParams({initializerHash: keccak256(initializer), _singleton: address(_syncModule), nonce: nonce}); proxyCreationParams[proxy] = params; - _setChains(chains); + _setChains(proxy, chains); } - function _setChains(uint32[] memory chains) internal { - _chainIds = chains; + function _setChains(SafeProxy proxy, uint32[] memory chains) internal { + _chainIds[proxy] = chains; } function initDeployProxy( @@ -99,8 +99,8 @@ contract SyncSafeModule is OApp, HoldsBalance { _fund(msg.sender, msg.value); } - function chainIds() public view returns (uint32[] memory) { - return _chainIds; + function chainIds(SafeProxy proxy) public view returns (uint32[] memory) { + return _chainIds[proxy]; } function _removeChainFromList(uint32[] memory chains, uint32 chain) internal pure returns (uint32[] memory newChains) {