├── .github └── workflows │ └── main.yml ├── .gitignore ├── .gitmodules ├── LICENSE.md ├── NethereumExplorer.ClientWasm ├── NethereumExplorer.ClientWasm.csproj ├── Program.cs ├── Properties │ └── launchSettings.json └── wwwroot │ ├── CNAME │ ├── favicon.ico │ ├── images │ └── logo512.png │ ├── index.html │ ├── manifest.json │ ├── service-worker.js │ └── service-worker.published.js ├── NethereumExplorer.Core ├── App.razor ├── Messages │ ├── AccountTransactionCompleted.cs │ ├── NewBlock.cs │ └── UrlChanged.cs ├── Model │ ├── AccountInfo.cs │ └── TransactionInfo.cs ├── NethereumExplorer.Core.csproj ├── Pages │ ├── Accounts.razor │ ├── Balances.razor │ ├── Block.razor │ ├── Erc20Transfer.razor │ ├── EtherTransfer.razor │ ├── Index.razor │ └── Transaction.razor ├── Services │ ├── AccountsService.cs │ ├── AccountsTransactionMonitoringService.cs │ ├── Gecko │ │ ├── GeckoTokenService.cs │ │ └── Model │ │ │ └── GeckoToken.cs │ ├── IAccountsService.cs │ ├── IWeb3ProviderService.cs │ ├── NewBlockProcessingService.cs │ ├── TokenAddressService.cs │ ├── TokenBalanceService.cs │ ├── TokenInfo.cs │ ├── TokenList │ │ ├── Model │ │ │ ├── Root.cs │ │ │ ├── Token.cs │ │ │ └── Version.cs │ │ └── TokenListService.cs │ └── Web3ProviderService.cs ├── Shared │ ├── LatestBlockTransactions.razor │ ├── LatestBlocks.razor │ ├── MainLayout.razor │ ├── MainLayout.razor.css │ ├── NavMenu.razor │ ├── NavMenu.razor.css │ └── Toasts.razor ├── ViewModels │ ├── AccountViewModel.cs │ ├── BlazorObservableExtensions.cs │ ├── BlockTransactionsViewModel.cs │ ├── BlockViewModel.cs │ ├── BlocksViewModel.cs │ ├── LatestBlockTransactionsViewModel.cs │ ├── NewAccountPrivateKeyViewModel.cs │ ├── SearchQueryParser.cs │ ├── SearchType.cs │ ├── SendErc20TransactionViewModel.cs │ ├── SendTransactionBaseViewModel.cs │ ├── SendTransactionViewModel.cs │ ├── ToastViewModel.cs │ ├── ToastsViewModel.cs │ ├── TransactionViewModel.cs │ ├── TransactionWithReceiptViewModel.cs │ ├── TransactionsViewModelGridConfiguration.cs │ ├── Utils.cs │ └── Web3UrlViewModel.cs ├── _Imports.razor └── wwwroot │ ├── css │ ├── app.css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ ├── css │ │ └── open-iconic-bootstrap.min.css │ │ └── fonts │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff │ └── images │ ├── 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png │ ├── logo192x192t.png │ ├── logo192x192w.png │ └── logo512.png ├── NethereumExplorer.Maui ├── App.xaml ├── App.xaml.cs ├── MainPage.xaml ├── MainPage.xaml.cs ├── MauiProgram.cs ├── NethereumExplorer.Maui.csproj ├── Platforms │ ├── Android │ │ ├── AndroidManifest.xml │ │ ├── MainActivity.cs │ │ ├── MainApplication.cs │ │ └── Resources │ │ │ └── values │ │ │ └── colors.xml │ ├── MacCatalyst │ │ ├── AppDelegate.cs │ │ ├── Info.plist │ │ └── Program.cs │ ├── Windows │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Package.appxmanifest │ │ └── app.manifest │ └── iOS │ │ ├── AppDelegate.cs │ │ ├── Info.plist │ │ ├── Program.cs │ │ └── Resources │ │ └── LaunchScreen.xib ├── Properties │ └── launchSettings.json ├── Resources │ ├── Fonts │ │ └── OpenSans-Regular.ttf │ ├── Images │ │ ├── dotnet_bot.svg │ │ └── logon.svg │ ├── appicon.svg │ ├── appiconfg.svg │ ├── logo512n.png │ ├── logon.svg │ └── logonicon.svg ├── _Imports.razor └── wwwroot │ └── index.html ├── NethereumExplorer.Server ├── NethereumExplorer.Server.csproj ├── Pages │ └── _Host.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── Startup.cs ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── favicon.ico │ ├── images │ └── logo512.png │ ├── manifest.json │ ├── service-worker.js │ └── service-worker.published.js ├── NethereumExplorer.sln ├── OldHybrid ├── NethereumExplorer.Android │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── NethereumExplorer.Android.csproj │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── layout │ │ │ ├── Tabbar.xml │ │ │ └── Toolbar.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── icon.xml │ │ │ └── icon_round.xml │ │ ├── mipmap-hdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-mdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── icon.png │ │ │ └── launcher_foreground.png │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── wwwroot │ │ ├── images │ │ └── logo192x192t.png │ │ └── index.html ├── NethereumExplorer.Windows │ ├── App.cs │ ├── AssemblyInfo.cs │ ├── NethereumExplorer.Windows.csproj │ ├── app.manifest │ └── wwwroot │ │ ├── images │ │ └── logo192x192t.png │ │ └── index.html ├── NethereumExplorer.iOS │ ├── AppDelegate.cs │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon1024.png │ │ │ ├── Icon120.png │ │ │ ├── Icon152.png │ │ │ ├── Icon167.png │ │ │ ├── Icon180.png │ │ │ ├── Icon20.png │ │ │ ├── Icon29.png │ │ │ ├── Icon40.png │ │ │ ├── Icon58.png │ │ │ ├── Icon60.png │ │ │ ├── Icon76.png │ │ │ ├── Icon80.png │ │ │ └── Icon87.png │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── NethereumExplorer.iOS.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Resources │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── LaunchScreen.storyboard │ │ └── wwwroot │ │ ├── images │ │ └── logo192x192t.png │ │ └── index.html ├── NethereumExplorer.macOS │ ├── AppDelegate.cs │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon-128.png │ │ │ ├── AppIcon-128@2x.png │ │ │ ├── AppIcon-16.png │ │ │ ├── AppIcon-16@2x.png │ │ │ ├── AppIcon-256.png │ │ │ ├── AppIcon-256@2x.png │ │ │ ├── AppIcon-32.png │ │ │ ├── AppIcon-32@2x.png │ │ │ ├── AppIcon-512.png │ │ │ ├── AppIcon-512@2x.png │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── NethereumExplorer.macOS.csproj │ ├── Resources │ │ └── wwwroot │ │ │ ├── images │ │ │ └── logo192x192t.png │ │ │ └── index.html │ ├── ViewController.cs │ └── ViewController.designer.cs └── NethereumExplorer │ ├── App.cs │ ├── Main.razor │ ├── NethereumExplorer.csproj │ ├── _Imports.razor │ └── wwwroot │ ├── css │ ├── app.css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ ├── css │ │ └── open-iconic-bootstrap.min.css │ │ └── fonts │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff │ └── images │ ├── logo192x192t.png │ ├── logo192x192w.png │ └── logo512.png ├── README.md ├── Screenshots ├── android.png ├── browserwasm.png └── windows.png └── nuget.config /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to GitHub Pages 2 | 3 | # Run workflow on every push to the master branch 4 | on: 5 | push: 6 | branches: [ master ] 7 | jobs: 8 | deploy-to-github-pages: 9 | # using linux, on the project i used an os condition to not target the runtimes of android, ios, mac on linux 10 | runs-on: ubuntu-latest 11 | steps: 12 | # uses GitHub's checkout action to checkout code form the master branch 13 | - uses: actions/checkout@v2 14 | # sets up .NET 6 15 | - name: Setup .NET 6 16 | uses: actions/setup-dotnet@v1 17 | with: 18 | dotnet-version: '6.0.x' 19 | # - name: Install MAUI Workloads / if were going to build all the project runtimes 20 | # shell: pwsh 21 | # run: | 22 | # dotnet workload install wasm-tools 23 | # dotnet workload install android 24 | # dotnet workload install ios 25 | # dotnet workload install maccatalyst 26 | # publishes Blazor project to the release-folder 27 | - name: Publish .NET Core Project 28 | run: dotnet publish NethereumExplorer.ClientWasm/NethereumExplorer.ClientWasm.csproj -c Release -f net6.0 -o release --nologo 29 | # copy index.html to 404.html to serve the same file when a file is not found 30 | - name: copy index.html to 404.html 31 | run: cp release/wwwroot/index.html release/wwwroot/404.html 32 | # add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. (Allow files and folders starting with an underscore) 33 | - name: Add .nojekyll file 34 | run: touch release/wwwroot/.nojekyll 35 | - name: Commit wwwroot to GitHub Pages 36 | uses: JamesIves/github-pages-deploy-action@3.7.1 37 | with: 38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 39 | BRANCH: gh-pages 40 | FOLDER: release/wwwroot 41 | 42 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ReactiveUI"] 2 | path = ReactiveUI 3 | url = https://github.com/Nethereum/ReactiveUI.git 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Nethereum.com (Juan Blanco) , Logo by Cass (https://github.com/cassiopaia) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or ANY portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/NethereumExplorer.ClientWasm.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | service-worker-assets.js 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Net.Http; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using Blazor.FlexGrid; 11 | using NethereumExplorer.Core; 12 | using NethereumExplorer.Services; 13 | using NethereumExplorer.ViewModels; 14 | 15 | namespace NethereumExplorer 16 | { 17 | public class Program 18 | { 19 | public static async Task Main(string[] args) 20 | { 21 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 22 | builder.RootComponents.Add("#app"); 23 | 24 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 25 | ConfigureServices(builder.Services); 26 | 27 | await builder.Build().RunAsync(); 28 | } 29 | 30 | public static void ConfigureServices(IServiceCollection services) 31 | { 32 | var web3ServiceProvider = new Web3ProviderService(); 33 | var accountsService = new AccountsService(web3ServiceProvider); 34 | var newBlockProcessingService = new NewBlockProcessingService(web3ServiceProvider); 35 | var toastsViewModel = new ToastsViewModel(); 36 | var blocksViewModel = new BlocksViewModel(newBlockProcessingService); 37 | var latestBlockTransactionsViewModel = new LatestBlockTransactionsViewModel(web3ServiceProvider); 38 | var newAccountPrivateKeyViewModel = new NewAccountPrivateKeyViewModel(); 39 | var accountsViewModel = new AccountsViewModel(accountsService, newAccountPrivateKeyViewModel); 40 | var accountsTransactionMonitoringService = new AccountsTransactionMonitoringService(accountsService, web3ServiceProvider); 41 | 42 | services.AddSingleton((x) => web3ServiceProvider); 43 | services.AddSingleton((x) => accountsService); 44 | services.AddSingleton(newBlockProcessingService); 45 | services.AddSingleton(toastsViewModel); 46 | services.AddSingleton(blocksViewModel); 47 | services.AddSingleton(latestBlockTransactionsViewModel); 48 | services.AddTransient(); 49 | services.AddSingleton(accountsViewModel); 50 | services.AddSingleton(newAccountPrivateKeyViewModel); 51 | services.AddSingleton(); 52 | services.AddSingleton(); 53 | services.AddSingleton(accountsTransactionMonitoringService); 54 | services.AddSingleton(); 55 | 56 | services.AddFlexGrid(cfg => 57 | { 58 | cfg.ApplyConfiguration(new TransactionsViewModelGridConfiguration()); 59 | }); 60 | 61 | services.AddSingleton(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:51076", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "NethereumExplorer": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": "true", 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/CNAME: -------------------------------------------------------------------------------- 1 | explorer.nethereum.com 2 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.ClientWasm/wwwroot/favicon.ico -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/images/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.ClientWasm/wwwroot/images/logo512.png -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Nethereum Light Explorer 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 |
27 |
28 |
29 |
30 |
Loading...
31 | 32 |
33 | 34 |
35 | ... 36 |
The Nethereum light explorer will load shortly
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Nethereum Light Explorer", 3 | "short_name": "NethereumLightExplorer", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#339989", 8 | "icons": [ 9 | { 10 | "src": "images/logo512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | }, 14 | { 15 | "src": "images/logo192x192w.png", 16 | "type": "image/png", 17 | "sizes": "192x192" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /NethereumExplorer.ClientWasm/wwwroot/service-worker.published.js: -------------------------------------------------------------------------------- 1 | // Caution! Be sure you understand the caveats before publishing an application with 2 | // offline support. See https://aka.ms/blazor-offline-considerations 3 | 4 | self.importScripts('./service-worker-assets.js'); 5 | self.addEventListener('install', event => event.waitUntil(onInstall(event))); 6 | self.addEventListener('activate', event => event.waitUntil(onActivate(event))); 7 | self.addEventListener('fetch', event => event.respondWith(onFetch(event))); 8 | 9 | const cacheNamePrefix = 'offline-cache-'; 10 | const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; 11 | const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; 12 | const offlineAssetsExclude = [ /^service-worker\.js$/ ]; 13 | 14 | async function onInstall(event) { 15 | console.info('Service worker: Install'); 16 | 17 | // Fetch and cache all matching items from the assets manifest 18 | const assetsRequests = self.assetsManifest.assets 19 | .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) 20 | .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) 21 | .map(asset => new Request(asset.url, { integrity: asset.hash })); 22 | await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); 23 | } 24 | 25 | async function onActivate(event) { 26 | console.info('Service worker: Activate'); 27 | 28 | // Delete unused caches 29 | const cacheKeys = await caches.keys(); 30 | await Promise.all(cacheKeys 31 | .filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName) 32 | .map(key => caches.delete(key))); 33 | } 34 | 35 | async function onFetch(event) { 36 | let cachedResponse = null; 37 | if (event.request.method === 'GET') { 38 | // For all navigation requests, try to serve index.html from cache 39 | // If you need some URLs to be server-rendered, edit the following check to exclude those URLs 40 | const shouldServeIndexHtml = event.request.mode === 'navigate'; 41 | 42 | const request = shouldServeIndexHtml ? 'index.html' : event.request; 43 | const cache = await caches.open(cacheName); 44 | cachedResponse = await cache.match(request); 45 | } 46 | 47 | return cachedResponse || fetch(event.request); 48 | } 49 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Messages/AccountTransactionCompleted.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Messages 2 | { 3 | public class AccountTransactionCompleted 4 | { 5 | public AccountTransactionCompleted(string transactionHash, string accountAddress, bool? failed = false) 6 | { 7 | TransactionHash = transactionHash; 8 | AccountAddress = accountAddress; 9 | Failed = failed; 10 | } 11 | 12 | public bool? Failed { get; } 13 | public string TransactionHash { get; } 14 | public string AccountAddress { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Messages/NewBlock.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace NethereumExplorer.Messages 4 | { 5 | public class NewBlock 6 | { 7 | public NewBlock(BigInteger blockNumber) 8 | { 9 | BlockNumber = blockNumber; 10 | } 11 | 12 | public BigInteger BlockNumber { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Messages/UrlChanged.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Messages 2 | { 3 | public class UrlChanged 4 | { 5 | public UrlChanged(string url) 6 | { 7 | Url = url; 8 | } 9 | 10 | public string Url { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Model/AccountInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace NethereumExplorer.Model 6 | { 7 | public class AccountInfo 8 | { 9 | public string Address { get; set; } 10 | private ConcurrentDictionary _transactions = new ConcurrentDictionary(); 11 | 12 | public void AddOrUpdateTransaction(TransactionInfo transaction) 13 | { 14 | _transactions.AddOrUpdate(transaction.TransactionHash, transaction, (x, y)=> transaction); 15 | } 16 | 17 | public List GetTransactions(string chainId) 18 | { 19 | return _transactions.Values.Where(x => x.ChainId == chainId).ToList(); 20 | } 21 | 22 | public List GetPendingTransactions(string chainId) 23 | { 24 | return _transactions.Values.Where(x => x.ChainId == chainId && x.Pending == true).ToList(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Model/TransactionInfo.cs: -------------------------------------------------------------------------------- 1 | using Nethereum.RPC.Eth.DTOs; 2 | 3 | namespace NethereumExplorer.Model 4 | { 5 | public class TransactionInfo 6 | { 7 | public string AccountAddress { get; set; } 8 | public string ChainId { get; set; } 9 | public TransactionReceipt TransactionReceipt { get; set; } 10 | public string TransactionHash { get; set; } 11 | public bool Pending { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/NethereumExplorer.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.1;net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst 5 | $(TargetFrameworks);net6.0-windows10.0.19041 6 | netstandard2.1;net6.0; 7 | 8 | 3.0 9 | 9.0 10 | 14.2 11 | 14.0 12 | 21.0 13 | 10.0.18362.0 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | true 45 | 46 | 47 | 48 | 49 | <_ContentIncludedByDefault Remove="wwwroot\css\app.css" /> 50 | <_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\bootstrap.min.css" /> 51 | <_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\bootstrap.min.css.map" /> 52 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\FONT-LICENSE" /> 53 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\css\open-iconic-bootstrap.min.css" /> 54 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\fonts\open-iconic.eot" /> 55 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\fonts\open-iconic.otf" /> 56 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\fonts\open-iconic.svg" /> 57 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\fonts\open-iconic.ttf" /> 58 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\font\fonts\open-iconic.woff" /> 59 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\ICON-LICENSE" /> 60 | <_ContentIncludedByDefault Remove="wwwroot\css\open-iconic\README.md" /> 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | true 70 | PreserveNewest 71 | 72 | 73 | true 74 | PreserveNewest 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Pages/Block.razor: -------------------------------------------------------------------------------- 1 | @page "/block/{BlockNumber}" 2 | @using Blazor.FlexGrid 3 | @using Blazor.FlexGrid.Components 4 | @using Blazor.FlexGrid.DataAdapters 5 | @using Blazor.FlexGrid.DataSet.Options 6 | @using Blazor.FlexGrid.Components.Configuration 7 | @inject BlockTransactionsViewModel BlockTransactionsViewModel 8 | @using System.Numerics 9 | @using Microsoft.AspNetCore.Components 10 | @using NethereumExplorer.ViewModels 11 | @inject BlazorComponentColumnCollection Collection 12 | 13 |
14 |
15 |
16 |
Block: @BlockNumber
17 | @if (BlockTransactionsViewModel.Loading) 18 | { 19 | 20 | } 21 |
22 |
23 |
24 | @if (!BlockTransactionsViewModel.Loading && BlockTransactionsViewModel.BlockFound) 25 | { 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
Hash:@BlockTransactionsViewModel.Block.Hash
Number:@BlockTransactionsViewModel.Block.Number.ToString()
Author:@BlockTransactionsViewModel.Block.Author
Parent Hash:@BlockTransactionsViewModel.Block.ParentHash
Time:@BlockTransactionsViewModel.Block.Time
Gas Used:@BlockTransactionsViewModel.Block.GasUsed
53 | 54 | 55 | 56 | 57 | } 58 | 59 | @if (!BlockTransactionsViewModel.Loading && !BlockTransactionsViewModel.BlockFound) 60 | { 61 |
No Block Found
62 | } 63 |
64 |
65 | 66 | @{ 67 | RenderFragment transactionHash = (transaction) => @@transaction.TransactionHash; 68 | Collection.AddColumnValueRenderFunction(txn => txn.TransactionHash, transactionHash); 69 | } 70 | 71 | @code { 72 | 73 | //workaround search for the time being 74 | [Parameter] 75 | public string BlockNumber { get; set; } 76 | 77 | [Parameter] 78 | public string TransactionHash { get; set; } 79 | 80 | 81 | CollectionTableDataAdapter dataAdapter; 82 | 83 | 84 | 85 | public int TransactionCount { get; set; } 86 | 87 | protected override void OnParametersSet() 88 | { 89 | BlockTransactionsViewModel.BlockNumber = BigInteger.Parse(BlockNumber); 90 | BlockTransactionsViewModel.Transactions.Connect() 91 | .SubscribeAndNotifyStateChanges(InvokeAsync,() => 92 | { 93 | TransactionCount = BlockTransactionsViewModel.Transactions.Count; 94 | dataAdapter = new CollectionTableDataAdapter(BlockTransactionsViewModel.Transactions.Items.ToArray()); 95 | 96 | StateHasChanged(); 97 | }); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using Microsoft.AspNetCore.Components 3 | 4 |
5 | 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 |
15 | 16 | @code { 17 | 18 | //workaround search for the time being 19 | [Parameter] 20 | public string BlockNumber { get; set; } 21 | 22 | [Parameter] 23 | public string TransactionHash { get; set; } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Pages/Transaction.razor: -------------------------------------------------------------------------------- 1 | @page "/transaction/{transactionHash}" 2 | @inject TransactionWithReceiptViewModel TransactionWithReceiptViewModel 3 | @using System 4 | @using System.Numerics 5 | @using System.Threading.Tasks 6 | @using Microsoft.AspNetCore.Components 7 | @using NethereumExplorer.ViewModels 8 | @using ReactiveUI 9 | 10 |
11 |
12 |
13 |
Transaction: @TransactionHash
14 | @if (TransactionWithReceiptViewModel.Loading) 15 | { 16 | 17 | } 18 |
19 |
20 |
21 | @if (!TransactionWithReceiptViewModel.Loading && TransactionWithReceiptViewModel.TransactionFound) 22 | { 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
Block Number:@TransactionWithReceiptViewModel.BlockNumber
Index:@TransactionWithReceiptViewModel.Index
From:@TransactionWithReceiptViewModel.From
To:@TransactionWithReceiptViewModel.To
Amount:@TransactionWithReceiptViewModel.Amount
Nonce:@TransactionWithReceiptViewModel.Nonce
New Contract address:@TransactionWithReceiptViewModel.ContractAddress
Data:@TransactionWithReceiptViewModel.Data
Cumulative Gas Used:@TransactionWithReceiptViewModel.CumulativeGasUsed
Gas:@TransactionWithReceiptViewModel.Gas
Gas Price:@TransactionWithReceiptViewModel.GasPrice
Logs:@TransactionWithReceiptViewModel.Logs
74 | @if (TransactionWithReceiptViewModel.HasErrors) 75 | { 76 | 79 | } 80 | 81 | } 82 | 83 | @if (!TransactionWithReceiptViewModel.Loading && !TransactionWithReceiptViewModel.TransactionFound) 84 | { 85 |
No Transaction Found
86 | } 87 |
88 |
89 | 90 | 91 | 92 | @code { 93 | 94 | //workaround search for the time being 95 | [Parameter] 96 | public string BlockNumber { get; set; } 97 | 98 | [Parameter] 99 | public string TransactionHash { get; set; } 100 | 101 | 102 | 103 | protected override async Task OnParametersSetAsync() 104 | { 105 | await TransactionWithReceiptViewModel.LoadTransactionAsync(TransactionHash); 106 | TransactionWithReceiptViewModel.WhenAnyValue(x => x.Loading).SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/AccountsTransactionMonitoringService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Linq; 3 | using System.Reactive.Threading.Tasks; 4 | using System.Threading.Tasks; 5 | using ReactiveUI; 6 | 7 | namespace NethereumExplorer.Services 8 | { 9 | public class AccountsTransactionMonitoringService 10 | { 11 | private readonly IAccountsService _accountsService; 12 | private readonly IWeb3ProviderService _web3ProviderService; 13 | private readonly TimeSpan _updateInterval = TimeSpan.FromMilliseconds(1000); 14 | private IDisposable _timer; 15 | 16 | public AccountsTransactionMonitoringService(IAccountsService accountsService, IWeb3ProviderService web3ProviderService) 17 | { 18 | _accountsService = accountsService; 19 | _web3ProviderService = web3ProviderService; 20 | _timer = Observable.Timer(TimeSpan.FromMilliseconds(500), _updateInterval) 21 | .Select(_ => ProcessCompletedTransactions().ToObservable()).Concat().Subscribe(); 22 | } 23 | 24 | public async Task ProcessCompletedTransactions() 25 | { 26 | var pendingTransactions = _accountsService.GetCurrentChainPendingTransactions(); 27 | var web3 = _web3ProviderService.GetWeb3(); 28 | foreach (var pendingTransaction in pendingTransactions) 29 | { 30 | var transactionReceipt = await 31 | web3.Eth.Transactions.GetTransactionReceipt.SendRequestAsync(pendingTransaction.TransactionHash); 32 | 33 | if (transactionReceipt != null) 34 | { 35 | pendingTransaction.TransactionReceipt = transactionReceipt; 36 | pendingTransaction.Pending = false; 37 | _accountsService.UpdateTransactionInfo(pendingTransaction); 38 | } 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/Gecko/Model/GeckoToken.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Services 2 | { 3 | public class GeckoToken 4 | { 5 | public string Id { get; set; } 6 | public string Symbol { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/IAccountsService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using DynamicData; 4 | using Nethereum.Contracts; 5 | using Nethereum.RPC.Eth.DTOs; 6 | using NethereumExplorer.Model; 7 | 8 | namespace NethereumExplorer.Services 9 | { 10 | public interface IAccountsService 11 | { 12 | IEnumerable GetAccountsAddresses(); 13 | Task GetAccountEtherBalanceAsync(string address); 14 | SourceCache Accounts { get; set; } 15 | void AddAccount(AccountInfo accountInfo, string privateKey); 16 | Task SendTransactionAsync(TransactionInput transactionInput); 17 | Task SendTransactionAsync(string contractAddress, TFunctionMessage functionMessage) where TFunctionMessage : FunctionMessage, new(); 18 | List GetCurrentChainPendingTransactions(); 19 | void UpdateTransactionInfo(TransactionInfo transactionInfo); 20 | Task GetAccountTokenBalanceAsync(string address, string contractAddress, int numberOfDecimals = 18); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/IWeb3ProviderService.cs: -------------------------------------------------------------------------------- 1 | using Nethereum.Web3; 2 | using Nethereum.Web3.Accounts; 3 | 4 | namespace NethereumExplorer.Services 5 | { 6 | public interface IWeb3ProviderService 7 | { 8 | string CurrentUrl { get; set; } 9 | string ChainId { get; } 10 | Web3 GetWeb3(); 11 | Web3 GetWeb3(Account account); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/TokenAddressService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NethereumExplorer.Services 4 | { 5 | public class TokenAddressService 6 | { 7 | public List GetTokens(string chainId) 8 | { 9 | //hack / workaround chainId this needs to use the rpc getchainid 10 | if (chainId.ToLower() == "https://mainnet.infura.io/v3/ddd5ed15e8d443e295b696c0d07c8b02".ToLower()) 11 | { 12 | return new List( 13 | new [] 14 | { 15 | new TokenInfo(){Address = "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", Description = "Maker"}, 16 | new TokenInfo(){Address = "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", Description = "Dai"}, 17 | new TokenInfo(){Address = "0x42d6622dece394b54999fbd73d108123806f6a18", Description = "Spank"}, 18 | new TokenInfo(){Address = "0x6810e776880c02933d47db1b9fc05908e5386b96", Description = "Gnosis"}, 19 | new TokenInfo(){Address = "0x1985365e9f78359a9B6AD760e32412f4a445E862", Description = "Augur"}, 20 | 21 | } 22 | ); 23 | } 24 | return new List(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/TokenInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Services 2 | { 3 | public class TokenInfo 4 | { 5 | public string Address { get; set; } 6 | public string Description { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/TokenList/Model/Root.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace NethereumExplorer.Services 5 | { 6 | public class Root 7 | { 8 | public string Name { get; set; } 9 | public DateTime Timestamp { get; set; } 10 | public List Keywords { get; set; } 11 | public Version Version { get; set; } 12 | public List Tokens { get; set; } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/TokenList/Model/Token.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Services 2 | { 3 | public class Token 4 | { 5 | public int ChainId { get; set; } 6 | public string Address { get; set; } 7 | public string Symbol { get; set; } 8 | public string Name { get; set; } 9 | public int Decimals { get; set; } 10 | public string LogoURI { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/TokenList/Model/Version.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.Services 2 | { 3 | public class Version 4 | { 5 | public int Major { get; set; } 6 | public int Minor { get; set; } 7 | public int Patch { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/Services/Web3ProviderService.cs: -------------------------------------------------------------------------------- 1 | using Nethereum.Web3; 2 | using Nethereum.Web3.Accounts; 3 | using NethereumExplorer.ViewModels; 4 | 5 | namespace NethereumExplorer.Services 6 | { 7 | public class Web3ProviderService: IWeb3ProviderService 8 | { 9 | public string CurrentUrl { get; set; } = "https://mainnet.infura.io/v3/ddd5ed15e8d443e295b696c0d07c8b02"; 10 | 11 | //TODO: Simple chainId workaround, this should be the ChainId from the connection, when adding the url we should get the chainId using rpc and add it here. 12 | public string ChainId => CurrentUrl; 13 | 14 | public Web3 GetWeb3() 15 | { 16 | if (Utils.IsValidUrl(CurrentUrl)) 17 | { 18 | return new Web3(CurrentUrl); 19 | } 20 | 21 | return null; 22 | } 23 | 24 | public Web3 GetWeb3(Account account) 25 | { 26 | if (Utils.IsValidUrl(CurrentUrl)) 27 | { 28 | return new Web3(account, CurrentUrl); 29 | } 30 | 31 | return null; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/LatestBlockTransactions.razor: -------------------------------------------------------------------------------- 1 | @using ReactiveUI; 2 | @using System.Reactive.Linq 3 | @using System.Reactive.Threading.Tasks 4 | @using NethereumExplorer.ViewModels 5 | 6 | @inject LatestBlockTransactionsViewModel LatestBlockTransactionsViewModel 7 |
8 |
9 |
10 |
Transactions
11 | @if (LatestBlockTransactionsViewModel.Loading) 12 | { 13 | 14 | } 15 | 16 |
17 |
18 |
19 | @foreach (var transaction in LatestBlockTransactionsViewModel.Transactions.Items.OrderBy(x => x.Index).Take(10)) 20 | { 21 |
22 |
23 | Block @transaction.BlockNumber 24 | 25 |
Index: @transaction.Index
26 |
27 | 28 |
Gas: @transaction.Gas
29 |
30 |
31 |
32 | Hash: @TruncateEllipse(transaction.TransactionHash, 40) 33 | 34 |
From: @transaction.From
35 |
36 | 37 |
To: @transaction.To
38 |
39 | Ether: @transaction.Amount 40 |
41 |
42 | } 43 |
44 |
45 | 46 | @code { 47 | 48 | protected override void OnInitialized() 49 | { 50 | 51 | LatestBlockTransactionsViewModel.Transactions.Connect() 52 | .SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 53 | 54 | LatestBlockTransactionsViewModel.WhenAnyValue(x => x.Loading) 55 | .SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 56 | } 57 | 58 | public static string TruncateEllipse(string value, int maxChars) 59 | { 60 | return value.Length <= maxChars ? value : value.Substring(0, maxChars) + "..."; 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/LatestBlocks.razor: -------------------------------------------------------------------------------- 1 | @using ReactiveUI; 2 | @using NethereumExplorer.ViewModels 3 | @using System.Reactive.Linq 4 | @using System.Reactive.Threading.Tasks 5 | @using System.Reactive 6 | @inject BlocksViewModel BlocksViewModel 7 |
8 |
9 |
10 |
Blocks
11 | @if (BlocksViewModel.Loading) 12 | { 13 | 14 | } 15 |
16 |
17 |
18 | @foreach (var block in BlocksViewModel.Blocks.Items.OrderByDescending(x => x.Number)) 19 | { 20 |
21 |
22 | Block @block.Number 23 | 24 |
@string.Format(@"> {0:mm} mins {0:ss} secs ago", (DateTime.Now - block.Time))
25 |
26 | 27 |
@block.Time
28 |
29 |
30 |
31 | Mined By: @block.Author 32 |

33 |

@block.TransactionCount Transactions

34 |
35 |
36 | } 37 |
38 |
39 | 40 | @code { 41 | 42 | protected override void OnInitialized() { 43 | //refreshing the seconds countdown 44 | 45 | 46 | System.Reactive.Linq.Observable.Timer(TimeSpan.FromMilliseconds(500), TimeSpan.FromMilliseconds(2000)) 47 | .SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 48 | 49 | 50 | BlocksViewModel.Blocks.Connect().SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 51 | 52 | BlocksViewModel.WhenAnyValue(x => x.Loading).SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/MainLayout.razor.css: -------------------------------------------------------------------------------- 1 | .page { 2 | position: relative; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | .content { 8 | padding-top: 1.1rem; 9 | } 10 | 11 | .main { 12 | flex: 1; 13 | } 14 | 15 | .sidebar { 16 | background-image: linear-gradient(180deg, #339989 0%, #7DE2D1 70%); 17 | } 18 | 19 | .top-row { 20 | background-color: #f7f7f7; 21 | border-bottom: 1px solid #d6d5d5; 22 | justify-content: flex-end; 23 | height: 3.5rem; 24 | display: flex; 25 | align-items: end; 26 | } 27 | 28 | .top-row ::deep a, .top-row .btn-link { 29 | white-space: nowrap; 30 | margin-left: 1.5rem; 31 | } 32 | 33 | .top-row a:first-child { 34 | overflow: hidden; 35 | text-overflow: ellipsis; 36 | } 37 | 38 | @media (max-width: 640.98px) { 39 | .top-row:not(.auth) { 40 | display: none; 41 | } 42 | 43 | .top-row.auth { 44 | justify-content: space-between; 45 | } 46 | 47 | .top-row a, .top-row .btn-link { 48 | margin-left: 0; 49 | } 50 | } 51 | 52 | @media (min-width: 641px) { 53 | .page { 54 | flex-direction: row; 55 | } 56 | 57 | .sidebar { 58 | width: 250px; 59 | height: 100vh; 60 | position: sticky; 61 | top: 0; 62 | } 63 | 64 | .top-row { 65 | position: sticky; 66 | top: 0; 67 | z-index: 1; 68 | } 69 | 70 | .main > div { 71 | padding-left: 2rem !important; 72 | padding-right: 1.5rem !important; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 41 | 42 |
43 | 44 | @code { 45 | bool collapseNavMenu = true; 46 | 47 | void ToggleNavMenu() 48 | { 49 | collapseNavMenu = !collapseNavMenu; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | 2 | .navbar-toggler { 3 | background-color: rgba(255, 255, 255, 0.1); 4 | } 5 | 6 | .top-row { 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | 11 | .navbar-brand { 12 | font-size: 1.5rem; 13 | } 14 | 15 | .oi { 16 | width: 2rem; 17 | font-size: 1.5rem; 18 | vertical-align: text-top; 19 | top: -2px; 20 | } 21 | 22 | 23 | 24 | .nav-item ::deep a:hover { 25 | background-color: rgba(255,255,255,0.1); 26 | color: white; 27 | } 28 | 29 | .nav-item ::deep a { 30 | color: #4E5656; 31 | border-radius: 4px; 32 | height: 3rem; 33 | display: flex; 34 | align-items: center; 35 | line-height: 3rem; 36 | } 37 | 38 | .nav-item ::deep a.active { 39 | background-color: rgba(255,255,255,0.25); 40 | color: white; 41 | } 42 | 43 | .nav-item { 44 | font-size: 1.3rem; 45 | padding-bottom: 0.5rem; 46 | } 47 | 48 | .nav-item:first-of-type { 49 | padding-top: 1rem; 50 | } 51 | 52 | .nav-item:last-of-type { 53 | padding-bottom: 1rem; 54 | } 55 | 56 | 57 | 58 | @media (min-width: 641px) { 59 | .navbar-toggler { 60 | display: none; 61 | } 62 | 63 | .collapse { 64 | /* Never collapse the sidebar for wide screens */ 65 | display: block; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/Shared/Toasts.razor: -------------------------------------------------------------------------------- 1 | @using ReactiveUI; 2 | @using NethereumExplorer.ViewModels 3 | @inject ToastsViewModel ToastsViewModel 4 | 5 | 6 |
7 | @foreach (var toast in ToastsViewModel.Toasts.Items) 8 | { 9 |
10 |
11 | ... 13 | @toast.Title 14 | @string.Format(@"> {0:mm} mins {0:ss} secs ago", (DateTime.Now - toast.Received)) 15 | 18 |
19 |
20 | @toast.LinkMessage 21 | @toast.Message 22 |
23 |
24 | } 25 |
26 | 27 | @code { 28 | 29 | protected override void OnInitialized() 30 | { 31 | //refreshing the seconds countdown 32 | 33 | System.Reactive.Linq.Observable.Timer(TimeSpan.FromMilliseconds(500), TimeSpan.FromMilliseconds(2000)) 34 | .SubscribeAndNotifyStateChanges(a => InvokeAsync(a), 35 | () => 36 | { 37 | if (ToastsViewModel.Toasts.Count > 0) 38 | { 39 | StateHasChanged(); 40 | } 41 | } 42 | ); 43 | 44 | ToastsViewModel.Toasts.Connect().SubscribeAndNotifyStateChanges(InvokeAsync, StateHasChanged); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/AccountViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using NethereumExplorer.Model; 3 | using NethereumExplorer.Services; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class AccountsViewModel : ReactiveObject 9 | { 10 | private readonly IAccountsService _accountsService; 11 | private NewAccountPrivateKeyViewModel _newAccountPrivateKeyViewModel; 12 | 13 | public SourceCache Accounts => _accountsService.Accounts; 14 | 15 | public NewAccountPrivateKeyViewModel NewAccount 16 | { 17 | get => _newAccountPrivateKeyViewModel; 18 | } 19 | 20 | public AccountsViewModel(IAccountsService accountsService, NewAccountPrivateKeyViewModel newAccountPrivateKeyViewModel) 21 | { 22 | _accountsService = accountsService; 23 | _newAccountPrivateKeyViewModel = newAccountPrivateKeyViewModel; 24 | InitNewAccount(); 25 | } 26 | 27 | private void InitNewAccount() 28 | { 29 | NewAccount.Clear(); 30 | } 31 | 32 | public void AddNewAccount() 33 | { 34 | if (NewAccount.ValidPrivateKey) 35 | { 36 | var newAccountInfo = new AccountInfo() 37 | { 38 | Address = NewAccount.Address 39 | }; 40 | 41 | _accountsService.AddAccount(newAccountInfo, NewAccount.PrivateKey); 42 | NewAccount.Clear(); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/BlazorObservableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Linq; 3 | using System.Reactive.Threading.Tasks; 4 | using System.Threading.Tasks; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public static class BlazorObservableExtensions 9 | { 10 | public static IDisposable SubscribeAndNotifyStateChanges(this IObservable source, Func invokeAsync, Action statehasChanged) 11 | { 12 | return source.Select(x => InvokeAsyncStateHasChanged(x, invokeAsync, statehasChanged).ToObservable()).Subscribe(); 13 | } 14 | 15 | public static async Task InvokeAsyncStateHasChanged(T value, Func invokeAsync, Action statehasChanged) 16 | { 17 | await invokeAsync(statehasChanged); 18 | return value; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/BlockViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Numerics; 3 | using Nethereum.RPC.Eth.DTOs; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class BlockViewModel : ReactiveObject 9 | { 10 | private BigInteger _number; 11 | private string _author; 12 | private string _hash; 13 | private string _parentHash; 14 | private BigInteger _gasUsed; 15 | private BigInteger _difficulty; 16 | private int _transactionCount; 17 | private DateTime _time; 18 | 19 | public BlockViewModel(BlockWithTransactionHashes block) 20 | { 21 | Initialise(block); 22 | _transactionCount = block.TransactionHashes.Length; 23 | } 24 | 25 | public BlockViewModel(BlockWithTransactions block) 26 | { 27 | Initialise(block); 28 | _transactionCount = block.Transactions.Length; 29 | } 30 | 31 | 32 | public BlockViewModel() 33 | { 34 | 35 | } 36 | public void Initialise(Block block) 37 | { 38 | _difficulty = block.Difficulty.Value; 39 | _hash = block.BlockHash; 40 | _gasUsed = block.GasUsed.Value; 41 | _parentHash = block.ParentHash; 42 | _number = block.Number.Value; 43 | _author = block.Miner; 44 | _time = UnixTimeStampToDateTime((int)block.Timestamp.Value); 45 | } 46 | 47 | public string Hash 48 | { 49 | get { return _hash; } 50 | set { this.RaiseAndSetIfChanged(ref _hash, value); } 51 | } 52 | 53 | public string ParentHash 54 | { 55 | get { return _parentHash; } 56 | set { this.RaiseAndSetIfChanged(ref _parentHash, value); } 57 | } 58 | 59 | public BigInteger Difficulty 60 | { 61 | get { return _difficulty; } 62 | set { this.RaiseAndSetIfChanged(ref _difficulty, value); } 63 | } 64 | 65 | public BigInteger GasUsed 66 | { 67 | get { return _gasUsed; } 68 | set { this.RaiseAndSetIfChanged(ref _gasUsed, value); } 69 | } 70 | 71 | public BigInteger Number 72 | { 73 | get { return _number; } 74 | set { this.RaiseAndSetIfChanged(ref _number, value); } 75 | } 76 | 77 | public string Author 78 | { 79 | get { return _author; } 80 | set { this.RaiseAndSetIfChanged(ref _author, value); } 81 | } 82 | 83 | public int TransactionCount 84 | { 85 | get { return _transactionCount; } 86 | set { this.RaiseAndSetIfChanged(ref _transactionCount, value); } 87 | } 88 | 89 | public DateTime Time 90 | { 91 | get { return _time; } 92 | set { this.RaiseAndSetIfChanged(ref _time, value); } 93 | } 94 | 95 | public DateTime UnixTimeStampToDateTime(int unixTimeStamp) 96 | { 97 | return DateTimeOffset.FromUnixTimeSeconds(unixTimeStamp).DateTime; 98 | } 99 | 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/BlocksViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using DynamicData; 4 | using NethereumExplorer.Messages; 5 | using NethereumExplorer.Services; 6 | using ReactiveUI; 7 | 8 | namespace NethereumExplorer.ViewModels 9 | { 10 | public class BlocksViewModel : ReactiveObject 11 | { 12 | private readonly NewBlockProcessingService _newBlockProcessingService; 13 | private object _lockingObject = new object(); 14 | private bool _loading; 15 | 16 | public BlocksViewModel(NewBlockProcessingService newBlockProcessingService) 17 | { 18 | _newBlockProcessingService = newBlockProcessingService; 19 | MessageBus.Current.Listen().Subscribe(x => 20 | { 21 | lock (_lockingObject) 22 | { 23 | Loading = true; 24 | Blocks.Clear(); 25 | } 26 | } 27 | ); 28 | 29 | _newBlockProcessingService.Blocks.Connect().Subscribe(blockChanges => 30 | { 31 | lock (_lockingObject) 32 | { 33 | Loading = true; 34 | Blocks.Edit(_ => 35 | { 36 | 37 | Blocks.Clear(); 38 | foreach (var block in _newBlockProcessingService.Blocks.Items) 39 | { 40 | Blocks.AddOrUpdate(new BlockViewModel(block)); 41 | } 42 | 43 | }); 44 | Loading = false; 45 | } 46 | } 47 | ); 48 | } 49 | 50 | public SourceCache Blocks { get; set; } = new SourceCache(t => t.Number.ToString(CultureInfo.InvariantCulture)); 51 | 52 | public bool Loading 53 | { 54 | get { return _loading; } 55 | set { this.RaiseAndSetIfChanged(ref _loading, value); } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/LatestBlockTransactionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NethereumExplorer.Messages; 3 | using NethereumExplorer.Services; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class LatestBlockTransactionsViewModel : BlockTransactionsViewModel 9 | { 10 | public LatestBlockTransactionsViewModel(IWeb3ProviderService web3ProviderService):base(web3ProviderService) 11 | { 12 | MessageBus.Current.Listen().Subscribe(x => 13 | { 14 | if (x.BlockNumber != BlockNumber) 15 | { 16 | BlockNumber = x.BlockNumber; 17 | } 18 | } 19 | ); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/NewAccountPrivateKeyViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Nethereum.Web3.Accounts; 3 | using ReactiveUI; 4 | 5 | namespace NethereumExplorer.ViewModels 6 | { 7 | public class NewAccountPrivateKeyViewModel : ReactiveObject 8 | { 9 | private string _privateKey; 10 | private string _address; 11 | private bool _validPrivateKey; 12 | 13 | public string PrivateKey 14 | { 15 | get => _privateKey; 16 | set => this.RaiseAndSetIfChanged(ref _privateKey, value); 17 | } 18 | 19 | public string Address 20 | { 21 | get => _address; 22 | set => this.RaiseAndSetIfChanged(ref _address, value); 23 | } 24 | 25 | public bool ValidPrivateKey 26 | { 27 | get => _validPrivateKey; 28 | set => this.RaiseAndSetIfChanged(ref _validPrivateKey, value); 29 | } 30 | 31 | public void Clear() 32 | { 33 | PrivateKey = string.Empty; 34 | Address = string.Empty; 35 | ValidPrivateKey = false; 36 | 37 | } 38 | 39 | public void LoadAccount() 40 | { 41 | if (string.IsNullOrEmpty(PrivateKey) || PrivateKey.Length < 64) 42 | { 43 | Address = string.Empty; 44 | ValidPrivateKey = false; 45 | } 46 | else 47 | { 48 | try 49 | { 50 | var account = new Account(PrivateKey); 51 | Address = account.Address; 52 | ValidPrivateKey = true; 53 | } 54 | catch 55 | { 56 | ValidPrivateKey = false; 57 | Address = string.Empty; 58 | } 59 | } 60 | } 61 | 62 | public NewAccountPrivateKeyViewModel() 63 | { 64 | Clear(); 65 | this.WhenAnyValue(x => x.PrivateKey).Subscribe(x => LoadAccount()); 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/SearchQueryParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace NethereumExplorer.ViewModels 6 | { 7 | public static class SearchQueryParser 8 | { 9 | public static readonly Regex BlockNumber = new Regex(@"^\d+$"); 10 | public static readonly Regex TransactionHash = new Regex("^0(?i)x([A-Fa-f0-9]{64})$"); 11 | public static readonly Regex Address = new Regex("^0(?i)x([A-Fa-f0-9]{40})$"); 12 | 13 | public static readonly Regex[] All = { BlockNumber, TransactionHash, Address }; 14 | 15 | public static readonly Dictionary RegexToSearchTypeDictionary = new Dictionary 16 | { 17 | {BlockNumber, SearchType.Block}, 18 | {Address, SearchType.Address}, 19 | {TransactionHash, SearchType.Transaction} 20 | }; 21 | 22 | public static SearchType InferSearchType(string query) 23 | { 24 | var matchingRegex = All.FirstOrDefault(regex => regex.IsMatch(query)); 25 | return matchingRegex == null ? SearchType.Unknown : RegexToSearchTypeDictionary[matchingRegex]; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/SearchType.cs: -------------------------------------------------------------------------------- 1 | namespace NethereumExplorer.ViewModels 2 | { 3 | public enum SearchType 4 | { 5 | Unknown, Block, Transaction, Contract, Address 6 | } 7 | } -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/SendTransactionBaseViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reactive.Linq; 4 | using System.Reactive.Threading.Tasks; 5 | using System.Threading.Tasks; 6 | using DynamicData; 7 | using NethereumExplorer.Messages; 8 | using NethereumExplorer.Model; 9 | using NethereumExplorer.Services; 10 | using ReactiveUI; 11 | 12 | namespace NethereumExplorer.ViewModels 13 | { 14 | public class SendTransactionBaseViewModel : ReactiveObject 15 | { 16 | protected IAccountsService AccountsService { get; } 17 | 18 | public SendTransactionBaseViewModel(IAccountsService accountsService) 19 | { 20 | AccountsService = accountsService; 21 | this.WhenAnyValue(x => x.Account, (x) => !string.IsNullOrEmpty(x)).Select(_=>RefreshBalanceAsync().ToObservable()).Concat().Subscribe(); 22 | 23 | MessageBus.Current.Listen().Select(_ => RefreshBalanceAsync().ToObservable()).Concat().Subscribe(); 24 | 25 | AccountsService.Accounts.Connect().Subscribe(x => { SelectFirstAccount(); }); 26 | 27 | SelectFirstAccount(); 28 | } 29 | 30 | private void SelectFirstAccount() 31 | { 32 | if (string.IsNullOrEmpty(Account) || !AccountsService.Accounts.Keys.Contains(Account.ToLowerInvariant())) 33 | { 34 | var firstAccount = AccountsService.Accounts.Items.FirstOrDefault(); 35 | if (firstAccount != null) 36 | { 37 | Account = firstAccount.Address; 38 | } 39 | } 40 | } 41 | 42 | public async Task RefreshBalanceAsync() 43 | { 44 | if (!string.IsNullOrWhiteSpace(Account)) 45 | { 46 | EtherBalance = await AccountsService.GetAccountEtherBalanceAsync(Account); 47 | } 48 | } 49 | 50 | public SourceCache Accounts => AccountsService.Accounts; 51 | 52 | private string _account; 53 | 54 | public string Account 55 | { 56 | get => _account; 57 | set => this.RaiseAndSetIfChanged(ref _account, value); 58 | } 59 | 60 | private string _addressTo; 61 | 62 | public string AddressTo 63 | { 64 | get => _addressTo; 65 | set => this.RaiseAndSetIfChanged(ref _addressTo, value); 66 | } 67 | 68 | private decimal _amountInEther; 69 | 70 | public decimal AmountInEther 71 | { 72 | get => _amountInEther; 73 | set => this.RaiseAndSetIfChanged(ref _amountInEther, value); 74 | } 75 | 76 | private ulong? _gas; 77 | 78 | public ulong? Gas 79 | { 80 | get => _gas; 81 | set => this.RaiseAndSetIfChanged(ref _gas, value); 82 | } 83 | 84 | private ulong? _nonce; 85 | 86 | public ulong? Nonce 87 | { 88 | get => _nonce; 89 | set => this.RaiseAndSetIfChanged(ref _nonce, value); 90 | } 91 | 92 | private string _data; 93 | 94 | public string Data 95 | { 96 | get => _data; 97 | set => this.RaiseAndSetIfChanged(ref _data, value); 98 | } 99 | 100 | private string _gasPrice; 101 | 102 | public string GasPrice 103 | { 104 | get => _gasPrice; 105 | set => this.RaiseAndSetIfChanged(ref _gasPrice, value); 106 | } 107 | 108 | private decimal _etherBalance; 109 | 110 | public decimal EtherBalance 111 | { 112 | get => _etherBalance; 113 | set => this.RaiseAndSetIfChanged(ref _etherBalance, value); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/SendTransactionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Nethereum.Hex.HexTypes; 3 | using Nethereum.RPC.Eth.DTOs; 4 | using Nethereum.Util; 5 | using Nethereum.Web3; 6 | using NethereumExplorer.Services; 7 | 8 | namespace NethereumExplorer.ViewModels 9 | { 10 | public class SendTransactionViewModel : SendTransactionBaseViewModel 11 | { 12 | public SendTransactionViewModel(IAccountsService accountsService) : base(accountsService) 13 | { 14 | 15 | } 16 | 17 | public async Task SendTransactionAsync() 18 | { 19 | var transactionInput = 20 | new TransactionInput 21 | { 22 | Value = new HexBigInteger(Web3.Convert.ToWei(AmountInEther)), 23 | To = AddressTo, 24 | From = Account 25 | }; 26 | if (Gas != null) 27 | transactionInput.Gas = new HexBigInteger(Gas.Value); 28 | if (!string.IsNullOrEmpty(GasPrice)) 29 | { 30 | var parsed = decimal.Parse(GasPrice); 31 | transactionInput.GasPrice = new HexBigInteger(Web3.Convert.ToWei(GasPrice, UnitConversion.EthUnit.Gwei)); 32 | } 33 | 34 | if (Nonce != null) 35 | transactionInput.Nonce = new HexBigInteger(Nonce.Value); 36 | if (!string.IsNullOrEmpty(Data)) 37 | transactionInput.Data = Data; 38 | 39 | return await AccountsService.SendTransactionAsync(transactionInput).ConfigureAwait(false); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/ToastViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReactiveUI; 3 | 4 | namespace NethereumExplorer.ViewModels 5 | { 6 | public class ToastViewModel : ReactiveObject 7 | { 8 | private string _key; 9 | 10 | public string Key 11 | { 12 | get => _key; 13 | set => this.RaiseAndSetIfChanged(ref _key, value); 14 | } 15 | 16 | private string _title; 17 | 18 | public string Title 19 | { 20 | get => _title; 21 | set => this.RaiseAndSetIfChanged(ref _title, value); 22 | } 23 | 24 | private string _message; 25 | 26 | public string Message 27 | { 28 | get => _message; 29 | set => this.RaiseAndSetIfChanged(ref _message, value); 30 | } 31 | 32 | private DateTime _received; 33 | 34 | public DateTime Received 35 | { 36 | get => _received; 37 | set => this.RaiseAndSetIfChanged(ref _received, value); 38 | } 39 | 40 | private string _link; 41 | 42 | public string RelativeLink 43 | { 44 | get => _link; 45 | set => this.RaiseAndSetIfChanged(ref _link, value); 46 | } 47 | 48 | 49 | private string _linkMessage; 50 | 51 | public string LinkMessage 52 | { 53 | get => _linkMessage; 54 | set => this.RaiseAndSetIfChanged(ref _linkMessage, value); 55 | } 56 | 57 | 58 | private bool _failed; 59 | 60 | public bool Failed 61 | { 62 | get => _failed; 63 | set => this.RaiseAndSetIfChanged(ref _failed, value); 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/ToastsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicData; 3 | using NethereumExplorer.Messages; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class ToastsViewModel : ReactiveObject 9 | { 10 | public SourceCache Toasts = new SourceCache(x => x.Key); 11 | 12 | public ToastsViewModel() 13 | { 14 | MessageBus.Current.Listen().Subscribe(x => 15 | { 16 | var state = x.Failed.HasValue && x.Failed.Value ? "error" : "confirmed"; 17 | 18 | Toasts.AddOrUpdate( 19 | new ToastViewModel() 20 | { 21 | Key = x.TransactionHash, 22 | Title = "Transaction " + state, 23 | Message= state + " for account: " + x.AccountAddress, 24 | RelativeLink = "transaction/" + x.TransactionHash, 25 | LinkMessage = Utils.TruncateEllipse(x.TransactionHash, 20), 26 | Received = DateTime.Now, 27 | Failed = x.Failed.HasValue && x.Failed.Value ? true : false 28 | }); 29 | } 30 | ); 31 | } 32 | 33 | public void RemoveToast(string key) 34 | { 35 | Toasts.Remove(key); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/TransactionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using Nethereum.RPC.Eth.DTOs; 3 | using Nethereum.Web3; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class TransactionViewModel : ReactiveObject 9 | { 10 | private decimal _amount; 11 | private ulong _index; 12 | private string _blockHash; 13 | private string _data; 14 | private string _from; 15 | private BigInteger? _gas; 16 | private BigInteger? _gasPrice; 17 | private ulong _nonce; 18 | private string _to; 19 | private ulong _blockNumber; 20 | private string _transactionHash; 21 | 22 | 23 | public ulong BlockNumber 24 | 25 | { 26 | get => _blockNumber; 27 | 28 | set => this.RaiseAndSetIfChanged(ref _blockNumber, value); 29 | } 30 | 31 | public string BlockHash 32 | 33 | { 34 | get => _blockHash; 35 | 36 | set => this.RaiseAndSetIfChanged(ref _blockHash, value); 37 | } 38 | 39 | public string TransactionHash 40 | 41 | { 42 | get => _transactionHash; 43 | 44 | set => this.RaiseAndSetIfChanged(ref _transactionHash, value); 45 | } 46 | 47 | 48 | public ulong Index 49 | 50 | { 51 | get => _index; 52 | 53 | set => this.RaiseAndSetIfChanged(ref _index, value); 54 | } 55 | 56 | public string From 57 | 58 | { 59 | get => _from; 60 | 61 | set => this.RaiseAndSetIfChanged(ref _from, value); 62 | } 63 | 64 | public string To 65 | 66 | { 67 | get => _to; 68 | 69 | set => this.RaiseAndSetIfChanged(ref _to, value); 70 | } 71 | 72 | public decimal Amount 73 | 74 | { 75 | get => _amount; 76 | 77 | set => this.RaiseAndSetIfChanged(ref _amount, value); 78 | } 79 | 80 | public BigInteger? Gas 81 | { 82 | get => _gas; 83 | 84 | set => this.RaiseAndSetIfChanged(ref _gas, value); 85 | } 86 | 87 | public string Data 88 | { 89 | get => _data; 90 | 91 | set => this.RaiseAndSetIfChanged(ref _data, value); 92 | } 93 | 94 | public BigInteger? GasPrice 95 | 96 | { 97 | get => _gasPrice; 98 | 99 | set => this.RaiseAndSetIfChanged(ref _gasPrice, value); 100 | } 101 | 102 | public ulong Nonce 103 | { 104 | get => _nonce; 105 | 106 | set => this.RaiseAndSetIfChanged(ref _nonce, value); 107 | } 108 | 109 | public void Initialise(Transaction transaction) 110 | 111 | { 112 | TransactionHash = transaction.TransactionHash; 113 | 114 | BlockNumber = (ulong)transaction.BlockNumber.Value; 115 | 116 | BlockHash = transaction.BlockHash; 117 | 118 | Nonce = (ulong)transaction.Nonce.Value; 119 | 120 | From = transaction.From; 121 | 122 | To = transaction.To; 123 | 124 | Gas = transaction.Gas; 125 | 126 | GasPrice = transaction.GasPrice; 127 | 128 | Data = transaction.Input; 129 | 130 | Index = (ulong)transaction.TransactionIndex.Value; 131 | 132 | if (transaction.Value != null) 133 | { 134 | Amount = Web3.Convert.FromWei(transaction.Value.Value); 135 | } 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/TransactionWithReceiptViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | using System.Threading.Tasks; 3 | using Nethereum.RPC.Eth.DTOs; 4 | using NethereumExplorer.Services; 5 | using ReactiveUI; 6 | 7 | namespace NethereumExplorer.ViewModels 8 | { 9 | public class TransactionWithReceiptViewModel : TransactionViewModel 10 | { 11 | private readonly IWeb3ProviderService _web3ProviderService; 12 | 13 | 14 | private bool _transactionFound; 15 | public bool TransactionFound 16 | { 17 | get { return _transactionFound; } 18 | set { this.RaiseAndSetIfChanged(ref _transactionFound, value); } 19 | } 20 | 21 | private bool _loading; 22 | public bool Loading 23 | { 24 | get { return _loading; } 25 | set { this.RaiseAndSetIfChanged(ref _loading, value); } 26 | } 27 | private bool _hasErrors; 28 | 29 | public bool HasErrors 30 | { 31 | get => _hasErrors; 32 | 33 | set => this.RaiseAndSetIfChanged(ref _hasErrors, value); 34 | } 35 | 36 | private string _logs; 37 | 38 | public string Logs 39 | { 40 | get => _logs; 41 | 42 | set => this.RaiseAndSetIfChanged(ref _logs, value); 43 | } 44 | 45 | private BigInteger? _cumulativeGasUsed; 46 | 47 | public BigInteger? CumulativeGasUsed 48 | { 49 | get => _cumulativeGasUsed; 50 | 51 | set => this.RaiseAndSetIfChanged(ref _cumulativeGasUsed, value); 52 | } 53 | 54 | private string _contractAddress; 55 | 56 | public string ContractAddress 57 | { 58 | get => _contractAddress; 59 | 60 | set => this.RaiseAndSetIfChanged(ref _contractAddress, value); 61 | } 62 | 63 | public TransactionWithReceiptViewModel(IWeb3ProviderService web3ProviderService) 64 | { 65 | _web3ProviderService = web3ProviderService; 66 | } 67 | 68 | public async Task LoadTransactionAsync(string transactionHash) 69 | { 70 | try 71 | { 72 | Loading = true; 73 | var web3 = _web3ProviderService.GetWeb3(); 74 | var transaction = await web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(transactionHash) 75 | .ConfigureAwait(false); 76 | 77 | if (transaction != null) 78 | { 79 | TransactionFound = true; 80 | var transactionReceipt = await web3.Eth.Transactions.GetTransactionReceipt 81 | .SendRequestAsync(transactionHash) 82 | .ConfigureAwait(false); 83 | Initialise(transaction); 84 | if (transactionReceipt != null) 85 | { 86 | Initialise(transactionReceipt); 87 | } 88 | } 89 | else 90 | { 91 | TransactionFound = false; 92 | } 93 | } 94 | finally 95 | { 96 | Loading = false; 97 | } 98 | } 99 | 100 | public void Initialise(TransactionReceipt transactionReceipt) 101 | { 102 | CumulativeGasUsed = transactionReceipt.CumulativeGasUsed; 103 | ContractAddress = transactionReceipt.ContractAddress; 104 | Logs = transactionReceipt.Logs.ToString(); 105 | HasErrors = transactionReceipt.HasErrors().HasValue ? transactionReceipt.HasErrors().Value : false; 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/TransactionsViewModelGridConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Blazor.FlexGrid.Components.Configuration; 2 | using Blazor.FlexGrid.Components.Configuration.Builders; 3 | 4 | namespace NethereumExplorer.ViewModels 5 | { 6 | public class TransactionsViewModelGridConfiguration : IEntityTypeConfiguration 7 | { 8 | public void Configure(EntityTypeBuilder builder) 9 | { 10 | builder.Property(e => e.Changed).IsVisible(false); 11 | builder.Property(e => e.Data).IsVisible(false); 12 | builder.Property(e => e.Changing).IsVisible(false); 13 | builder.Property(e => e.BlockHash).IsVisible(false); 14 | builder.Property(e => e.ThrownExceptions).IsVisible(false); 15 | builder.Property(e => e.BlockNumber).IsVisible(false); 16 | builder.Property(e => e.GasPrice).IsVisible(false); 17 | builder.Property(e => e.Nonce).IsVisible(false); 18 | builder.Property(e => e.TransactionHash).HasValueFormatter(s => "{s}"); 19 | builder.Property(e => e.Gas).IsVisible(false); 20 | builder.Property(e => e.Index).IsSortable(); 21 | 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Components; 3 | using Nethereum.Util; 4 | 5 | namespace NethereumExplorer.ViewModels 6 | { 7 | public static class Utils 8 | { 9 | private static AddressUtil _addressUtil = new AddressUtil(); 10 | 11 | public static bool IsValidUrl(string url) 12 | { 13 | return !string.IsNullOrEmpty(url) && Uri.IsWellFormedUriString(url, UriKind.Absolute); 14 | } 15 | 16 | public static bool IsValidAddress(string address) 17 | { 18 | return !string.IsNullOrEmpty(address) && _addressUtil.IsValidAddressLength(address); 19 | } 20 | 21 | public static string TruncateEllipse(string value, int maxChars) 22 | { 23 | return value.Length <= maxChars ? value : value.Substring(0, maxChars) + "..."; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/ViewModels/Web3UrlViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NethereumExplorer.Messages; 3 | using NethereumExplorer.Services; 4 | using ReactiveUI; 5 | 6 | namespace NethereumExplorer.ViewModels 7 | { 8 | public class Web3UrlViewModel : ReactiveObject 9 | { 10 | private IWeb3ProviderService _web3ProviderService; 11 | private string _url; 12 | 13 | public Web3UrlViewModel(IWeb3ProviderService web3ProviderService) 14 | { 15 | _web3ProviderService = web3ProviderService; 16 | _url = _web3ProviderService.CurrentUrl; 17 | 18 | this.WhenAnyValue(x => x.Url, Utils.IsValidUrl).Subscribe(_ => 19 | MessageBus.Current.SendMessage( 20 | new UrlChanged(_url))); 21 | } 22 | 23 | public string Url 24 | { 25 | get => _url; 26 | set 27 | { 28 | _web3ProviderService.CurrentUrl = value; 29 | this.RaiseAndSetIfChanged(ref _url, value); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.JSInterop 7 | @using NethereumExplorer.Core.Shared -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/images/0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/images/0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/images/logo192x192w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/images/logo192x192w.png -------------------------------------------------------------------------------- /NethereumExplorer.Core/wwwroot/images/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Core/wwwroot/images/logo512.png -------------------------------------------------------------------------------- /NethereumExplorer.Maui/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | #512bdf 11 | White 12 | 13 | 17 | 18 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Maui; 2 | using Microsoft.Maui.Controls; 3 | using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific; 4 | using Application = Microsoft.Maui.Controls.Application; 5 | 6 | namespace NethereumExplorer.Maui 7 | { 8 | public partial class App : Application 9 | { 10 | public App() 11 | { 12 | InitializeComponent(); 13 | 14 | MainPage = new MainPage(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Maui.Controls; 3 | 4 | namespace NethereumExplorer.Maui 5 | { 6 | public partial class MainPage : ContentPage 7 | { 8 | public MainPage() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/MauiProgram.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebView.Maui; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using Microsoft.Maui; 4 | using Microsoft.Maui.Hosting; 5 | using Microsoft.Maui.Controls.Compatibility; 6 | using Microsoft.Maui.Controls.Hosting; 7 | using NethereumExplorer.Services; 8 | using NethereumExplorer.ViewModels; 9 | using Blazor.FlexGrid; 10 | using System.Net.Http; 11 | 12 | namespace NethereumExplorer.Maui 13 | { 14 | public static class MauiProgram 15 | { 16 | public static MauiApp CreateMauiApp() 17 | { 18 | 19 | var builder = MauiApp.CreateBuilder(); 20 | builder 21 | .RegisterBlazorMauiWebView() 22 | .UseMauiApp() 23 | .ConfigureFonts(fonts => 24 | { 25 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); 26 | }); 27 | 28 | builder.Services.AddBlazorWebView(); 29 | 30 | var services = builder.Services; 31 | 32 | var web3ServiceProvider = new Web3ProviderService(); 33 | var accountsService = new AccountsService(web3ServiceProvider); 34 | var newBlockProcessingService = new NewBlockProcessingService(web3ServiceProvider); 35 | var toastsViewModel = new ToastsViewModel(); 36 | var blocksViewModel = new BlocksViewModel(newBlockProcessingService); 37 | var latestBlockTransactionsViewModel = new LatestBlockTransactionsViewModel(web3ServiceProvider); 38 | var newAccountPrivateKeyViewModel = new NewAccountPrivateKeyViewModel(); 39 | var accountsViewModel = new AccountsViewModel(accountsService, newAccountPrivateKeyViewModel); 40 | var accountsTransactionMonitoringService = new AccountsTransactionMonitoringService(accountsService, web3ServiceProvider); 41 | 42 | services.AddSingleton((x) => web3ServiceProvider); 43 | services.AddSingleton((x) => accountsService); 44 | services.AddSingleton(newBlockProcessingService); 45 | services.AddSingleton(toastsViewModel); 46 | services.AddSingleton(blocksViewModel); 47 | services.AddSingleton(latestBlockTransactionsViewModel); 48 | services.AddTransient(); 49 | services.AddSingleton(accountsViewModel); 50 | services.AddSingleton(newAccountPrivateKeyViewModel); 51 | services.AddSingleton(); 52 | services.AddSingleton(); 53 | services.AddSingleton(accountsTransactionMonitoringService); 54 | services.AddSingleton(); 55 | services.AddSingleton(); 56 | 57 | 58 | services.AddFlexGrid(cfg => 59 | { 60 | cfg.ApplyConfiguration(new TransactionsViewModelGridConfiguration()); 61 | }); 62 | 63 | return builder.Build(); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/NethereumExplorer.Maui.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0-ios;net6.0-android;net6.0-maccatalyst 5 | $(TargetFrameworks);net6.0-windows10.0.19041 6 | Exe 7 | NethereumExplorer.Maui 8 | true 9 | true 10 | true 11 | 12 | 13 | NethereumExplorer.Maui 14 | 15 | 16 | com.companyname.NethereumExplorer.Maui 17 | 18 | 19 | 1 20 | 21 | 22 | True 23 | 24 | 14.2 25 | 14.0 26 | 21.0 27 | 10.0.18362.0 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | WinExe 52 | win-x64 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | <_MauiCompileToAdd Remove="wwwroot\images\**" /> 90 | 91 | 92 | 93 | <_MauiXamlToRemove Remove="wwwroot\images\**" /> 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Microsoft.Maui; 4 | 5 | namespace NethereumExplorer.Maui 6 | { 7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)] 8 | public class MainActivity : MauiAppCompatActivity 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Android/MainApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.App; 3 | using Android.Runtime; 4 | using Microsoft.Maui; 5 | using Microsoft.Maui.Hosting; 6 | 7 | namespace NethereumExplorer.Maui 8 | { 9 | [Application] 10 | public class MainApplication : MauiApplication 11 | { 12 | public MainApplication(IntPtr handle, JniHandleOwnership ownership) 13 | : base(handle, ownership) 14 | { 15 | } 16 | 17 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 18 | } 19 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #512BD4 4 | #2B0B98 5 | #2B0B98 6 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/MacCatalyst/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using Microsoft.Maui; 3 | using Microsoft.Maui.Hosting; 4 | 5 | namespace NethereumExplorer.Maui 6 | { 7 | [Register("AppDelegate")] 8 | public class AppDelegate : MauiUIApplicationDelegate 9 | { 10 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 11 | } 12 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/MacCatalyst/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UIRequiredDeviceCapabilities 11 | 12 | arm64 13 | 14 | UISupportedInterfaceOrientations 15 | 16 | UIInterfaceOrientationPortrait 17 | UIInterfaceOrientationLandscapeLeft 18 | UIInterfaceOrientationLandscapeRight 19 | 20 | UISupportedInterfaceOrientations~ipad 21 | 22 | UIInterfaceOrientationPortrait 23 | UIInterfaceOrientationPortraitUpsideDown 24 | UIInterfaceOrientationLandscapeLeft 25 | UIInterfaceOrientationLandscapeRight 26 | 27 | XSAppIconAssets 28 | Assets.xcassets/appicon.appiconset 29 | 30 | 31 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/MacCatalyst/Program.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace NethereumExplorer.Maui 4 | { 5 | public class Program 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, typeof(AppDelegate)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Windows/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Windows/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Maui; 2 | using Microsoft.Maui.Hosting; 3 | using Microsoft.UI.Xaml; 4 | using Windows.ApplicationModel; 5 | 6 | // To learn more about WinUI, the WinUI project structure, 7 | // and more about our project templates, see: http://aka.ms/winui-project-info. 8 | 9 | namespace NethereumExplorer.Maui.WinUI 10 | { 11 | /// 12 | /// Provides application-specific behavior to supplement the default Application class. 13 | /// 14 | public partial class App : MauiWinUIApplication 15 | { 16 | /// 17 | /// Initializes the singleton application object. This is the first line of authored code 18 | /// executed, and as such is the logical equivalent of main() or WinMain(). 19 | /// 20 | public App() 21 | { 22 | this.InitializeComponent(); 23 | } 24 | 25 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 26 | 27 | protected override void OnLaunched(LaunchActivatedEventArgs args) 28 | { 29 | base.OnLaunched(args); 30 | 31 | Microsoft.Maui.Essentials.Platform.OnLaunched(args); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | NethereumExplorer.Maui 16 | Microsoft 17 | Assets\appiconStoreLogo.png 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/Windows/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | true/PM 12 | PerMonitorV2, PerMonitor 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using Microsoft.Maui; 3 | using Microsoft.Maui.Hosting; 4 | 5 | namespace NethereumExplorer.Maui 6 | { 7 | [Register("AppDelegate")] 8 | public class AppDelegate : MauiUIApplicationDelegate 9 | { 10 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 11 | } 12 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSRequiresIPhoneOS 6 | 7 | UIDeviceFamily 8 | 9 | 1 10 | 2 11 | 12 | UIRequiredDeviceCapabilities 13 | 14 | arm64 15 | 16 | UISupportedInterfaceOrientations 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationLandscapeLeft 20 | UIInterfaceOrientationLandscapeRight 21 | 22 | UISupportedInterfaceOrientations~ipad 23 | 24 | UIInterfaceOrientationPortrait 25 | UIInterfaceOrientationPortraitUpsideDown 26 | UIInterfaceOrientationLandscapeLeft 27 | UIInterfaceOrientationLandscapeRight 28 | 29 | XSAppIconAssets 30 | Assets.xcassets/appicon.appiconset 31 | 32 | 33 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/iOS/Program.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace NethereumExplorer.Maui 4 | { 5 | public class Program 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, typeof(AppDelegate)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Platforms/iOS/Resources/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Windows Machine": { 4 | "commandName": "MsixPackage", 5 | "nativeDebugging": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Resources/Fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Maui/Resources/Fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Resources/appicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Resources/appiconfg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/Resources/logo512n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Maui/Resources/logo512n.png -------------------------------------------------------------------------------- /NethereumExplorer.Maui/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.AspNetCore.Components.Web 5 | @using Microsoft.AspNetCore.Components.Web.Virtualization 6 | @using Microsoft.JSInterop 7 | @using NethereumExplorer.Maui 8 | 9 | 10 | -------------------------------------------------------------------------------- /NethereumExplorer.Maui/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | NethereumExplorer.Maui 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | An unhandled error has occurred. 28 | Reload 29 | 🗙 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/NethereumExplorer.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | true 14 | PreserveNewest 15 | 16 | 17 | true 18 | PreserveNewest 19 | 20 | 21 | true 22 | PreserveNewest 23 | 24 | 25 | true 26 | PreserveNewest 27 | 28 | 29 | true 30 | PreserveNewest 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using NethereumExplorer.Core 3 | @namespace NethereumExplorer.Server.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | @{ 6 | Layout = null; 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | NethereumExplorer.Server 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 |
33 |
34 | 35 | An error has occurred. This application may no longer respond until reloaded. 36 | 37 | 38 | An unhandled exception has occurred. See browser dev tools for details. 39 | 40 | Reload 41 | 🗙 42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace NethereumExplorer.Server 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:45371", 7 | "sslPort": 44368 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "NethereumExplorer.Server": { 19 | "commandName": "Project", 20 | "dotnetRunMessages": "true", 21 | "launchBrowser": true, 22 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Server/wwwroot/favicon.ico -------------------------------------------------------------------------------- /NethereumExplorer.Server/wwwroot/images/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/NethereumExplorer.Server/wwwroot/images/logo512.png -------------------------------------------------------------------------------- /NethereumExplorer.Server/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Nethereum Light Explorer", 3 | "short_name": "NethereumLightExplorer", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#339989", 8 | "icons": [ 9 | { 10 | "src": "images/logo512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | }, 14 | { 15 | "src": "images/logo192x192w.png", 16 | "type": "image/png", 17 | "sizes": "192x192" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /NethereumExplorer.Server/wwwroot/service-worker.published.js: -------------------------------------------------------------------------------- 1 | // Caution! Be sure you understand the caveats before publishing an application with 2 | // offline support. See https://aka.ms/blazor-offline-considerations 3 | 4 | self.importScripts('./service-worker-assets.js'); 5 | self.addEventListener('install', event => event.waitUntil(onInstall(event))); 6 | self.addEventListener('activate', event => event.waitUntil(onActivate(event))); 7 | self.addEventListener('fetch', event => event.respondWith(onFetch(event))); 8 | 9 | const cacheNamePrefix = 'offline-cache-'; 10 | const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; 11 | const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; 12 | const offlineAssetsExclude = [ /^service-worker\.js$/ ]; 13 | 14 | async function onInstall(event) { 15 | console.info('Service worker: Install'); 16 | 17 | // Fetch and cache all matching items from the assets manifest 18 | const assetsRequests = self.assetsManifest.assets 19 | .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) 20 | .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) 21 | .map(asset => new Request(asset.url, { integrity: asset.hash })); 22 | await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); 23 | } 24 | 25 | async function onActivate(event) { 26 | console.info('Service worker: Activate'); 27 | 28 | // Delete unused caches 29 | const cacheKeys = await caches.keys(); 30 | await Promise.all(cacheKeys 31 | .filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName) 32 | .map(key => caches.delete(key))); 33 | } 34 | 35 | async function onFetch(event) { 36 | let cachedResponse = null; 37 | if (event.request.method === 'GET') { 38 | // For all navigation requests, try to serve index.html from cache 39 | // If you need some URLs to be server-rendered, edit the following check to exclude those URLs 40 | const shouldServeIndexHtml = event.request.mode === 'navigate'; 41 | 42 | const request = shouldServeIndexHtml ? 'index.html' : event.request; 43 | const cache = await caches.open(cacheName); 44 | cachedResponse = await cache.match(request); 45 | } 46 | 47 | return cachedResponse || fetch(event.request); 48 | } 49 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.App; 3 | using Android.Content.PM; 4 | using Android.Runtime; 5 | using Android.Views; 6 | using Android.Widget; 7 | using Android.OS; 8 | using Microsoft.MobileBlazorBindings.WebView.Android; 9 | 10 | namespace NethereumExplorer.Droid 11 | { 12 | [Activity(Label = "NethereumExplorer", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 14 | { 15 | protected override void OnCreate(Bundle savedInstanceState) 16 | { 17 | BlazorHybridAndroid.Init(); 18 | 19 | var fileProvider = new AssetFileProvider(Assets, "wwwroot"); 20 | 21 | TabLayoutResource = Resource.Layout.Tabbar; 22 | ToolbarResource = Resource.Layout.Toolbar; 23 | 24 | base.OnCreate(savedInstanceState); 25 | 26 | Xamarin.Essentials.Platform.Init(this, savedInstanceState); 27 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 28 | LoadApplication(new App(fileProvider: fileProvider)); 29 | } 30 | 31 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) 32 | { 33 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); 34 | 35 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("NethereumExplorer.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("NethereumExplorer.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2019")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | [assembly: AssemblyVersion("1.0.0.0")] 26 | [assembly: AssemblyFileVersion("1.0.0.0")] 27 | 28 | // Add some common permissions, these can be removed if not needed 29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 31 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | 8 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Android/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Android/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | An unhandled error has occurred. 24 | Reload 25 | 🗙 26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/App.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.MobileBlazorBindings.WebView.Windows; 2 | using System; 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Platform.WPF; 5 | 6 | namespace NethereumExplorer.Windows 7 | { 8 | public class MainWindow : FormsApplicationPage 9 | { 10 | [STAThread] 11 | public static void Main(string[] args) 12 | { 13 | var app = new System.Windows.Application(); 14 | app.Run(new MainWindow(args)); 15 | } 16 | 17 | public MainWindow(string[] args) 18 | { 19 | Forms.Init(); 20 | this.Title = "Nethereum Hybrid"; 21 | BlazorHybridWindows.Init(); 22 | LoadApplication(new App(args: args)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/NethereumExplorer.Windows.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | $(NoWarn);NU1701 8 | app.manifest 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | PreserveNewest 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | 55 | true 56 | 57 | PerMonitorV2 58 | 59 | 60 | 61 | 62 | 63 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.Windows/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.Windows/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | An unhandled error has occurred. 25 | Reload 26 | 🗙 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Xamarin.Forms; 5 | 6 | using Foundation; 7 | using UIKit; 8 | 9 | namespace NethereumExplorer.iOS 10 | { 11 | // The UIApplicationDelegate for the application. This class is responsible for launching the 12 | // User Interface of the application, as well as listening (and optionally responding) to 13 | // application events from iOS. 14 | [Register("AppDelegate")] 15 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 16 | { 17 | // 18 | // This method is invoked when the application has loaded and is ready to run. In this 19 | // method you should instantiate the window, load the UI into it and then make the window 20 | // visible. 21 | // 22 | // You have 17 seconds to return from this method, or iOS will terminate your application. 23 | // 24 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 25 | { 26 | global::Xamarin.Forms.Forms.Init(); 27 | 28 | // For iOS, wrap inside a navigation page, otherwise the header looks wrong 29 | var formsApp = new App(); 30 | formsApp.MainPage = new NavigationPage(formsApp.MainPage); 31 | 32 | LoadApplication(formsApp); 33 | 34 | return base.FinishedLaunching(app, options); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "scale": "2x", 5 | "size": "20x20", 6 | "idiom": "iphone", 7 | "filename": "Icon40.png" 8 | }, 9 | { 10 | "scale": "3x", 11 | "size": "20x20", 12 | "idiom": "iphone", 13 | "filename": "Icon60.png" 14 | }, 15 | { 16 | "scale": "2x", 17 | "size": "29x29", 18 | "idiom": "iphone", 19 | "filename": "Icon58.png" 20 | }, 21 | { 22 | "scale": "3x", 23 | "size": "29x29", 24 | "idiom": "iphone", 25 | "filename": "Icon87.png" 26 | }, 27 | { 28 | "scale": "2x", 29 | "size": "40x40", 30 | "idiom": "iphone", 31 | "filename": "Icon80.png" 32 | }, 33 | { 34 | "scale": "3x", 35 | "size": "40x40", 36 | "idiom": "iphone", 37 | "filename": "Icon120.png" 38 | }, 39 | { 40 | "scale": "2x", 41 | "size": "60x60", 42 | "idiom": "iphone", 43 | "filename": "Icon120.png" 44 | }, 45 | { 46 | "scale": "3x", 47 | "size": "60x60", 48 | "idiom": "iphone", 49 | "filename": "Icon180.png" 50 | }, 51 | { 52 | "scale": "1x", 53 | "size": "20x20", 54 | "idiom": "ipad", 55 | "filename": "Icon20.png" 56 | }, 57 | { 58 | "scale": "2x", 59 | "size": "20x20", 60 | "idiom": "ipad", 61 | "filename": "Icon40.png" 62 | }, 63 | { 64 | "scale": "1x", 65 | "size": "29x29", 66 | "idiom": "ipad", 67 | "filename": "Icon29.png" 68 | }, 69 | { 70 | "scale": "2x", 71 | "size": "29x29", 72 | "idiom": "ipad", 73 | "filename": "Icon58.png" 74 | }, 75 | { 76 | "scale": "1x", 77 | "size": "40x40", 78 | "idiom": "ipad", 79 | "filename": "Icon40.png" 80 | }, 81 | { 82 | "scale": "2x", 83 | "size": "40x40", 84 | "idiom": "ipad", 85 | "filename": "Icon80.png" 86 | }, 87 | { 88 | "scale": "1x", 89 | "size": "76x76", 90 | "idiom": "ipad", 91 | "filename": "Icon76.png" 92 | }, 93 | { 94 | "scale": "2x", 95 | "size": "76x76", 96 | "idiom": "ipad", 97 | "filename": "Icon152.png" 98 | }, 99 | { 100 | "scale": "2x", 101 | "size": "83.5x83.5", 102 | "idiom": "ipad", 103 | "filename": "Icon167.png" 104 | }, 105 | { 106 | "scale": "1x", 107 | "size": "1024x1024", 108 | "idiom": "ios-marketing", 109 | "filename": "Icon1024.png" 110 | } 111 | ], 112 | "properties": {}, 113 | "info": { 114 | "version": 1, 115 | "author": "xcode" 116 | } 117 | } -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | NethereumExplorer 27 | CFBundleIdentifier 28 | com.companyname.NethereumExplorer.iOS 29 | CFBundleVersion 30 | 1.0 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | CFBundleName 34 | NethereumExplorer 35 | XSAppIconAssets 36 | Assets.xcassets/AppIcon.appiconset 37 | 38 | 39 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Foundation; 5 | using Microsoft.MobileBlazorBindings.WebView.iOS; 6 | using UIKit; 7 | 8 | namespace NethereumExplorer.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | BlazorHybridIOS.Init(); 16 | 17 | // if you want to use a different Application Delegate class from "AppDelegate" 18 | // you can specify it here. 19 | UIApplication.Main(args, null, "AppDelegate"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NethereumExplorer.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NethereumExplorer.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/Default.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.iOS/Resources/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.iOS/Resources/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | An unhandled error has occurred. 17 | Reload 18 | 🗙 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | using Foundation; 3 | 4 | namespace NethereumExplorer.macOS 5 | { 6 | [Register("AppDelegate")] 7 | public class AppDelegate : Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate 8 | { 9 | public AppDelegate() 10 | { 11 | var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled; 12 | var rect = new CoreGraphics.CGRect(200, 1000, 1024, 768); 13 | MainWindow = new NSWindow(rect, style, NSBackingStore.Buffered, false) 14 | { 15 | Title = "Nethereum Explorer", 16 | TitleVisibility = NSWindowTitleVisibility.Visible, 17 | }; 18 | } 19 | 20 | public override NSWindow MainWindow { get; } 21 | 22 | public override void DidFinishLaunching(NSNotification notification) 23 | { 24 | // Menu options to make it easy to press cmd+q to quit the app 25 | NSApplication.SharedApplication.MainMenu = MakeMainMenu(); 26 | 27 | Xamarin.Forms.Forms.Init(); 28 | LoadApplication(new App()); 29 | base.DidFinishLaunching(notification); 30 | } 31 | 32 | public override void WillTerminate(NSNotification notification) 33 | { 34 | // Insert code here to tear down your application 35 | } 36 | 37 | private NSMenu MakeMainMenu() 38 | { 39 | // top bar app menu 40 | var menubar = new NSMenu(); 41 | var appMenuItem = new NSMenuItem(); 42 | menubar.AddItem(appMenuItem); 43 | 44 | var appMenu = new NSMenu(); 45 | appMenuItem.Submenu = appMenu; 46 | 47 | // add separator 48 | var separator = NSMenuItem.SeparatorItem; 49 | appMenu.AddItem(separator); 50 | 51 | // add quit menu item 52 | var quitTitle = string.Format("Quit {0}", "NethereumExplorer.macOS"); 53 | var quitMenuItem = new NSMenuItem(quitTitle, "q", delegate 54 | { 55 | NSApplication.SharedApplication.Terminate(menubar); 56 | }); 57 | appMenu.AddItem(quitMenuItem); 58 | 59 | return menubar; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "filename": "AppIcon-16.png", 5 | "size": "16x16", 6 | "scale": "1x", 7 | "idiom": "mac" 8 | }, 9 | { 10 | "filename": "AppIcon-16@2x.png", 11 | "size": "16x16", 12 | "scale": "2x", 13 | "idiom": "mac" 14 | }, 15 | { 16 | "filename": "AppIcon-32.png", 17 | "size": "32x32", 18 | "scale": "1x", 19 | "idiom": "mac" 20 | }, 21 | { 22 | "filename": "AppIcon-32@2x.png", 23 | "size": "32x32", 24 | "scale": "2x", 25 | "idiom": "mac" 26 | }, 27 | { 28 | "filename": "AppIcon-128.png", 29 | "size": "128x128", 30 | "scale": "1x", 31 | "idiom": "mac" 32 | }, 33 | { 34 | "filename": "AppIcon-128@2x.png", 35 | "size": "128x128", 36 | "scale": "2x", 37 | "idiom": "mac" 38 | }, 39 | { 40 | "filename": "AppIcon-256.png", 41 | "size": "256x256", 42 | "scale": "1x", 43 | "idiom": "mac" 44 | }, 45 | { 46 | "filename": "AppIcon-256@2x.png", 47 | "size": "256x256", 48 | "scale": "2x", 49 | "idiom": "mac" 50 | }, 51 | { 52 | "filename": "AppIcon-512.png", 53 | "size": "512x512", 54 | "scale": "1x", 55 | "idiom": "mac" 56 | }, 57 | { 58 | "filename": "AppIcon-512@2x.png", 59 | "size": "512x512", 60 | "scale": "2x", 61 | "idiom": "mac" 62 | } 63 | ], 64 | "info": { 65 | "version": 1, 66 | "author": "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Info.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | CFBundleName 6 | NethereumExplorer 7 | CFBundleIdentifier 8 | com.companyname.NethereumExplorer.NethereumExplorer 9 | CFBundleShortVersionString 10 | 1.0 11 | CFBundleVersion 12 | 1 13 | LSMinimumSystemVersion 14 | 10.14 15 | CFBundleDevelopmentRegion 16 | en 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | NSHumanReadableCopyright 24 | ${AuthorCopyright:HtmlEncode} 25 | NSPrincipalClass 26 | NSApplication 27 | XSAppIconAssets 28 | Assets.xcassets/AppIcon.appiconset 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Main.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | using Microsoft.MobileBlazorBindings.WebView.macOS; 3 | 4 | namespace NethereumExplorer.macOS 5 | { 6 | internal static class MainClass 7 | { 8 | private static void Main(string[] args) 9 | { 10 | BlazorHybridMacOS.Init(); 11 | NSApplication.Init(); 12 | NSApplication.SharedApplication.Delegate = new AppDelegate(); 13 | NSApplication.Main(args); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Resources/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer.macOS/Resources/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/Resources/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | An unhandled error has occurred. 17 | Reload 18 | 🗙 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/ViewController.cs: -------------------------------------------------------------------------------- 1 | using AppKit; 2 | using Foundation; 3 | using System; 4 | 5 | namespace NethereumExplorer.macOS 6 | { 7 | public partial class ViewController : NSViewController 8 | { 9 | public ViewController(IntPtr handle) : base(handle) 10 | { 11 | } 12 | 13 | public override void ViewDidLoad() 14 | { 15 | base.ViewDidLoad(); 16 | 17 | // Do any additional setup after loading the view. 18 | } 19 | 20 | public override NSObject RepresentedObject 21 | { 22 | get 23 | { 24 | return base.RepresentedObject; 25 | } 26 | set 27 | { 28 | base.RepresentedObject = value; 29 | // Update the view, if already loaded. 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer.macOS/ViewController.designer.cs: -------------------------------------------------------------------------------- 1 | // WARNING 2 | // 3 | // This file has been generated automatically by Xamarin Studio to store outlets and 4 | // actions made in the UI designer. If it is removed, they will be lost. 5 | // Manual changes to this file may not be handled correctly. 6 | // 7 | using Foundation; 8 | 9 | namespace NethereumExplorer.macOS 10 | { 11 | [Register("ViewController")] 12 | partial class ViewController 13 | { 14 | void ReleaseDesignerOutlets() 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/App.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Blazor.FlexGrid; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.FileProviders; 5 | using Microsoft.Extensions.Hosting; 6 | using Microsoft.MobileBlazorBindings; 7 | using NethereumExplorer.Services; 8 | using NethereumExplorer.ViewModels; 9 | using Xamarin.Essentials; 10 | using Xamarin.Forms; 11 | 12 | namespace NethereumExplorer 13 | { 14 | public class App : Application 15 | { 16 | public App(string[] args = null, IFileProvider fileProvider = null) 17 | { 18 | var hostBuilder = MobileBlazorBindingsHost.CreateDefaultBuilder() 19 | .ConfigureServices((hostContext, services) => 20 | { 21 | // Adds web-specific services such as NavigationManager 22 | services.AddBlazorHybrid(); 23 | 24 | // Register app-specific services 25 | //services.AddSingleton(); 26 | 27 | var web3ServiceProvider = new Web3ProviderService(); 28 | var accountsService = new AccountsService(web3ServiceProvider); 29 | var newBlockProcessingService = new NewBlockProcessingService(web3ServiceProvider); 30 | var toastsViewModel = new ToastsViewModel(); 31 | var blocksViewModel = new BlocksViewModel(newBlockProcessingService); 32 | var latestBlockTransactionsViewModel = new LatestBlockTransactionsViewModel(web3ServiceProvider); 33 | var newAccountPrivateKeyViewModel = new NewAccountPrivateKeyViewModel(); 34 | var accountsViewModel = new AccountsViewModel(accountsService, newAccountPrivateKeyViewModel); 35 | var accountsTransactionMonitoringService = new AccountsTransactionMonitoringService(accountsService, web3ServiceProvider); 36 | 37 | services.AddSingleton((x) => web3ServiceProvider); 38 | services.AddSingleton((x) => accountsService); 39 | services.AddSingleton(newBlockProcessingService); 40 | services.AddSingleton(toastsViewModel); 41 | services.AddSingleton(blocksViewModel); 42 | services.AddSingleton(latestBlockTransactionsViewModel); 43 | services.AddTransient(); 44 | services.AddSingleton(accountsViewModel); 45 | services.AddSingleton(newAccountPrivateKeyViewModel); 46 | services.AddSingleton(); 47 | services.AddSingleton(); 48 | services.AddSingleton(accountsTransactionMonitoringService); 49 | services.AddSingleton(); 50 | services.AddSingleton(); 51 | 52 | services.AddFlexGrid(cfg => 53 | { 54 | cfg.ApplyConfiguration(new TransactionsViewModelGridConfiguration()); 55 | }); 56 | }) 57 | .UseWebRoot("wwwroot"); 58 | 59 | if (fileProvider != null) 60 | { 61 | hostBuilder.UseStaticFiles(fileProvider); 62 | } 63 | else 64 | { 65 | hostBuilder.UseStaticFiles(); 66 | } 67 | var host = hostBuilder.Build(); 68 | 69 | MainPage = new ContentPage(); 70 | NavigationPage.SetHasNavigationBar(MainPage, false); 71 | host.AddComponent
(parent: MainPage); 72 | } 73 | 74 | protected override void OnStart() 75 | { 76 | } 77 | 78 | protected override void OnSleep() 79 | { 80 | } 81 | 82 | protected override void OnResume() 83 | { 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/Main.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/NethereumExplorer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.1 5 | true 6 | 3.0 7 | false 8 | true 9 | 10 | 11 | 12 | portable 13 | true 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.MobileBlazorBindings 2 | @using Microsoft.MobileBlazorBindings.Elements 3 | @using Xamarin.Essentials 4 | @using Xamarin.Forms 5 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/images/logo192x192t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/images/logo192x192t.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/images/logo192x192w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/images/logo192x192w.png -------------------------------------------------------------------------------- /OldHybrid/NethereumExplorer/wwwroot/images/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/OldHybrid/NethereumExplorer/wwwroot/images/logo512.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nethereum Explorer 2 | 3 | Nethereum Explorer is a .Net Blazor Wasm SPA, Desktop Windows and Mac, Android and iOS light blockchain explorer and simple wallet Template. 4 | 5 | You can try it here: https://explorer.nethereum.com 6 | 7 | The aim of this application is to provide another wallet / client reference for the final goal of providing a reusable common mvvm front end framework and libraries targetting all Dekstops (WinForms, Xamarin.Forms, Avalonia (https://avaloniaui.net/) for Windows, Mac, Linux), Mobile (Android and iOS using Xamarin.Forms), Browser SPA (Blazor in this example, but there is also [Uno](https://platform.uno/)) and gaming / vr engines (Unity3d). 8 | It started as a Demo of what Blazor could achieve in a complex application (when Blazor started) and was an attempt to use ReactiveUI in the browser. ReactiveUI is now fully supported in the browser thanks to the magic of the ReactiveUI team. 9 | 10 | Now thanks to Maui Blazor (previously preview of the Blazor Mobile Hybrid) your Blazor project can also be rendered and interop with native desktop and mobile. 11 | 12 | ![Nethereum Blazor](Screenshots/browserwasm.png "Nethereum Blazor") 13 | 14 | ![Nethereum Android](Screenshots/android.png "Nethereum Blazor") 15 | 16 | ![Nethereum Windows](Screenshots/windows.png "Nethereum Windows") 17 | 18 | # More info: 19 | * Blazor: The .Net Html / razor wasm framework https://blazor.net/ 20 | * ReactiveUI: https://reactiveui.net/ 21 | * Blazor mobile hybrid: https://docs.microsoft.com/en-us/mobile-blazor-bindings/walkthroughs/hybrid-hello-world 22 | * WebView2 Required to run windows applications: https://docs.microsoft.com/en-gb/microsoft-edge/webview2/gettingstarted/wpf 23 | * Blazor.FlexGrid: The grid component used in Block Page https://github.com/Mewriick/Blazor.FlexGrid 24 | * Infura: Infura hosts the preconfigured public Ethereum nodes https://infura.io/ 25 | * Testchains: If you need a test chain to run in your localhost https://github.com/Nethereum/TestChains 26 | * Etherscan: You may find that the home page is inspired by the awesome https://etherscan.io 27 | 28 | ## Common Solution 29 | One of the main goals is to eventually have full support of ReactiveUI as the common framework for all the Nethereum FrontEnd example and future solutions. 30 | Avalonia Desktop (Windows, Linux, Mac): https://github.com/Nethereum/Nethereum.UI.Desktop, WindowsForms https://github.com/Nethereum/Nethereum.SimpleWindowsWallet 31 | Xamarin.Forms Mobile and Desktop wallets: https://github.com/Nethereum/Nethereum.UI.Wallet.Sample 32 | 33 | 34 | -------------------------------------------------------------------------------- /Screenshots/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/Screenshots/android.png -------------------------------------------------------------------------------- /Screenshots/browserwasm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/Screenshots/browserwasm.png -------------------------------------------------------------------------------- /Screenshots/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor/b55cd43837bbf6dfabf0278cc05d5ad2e2b09026/Screenshots/windows.png -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | --------------------------------------------------------------------------------