From 0a2c29613f4da991c989b194a4dd5dbc09c86198 Mon Sep 17 00:00:00 2001 From: Matt Wilhelm Date: Sat, 31 Jul 2021 15:32:17 -0400 Subject: [PATCH] rename mumbai to maticmum when ethers added official support, they chose maticmum as the name. see here: https://github.com/ethers-io/ethers.js/issues/1546#issuecomment-885956859 --- Makefile | 10 ++++++++-- hardhat.config.ts | 10 +--------- scripts/utils.ts | 20 ++++++++++---------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 97d062d..65cd6ee 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all environment lint install-poetry start test test-natron +.PHONY: all environment start test deploy-storage-mumbai environment: npm install @@ -7,4 +7,10 @@ build: npx hardhat compile test: - npx hardhat test \ No newline at end of file + npx hardhat test + +deploy-storage-mumbai: + npx hardhat run --network maticmum scripts/pizza.storage.deploy.ts + +deploy-random-mumbai: + npx hardhat run --network maticmum scripts/randomConsumer.polygon.deploy.ts diff --git a/hardhat.config.ts b/hardhat.config.ts index 3307d9b..be2c45c 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -23,23 +23,15 @@ const networks: NetworksUserConfig = { accounts: [`0x${config.MAINNET_PRIVATE_KEY}`], gasPrice: 250000000000 }, - goerli: { - url: `https://eth-goerli.alchemyapi.io/v2/${config.ALCHEMY_GOERLI_KEY}`, - accounts: [`0x${config.GOERLI_PRIVATE_KEY}`], - }, rinkeby: { url: `https://eth-rinkeby.alchemyapi.io/v2/${config.ALCHEMY_RINKEBY_KEY}`, accounts: [`0x${config.RINKEBY_PRIVATE_KEY}`], }, - ropsten: { - url: `https://eth-ropsten.alchemyapi.io/v2/${config.ALCHEMY_ROPSTEN_KEY}`, - accounts: [`0x${config.ROPSTEN_PRIVATE_KEY}`], - }, matic: { url: `https://polygon-mainnet.g.alchemy.com/v2/${config.ALCHEMY_MATIC_KEY}`, accounts: [`0x${config.MATIC_PRIVATE_KEY}`], }, - mumbai: { + maticmum: { url: `https://polygon-mumbai.g.alchemy.com/v2/${config.ALCHEMY_MUMBAI_KEY}`, accounts: [`0x${config.MATIC_MUMBAI_PRIVATE_KEY}`], }, diff --git a/scripts/utils.ts b/scripts/utils.ts index 355f43e..2047d5b 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -17,7 +17,7 @@ const getAlchemyAPIKey = (config: NetworkConfig) => { return config.ALCHEMY_RINKEBY_KEY case 'matic': return config.ALCHEMY_MATIC_KEY - case 'mumbai': + case 'maticmum': return config.ALCHEMY_MUMBAI_KEY } return 'VALUE NOT FOUND' @@ -32,7 +32,7 @@ const getDeploymentKey = (config: NetworkConfig) => { return config.RINKEBY_PRIVATE_KEY case 'matic': return config.MATIC_PRIVATE_KEY - case 'mumbai': + case 'maticmum': return config.MATIC_MUMBAI_PRIVATE_KEY } return 'VALUE NOT FOUND' @@ -64,7 +64,7 @@ const getChainlinkToken = (config: NetworkConfig) => { return config.CHAINLINK_RINKEBY_TOKEN case 'matic': return config.CHAINLINK_MATIC_TOKEN - case 'mumbai': + case 'maticmum': return config.CHAINLINK_MATIC_MUMBAI_TOKEN } return 'VALUE NOT FOUND' @@ -82,7 +82,7 @@ const getChainlinkVRFCoordinator = (config: NetworkConfig) => { return config.CHAINLINK_RINKEBY_VRF_COORD case 'matic': return config.CHAINLINK_MATIC_VRF_COORD - case 'mumbai': + case 'maticmum': return config.CHAINLINK_MATIC_MUMBAI_VRF_COORD } return 'VALUE NOT FOUND' @@ -100,7 +100,7 @@ const getChainlinkVRFKeyHash = (config: NetworkConfig) => { return config.CHAINLINK_RINKEBY_VRF_KEY_HASH case 'matic': return config.CHAINLINK_MATIC_VRF_KEY_HASH - case 'mumbai': + case 'maticmum': return config.CHAINLINK_MATIC_MUMBAI_VRF_KEY_HASH } return 'VALUE NOT FOUND' @@ -118,7 +118,7 @@ const getChainlinkVRFFee = (config: NetworkConfig) => { return config.CHAINLINK_RINKEBY_VRF_FEE case 'matic': return config.CHAINLINK_MATIC_VRF_FEE - case 'mumbai': + case 'maticmum': return config.CHAINLINK_MATIC_MUMBAI_VRF_FEE } return 'VALUE NOT FOUND' @@ -236,7 +236,7 @@ const getRandomConsumerAddress = (config: NetworkConfig) => { return config.RAREPIZZAS_BOX_RINKEBY_RANDOM_CONSUMER_ADDRESS case 'matic': return config.RAREPIZZAS_MATIC_RANDOM_CONSUMER_ADDRESS - case 'mumbai': + case 'maticmum': return config.RAREPIZZAS_MUMBAI_RANDOM_CONSUMER_ADDRESS } return 'VALUE NOT FOUND' @@ -280,7 +280,7 @@ const getStorageProxyAddress = (config: NetworkConfig) => { switch (networkName) { case 'matic': return config.RAREPIZZAS_SEEDSTORAGE_MATIC_PROXY_ADDRESS - case 'mumbai': + case 'maticmum': return config.RAREPIZZAS_SEEDSTORAGE_MUMBAI_PROXY_ADDRESS } return 'VALUE NOT FOUND' @@ -294,7 +294,7 @@ const getStorageProxyAdminAddress = (config: NetworkConfig) => { switch (networkName) { case 'matic': return config.RAREPIZZAS_MATIC_PROXY_ADMIN_ADDRESS - case 'mumbai': + case 'maticmum': return config.RAREPIZZAS_MUMBAI_PROXY_ADMIN_ADDRESS } return 'VALUE NOT FOUND' @@ -308,7 +308,7 @@ const getStorageProxyAuthorizedRequestorAddress = (config: NetworkConfig) => { switch (networkName) { case 'matic': return config.RAREPIZZAS_SEEDSTORAGE_AUTHORIZED_REQUESTOR_MATIC_ADDRESS - case 'mumbai': + case 'maticmum': return config.RAREPIZZAS_SEEDSTORAGE_AUTHORIZED_REQUESTOR_MUMBAI_ADDRESS } return 'VALUE NOT FOUND'