diff --git a/contracts/arbitrum/connectors/delegate/events.sol b/contracts/arbitrum/connectors/delegate/events.sol new file mode 100644 index 0000000..a7fb918 --- /dev/null +++ b/contracts/arbitrum/connectors/delegate/events.sol @@ -0,0 +1,6 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.2; + +contract Events { + event LogDelegate(address token, address delegatee); +} diff --git a/contracts/arbitrum/connectors/delegate/interface.sol b/contracts/arbitrum/connectors/delegate/interface.sol new file mode 100644 index 0000000..2fe5bf0 --- /dev/null +++ b/contracts/arbitrum/connectors/delegate/interface.sol @@ -0,0 +1,6 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.2; + +interface IVoteToken { + function delegate(address delegatee) external; +} diff --git a/contracts/arbitrum/connectors/delegate/main.sol b/contracts/arbitrum/connectors/delegate/main.sol new file mode 100644 index 0000000..9f0d0e8 --- /dev/null +++ b/contracts/arbitrum/connectors/delegate/main.sol @@ -0,0 +1,21 @@ +//SPDX-License-Identifier: MIT +pragma solidity ^0.8.2; + +import "./interface.sol"; +import "./events.sol"; + +contract DelegateConnector is Events { + function delegate( + address token, + address delegatee + ) external returns (string memory _eventName, bytes memory _eventParam) { + IVoteToken(token).delegate(delegatee); + + _eventName = "LogDelegate(address,address)"; + _eventParam = abi.encode(token, delegatee); + } +} + +contract ConnectV2DelegateArbitrum is DelegateConnector { + string public constant name = "Delegate-v1.0"; +}