Comparing version 0.0.0-canary-20250305030425 to 0.0.0-canary-20250306045222
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '0.0.0-canary-20250305030425'; | ||
exports.version = '0.0.0-canary-20250306045222'; | ||
//# sourceMappingURL=version.js.map |
@@ -21,7 +21,13 @@ "use strict"; | ||
throw new abi_js_1.AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath }); | ||
let values = Array.isArray(result) ? result : [result]; | ||
if (abiItem.outputs.length === 0 && !values[0]) | ||
values = []; | ||
const values = (() => { | ||
if (abiItem.outputs.length === 0) | ||
return []; | ||
if (abiItem.outputs.length === 1) | ||
return [result]; | ||
if (Array.isArray(result)) | ||
return result; | ||
throw new abi_js_1.InvalidArrayError(result); | ||
})(); | ||
return (0, encodeAbiParameters_js_1.encodeAbiParameters)(abiItem.outputs, values); | ||
} | ||
//# sourceMappingURL=encodeFunctionResult.js.map |
@@ -244,2 +244,3 @@ // biome-ignore lint/performance/noBarrelFile: entrypoint module | ||
export { jbcTestnet } from './definitions/jbcTestnet.js'; | ||
export { juneo } from './definitions/juneo.js'; | ||
export { karura } from './definitions/karura.js'; | ||
@@ -246,0 +247,0 @@ /** @deprecated Use `kakarotStarknetSepolia` instead. */ |
@@ -1,2 +0,2 @@ | ||
export const version = '0.0.0-canary-20250305030425'; | ||
export const version = '0.0.0-canary-20250306045222'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,2 @@ | ||
import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, } from '../../errors/abi.js'; | ||
import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, InvalidArrayError, } from '../../errors/abi.js'; | ||
import { encodeAbiParameters, } from './encodeAbiParameters.js'; | ||
@@ -18,7 +18,13 @@ import { getAbiItem } from './getAbiItem.js'; | ||
throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath }); | ||
let values = Array.isArray(result) ? result : [result]; | ||
if (abiItem.outputs.length === 0 && !values[0]) | ||
values = []; | ||
const values = (() => { | ||
if (abiItem.outputs.length === 0) | ||
return []; | ||
if (abiItem.outputs.length === 1) | ||
return [result]; | ||
if (Array.isArray(result)) | ||
return result; | ||
throw new InvalidArrayError(result); | ||
})(); | ||
return encodeAbiParameters(abiItem.outputs, values); | ||
} | ||
//# sourceMappingURL=encodeFunctionResult.js.map |
@@ -244,2 +244,3 @@ export type { Chain } from '../types/chain.js'; | ||
export { jbcTestnet } from './definitions/jbcTestnet.js'; | ||
export { juneo } from './definitions/juneo.js'; | ||
export { karura } from './definitions/karura.js'; | ||
@@ -246,0 +247,0 @@ /** @deprecated Use `kakarotStarknetSepolia` instead. */ |
@@ -1,2 +0,2 @@ | ||
export declare const version = "0.0.0-canary-20250305030425"; | ||
export declare const version = "0.0.0-canary-20250306045222"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -246,2 +246,3 @@ export type { Chain } from '../types/chain.js' | ||
export { jbcTestnet } from './definitions/jbcTestnet.js' | ||
export { juneo } from './definitions/juneo.js' | ||
export { karura } from './definitions/karura.js' | ||
@@ -248,0 +249,0 @@ /** @deprecated Use `kakarotStarknetSepolia` instead. */ |
@@ -1,1 +0,1 @@ | ||
export const version = '0.0.0-canary-20250305030425' | ||
export const version = '0.0.0-canary-20250306045222' |
{ | ||
"name": "viem", | ||
"description": "TypeScript Interface for Ethereum", | ||
"version": "0.0.0-canary-20250305030425", | ||
"version": "0.0.0-canary-20250306045222", | ||
"main": "./_cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "./_esm/index.js", |
@@ -6,2 +6,3 @@ import type { Abi, AbiStateMutability, ExtractAbiFunctions } from 'abitype' | ||
AbiFunctionOutputsNotFoundError, | ||
InvalidArrayError, | ||
} from '../../errors/abi.js' | ||
@@ -90,6 +91,10 @@ import type { | ||
let values = Array.isArray(result) ? result : [result] | ||
if (abiItem.outputs.length === 0 && !values[0]) values = [] | ||
const values = (() => { | ||
if (abiItem.outputs.length === 0) return [] | ||
if (abiItem.outputs.length === 1) return [result] | ||
if (Array.isArray(result)) return result | ||
throw new InvalidArrayError(result) | ||
})() | ||
return encodeAbiParameters(abiItem.outputs, values) | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
15407738
7872
281342