@neo-one/smart-contract-codegen-esnext-esm
Version:
NEO•ONE TypeScript smart contract codegen.
12 lines (9 loc) • 374 B
JavaScript
import stringify from 'safe-stable-stringify';
import { getABIName } from './getABIName';
export const genABI = (name, abi) => ({
js: `export const ${getABIName(name)} = ${stringify(abi, undefined, 2)};`,
ts: `import { ABI } from '@neo-one/client';
export const ${getABIName(name)}: ABI = ${stringify(abi, undefined, 2)};
`,
});
//# sourceMappingURL=genABI.js.map