mirror of
https://github.com/FlipsideCrypto/near-bos-vm.git
synced 2026-02-06 11:18:24 +00:00
Expose ethers.providers
This commit is contained in:
parent
6e29c48f8c
commit
643ecd0b6a
11
CHANGELOG.md
11
CHANGELOG.md
@ -20,6 +20,17 @@
|
||||
```
|
||||
- Expose `Ethers.setChain({chainId})` to be able to switch between EVM networks. Note, the gateway should inject it as part of the `EthersProviderContext`.
|
||||
- Add `config.defaultFinality` to be able to specify `final` instead of `optimistic` (default). It would route the majority of the view calls through the API server.
|
||||
- Expose `ethers.providers`. You will be able to construct a custom JSON provider for read only data. Example usage:
|
||||
|
||||
```jsx
|
||||
const opGoerliProvider = new ethers.providers.JsonRpcProvider(
|
||||
"https://optimism-goerli.blockpi.network/v1/rpc/public"
|
||||
);
|
||||
|
||||
console.log(opGoerliProvider);
|
||||
```
|
||||
|
||||
```jsx
|
||||
|
||||
## 2.2.4
|
||||
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -75,6 +75,7 @@ const frozenEthers = Object.freeze({
|
||||
utils: deepFreeze(ethers.utils),
|
||||
BigNumber: deepFreeze(ethers.BigNumber),
|
||||
Contract: deepFreeze(ethers.Contract),
|
||||
providers: deepFreeze(ethers.providers),
|
||||
});
|
||||
|
||||
// `nanoid.nanoid()` is a but odd, but it seems better to match the official
|
||||
@ -1778,7 +1779,9 @@ export default class VM {
|
||||
this.intervals = new Set();
|
||||
this.websockets = [];
|
||||
this.vmInstances = new Map();
|
||||
this.networkId = widgetConfigs.findLast(config => config && config.networkId)?.networkId || near.config.networkId
|
||||
this.networkId =
|
||||
widgetConfigs.findLast((config) => config && config.networkId)
|
||||
?.networkId || near.config.networkId;
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user