Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions helper-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const autoFundCheck = async (contractAddr, networkName, linkTokenAddress, additi
const contractBalanceBN = await linkTokenContract.balanceOf(contractAddr)
const contractBalance = await contractBalanceBN.toString()
if (balance > amount && amount > 0 && contractBalance < amount) {
//user has enough LINK to auto-fund
//and the contract isn't already funded
// user has enough LINK to auto-fund
// and the contract isn't already funded
return true
} else {
//user doesn't have enough LINK, print a warning
// user doesn't have enough LINK, print a warning
console.log(
"Account doesn't have enough LINK to fund contracts, you're deploying to a network where auto funding isn't done by default, the contract is already funded, or you set AUTO_FUND to false."
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/automation/read-automation-counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ task(
networkId
)

//Get signer information
// Get signer information
const accounts = await ethers.getSigners()
const signer = accounts[0]
const automationCounterContract = await new ethers.Contract(
Expand Down
2 changes: 1 addition & 1 deletion tasks/price-consumer/read-price-feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ task("read-price-feed", "Gets the latest price from a Chainlink Price Feed")
`Reading data from Price Feed consumer contract ${contractAddr} on network ${networkId}`
)

//Get signer information
// Get signer information
const accounts = await ethers.getSigners()
const signer = accounts[0]

Expand Down
2 changes: 1 addition & 1 deletion tasks/random-number-consumer/request-random-number.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ task(
const accounts = await hre.ethers.getSigners()
const signer = accounts[0]

// Create connection to VRF Contract and call the getRandomNumber function
// Create connection to VRF Contract and call the requestRandomWords function
const vrfConsumerContractV2 = new ethers.Contract(
contractAddr,
RandomNumberConsumerV2.interface,
Expand Down
6 changes: 3 additions & 3 deletions tasks/transfer-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ task("transfer-link", "Transfer LINK tokens to a recipient")
console.log("linktokenaddress", linkTokenAddress)
const balance = await linkTokenContract.balanceOf(signer.address)
console.log(
`LINK balance of sender ${signer.address} is + ${ethers.utils.formatEther(balance)}`
`LINK balance of sender ${signer.address} is ${ethers.utils.formatEther(balance)}`
)
const amountBN = BigNumber.from(amount)
if (balance.gte(amountBN)) {
const result = await linkTokenContract.transfer(recipientAddress, amount)
await result.wait()
console.log(
`${ethers.utils.formatEther(amountBN)} LINK where sent from sender ${
`${ethers.utils.formatEther(amountBN)} LINK were sent from sender ${
signer.address
} to ${recipientAddress}.Transaction Hash: ${result.hash}`
} to ${recipientAddress}. Transaction Hash: ${result.hash}`
)
} else {
console.log(
Expand Down
2 changes: 1 addition & 1 deletion tasks/withdraw-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ task("withdraw-link", "Returns any LINK left in deployed contract")
// Could also be a RandomNumberConsumer contract, but in either case the function signature is the same, so we just need to use one
const RandomNumberConsumer = await ethers.getContractFactory("RandomNumberConsumer")

//Create connection to Consumer Contract and call the withdraw function
// Create connection to Consumer Contract and call the withdraw function
const ConsumerContract = new ethers.Contract(
contractAddr,
RandomNumberConsumer.interface,
Expand Down