### File

`src/app/_services/web3.service.ts`

### Index

###### Properties
Private Static web3
###### Methods
Static getInstance

### Constructor

`constructor()`
Defined in src/app/_services/web3.service.ts:9

### Methods

Static getInstance
`getInstance()`
Defined in src/app/_services/web3.service.ts:13
Returns : `Web3`

### Properties

Private Static web3
Type : `Web3`
Defined in src/app/_services/web3.service.ts:9

    import { Injectable } from '@angular/core';
    import Web3 from 'web3';
    import { environment } from '@src/environments/environment';

    @Injectable({
      providedIn: 'root',
    })
    export class Web3Service {
      private static web3: Web3;

      constructor() {}

      public static getInstance(): Web3 {
        if (!Web3Service.web3) {
          Web3Service.web3 = new Web3(environment.web3Provider);
        }
        return Web3Service.web3;
      }
    }

# result-matching ""

# No results matching ""