You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
+
39
+
steps:
40
+
- name: Checkout repository
41
+
uses: actions/checkout@v3
42
+
43
+
# Initializes the CodeQL tools for scanning.
44
+
- name: Initialize CodeQL
45
+
uses: github/codeql-action/init@v2
46
+
with:
47
+
languages: ${{ matrix.language }}
48
+
# If you wish to specify custom queries, you can do so here or in a config file.
49
+
# By default, queries listed here will override any specified in a config file.
50
+
# Prefix the list here with "+" to use these queries and those in the config file.
51
+
52
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+
# queries: security-extended,security-and-quality
54
+
55
+
56
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
+
# If this step fails, then you should remove it and run the build manually (see below)
58
+
- name: Autobuild
59
+
uses: github/codeql-action/autobuild@v2
60
+
61
+
# ℹ️ Command-line programs to run using the OS shell.
62
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
64
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
65
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-[#139](https://github.com/blockcoders/nestjs-ethers/pull/139) Fix: Function name createWalletFromEncryptedJson by [@GustavoRSSilva](https://github.com/GustavoRSSilva)
7
20
-[#138](https://github.com/blockcoders/nestjs-ethers/pull/138) Fix: README injected variable ethersContract by [@GustavoRSSilva](https://github.com/GustavoRSSilva)
* EthersModule will use the FallbackProvider to send multiple requests simultaneously.
117
132
*/
118
133
useDefaultProvider?:boolean;
134
+
135
+
/**
136
+
* Optional parameter if this option is true, EthersModule will disable
137
+
* the console.log in the ethers.js library.
138
+
*/
139
+
disableEthersLogger?:boolean
119
140
120
141
/**
121
142
* Optional parameter to associate a token name to EthersProvider,
@@ -834,7 +855,7 @@ class ConfigModule {}
834
855
classTestModule {}
835
856
```
836
857
837
-
## Testing a class that uses @InjectEthersProvider
858
+
## Testing a class that uses InjectEthersProvider
838
859
839
860
This package exposes a getEthersToken(token?: string) function that returns a prepared injection token based on the provided context.
840
861
Using this token, you can easily provide a mock implementation of the `BaseProvider` using any of the standard custom provider techniques, including useClass, useValue, and useFactory.
@@ -851,6 +872,40 @@ Using this token, you can easily provide a mock implementation of the `BaseProvi
851
872
}).compile();
852
873
```
853
874
875
+
## Testing a class that uses InjectContractProvider
876
+
877
+
This package exposes a getContractToken(token?: string) function that returns a prepared injection token based on the contract provided context.
878
+
Using this token, you can easily provide a mock implementation of the `ethers.Contract` using any of the standard custom provider techniques, including useClass, useValue, and useFactory.
This package exposes a getSignerToken(token?: string) function that returns a prepared injection token based on the signer provided context.
895
+
Using this token, you can easily provide a mock implementation of the `ethers.Signer` using any of the standard custom provider techniques, including useClass, useValue, and useFactory.
0 commit comments