abi-wan-kanabi
Advanced tools
Comparing version 2.1.0-rc.0 to 2.1.0-rc.1
@@ -46,7 +46,15 @@ #!/usr/bin/env node | ||
async function run() { | ||
console.log("Wech ya wsmk, rana jina !"); | ||
const json = await fs.readJson(argv.input); | ||
const content = `export const ABI = ${JSON.stringify(json.abi, null, 2)} as const;\n`; | ||
let abi = json.abi; | ||
if (typeof abi === 'string') { | ||
console.log('String dab ben dab'); | ||
abi = JSON.parse(abi); | ||
} | ||
else { | ||
console.log('machi string ya jeddek'); | ||
} | ||
const content = `export const ABI = ${JSON.stringify(abi, null, 2)} as const;\n`; | ||
await fs.writeFile(argv.output, content); | ||
} | ||
run().catch(console.error); | ||
//# sourceMappingURL=generate.js.map |
@@ -100,3 +100,6 @@ import { ResolvedConfig } from './config' | ||
type AbiEventKind = 'nested' | 'data' | 'key' | ||
// TODO: Do we need to handle 'key' and 'data' differently ? | ||
// TODO: 'flat' is found in some ABIs but it's not mentioned in the ABI spec: | ||
// https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_metadata.json#L507:L509 | ||
type AbiEventKind = 'nested' | 'data' | 'key' | 'flat' | ||
@@ -103,0 +106,0 @@ export type AbiEventMember = { |
{ | ||
"name": "abi-wan-kanabi", | ||
"version": "2.1.0-rc.0", | ||
"version": "2.1.0-rc.1", | ||
"description": "Abi parser for Cairo smart contracts, based on wagmi abitype", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69062
18
1611