* Single put_code/deploy (new & backwards compat.) * new-style * old-style deploy? * notice * Cleanups * linting * grrr... Mac case-sensistivity * Add createContract on BluePrint * Adjust contracts check * Adjust * Adjust tests
24 lines
529 B
TypeScript
24 lines
529 B
TypeScript
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { ApiBase } from '@polkadot/api/base';
|
|
import { TypeRegistry } from '@polkadot/types';
|
|
|
|
const registry = new TypeRegistry();
|
|
|
|
export const mockApi = {
|
|
registry,
|
|
rx: {
|
|
tx: {
|
|
contracts: {
|
|
instantiate: (): never => {
|
|
throw new Error('mock');
|
|
},
|
|
putCode: (): never => {
|
|
throw new Error('mock');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} as unknown as ApiBase<'promise'>;
|