From 3282a76d441403f10a5fe60b9dd3b8078c82990e Mon Sep 17 00:00:00 2001 From: ledigang Date: Fri, 21 Nov 2025 15:59:37 +0800 Subject: [PATCH] chore: minor improvement for docs Signed-off-by: ledigang --- README.md | 2 +- contracts/AutomationCounter.sol | 2 +- hardhat.config.js | 2 +- helper-functions.js | 2 +- tasks/price-consumer/read-price-feed-ens.js | 2 +- .../request-random-number-direct-funding.js | 4 ++-- tasks/random-number-consumer/request-random-number.js | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9a1d0ef3..3f5615fd 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ - [Chainlink Automation](https://docs.chain.link/chainlink-automation/introduction) - For [Chainlink Functions](https://docs.chain.link/chainlink-functions) please go to these tarter kits: [Hardhat](https://github.com/smartcontractkit/functions-hardhat-starter-kit) | [Foundry (coming soon)](https://github.com/smartcontractkit/functions-foundry-starter-kit) + For [Chainlink Functions](https://docs.chain.link/chainlink-functions) please go to these starter kits: [Hardhat](https://github.com/smartcontractkit/functions-hardhat-starter-kit) | [Foundry (coming soon)](https://github.com/smartcontractkit/functions-foundry-starter-kit) For [Chainlink CCIP (Cross Chain Interoperability Prototocol)](https://docs.chain.link/ccip) please go to these starter kits: [Hardhat](https://github.com/smartcontractkit/ccip-starter-kit-hardhat) | [Foundry](https://github.com/smartcontractkit/ccip-starter-kit-foundry) diff --git a/contracts/AutomationCounter.sol b/contracts/AutomationCounter.sol index d0a06c70..887767ea 100644 --- a/contracts/AutomationCounter.sol +++ b/contracts/AutomationCounter.sol @@ -48,7 +48,7 @@ contract AutomationCounter is AutomationCompatibleInterface { function performUpkeep( bytes calldata /* performData */ ) external override { - //We highly recommend revalidating the upkeep in the performUpkeep function + // We highly recommend revalidating the upkeep in the performUpkeep function (bool upkeepNeeded, ) = checkUpkeep(""); require(upkeepNeeded, "Time interval not met"); lastTimeStamp = block.timestamp; diff --git a/hardhat.config.js b/hardhat.config.js index ba0e144e..a76b87b3 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -23,7 +23,7 @@ const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL const AMOY_RPC_URL = process.env.AMOY_RPC_URL || "https://polygon-amoy.infura.io/v3/your-api-key" const PRIVATE_KEY = process.env.PRIVATE_KEY -// optional +// Optional: mnemonic for wallet generation const MNEMONIC = process.env.MNEMONIC || "Your mnemonic" const FORKING_BLOCK_NUMBER = parseInt(process.env.FORKING_BLOCK_NUMBER) || 0 diff --git a/helper-functions.js b/helper-functions.js index 706f6207..1552108a 100644 --- a/helper-functions.js +++ b/helper-functions.js @@ -10,7 +10,7 @@ const autoFundCheck = async (contractAddr, networkName, linkTokenAddress, additi const chainId = network.config.chainId console.log("Checking to see if contract can be auto-funded with LINK:") const amount = networkConfig[chainId]["fundAmount"] - //check to see if user has enough LINK + // Check to see if user has enough LINK const accounts = await ethers.getSigners() const signer = accounts[0] const LinkToken = await ethers.getContractFactory("MockLinkToken") diff --git a/tasks/price-consumer/read-price-feed-ens.js b/tasks/price-consumer/read-price-feed-ens.js index b9bb01a2..4b1fa6b4 100644 --- a/tasks/price-consumer/read-price-feed-ens.js +++ b/tasks/price-consumer/read-price-feed-ens.js @@ -8,7 +8,7 @@ task("read-price-feed-ens", "Gets the latest price from a Chainlink Price Feed") const V3Aggregator = await ethers.getContractFactory("MockV3Aggregator") console.log("Reading data from Price Feed consumer contract ", ensAddress) - //Get signer information + // Get signer information const accounts = await ethers.getSigners() const signer = accounts[0] const priceFeedConsumerContract = await new ethers.Contract( diff --git a/tasks/random-number-consumer/request-random-number-direct-funding.js b/tasks/random-number-consumer/request-random-number-direct-funding.js index d92b53bc..3732de4b 100644 --- a/tasks/random-number-consumer/request-random-number-direct-funding.js +++ b/tasks/random-number-consumer/request-random-number-direct-funding.js @@ -30,11 +30,11 @@ task( "RandomNumberDirectFundingConsumerV2" ) - //Get signer information + // Get signer information 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 getRandomNumber function const vrfConsumerContractV2 = await RandomNumberConsumerV2.attach(contractAddr, signer) const transaction = await vrfConsumerContractV2.requestRandomWords( diff --git a/tasks/random-number-consumer/request-random-number.js b/tasks/random-number-consumer/request-random-number.js index 293497a1..04e6b01f 100644 --- a/tasks/random-number-consumer/request-random-number.js +++ b/tasks/random-number-consumer/request-random-number.js @@ -14,11 +14,11 @@ task( ) const RandomNumberConsumerV2 = await ethers.getContractFactory("RandomNumberConsumerV2") - //Get signer information + // Get signer information 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 getRandomNumber function const vrfConsumerContractV2 = new ethers.Contract( contractAddr, RandomNumberConsumerV2.interface,