Use hardcoded deployedBytecode for local EVM execution (#2198)
* hardcode deployedBytecode in contracts * log warning if bytecode is empty or invalid * be typesafe
This commit is contained in:
@@ -28,6 +28,7 @@ import * as ethers from 'ethers';
|
||||
// tslint:disable:no-parameter-reassignment
|
||||
// tslint:disable-next-line:class-name
|
||||
export class CoordinatorContract extends BaseContract {
|
||||
public static deployedBytecode: string | undefined;
|
||||
/**
|
||||
* Recovers the address of a signer given a hash and signature.
|
||||
*/
|
||||
@@ -1491,8 +1492,17 @@ export class CoordinatorContract extends BaseContract {
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults?: Partial<TxData>,
|
||||
logDecodeDependencies?: { [contractName: string]: ContractAbi },
|
||||
deployedBytecode: string | undefined = CoordinatorContract.deployedBytecode,
|
||||
) {
|
||||
super('Coordinator', CoordinatorContract.ABI(), address, supportedProvider, txDefaults, logDecodeDependencies);
|
||||
super(
|
||||
'Coordinator',
|
||||
CoordinatorContract.ABI(),
|
||||
address,
|
||||
supportedProvider,
|
||||
txDefaults,
|
||||
logDecodeDependencies,
|
||||
deployedBytecode,
|
||||
);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', '_web3Wrapper']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user