Rework asLatest update (#2802)
* Revert "[CI Skip] release/beta 2.4.2-10" This reverts commit5cb1c2d33a. * Revert "Use asLatest in metadata extraction (#2800)" This reverts commit600666de1c. * Bumps * Expansion * Flatten * Metadata class imports * Cleanup Decorate exports * Move Metadata to top-level * Swap logger on ABI * Adjust imports * Cleanups * Updates
This commit is contained in:
@@ -5,10 +5,12 @@ import { AnyJson, Codec, CodecArg } from '@polkadot/types/types';
|
||||
import { ChainProperties, ContractConstructorSpec, ContractEventSpec, ContractMessageSpec, ContractMessageParamSpec, ContractProject } from '@polkadot/types/interfaces';
|
||||
import { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from './types';
|
||||
|
||||
import { assert, compactAddLength, compactStripLength, isNumber, isObject, isString, stringCamelCase, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
import { assert, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import MetaRegistry from './MetaRegistry';
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string | number): T {
|
||||
const message = isNumber(messageOrId)
|
||||
? list[messageOrId]
|
||||
@@ -115,7 +117,7 @@ export default class Abi {
|
||||
type: this.registry.getMetaTypeDef(arg.type)
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(`Error expanding argument ${index} in ${JSON.stringify(spec)}`);
|
||||
l.error(`Error expanding argument ${index} in ${JSON.stringify(spec)}`);
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user