* wip: support revive for ink! v6 * revive components * fix: support v6 metadata * fix: remove debug messages * test: extend tests for v6ToLatestCompatible * refactor: remove Revive specific components * test: construct revive compatible contract * feat: use ContractReviveProjectInfo new type * fix: parse version to decide what kind of contract * refactor: remove hardcoded address * fix: format --------- Co-authored-by: Peter White <petras9789@gmail.com>
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
// Copyright 2017-2025 @polkadot/api-contract authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { ApiPromise } from '@polkadot/api';
|
|
import type { AccountId, AccountId20, Hash } from '@polkadot/types/interfaces';
|
|
import type { Abi } from '../Abi/index.js';
|
|
|
|
import { toPromiseMethod } from '@polkadot/api';
|
|
|
|
import { Blueprint, Code, Contract } from '../base/index.js';
|
|
|
|
export class BlueprintPromise extends Blueprint<'promise'> {
|
|
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
|
|
super(api, abi, codeHash, toPromiseMethod);
|
|
}
|
|
}
|
|
|
|
export class CodePromise extends Code<'promise'> {
|
|
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
|
super(api, abi, wasm, toPromiseMethod);
|
|
}
|
|
}
|
|
|
|
export class ContractPromise extends Contract<'promise'> {
|
|
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20) {
|
|
super(api, abi, address, toPromiseMethod);
|
|
}
|
|
}
|