diff --git a/README.md b/README.md
index 23bc6b00..79c3286e 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
- [Tutorials \& examples](#tutorials--examples)
- [Quickstart](#quickstart)
- [Requirements](#requirements)
- - [Steps on live testnet](#steps-on-live-testnet)
+ - [Steps on Live (Public) Testnets](#steps-on-live-public-testnets)
- [Steps on local testnet](#steps-on-local-testnet)
- [Environment Variable Management](#environment-variable-management)
- [Using Remote Secrets (e.g. Github Gists)](#using-remote-secrets-eg-github-gists)
@@ -49,22 +49,26 @@ In order to set up your own project which uses Chainlink Functions, please refer
## Supported Networks
> ⚠️⚠️⚠️
-> As at 13 April 2024, Mumbai (anchored to Goerli) stopped producing blocks. Mumbai's deprecation had been announced in favour of a new Amoy testnet, anchored to Sepolia.
-> Amoy support is coming soon, and in the meanwhile we recommend you use the Ethereum Sepolia testnet or the Avalanche Fuji testnet for Functions related projects. Please refer to docs.chain.link to find the latest information on networks that support Chainlink services.
+> As at 13 April 2024, Mumbai (anchored to Goerli) stopped producing blocks. Mumbai's deprecation had been announced in favour of a new Amoy testnet, anchored to Sepolia.
### Mainnets
-- Ethereum : `ETHEREUM_RPC_URL`, `--network ethereum`
-- Polygon : `POLYGON_RPC_URL`, `--network polygon`
-- Avalanche : `AVALANCHE_RPC_URL`, `--network avalanche`
-- Arbitrum : `ARBITRUM_RPC_URL`, `--network arbitrum`
+- Ethereum : `ETHEREUM_RPC_URL`, `--network ethereum`, `ETHERSCAN_API_KEY`
+- Polygon : `POLYGON_RPC_URL`, `--network polygon`, `POLYGONSCAN_API_KEY`
+- Avalanche : `AVALANCHE_RPC_URL`, `--network avalanche`, `SNOWTRACE_API_KEY`
+- Arbitrum : `ARBITRUM_RPC_URL`, `--network arbitrum`, `ARBISCAN_API_KEY`
+- Base : `BASE_RPC_URL`, `--network base`, `BASESCAN_API_KEY`
+- Celo : `CELO_RPC_URL`, `--network celo`, `CELOSCAN_API_KEY`
### Testnets
-- Ethereum Sepolia: `ETHEREUM_SEPOLIA_RPC_URL`, `--network ethereumSepolia`
-- Polygon Mumbai: `POLYGON_MUMBAI_RPC_URL`, `--network polygonMumbai`
-- Avalanche Fuji: `AVALANCHE_FUJI_RPC_URL`, `--network avalancheFuji`
-- Arbitrum Sepolia: `ARBITRUM_SEPOLIA_RPC_URL`, `--network arbitrumSepolia`
+- Ethereum Sepolia: `ETHEREUM_SEPOLIA_RPC_URL`, `--network ethereumSepolia`, `ETHERSCAN_API_KEY`
+- Polygon Amoy: `POLYGON_AMOY_RPC_URL`, `--network polygonAmoy`, `POLYGONSCAN_API_KEY`
+- Avalanche Fuji: `AVALANCHE_FUJI_RPC_URL`, `--network avalancheFuji`, `SNOWTRACE_API_KEY`
+- Arbitrum Sepolia: `ARBITRUM_SEPOLIA_RPC_URL`, `--network arbitrumSepolia`, `ARBISCAN_API_KEY`
+- Base Sepolia: `BASE_SEPOLIA_RPC_URL`, `--network baseSepolia`, `BASESCAN_API_KEY`
+- Optimism Sepolia: `OPTIMISM_SEPOLIA_RPC_URL`, `--network optimismSepolia`, `OP_ETHERSCAN_API_KEY`
+- Celo Alfajores: `CELO_ALFAJORES_RPC_URL`, `--network celoAlfajores`, `CELOSCAN_API_KEY`
## For Beginners
@@ -94,7 +98,7 @@ Install **both** of the following:
1. Clone this repository to your local machine
. Also ensure that the testnet your wanting to deploy on is [supported](https://docs.chain.link/chainlink-functions/supported-networks) by Chainlink Functions.
2. Open this directory in your command line/terminal app, then run `npm install` to install all dependencies.
3. Obtain the values for following environment variables (examples only - please see `./env.enc.example` for env vars you may need):
- - `PRIVATE_KEY` for your development wallet - `POLYGON_MUMBAI_RPC_URL`, `ETHEREUM_SEPOLIA_RPC_URL`, or `AVALANCHE_FUJI_RPC_URL`
+ - `PRIVATE_KEY` for your development wallet - `POLYGON_AMOY_RPC_URL`, `ETHEREUM_SEPOLIA_RPC_URL`, or `AVALANCHE_FUJI_RPC_URL`
- `POLYGONSCAN_API_KEY`, `ETHERSCAN_API_KEY`, or `FUJI_SNOWTRACE_API_KEY` blockchain explore API keys depending on which network you're using
- `COINMARKETCAP_API_KEY` (from [here](https://pro.coinmarketcap.com/))
diff --git a/hardhat.config.js b/hardhat.config.js
index 52787d29..4d17ca64 100644
--- a/hardhat.config.js
+++ b/hardhat.config.js
@@ -57,6 +57,8 @@ module.exports = {
optimismSepolia: networks.optimismSepolia.verifyApiKey,
base: networks.base.verifyApiKey,
optimism: networks.optimism.verifyApiKey,
+ celoAlfajores: networks.celoAlfajores.verifyApiKey,
+ celo: networks.celo.verifyApiKey,
},
customChains: [
{
@@ -107,6 +109,22 @@ module.exports = {
browserURL: "https://optimistic.etherscan.io/",
},
},
+ {
+ celoAlfajores: "celoAlfajores",
+ chainId: 44787,
+ urls: {
+ apiURL: "https://alfajores.celoscan.io/api",
+ browserURL: "https://alfajores.celoscan.io",
+ },
+ },
+ {
+ celoAlfajores: "celo",
+ chainId: 42220,
+ urls: {
+ apiURL: "https://celoscan.io/api",
+ browserURL: "https://celoscan.io",
+ },
+ },
],
},
gasReporter: {
diff --git a/networks.js b/networks.js
index 6fca6717..5311e1d3 100644
--- a/networks.js
+++ b/networks.js
@@ -101,7 +101,7 @@ const networks = {
gasPrice: undefined,
nonce: undefined,
accounts,
- verifyApiKey: process.env.FUJI_SNOWTRACE_API_KEY || "UNSET",
+ verifyApiKey: process.env.SNOWTRACE_API_KEY || "UNSET",
chainId: 43113,
confirmations: DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS,
nativeCurrencySymbol: "AVAX",
@@ -224,7 +224,7 @@ const networks = {
gasPrice: undefined,
nonce: undefined,
accounts,
- verifyApiKey: process.env.OPTISCAN_API_KEY || "UNSET",
+ verifyApiKey: process.env.OP_ETHERSCAN_API_KEY || "UNSET",
chainId: 10,
confirmations: DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS,
nativeCurrencySymbol: "ETH",
@@ -234,6 +234,39 @@ const networks = {
donId: "fun-optimism-mainnet-1",
gatewayUrls: ["https://01.functions-gateway.chain.link/", "https://02.functions-gateway.chain.link/"],
},
+ celoAlfajores: {
+ url: process.env.CELO_ALFAJORES_RPC_URL || "UNSET",
+ gasPrice: undefined,
+ nonce: undefined,
+ accounts,
+ verifyApiKey: process.env.CELOSCAN_API_KEY || "UNSET",
+ chainId: 44787,
+ confirmations: DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS,
+ nativeCurrencySymbol: "ETH",
+ linkToken: "0x32e08557b14fad8908025619797221281d439071",
+ linkPriceFeed: "0xeA11fA4307B8BD6D6074Cf1c0caAc9790cf96857", // LINK/CELO
+ functionsRouter: "0x53BA5D8E5aab0cf9589aCE139666Be2b9Fd268e2",
+ donId: "fun-celo-alfajores-1",
+ gatewayUrls: [
+ "https://01.functions-gateway.testnet.chain.link/",
+ "https://02.functions-gateway.testnet.chain.link/",
+ ],
+ },
+ celo: {
+ url: process.env.CELO_RPC_URL || "UNSET",
+ gasPrice: undefined,
+ nonce: undefined,
+ accounts,
+ verifyApiKey: process.env.CELOSCAN_API_KEY || "UNSET",
+ chainId: 42220,
+ confirmations: DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS,
+ nativeCurrencySymbol: "ETH",
+ linkToken: "0xd07294e6E917e07dfDcee882dd1e2565085C2ae0",
+ linkPriceFeed: "0xBa45f0a1a2fa3FB62a4D6dC135741E2aeb1b14e7", // LINK/CELO
+ functionsRouter: "0xd74646C75163f9dA0F3666C3BE8A9C42F4b3b261",
+ donId: "fun-celo-mainnet-1",
+ gatewayUrls: ["https://01.functions-gateway.chain.link/", "https://02.functions-gateway.chain.link/"],
+ },
// localFunctionsTestnet is updated dynamically by scripts/startLocalFunctionsTestnet.js so it should not be modified here
localFunctionsTestnet: {
url: "http://localhost:8545/",
diff --git a/tasks/Functions-consumer/deployAutoConsumer.js b/tasks/Functions-consumer/deployAutoConsumer.js
index 71849e30..f29b9282 100644
--- a/tasks/Functions-consumer/deployAutoConsumer.js
+++ b/tasks/Functions-consumer/deployAutoConsumer.js
@@ -66,9 +66,7 @@ task("functions-deploy-auto-consumer", "Deploys the AutomatedFunctionsConsumer c
}
}
} else if (verifyContract && network.name !== "localFunctionsTestnet") {
- console.log(
- "\nPOLYGONSCAN_API_KEY, ETHERSCAN_API_KEY or FUJI_SNOWTRACE_API_KEY is missing. Skipping contract verification..."
- )
+ console.log("\nBlockchain explorer API key is missing. Skipping contract verification...")
}
console.log(`\nAutomatedFunctionsConsumer contract deployed to ${consumerAddress} on ${network.name}`)
diff --git a/tasks/utils/network.js b/tasks/utils/network.js
index 6dac9e55..9cb9662e 100644
--- a/tasks/utils/network.js
+++ b/tasks/utils/network.js
@@ -11,6 +11,8 @@ const BASE_URLS = {
11155420: "https://sepolia-optimistic.etherscan.io/",
8453: "https://basescan.org/",
10: "https://optimistic.etherscan.io/",
+ 44787: "https://alfajores.celoscan.io/",
+ 42220: "https://celoscan.io/",
}
/**