From f7182d1e8ac2d701c70eaba9a0256790fac62f04 Mon Sep 17 00:00:00 2001 From: Ivan Yaremenchuk Date: Sun, 17 Apr 2022 15:04:56 +0200 Subject: [PATCH] Add OptimismKovan network support --- NftFaucet/Models/Enums/EthereumNetwork.cs | 2 ++ NftFaucet/Pages/Step4Page.razor.cs | 2 ++ NftFaucet/Shared/MainLayout.razor.cs | 4 +++- NftFaucet/wwwroot/appsettings.json | 15 ++++++++++----- README.md | 3 ++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/NftFaucet/Models/Enums/EthereumNetwork.cs b/NftFaucet/Models/Enums/EthereumNetwork.cs index cfde830..166d156 100644 --- a/NftFaucet/Models/Enums/EthereumNetwork.cs +++ b/NftFaucet/Models/Enums/EthereumNetwork.cs @@ -7,6 +7,8 @@ public enum EthereumNetwork : long Rinkeby = 4, Goerli = 5, Kovan = 42, + OptimismMainnet = 10, + OptimismKovan = 69, PolygonMainnet = 137, PolygonMumbai = 80001, } diff --git a/NftFaucet/Pages/Step4Page.razor.cs b/NftFaucet/Pages/Step4Page.razor.cs index d3e1937..291c11a 100644 --- a/NftFaucet/Pages/Step4Page.razor.cs +++ b/NftFaucet/Pages/Step4Page.razor.cs @@ -68,6 +68,8 @@ public class Step4Component : BasicComponent EthereumNetwork.Rinkeby => "https://rinkeby.etherscan.io/tx/", EthereumNetwork.Goerli => "https://goerli.etherscan.io/tx/", EthereumNetwork.Kovan => "https://kovan.etherscan.io/tx/", + EthereumNetwork.OptimismMainnet => "https://optimistic.etherscan.io/tx/", + EthereumNetwork.OptimismKovan => "https://kovan-optimistic.etherscan.io/tx/", EthereumNetwork.PolygonMainnet => "https://polygonscan.com/tx/", EthereumNetwork.PolygonMumbai => "https://mumbai.polygonscan.com/tx/", _ => null, diff --git a/NftFaucet/Shared/MainLayout.razor.cs b/NftFaucet/Shared/MainLayout.razor.cs index b87e3d1..f3242aa 100644 --- a/NftFaucet/Shared/MainLayout.razor.cs +++ b/NftFaucet/Shared/MainLayout.razor.cs @@ -34,7 +34,9 @@ public class MainLayoutComponent : LayoutBasicComponent EthereumNetwork.Rinkeby => PresetColor.Gold, EthereumNetwork.Goerli => PresetColor.GeekBlue, EthereumNetwork.Kovan => PresetColor.Purple, - EthereumNetwork.PolygonMainnet => PresetColor.Green, + EthereumNetwork.OptimismMainnet => PresetColor.Cyan, + EthereumNetwork.OptimismKovan => PresetColor.Red, + EthereumNetwork.PolygonMainnet => PresetColor.Cyan, EthereumNetwork.PolygonMumbai => PresetColor.Pink, _ => PresetColor.Yellow, }; diff --git a/NftFaucet/wwwroot/appsettings.json b/NftFaucet/wwwroot/appsettings.json index 9020250..166fb04 100644 --- a/NftFaucet/wwwroot/appsettings.json +++ b/NftFaucet/wwwroot/appsettings.json @@ -5,11 +5,6 @@ "Erc721ContractAddress": "0x71902F99902339d7ce1F994C12155f4350BCD226", "Erc1155ContractAddress": "0x80b45421881c0452A6e70148Fc928fA33107cEb3" }, - { - "Id": "Kovan", - "Erc721ContractAddress": "0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311", - "Erc1155ContractAddress": "0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb" - }, { "Id": "Rinkeby", "Erc721ContractAddress": "0x9F64932Be34D5D897C4253D17707b50921f372B6", @@ -20,6 +15,16 @@ "Erc721ContractAddress": "0xC3E4214dd442136079dF06bb2529Bae276d37564", "Erc1155ContractAddress": "0x5807d7be82153F6a302d92199221090E3b78A3C3" }, + { + "Id": "Kovan", + "Erc721ContractAddress": "0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311", + "Erc1155ContractAddress": "0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb" + }, + { + "Id": "OptimismKovan", + "Erc721ContractAddress": "0xee52f32f4bbcedc2a1ed1c195936132937f2d371", + "Erc1155ContractAddress": "0xCc0040129f197F63D37ebd77E62a6F96dDcd4e0A" + }, { "Id": "PolygonMumbai", "Erc721ContractAddress": "0xeE8272220A0988279627714144Ff6981E204fbE4", diff --git a/README.md b/README.md index a362d39..d479a71 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ Used [contracts](NftFaucet/Contracts) are based on [OpenZeppilin contracts](http | | ERC-721 | ERC-1155 | |----------------|-----------|------------| | Ropsten | [0x71902F99902339d7ce1F994C12155f4350BCD226](https://ropsten.etherscan.io/token/0x71902F99902339d7ce1F994C12155f4350BCD226) | [0x80b45421881c0452A6e70148Fc928fA33107cEb3](https://ropsten.etherscan.io/token/0x80b45421881c0452A6e70148Fc928fA33107cEb3) | -| Kovan | [0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311](https://kovan.etherscan.io/token/0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311) | [0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb](https://kovan.etherscan.io/token/0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb) | | Rinkeby | [0x9F64932Be34D5D897C4253D17707b50921f372B6](https://rinkeby.etherscan.io/token/0x9F64932Be34D5D897C4253D17707b50921f372B6) | [0xf67C575502fc1cE399a3e1895dDf41847185D7bD](https://rinkeby.etherscan.io/token/0xf67C575502fc1cE399a3e1895dDf41847185D7bD) | | Goerli | [0xC3E4214dd442136079dF06bb2529Bae276d37564](https://goerli.etherscan.io/token/0xC3E4214dd442136079dF06bb2529Bae276d37564) | [0x5807d7be82153F6a302d92199221090E3b78A3C3](https://goerli.etherscan.io/token/0x5807d7be82153F6a302d92199221090E3b78A3C3) | +| Kovan | [0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311](https://kovan.etherscan.io/token/0x99ea658e02baDE18c43Af5Fa8c18cfF4f251E311) | [0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb](https://kovan.etherscan.io/token/0xdBDD0377D1799910A4B0a4306F8d812265bF33Cb) | +| OptimismKovan | [0xee52f32f4bbcedc2a1ed1c195936132937f2d371](https://kovan-optimistic.etherscan.io/token/0xee52f32f4bbcedc2a1ed1c195936132937f2d371) | [0xCc0040129f197F63D37ebd77E62a6F96dDcd4e0A](https://kovan-optimistic.etherscan.io/token/0xCc0040129f197F63D37ebd77E62a6F96dDcd4e0A) | | Polygon Mumbai | [0xeE8272220A0988279627714144Ff6981E204fbE4](https://mumbai.polygonscan.com/token/0xeE8272220A0988279627714144Ff6981E204fbE4) | [0x23147CdbD963A3D0fec0F25E4604844f477F65d2](https://mumbai.polygonscan.com/token/0x23147CdbD963A3D0fec0F25E4604844f477F65d2) | ## Technology stack