types.ts 961 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2017-2019 @polkadot/app-contracts authors & contributors
  2. // This software may be modified and distributed under the terms
  3. // of the Apache-2.0 license. See the LICENSE file for details.
  4. import { Abi } from '@polkadot/api-contract';
  5. import { AppProps } from '@polkadot/react-components/types';
  6. import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
  7. export interface LocationProps {
  8. match: {
  9. params: Record<string, any>;
  10. };
  11. }
  12. export type ComponentProps = AppProps & LocationProps & {
  13. accounts: SubjectInfo[];
  14. contracts: SubjectInfo[];
  15. hasCode: boolean;
  16. showDeploy: (codeHash?: string) => () => void;
  17. };
  18. export interface CodeJson {
  19. abi?: string | null;
  20. codeHash: string;
  21. name: string;
  22. genesisHash: string;
  23. tags: string[];
  24. }
  25. export interface CodeStored {
  26. json: CodeJson;
  27. contractAbi?: Abi;
  28. }
  29. export interface ContractJsonOld {
  30. genesisHash: string;
  31. abi: string;
  32. address: string;
  33. name: string;
  34. }