Skip to content

Commit 57c91f9

Browse files
committed
Added changes
Signed-off-by: Christopher Maree <christopher.maree@gmail.com>
1 parent 463a22e commit 57c91f9

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/core/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,9 @@ function getAddressTest(contractName, networkId, version = "latest") {
102102

103103
if (truffleContract.networks[networkId]) {
104104
return truffleContract.networks[networkId].address;
105-
} else if (
106-
global.artifacts._provisioner &&
107-
global.artifacts._provisioner._deploymentAddresses[contractName] &&
108-
artifacts._provisioner._networkConfig.chainId === networkId
109-
) {
110-
// In the buidler case, there is no networks object, so we fall back to buidler's global list of deployed addresses as long as buidler's network id matches the one passed in.
111-
// Note: this is a bit hacky because it depends on internal buidler details.
112-
return global.artifacts._provisioner._deploymentAddresses[contractName];
105+
} else if (global.hardhatTestingAddresses[contractName]) {
106+
// If running in tests in hardhat check if there is a testing address set.
107+
return global.hardhatTestingAddresses[contractName];
113108
} else {
114109
throw new Error(`No address found for contract ${contractName} on network ${networkId}`);
115110
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uma/core",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "UMA smart contracts and unit tests",
55
"dependencies": {
66
"@truffle/contract": "^4.2.20",

0 commit comments

Comments
 (0)