Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
connect(signerOrProvider) {
if (typeof (signerOrProvider) === "string") {
signerOrProvider = new VoidSigner(signerOrProvider, this.provider);
}
let contract = new (this.constructor)(this.address, this.interface, signerOrProvider);
if (this.deployTransaction) {
defineReadOnly(contract, "deployTransaction", this.deployTransaction);
}
return contract;
}
// Re-attach to a different on-chain instance of this contract
Contract.prototype.connect = function (signerOrProvider) {
if (typeof (signerOrProvider) === "string") {
signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);
}
var contract = new (this.constructor)(this.address, this.interface, signerOrProvider);
if (this.deployTransaction) {
properties_1.defineReadOnly(contract, "deployTransaction", this.deployTransaction);
}
return contract;
};
// Re-attach to a different on-chain instance of this contract