From 7b74f679fe3b379cc8fc6b2eabf27ea1fad1a171 Mon Sep 17 00:00:00 2001 From: Zubin Pratap Date: Mon, 15 Apr 2024 12:15:13 +1000 Subject: [PATCH 1/4] Update npm chainlink contracts package to v1.1.0. Bump HHSK patch version as well. --- package-lock.json | 18 +++++++++--------- package.json | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74be01f3..73babd51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "0.2.0", "license": "MIT", "dependencies": { - "@chainlink/contracts": "^1.0.0", + "@chainlink/contracts": "^1.1.0-beta.0", "@chainlink/env-enc": "^1.0.5", - "@chainlink/functions-toolkit": "^0.2.7", + "@chainlink/functions-toolkit": "^0.2.8", "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.1", "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", @@ -86,9 +86,9 @@ } }, "node_modules/@chainlink/contracts": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-1.0.0.tgz", - "integrity": "sha512-d7VEOewoZRR0U7SQq7837g77b0tLwNjIJo5FZ5ZFi9yJp03x73tqXpvdFZvb8sTod7OqV5wC72CDts+uHKKrYg==", + "version": "1.1.0-beta.0", + "resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-1.1.0-beta.0.tgz", + "integrity": "sha512-+GEsneNtWdHE85+DF9tdrfX3RimPMQnFDd08iwqEEvu95v7NiGBFqIzb5bfZ96A9mkzFP993h702DCaG3niQaA==", "dependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "~2.26.2", @@ -96,7 +96,7 @@ "@openzeppelin/contracts": "4.9.3", "@openzeppelin/contracts-upgradeable": "4.9.3", "@scroll-tech/contracts": "0.1.0", - "semver": "^7.5.4" + "semver": "^7.6.0" } }, "node_modules/@chainlink/contracts/node_modules/lru-cache": { @@ -141,9 +141,9 @@ } }, "node_modules/@chainlink/functions-toolkit": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@chainlink/functions-toolkit/-/functions-toolkit-0.2.7.tgz", - "integrity": "sha512-V4x7X0932LaOYX89rOL9VXCu35HtxnK0O7HfrIuXemLA5XiRfTSaGyTKVEk0jWpz8a6EvimTXAAad3qdErl5hQ==", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@chainlink/functions-toolkit/-/functions-toolkit-0.2.8.tgz", + "integrity": "sha512-n7WicB5N9m1jZAu5p8Bh66oMVRc04L0usrr7dbuHl8ONybzraEDWc6fopXJKKyF529NEGr4B4c9nYcD5ZZt0Dw==", "dependencies": { "axios": "^1.4.0", "bcrypto": "^5.4.0", diff --git a/package.json b/package.json index 95b04ff6..bd909e8f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "functions-hardhat-starter-kit", "license": "MIT", - "version": "0.2.0", + "version": "0.2.1", "description": "Tooling for interacting with Chainlink Functions", "scripts": { "prepare": "husky install", @@ -18,9 +18,9 @@ "format:fix": "prettier --write ." }, "dependencies": { - "@chainlink/contracts": "^1.0.0", + "@chainlink/contracts": "^1.1.0-beta.0", "@chainlink/env-enc": "^1.0.5", - "@chainlink/functions-toolkit": "^0.2.7", + "@chainlink/functions-toolkit": "^0.2.8", "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.1", "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", From f72103818beb5b476e72432b0ae56ce91554e1c3 Mon Sep 17 00:00:00 2001 From: Zubin Pratap Date: Thu, 18 Apr 2024 11:48:19 +1000 Subject: [PATCH 2/4] configs for programmatic verification on amoy polygonscan --- hardhat.config.js | 9 +++++++++ networks.js | 16 ++++++++++++++++ tasks/utils/network.js | 1 + 3 files changed, 26 insertions(+) diff --git a/hardhat.config.js b/hardhat.config.js index 75ca6efc..3f361aff 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -50,6 +50,7 @@ module.exports = { polygon: networks.polygon.verifyApiKey, sepolia: networks.ethereumSepolia.verifyApiKey, polygonMumbai: networks.polygonMumbai.verifyApiKey, + polygonAmoy: networks.polygonAmoy.verifyApiKey, avalancheFujiTestnet: networks.avalancheFuji.verifyApiKey, arbitrum: networks.arbitrum.verifyApiKey, arbitrumSepolia: networks.arbitrumSepolia.verifyApiKey, @@ -81,6 +82,14 @@ module.exports = { browserURL: "https://sepolia-optimistic.etherscan.io/", }, }, + { + network: "polygonAmoy", + chainId: 80002, + urls: { + apiURL: "https://api-amoy.polygonscan.com/api", + browserURL: "https://amoy.polygonscan.com", + }, + }, ], }, gasReporter: { diff --git a/networks.js b/networks.js index c7a73876..243d679e 100644 --- a/networks.js +++ b/networks.js @@ -203,6 +203,22 @@ const networks = { "https://02.functions-gateway.testnet.chain.link/", ], }, + polygonAmoy: { + url: process.env.AMOY_RPC_URL || "UNSET", // h + gasPrice: undefined, + nonce: undefined, + accounts, + verifyApiKey: process.env.POLYGONSCAN_API_KEY || "UNSET", + chainId: 80002, + confirmations: DEFAULT_VERIFICATION_BLOCK_CONFIRMATIONS, + nativeCurrencySymbol: "MATIC", + linkToken: "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904", + linkPriceFeed: "0x408D97c89c141e60872C0835e18Dd1E670CD8781", // LINK/MATIC + // TODO @zeuslawyer--update all the below + functionsRouter: "TODO", + donId: "TODO", + gatewayUrls: ["TODO-01.functions-gateway.testnet.chain.link/", "TODO-02.functions-gateway.testnet.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/utils/network.js b/tasks/utils/network.js index 43faacac..9a423486 100644 --- a/tasks/utils/network.js +++ b/tasks/utils/network.js @@ -3,6 +3,7 @@ const BASE_URLS = { 137: "https://polygonscan.com/", 43114: "https://snowtrace.io/", 80001: "https://mumbai.polygonscan.com/", + 80002: "https://api-amoy.polygonscan.com/api", 11155111: "https://sepolia.etherscan.io/", 43113: "https://testnet.snowtrace.io/", 421614: "https://sepolia.arbiscan.io/", From 2122cccd0e23f2f76af95be1da40873af4ed64a4 Mon Sep 17 00:00:00 2001 From: Zubin Pratap Date: Fri, 3 May 2024 15:32:55 +1000 Subject: [PATCH 3/4] update networks.js configs for amoy --- networks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networks.js b/networks.js index 243d679e..9abf3ff1 100644 --- a/networks.js +++ b/networks.js @@ -214,10 +214,10 @@ const networks = { nativeCurrencySymbol: "MATIC", linkToken: "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904", linkPriceFeed: "0x408D97c89c141e60872C0835e18Dd1E670CD8781", // LINK/MATIC - // TODO @zeuslawyer--update all the below - functionsRouter: "TODO", - donId: "TODO", - gatewayUrls: ["TODO-01.functions-gateway.testnet.chain.link/", "TODO-02.functions-gateway.testnet.chain.link/"], + + functionsRouter: "0xC22a79eBA640940ABB6dF0f7982cc119578E11De", + donId: "fun-polygon-amoy-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: { From 1cba1fa0b1e096557f7aafab4180b31dbc6db648 Mon Sep 17 00:00:00 2001 From: Zubin Pratap Date: Mon, 6 May 2024 12:22:06 +1000 Subject: [PATCH 4/4] update network.js with correct amoy testnet don gateway urls --- networks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/networks.js b/networks.js index 9abf3ff1..660f2dd9 100644 --- a/networks.js +++ b/networks.js @@ -217,7 +217,10 @@ const networks = { functionsRouter: "0xC22a79eBA640940ABB6dF0f7982cc119578E11De", donId: "fun-polygon-amoy-1", - gatewayUrls: ["https://01.functions-gateway.chain.link/", "https://02.functions-gateway.chain.link/"], + gatewayUrls: [ + "https://01.functions-gateway.testnet.chain.link/", + "https://02.functions-gateway.testnet.chain.link/", + ], }, // localFunctionsTestnet is updated dynamically by scripts/startLocalFunctionsTestnet.js so it should not be modified here localFunctionsTestnet: {