Skip to content
Merged
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
4 changes: 2 additions & 2 deletions tasks/balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ task("balance", "Prints an account's balances of native and LINK tokens")
const networkId = network.config.chainId
const provider = signer.provider

// native token
// Get native token balance
const balance = await provider.getBalance(account)

// fetch link balance
// Fetch LINK token balance
const linkTokenAddress = networkConfig[networkId]["linkToken"] || taskArgs.linkaddress
const LinkToken = await ethers.getContractFactory("MockLinkToken")
const linkTokenContract = await LinkToken.attach(linkTokenAddress)
Expand Down
2 changes: 1 addition & 1 deletion tasks/transfer-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ task("transfer-link", "Transfer LINK tokens to a recipient")
const { recipient: recipientAddress, amount } = taskArgs
const networkId = network.config.chainId

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

Expand Down
6 changes: 3 additions & 3 deletions tasks/withdraw-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ task("withdraw-link", "Returns any LINK left in deployed contract")
const contractAddr = taskArgs.contract
const networkId = network.config.chainId

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

//First, lets see if there is any LINK to withdraw
// First, let's see if there is any LINK to withdraw
const linkTokenAddress = networkConfig[networkId]["linkToken"] || taskArgs.linkaddress
const LinkToken = await ethers.getContractFactory("MockLinkToken")
const linkTokenContract = new ethers.Contract(linkTokenAddress, LinkToken.interface, signer)
Expand All @@ -22,7 +22,7 @@ task("withdraw-link", "Returns any LINK left in deployed contract")
)

if (balance > 0) {
//Could also be Any-API contract, but in either case the function signature is the same, so we just need to use one
// 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
Expand Down
Loading