Skip to content

Commit

Permalink
Added changes
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Maree <[email protected]>
  • Loading branch information
chrismaree committed Dec 22, 2020
1 parent 463a22e commit 57c91f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions packages/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,9 @@ function getAddressTest(contractName, networkId, version = "latest") {

if (truffleContract.networks[networkId]) {
return truffleContract.networks[networkId].address;
} else if (
global.artifacts._provisioner &&
global.artifacts._provisioner._deploymentAddresses[contractName] &&
artifacts._provisioner._networkConfig.chainId === networkId
) {
// 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.
// Note: this is a bit hacky because it depends on internal buidler details.
return global.artifacts._provisioner._deploymentAddresses[contractName];
} else if (global.hardhatTestingAddresses[contractName]) {
// If running in tests in hardhat check if there is a testing address set.
return global.hardhatTestingAddresses[contractName];
} else {
throw new Error(`No address found for contract ${contractName} on network ${networkId}`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uma/core",
"version": "1.2.1",
"version": "1.2.2",
"description": "UMA smart contracts and unit tests",
"dependencies": {
"@truffle/contract": "^4.2.20",
Expand Down

0 comments on commit 57c91f9

Please sign in to comment.