mirror of
				https://github.com/Instadapp/dsa-connectors.git
				synced 2024-07-29 22:37:00 +00:00 
			
		
		
		
	feat: add euler-burn connector
This commit is contained in:
		
							parent
							
								
									ad56081bd3
								
							
						
					
					
						commit
						1f88fa50f5
					
				
							
								
								
									
										39
									
								
								contracts/mainnet/connectors/euler-burn/main.sol
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								contracts/mainnet/connectors/euler-burn/main.sol
									
									
									
									
									
										Normal 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"; | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Shriya Tyagi
						Shriya Tyagi