dsa-connectors-2.0/scripts/tests/encodeFlashcastData.ts

14 lines
358 B
TypeScript
Raw Normal View History

2023-12-15 22:50:02 +00:00
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],
]);
};