Skip to content

Commit

Permalink
fix: set oracle permissions only if false
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbn committed May 21, 2021
1 parent 95c0399 commit 67dc60f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions subtasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,17 @@ subtask(SUB_TASK_NAMES.PREPARE_CHAINLINK_NODE, undefined).setAction(
oracle.address,
await ethers.getSigner(deployer)
);
const tx = await oracleContract.setFulfillmentPermission(
chainlinkNodeAddress,
true
let permissions = await oracleContract.getAuthorizationStatus(
chainlinkNodeAddress
);
await tx.wait();
const permissions = await oracleContract.getAuthorizationStatus(
if (!permissions) {
const tx = await oracleContract.setFulfillmentPermission(
chainlinkNodeAddress,
true
);
await tx.wait();
}
permissions = await oracleContract.getAuthorizationStatus(
chainlinkNodeAddress
);
console.log(`Chainlink Node Fullfillment permissions: ${permissions}`);
Expand Down

0 comments on commit 67dc60f

Please sign in to comment.