Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiovb committed Nov 28, 2023
2 parents 989a758 + 3a8b902 commit 3c7745c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/oracleTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ describe("Functions Consumer Unit Tests", async function () {
// and reset Hardhat Network to that snapshot in every test.

it("reads s_lastResponse from AutomatedFunctionsConsumer contract", async () => {
const AutomatedFunctionsConsumer = await ethers.getContractFactory("AutomatedFunctionsConsumer");
const contractAddress = "0xfdEdFF6E45BdB0d3a3b89FDefCDc1fFec2CA9120"; //TODO @dev replace with your contract address
const contract = AutomatedFunctionsConsumer.attach(contractAddress);
const AutomatedFunctionsConsumer = await ethers.getContractFactory(
"AutomatedFunctionsConsumer"
)
const contractAddress = "0xfdEdFF6E45BdB0d3a3b89FDefCDc1fFec2CA9120" //TODO @dev replace with your contract address
const contract = AutomatedFunctionsConsumer.attach(contractAddress)

const lastResponse = await contract.selicRate();
const unitValue = await contract.unitValue();
const maturityTime = await contract.maturityTime();
console.log('My Response', lastResponse, unitValue, maturityTime);
const lastResponse = await contract.selicRate()
const unitValue = await contract.unitValue()
const maturityTime = await contract.maturityTime()
console.log("My Response", lastResponse, unitValue, maturityTime)
})
})

0 comments on commit 3c7745c

Please sign in to comment.