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
{{ message }}
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Methods `modifyProvider` and `modifyFactory` are used to bypass the Ethereum contract address computation that is incompatible with the Thor protocol.
95
+
Methods `modifyProvider` and `modifyFactory` are used to patch the original code of [ethers.js](https://github.com/ethers-io/ethers.js) that is incompatible with the Thor protocol.
89
96
90
97
### Request at a particular block hight
91
-
APIs `eth_getBalance`, `eth_getCode`, `et_getStorageAt` and `eth_call` allow users to specify a particular block height [1]. To do that, we need to provide a `Net` object when creating a provider:
98
+
APIs `eth_getBalance`, `eth_getCode`, `eth_getStorageAt` and `eth_call` allow users to specify a particular block height [1]. To do that, we need to provide a `Net` object when creating a provider:
92
99
```ts
93
100
import { SimpleNet } from'@vechain/connex-driver'
94
101
import*asthorfrom'@vechain/web3-providers-connex'
95
-
importWeb3from'web3'
102
+
import{ Web3 }from'web3'
96
103
import { ethers } from'ethers'
97
104
98
105
const provider =newthor.Provider({
@@ -108,7 +115,7 @@ const web3 = new Web3(
108
115
)
109
116
110
117
const providerEthers =thor.ethers.modifyProvider(
111
-
newethers.providers.Web3Provider(
118
+
newethers.BrowserProvider(
112
119
newthor.Provider({
113
120
connex: connexObj,
114
121
net: netObj
@@ -161,6 +168,7 @@ Returning `0x0`
161
168
Returning `0x0`
162
169
##### `eth_getTransactionReceipt`
163
170
##### `eth_isSyncing`
171
+
##### `eth_requestAccounts`
164
172
##### `eth_sendRawTransaction`
165
173
Requiring passing a `Net` object when constructing an instance of `Provider` or `ProviderWeb3`
0 commit comments