feat: add euler-burn connector

This commit is contained in:
Shriya Tyagi 2023-12-19 04:29:02 +05:30
parent ad56081bd3
commit 1f88fa50f5

View File

@ -0,0 +1,39 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
interface IEToken {
function burnDTokens(uint subAccountId) external;
function burnETokens(uint subAccountId) external;
}
contract ConnectV2EulerBurn {
event LogBurn(address token, uint256 subAccountId);
function burnDTokens(address dtoken, uint256 subAccountId, uint256 getId, uint256 setId)
external
payable
returns (string memory _eventName, bytes memory _eventParam)
{
IEToken(dtoken).burnDTokens(subAccountId);
_eventName = "LogBurn(address,uint256)";
_eventParam = abi.encode(dtoken, subAccountId);
}
function burnETokens(address etoken, uint256 subAccountId, uint256 getId, uint256 setId)
external
payable
returns (string memory _eventName, bytes memory _eventParam)
{
IEToken(etoken).burnDTokens(subAccountId);
_eventName = "LogBurn(address,uint256)";
_eventParam = abi.encode(etoken, subAccountId);
}
string public constant name = "Euler-Burn-v1.0";
}