Created
June 28, 2022 14:19
-
-
Save pradyuman-verma/7fe5853bacaca2eb9088b2014a0d971f to your computer and use it in GitHub Desktop.
Event Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.0; | |
interface ListInterface { | |
function accountID(address) external returns (uint64); | |
} | |
contract InstaEventManager { | |
ListInterface internal immutable instalist; | |
constructor(address _instaList) public { | |
instalist = ListInterface(_instaList); | |
} | |
event LogSwapAggregated(string[] indexed allTargets, string target); | |
modifier onlyDsa() { | |
require(instalist.accountID(msg.sender) != 0, "zero-caller:not-a-dsa"); | |
_; | |
} | |
function logSwapAggregator( | |
string[] memory _connectors, | |
string memory _connector | |
) external onlyDsa { | |
emit LogSwapAggregated(_connectors, _connector); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment