Skip to content

Commit

Permalink
fix: fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Jan 10, 2024
1 parent 6b3f027 commit ef5b4d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contracts/DataFeedConsumer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract DataFeedConsumer {
return dataFeed.decimals();
}

function getLatestDataThroughRouter(string pair) public {
function getLatestDataThroughRouter(string calldata pair) public {
(
uint80 roundId_,
int256 answer_ /* uint startedAt */ /* uint updatedAt */ /* uint80 answeredInRound */,
Expand All @@ -45,7 +45,7 @@ contract DataFeedConsumer {
roundId = roundId_;
}

function decimalsThroughRouter(string pair) public view returns (uint8) {
function decimalsThroughRouter(string calldata pair) public view returns (uint8) {
return router.decimals(pair);
}
}
8 changes: 5 additions & 3 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ import dotenv from 'dotenv'

dotenv.config()

let commonConfig = { gas: 5_000_000, gasPrice: 250_000_000_000 }
let commonConfig = {}
if (process.env.PRIV_KEY) {
commonConfig = {
...commonConfig,
gas: 5_000_000,
gasPrice: 250_000_000_000,
accounts: [process.env.PRIV_KEY]
}
} else {
commonConfig = {
...commonConfig,
gas: 5_000_000,
gasPrice: 250_000_000_000,
accounts: {
mnemonic: process.env.MNEMONIC || ''
}
Expand Down

0 comments on commit ef5b4d4

Please sign in to comment.