@ethersproject/contracts
Advanced tools
Comparing version 5.0.0-beta.144 to 5.0.0-beta.145
@@ -1,1 +0,1 @@ | ||
export declare const version = "contracts/5.0.0-beta.144"; | ||
export declare const version = "contracts/5.0.0-beta.145"; |
@@ -1,1 +0,1 @@ | ||
export const version = "contracts/5.0.0-beta.144"; | ||
export const version = "contracts/5.0.0-beta.145"; |
@@ -64,7 +64,7 @@ import { Fragment, Indexed, Interface, JsonFragment, Result } from "@ethersproject/abi"; | ||
readonly callStatic: Bucket<ContractFunction>; | ||
readonly estimate: Bucket<(...params: Array<any>) => Promise<BigNumber>>; | ||
readonly estimateGas: Bucket<(...params: Array<any>) => Promise<BigNumber>>; | ||
readonly populateTransaction: Bucket<(...params: Array<any>) => Promise<UnsignedTransaction>>; | ||
readonly filters: Bucket<(...params: Array<any>) => EventFilter>; | ||
readonly [name: string]: ContractFunction | any; | ||
readonly addressPromise: Promise<string>; | ||
readonly resolvedAddress: Promise<string>; | ||
readonly deployTransaction: TransactionResponse; | ||
@@ -71,0 +71,0 @@ private _deployedPromise; |
@@ -76,7 +76,7 @@ "use strict"; | ||
tx.to = contract._deployed(blockTag).then(() => { | ||
return contract.addressPromise; | ||
return contract.resolvedAddress; | ||
}); | ||
} | ||
else { | ||
tx.to = contract.addressPromise; | ||
tx.to = contract.resolvedAddress; | ||
} | ||
@@ -300,3 +300,3 @@ return resolveAddresses(contract.signer || contract.provider, params, method.inputs).then((params) => { | ||
defineReadOnly(this, "callStatic", {}); | ||
defineReadOnly(this, "estimate", {}); | ||
defineReadOnly(this, "estimateGas", {}); | ||
defineReadOnly(this, "functions", {}); | ||
@@ -334,3 +334,3 @@ defineReadOnly(this, "populateTransaction", {}); | ||
if (this.provider) { | ||
defineReadOnly(this, "addressPromise", this.provider.resolveName(addressOrName).then((address) => { | ||
defineReadOnly(this, "resolvedAddress", this.provider.resolveName(addressOrName).then((address) => { | ||
if (address == null) { | ||
@@ -347,3 +347,3 @@ throw new Error("name not found"); | ||
try { | ||
defineReadOnly(this, "addressPromise", Promise.resolve((this.interface.constructor).getAddress(addressOrName))); | ||
defineReadOnly(this, "resolvedAddress", Promise.resolve((this.interface.constructor).getAddress(addressOrName))); | ||
} | ||
@@ -372,4 +372,4 @@ catch (error) { | ||
} | ||
if (this.estimate[name] == null) { | ||
defineReadOnly(this.estimate, name, runMethod(this, name, { estimate: true })); | ||
if (this.estimateGas[name] == null) { | ||
defineReadOnly(this.estimateGas, name, runMethod(this, name, { estimate: true })); | ||
} | ||
@@ -393,3 +393,3 @@ if (!uniqueFunctions[fragment.name]) { | ||
defineReadOnly(this.populateTransaction, name, this.populateTransaction[signatures[0]]); | ||
defineReadOnly(this.estimate, name, this.estimate[signatures[0]]); | ||
defineReadOnly(this.estimateGas, name, this.estimateGas[signatures[0]]); | ||
}); | ||
@@ -450,3 +450,3 @@ } | ||
}); | ||
tx.to = this.addressPromise; | ||
tx.to = this.resolvedAddress; | ||
return this.deployed().then(() => { | ||
@@ -453,0 +453,0 @@ return this.signer.sendTransaction(tx); |
@@ -1,1 +0,1 @@ | ||
export declare const version = "contracts/5.0.0-beta.144"; | ||
export declare const version = "contracts/5.0.0-beta.145"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "contracts/5.0.0-beta.144"; | ||
exports.version = "contracts/5.0.0-beta.145"; |
@@ -64,7 +64,7 @@ import { Fragment, Indexed, Interface, JsonFragment, Result } from "@ethersproject/abi"; | ||
readonly callStatic: Bucket<ContractFunction>; | ||
readonly estimate: Bucket<(...params: Array<any>) => Promise<BigNumber>>; | ||
readonly estimateGas: Bucket<(...params: Array<any>) => Promise<BigNumber>>; | ||
readonly populateTransaction: Bucket<(...params: Array<any>) => Promise<UnsignedTransaction>>; | ||
readonly filters: Bucket<(...params: Array<any>) => EventFilter>; | ||
readonly [name: string]: ContractFunction | any; | ||
readonly addressPromise: Promise<string>; | ||
readonly resolvedAddress: Promise<string>; | ||
readonly deployTransaction: TransactionResponse; | ||
@@ -71,0 +71,0 @@ private _deployedPromise; |
@@ -102,7 +102,7 @@ "use strict"; | ||
tx.to = contract._deployed(blockTag).then(function () { | ||
return contract.addressPromise; | ||
return contract.resolvedAddress; | ||
}); | ||
} | ||
else { | ||
tx.to = contract.addressPromise; | ||
tx.to = contract.resolvedAddress; | ||
} | ||
@@ -341,3 +341,3 @@ return resolveAddresses(contract.signer || contract.provider, params, method.inputs).then(function (params) { | ||
properties_1.defineReadOnly(this, "callStatic", {}); | ||
properties_1.defineReadOnly(this, "estimate", {}); | ||
properties_1.defineReadOnly(this, "estimateGas", {}); | ||
properties_1.defineReadOnly(this, "functions", {}); | ||
@@ -379,3 +379,3 @@ properties_1.defineReadOnly(this, "populateTransaction", {}); | ||
if (this.provider) { | ||
properties_1.defineReadOnly(this, "addressPromise", this.provider.resolveName(addressOrName).then(function (address) { | ||
properties_1.defineReadOnly(this, "resolvedAddress", this.provider.resolveName(addressOrName).then(function (address) { | ||
if (address == null) { | ||
@@ -392,3 +392,3 @@ throw new Error("name not found"); | ||
try { | ||
properties_1.defineReadOnly(this, "addressPromise", Promise.resolve((this.interface.constructor).getAddress(addressOrName))); | ||
properties_1.defineReadOnly(this, "resolvedAddress", Promise.resolve((this.interface.constructor).getAddress(addressOrName))); | ||
} | ||
@@ -417,4 +417,4 @@ catch (error) { | ||
} | ||
if (_this.estimate[name] == null) { | ||
properties_1.defineReadOnly(_this.estimate, name, runMethod(_this, name, { estimate: true })); | ||
if (_this.estimateGas[name] == null) { | ||
properties_1.defineReadOnly(_this.estimateGas, name, runMethod(_this, name, { estimate: true })); | ||
} | ||
@@ -438,3 +438,3 @@ if (!uniqueFunctions[fragment.name]) { | ||
properties_1.defineReadOnly(_this.populateTransaction, name, _this.populateTransaction[signatures[0]]); | ||
properties_1.defineReadOnly(_this.estimate, name, _this.estimate[signatures[0]]); | ||
properties_1.defineReadOnly(_this.estimateGas, name, _this.estimateGas[signatures[0]]); | ||
}); | ||
@@ -497,3 +497,3 @@ } | ||
}); | ||
tx.to = this.addressPromise; | ||
tx.to = this.resolvedAddress; | ||
return this.deployed().then(function () { | ||
@@ -500,0 +500,0 @@ return _this.signer.sendTransaction(tx); |
@@ -35,5 +35,5 @@ { | ||
}, | ||
"tarballHash": "0xbcc0e8986a89858852c93feb191691d1504bba45f0c66dad24ff43d7fc5305f7", | ||
"tarballHash": "0xed430464dbbda0f672a8a820831c3480355033ed739640b96f582adfb5582da1", | ||
"types": "./lib/index.d.ts", | ||
"version": "5.0.0-beta.144" | ||
"version": "5.0.0-beta.145" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82458