mirror of
				https://github.com/Instadapp/dsa-connectors-2.0.git
				synced 2024-07-29 21:57:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			358 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			358 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import hre from "hardhat";
 | |
| const { web3 } = hre;
 | |
| 
 | |
| import { encodeSpells } from "./encodeSpells";
 | |
| 
 | |
| export default function encodeFlashcastData(spells: any) {
 | |
|   const encodeSpellsData = encodeSpells(spells);
 | |
|   let argTypes = ["string[]", "bytes[]"];
 | |
|   return web3.eth.abi.encodeParameters(argTypes, [
 | |
|     encodeSpellsData[0],
 | |
|     encodeSpellsData[1],
 | |
|   ]);
 | |
| };
 | 
