44
55import { ApiTypes , DecorateMethod , ObsInnerType } from '@polkadot/api/types' ;
66import { AccountId , Address , ContractExecResult } from '@polkadot/types/interfaces' ;
7- import { Codec , IKeyringPair } from '@polkadot/types/types' ;
7+ import { Codec , CodecArg , IKeyringPair } from '@polkadot/types/types' ;
88import { ApiObject , ContractABIMessage , ContractABIPre , ContractCallOutcome } from '../types' ;
99
1010import BN from 'bn.js' ;
@@ -38,9 +38,9 @@ export default class Contract<ApiType extends ApiTypes> extends BaseWithTxAndRpc
3838 this . address = this . registry . createType ( 'Address' , address ) ;
3939 }
4040
41- public call ( as : 'rpc' , message : string , value : BN | number , gasLimit : BN | number , ...params : any [ ] ) : ContractCall < ApiType , 'rpc' > ;
42- public call ( as : 'tx' , message : string , value : BN | number , gasLimit : BN | number , ...params : any [ ] ) : ContractCall < ApiType , 'tx' > ;
43- public call < CallType extends ContractCallTypes > ( as : CallType , message : string , value : BN | number , gasLimit : BN | number , ...params : any [ ] ) : ContractCall < ApiType , CallType > {
41+ public call ( as : 'rpc' , message : string , value : BN | number , gasLimit : BN | number , ...params : CodecArg [ ] ) : ContractCall < ApiType , 'rpc' > ;
42+ public call ( as : 'tx' , message : string , value : BN | number , gasLimit : BN | number , ...params : CodecArg [ ] ) : ContractCall < ApiType , 'tx' > ;
43+ public call < CallType extends ContractCallTypes > ( as : CallType , message : string , value : BN | number , gasLimit : BN | number , ...params : CodecArg [ ] ) : ContractCall < ApiType , CallType > {
4444 const { def, fn } = this . getMessage ( message ) ;
4545
4646 return {
@@ -67,7 +67,7 @@ export default class Contract<ApiType extends ApiTypes> extends BaseWithTxAndRpc
6767 } ;
6868 }
6969
70- private _createOutcome ( result : ContractExecResult , origin : AccountId , message : ContractABIMessage , params : any [ ] ) : ContractCallOutcome {
70+ private _createOutcome ( result : ContractExecResult , origin : AccountId , message : ContractABIMessage , params : CodecArg [ ] ) : ContractCallOutcome {
7171 let output : Codec | null = null ;
7272
7373 if ( result . isSuccess ) {
0 commit comments