Skip to content

Commit 25c46f2

Browse files
authored
Ensure non-option calls in api-contract are marked as @deprecated (#4433)
1 parent f7124f7 commit 25c46f2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## master
4+
5+
Changes:
6+
7+
- Ensure non-option calls in api-contract are marked as `@deprecated`
8+
9+
310
## 7.3.1 Jan 9, 2022
411

512
Upgrade priority: Low. Maintenance upgrade, tracking the latest `@polkadot` libraries.

packages/api-contract/src/base/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions
1010

1111
export interface BlueprintDeploy<ApiType extends ApiTypes> {
1212
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
13+
// @deprecated Use options form (to be dropped in a major update)
1314
(value: bigint | string | number | BN, gasLimit: bigint | string | number | BN, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
1415
}
1516

1617
export interface ContractQuery<ApiType extends ApiTypes> {
1718
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
19+
// @deprecated Use options form (to be dropped in a major update)
1820
(origin: AccountId | string | Uint8Array, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
1921
}
2022

2123
export interface ContractTx<ApiType extends ApiTypes> {
2224
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
25+
// @deprecated Use options form (to be dropped in a major update)
2326
(value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
2427
}
2528

2629
export interface ContractGeneric<O, T> {
2730
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
31+
// @deprecated Use options form (to be dropped in a major update)
2832
(messageOrId: AbiMessage | string | number, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): T;
2933
}
3034

0 commit comments

Comments
 (0)