File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ import { IL2Staking } from '../build/types/IL2Staking'
45
45
import { Interface } from 'ethers/lib/utils'
46
46
import { loadArtifact } from './artifacts'
47
47
48
+ class WrappedContract {
49
+ // The meta-class properties
50
+ [ key : string ] : ContractFunction | any
51
+ }
48
52
export interface NetworkContracts {
49
53
EpochManager : EpochManager
50
54
DisputeManager : DisputeManager
@@ -160,7 +164,7 @@ function getWrappedConnect(
160
164
// Returns a contract with wrapped calls
161
165
// The wrapper will run the tx, wait for confirmation and log the details
162
166
function wrapCalls ( contract : Contract , contractName : string ) : Contract {
163
- const wrappedContract = lodash . cloneDeep ( contract )
167
+ const wrappedContract = lodash . cloneDeep ( contract ) as WrappedContract
164
168
165
169
for ( const fn of Object . keys ( contract . functions ) ) {
166
170
const call : ContractFunction < ContractTransaction > = contract . functions [ fn ]
@@ -179,7 +183,7 @@ function wrapCalls(contract: Contract, contractName: string): Contract {
179
183
wrappedContract [ fn ] = override
180
184
}
181
185
182
- return wrappedContract
186
+ return wrappedContract as Contract
183
187
}
184
188
185
189
function logContractCall (
You can’t perform that action at this time.
0 commit comments