File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/sdk/src/deployments/lib/contracts Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ import type {
11
11
import type { Provider } from '@ethersproject/providers'
12
12
import type { ContractParam } from '../types/contract'
13
13
14
+ class WrappedContract {
15
+ // The meta-class properties
16
+ [ key : string ] : ContractFunction | any
17
+ }
18
+
14
19
/**
15
20
* Modifies a contract connect function to return a contract wrapped with {@link wrapCalls}
16
21
*
@@ -45,7 +50,7 @@ export function getWrappedConnect(
45
50
* @returns the wrapped contract
46
51
*/
47
52
export function wrapCalls ( contract : Contract , contractName : string ) : Contract {
48
- const wrappedContract = lodash . cloneDeep ( contract )
53
+ const wrappedContract = lodash . cloneDeep ( contract ) as WrappedContract
49
54
50
55
for ( const fn of Object . keys ( contract . functions ) ) {
51
56
const call : ContractFunction < ContractTransaction > = contract . functions [ fn ]
@@ -60,13 +65,11 @@ export function wrapCalls(contract: Contract, contractName: string): Contract {
60
65
return tx
61
66
}
62
67
63
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
64
- // @ts -ignore
65
68
wrappedContract [ fn ] = override
66
69
wrappedContract . functions [ fn ] = override
67
70
}
68
71
69
- return wrappedContract
72
+ return wrappedContract as Contract
70
73
}
71
74
72
75
function logContractCall (
You can’t perform that action at this time.
0 commit comments