Commit dfcb144a authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6619 from ethereum-optimism/wyatt/web3.js-plugin-fee-estimation

Web3.js Plugin for Fee Estimation
parents 3783ce2f 77866af0
artifacts
cache
typechain
.deps
.envrc
.env
/dist/
module.exports = {
...require('../../.prettierrc.js'),
}
MIT License
Copyright (c) 2023 Optimism
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# @eth-optimism/web3js-plugin
This web3.js plugin adds utility functions for estimating L1 and L2 gas for OP chains by wrapping the [GasPriceOracle](../contracts-bedrock/contracts/l2/GasPriceOracle.sol) contract
The GasPriceOracle is [deployed to Optimism](https://optimistic.etherscan.io/address/0x420000000000000000000000000000000000000F) and other OP chains at a predeployed address of `0x420000000000000000000000000000000000000F`
For more detailed information about gas fees on Optimism's Layer 2, you can visit the [official documentation](https://community.optimism.io/docs/developers/build/transaction-fees/#the-l2-execution-fee)
## Installation
This plugin is intended to be [registered](https://docs.web3js.org/guides/web3_plugin_guide/plugin_users#registering-the-plugin) onto an instance of `Web3`. It has a [peerDependency](https://nodejs.org/es/blog/npm/peer-dependencies) of `web3` version `4.x`, so make sure you have that latest version of `web3` installed for your project before installing the plugin
### Installing the Plugin
```bash
pnpm install @eth-optimism/web3js-plugin
```
```bash
npm install @eth-optimism/web3js-plugin
```
```bash
yarn add @eth-optimism/web3js-plugin
```
### Registering the Plugin
```typescript
import Web3 from 'web3'
import OptimismFeeEstimationPlugin from '@eth-optimism/web3js-plugin'
const web3 = new Web3('http://yourProvider.com')
web3.registerPlugin(new OptimismFeeEstimationPlugin())
```
You will now have access to the following functions under the `op` namespace, i.e. `web3.op.someMethod`
## API
| Function Name | Returns |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [estimateFees](#estimatefees) | The combined estimated L1 and L2 fees for a transaction |
| [getL1Fee](#getl1fee) | The L1 portion of the fee based on the size of the [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/) encoded transaction, the current L1 base fee, and other various dynamic parameters |
| [getL2Fee](#getl2fee) | The L2 portion of the fee based on the simulated execution of the provided transaction and current `gasPrice` |
| [getBaseFee](#getbasefee) | The current L2 base fee |
| [getDecimals](#getdecimals) | The decimals used in the scalar |
| [getGasPrice](#getgasprice) | The current L2 gas price |
| [getL1GasUsed](#getl1gasused) | The amount of L1 gas estimated to be used to execute a transaction |
| [getL1BaseFee](#getdegetl1basefeecimals) | The L1 base fee |
| [getOverhead](#getoverhead) | The current overhead |
| [getScalar](#getscalar) | The current fee scalar |
| [getVersion](#getversion) | The current version of `GasPriceOracle` |
---
### `estimateFees`
Computes the total (L1 + L2) fee estimate to execute a transaction
```typescript
async estimateFees(transaction: Transaction, returnFormat?: ReturnFormat)
```
#### Parameters
- `transaction: Transaction` - An unsigned web3.js [transaction](https://docs.web3js.org/api/web3-types/interface/Transaction) object
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The estimated total fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
import Web3 from 'web3'
import {
l2StandardBridgeABI,
l2StandardBridgeAddress,
} from '@eth-optimism/contracts-ts'
const web3 = new Web3('https://mainnet.optimism.io')
const l2BridgeContract = new web3.eth.Contract(
l2StandardBridgeABI,
optimistAddress[420]
)
const encodedWithdrawMethod = l2BridgeContract.methods
.withdraw(
// l2 token address
'0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000',
// amount
Web3.utils.toWei('0.00000001', 'ether'),
// l1 gas
0,
// extra data
'0x00'
)
.encodeABI()
const totalFee = await web3.op.estimateFees({
chainId: 10,
data: encodedWithdrawMethod,
value: Web3.utils.toWei('0.00000001', 'ether'),
type: 2,
to: '0x420000000000000000000000000000000000000F',
from: '0x6387a88a199120aD52Dd9742C7430847d3cB2CD4',
maxFeePerGas: Web3.utils.toWei('0.2', 'gwei'),
maxPriorityFeePerGas: Web3.utils.toWei('0.1', 'gwei'),
})
console.log(totalFee) // 26608988767659n
```
##### Formatting Response as a Hex String
```typescript
import Web3 from 'web3'
import {
l2StandardBridgeABI,
l2StandardBridgeAddress,
} from '@eth-optimism/contracts-ts'
const web3 = new Web3('https://mainnet.optimism.io')
const l2BridgeContract = new web3.eth.Contract(
l2StandardBridgeABI,
optimistAddress[420]
)
const encodedWithdrawMethod = l2BridgeContract.methods
.withdraw(
// l2 token address
'0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000',
// amount
Web3.utils.toWei('0.00000001', 'ether'),
// l1 gas
0,
// extra data
'0x00'
)
.encodeABI()
const totalFee = await web3.op.estimateFees(
{
chainId: 10,
data: encodedWithdrawMethod,
value: Web3.utils.toWei('0.00000001', 'ether'),
type: 2,
to: '0x420000000000000000000000000000000000000F',
from: '0x6387a88a199120aD52Dd9742C7430847d3cB2CD4',
maxFeePerGas: Web3.utils.toWei('0.2', 'gwei'),
maxPriorityFeePerGas: Web3.utils.toWei('0.1', 'gwei'),
},
{ number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX }
)
console.log(totalFee) // 0x18336352c5ab
```
### `getL1Fee`
Computes the L1 portion of the fee based on the size of the rlp encoded input transaction, the current L1 base fee, and the various dynamic parameters
```typescript
async getL1Fee(transaction: Transaction, returnFormat?: ReturnFormat)
```
#### Parameters
- `transaction: Transaction` - An unsigned web3.js [transaction](https://docs.web3js.org/api/web3-types/interface/Transaction) object
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The estimated L1 fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l1Fee = await web3.op.getL1Fee({
chainId: 10,
data: encodedBurnMethod,
type: 2,
})
console.log(l1Fee) // 18589035222172n
```
##### Formatting Response as a Hex String
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l1Fee = await web3.op.getL1Fee(
{
chainId: 10,
data: encodedBurnMethod,
type: 2,
},
{ number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX }
)
console.log(l1Fee) // 0x10e818d7549c
```
### `getL2Fee`
Retrieves the amount of L2 gas estimated to execute `transaction`
```typescript
async getL2Fee(transaction: Transaction, returnFormat?: ReturnFormat)
```
#### Parameters
- `transaction: Transaction` - An unsigned web3.js [transaction](https://docs.web3js.org/api/web3-types/interface/Transaction) object
- `options?: { blockNumber?: BlockNumberOrTag, returnFormat?: ReturnFormat }` - An optional object with properties:
- `blockNumber?: BlockNumberOrTag` - Specifies what block to use for gas estimation. Can be either:
- **Note** Specifying a block to estimate L2 gas for is currently not working
- A web3.js [Numbers](https://docs.web3js.org/api/web3-types#Numbers)
- A web3.js [BlockTags](https://docs.web3js.org/api/web3-types/enum/BlockTags)
- If not provided, `BlockTags.LATEST` is used
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The estimated total fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l2Fee = await web3.op.getL2Fee({
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
to: optimistAddress[420],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
})
console.log(l2Fee) // 2659500n
```
##### Formatting Response as a Hex String
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l2Fee = await web3.op.getL2Fee(
{
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
to: optimistAddress[420],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
},
{
returnFormat: { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX },
}
)
console.log(l2Fee) // 0x2894ac
```
### `getBaseFee`
Retrieves the current L2 base fee
```typescript
async getBaseFee(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The L2 base fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const baseFee = await web3.op.getBaseFee()
console.log(baseFee) // 68n
```
##### Formatting Response as a Hex String
```typescript
const baseFee = await web3.op.getBaseFee({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(baseFee) // 0x44
```
### `getDecimals`
Retrieves the decimals used in the scalar
```typescript
async getDecimals(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The number of decimals as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const decimals = await web3.op.getDecimals()
console.log(decimals) // 6n
```
##### Formatting Response as a Hex String
```typescript
const decimals = await web3.op.getDecimals({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(decimals) // 0x6
```
### `getGasPrice`
Retrieves the current L2 gas price (base fee)
```typescript
async getGasPrice(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The current L2 gas price as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const gasPrice = await web3.op.getGasPrice()
console.log(gasPrice) // 77n
```
##### Formatting Response as a Hex String
```typescript
const gasPrice = await web3.op.getGasPrice({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(gasPrice) // 0x4d
```
### `getL1GasUsed`
Computes the amount of L1 gas used for {transaction}. Adds the overhead which represents the per-transaction gas overhead of posting the {transaction} and state roots to L1. Adds 68 bytes of padding to account for the fact that the input does not have a signature.
```typescript
async getL1GasUsed(transaction: Transaction, returnFormat?: ReturnFormat)
```
#### Parameters
- `transaction: Transaction` - An unsigned web3.js [transaction](https://docs.web3js.org/api/web3-types/interface/Transaction) object
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The amount of gas as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l1GasUsed = await web3.op.getL1GasUsed({
chainId: 10,
data: encodedBurnMethod,
type: 2,
})
console.log(l1GasUsed) // 1884n
```
##### Formatting Response as a Hex String
```typescript
import { Contract } from 'web3'
import { optimistABI, optimistAddress } from '@eth-optimism/contracts-ts'
const optimistContract = new Contract(optimistABI, optimistAddress[420])
const encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
const l1GasUsed = await web3.op.getL1GasUsed(
{
chainId: 10,
data: encodedBurnMethod,
type: 2,
},
{ number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX }
)
console.log(l1GasUsed) // 0x75c
```
### `getL1BaseFee`
Retrieves the latest known L1 base fee
```typescript
async getL1BaseFee(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The L1 base fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const baseFee = await web3.op.getL1BaseFee()
console.log(baseFee) // 13752544112n
```
##### Formatting Response as a Hex String
```typescript
const baseFee = await web3.op.getL1BaseFee({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(baseFee) // 0x333b72b70
```
### `getOverhead`
Retrieves the current fee overhead
```typescript
async getOverhead(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The current overhead as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const overhead = await web3.op.getOverhead()
console.log(overhead) // 188n
```
##### Formatting Response as a Hex String
```typescript
const overhead = await web3.op.getOverhead({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(overhead) // 0xbc
```
### `getScalar`
Retrieves the current fee scalar
```typescript
async getScalar(returnFormat?: ReturnFormat)
```
#### Parameters
- `returnFormat?: ReturnFormat` - A web3.js [DataFormat](https://docs.web3js.org/api/web3-types#DataFormat) object that specifies how to format number and bytes values
- If `returnFormat` is not provided, [DEFAULT_RETURN_FORMAT](https://docs.web3js.org/api/web3-types#DEFAULT_RETURN_FORMAT) is used which will format numbers to `BigInt`s
#### Returns
- `Promise<Numbers>` - The current scalar fee as a `BigInt` by default, but `returnFormat` determines type
#### Example
```typescript
const scalarFee = await web3.op.getScalar()
console.log(scalarFee) // 684000n
```
##### Formatting Response as a Hex String
```typescript
const scalarFee = await web3.op.getScalar({
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
})
console.log(scalarFee) // 0xa6fe0
```
### `getVersion`
Retrieves the full semver version of GasPriceOracle
```typescript
async getVersion()
```
#### Returns
- `Promise<string>` - The semver version
#### Example
```typescript
const version = await web3.op.getVersion()
console.log(version) // 1.0.0
```
## Known Issues
- As of version `4.0.3` of web3.js, both `input` and `data` parameters are automatically added to a transaction objects causing the gas estimations to be inflated. This was corrected in [this](https://github.com/web3/web3.js/pull/6294) PR, but has yet to be released
- For the plugin function `getL2Fee`, you should be able to get the fee estimates using the state of the blockchain at a specified block, however, this doesn't seem to be working with web3.js and requires further investigation
{
"name": "@eth-optimism/web3.js-plugin",
"version": "0.1.0",
"description": "A Web3.js plugin for doing OP-Chain gas estimation",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git",
"directory": "packages/web3js-plugin"
},
"homepage": "https://optimism.io",
"type": "module",
"exports": {
".": {
"import": "./dist/plugin.js",
"require": "./dist/plugin.cjs",
"default": "./dist/plugin.js",
"types": "./src/plugin.d.ts"
}
},
"types": "dist/plugin.d.ts",
"files": [
"dist/",
"src/"
],
"scripts": {
"build": "tsup",
"lint": "prettier --check .",
"lint:fix": "prettier --write .",
"test": "vitest --coverage",
"test:coverage": "vitest run --coverage",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@eth-optimism/contracts-ts": "workspace:^",
"@swc/core": "^1.3.76",
"@vitest/coverage-istanbul": "^0.34.1",
"tsup": "^7.2.0",
"typescript": "^5.1.6",
"viem": "^1.6.0",
"vite": "^4.4.9",
"vitest": "^0.34.1",
"zod": "^3.22.0"
},
"dependencies": {
"@ethereumjs/rlp": "^5.0.0",
"web3-eth": "^4.0.3",
"web3-eth-accounts": "^4.0.3"
},
"peerDependencies": {
"web3": ">= 4.0.3 < 5.x"
}
}
import { beforeAll, describe, expect, test } from 'vitest'
import { z } from 'zod'
import Web3, { Contract, FMT_BYTES, FMT_NUMBER } from 'web3'
import {
l2StandardBridgeABI,
l2StandardBridgeAddress,
optimistABI,
optimistAddress,
} from '@eth-optimism/contracts-ts'
import { OptimismFeeEstimationPlugin } from './plugin'
const defaultProvider = 'https://mainnet.optimism.io'
const provider = z
.string()
.url()
.default(defaultProvider)
.parse(process.env['VITE_L2_RPC_URL'])
if (provider === defaultProvider)
console.warn(
'Warning: Using default public provider, this could cause tests to fail due to rate limits. Set the VITE_L2_RPC_URL env to override default provider'
)
describe('OptimismFeeEstimationPlugin', () => {
let web3: Web3
beforeAll(() => {
web3 = new Web3(provider)
web3.registerPlugin(new OptimismFeeEstimationPlugin())
})
test('should be registered under .op namespace', () =>
expect(web3.op).toMatchInlineSnapshot(`
OptimismFeeEstimationPlugin {
"_accountProvider": {
"create": [Function],
"decrypt": [Function],
"encrypt": [Function],
"hashMessage": [Function],
"privateKeyToAccount": [Function],
"recover": [Function],
"recoverTransaction": [Function],
"sign": [Function],
"signTransaction": [Function],
"wallet": Wallet [],
},
"_emitter": EventEmitter {
"_events": {},
"_eventsCount": 0,
"_maxListeners": undefined,
Symbol(kCapture): false,
},
"_gasPriceOracleContract": undefined,
"_requestManager": Web3RequestManager {
"_emitter": EventEmitter {
"_events": {
"BEFORE_PROVIDER_CHANGE": [Function],
"PROVIDER_CHANGED": [Function],
},
"_eventsCount": 2,
"_maxListeners": undefined,
Symbol(kCapture): false,
},
"_provider": HttpProvider {
"clientUrl": "https://mainnet.optimism.io",
"httpProviderOptions": undefined,
},
"useRpcCallSpecification": undefined,
},
"_subscriptionManager": Web3SubscriptionManager {
"_subscriptions": Map {},
"registeredSubscriptions": {
"logs": [Function],
"newBlockHeaders": [Function],
"newHeads": [Function],
"newPendingTransactions": [Function],
"pendingTransactions": [Function],
"syncing": [Function],
},
"requestManager": Web3RequestManager {
"_emitter": EventEmitter {
"_events": {
"BEFORE_PROVIDER_CHANGE": [Function],
"PROVIDER_CHANGED": [Function],
},
"_eventsCount": 2,
"_maxListeners": undefined,
Symbol(kCapture): false,
},
"_provider": HttpProvider {
"clientUrl": "https://mainnet.optimism.io",
"httpProviderOptions": undefined,
},
"useRpcCallSpecification": undefined,
},
"tolerateUnlinkedSubscription": false,
},
"_wallet": Wallet [],
"config": {
"blockHeaderTimeout": 10,
"defaultAccount": undefined,
"defaultBlock": "latest",
"defaultChain": "mainnet",
"defaultCommon": undefined,
"defaultHardfork": "london",
"defaultMaxPriorityFeePerGas": "0x9502f900",
"defaultNetworkId": undefined,
"defaultTransactionType": "0x0",
"enableExperimentalFeatures": {
"useRpcCallSpecification": false,
"useSubscriptionWhenCheckingBlockTimeout": false,
},
"handleRevert": false,
"maxListenersWarningThreshold": 100,
"transactionBlockTimeout": 50,
"transactionBuilder": undefined,
"transactionConfirmationBlocks": 24,
"transactionConfirmationPollingInterval": undefined,
"transactionPollingInterval": 1000,
"transactionPollingTimeout": 750000,
"transactionReceiptPollingInterval": undefined,
"transactionSendTimeout": 750000,
"transactionTypeParser": undefined,
},
"pluginNamespace": "op",
"providers": {
"HttpProvider": [Function],
"WebsocketProvider": [Function],
},
}
`))
describe('should return a bigint by default', () => {
test('getBaseFee', async () =>
expect(await web3.op.getBaseFee()).toBeTypeOf('bigint'))
test('getDecimals should return 6n', async () =>
expect(await web3.op.getDecimals()).toBe(BigInt(6)))
test('getGasPrice', async () =>
expect(await web3.op.getGasPrice()).toBeTypeOf('bigint'))
test('getL1BaseFee', async () =>
expect(await web3.op.getL1BaseFee()).toBeTypeOf('bigint'))
test('getOverhead should return 188n', async () =>
expect(await web3.op.getOverhead()).toBe(BigInt(188)))
test('getScalar should return 684000n', async () =>
expect(await web3.op.getScalar()).toBe(BigInt(684000)))
})
describe('should return a number', () => {
const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
test('getBaseFee', async () =>
expect(await web3.op.getBaseFee(numberFormat)).toBeTypeOf('number'))
test('getDecimals should return 6', async () =>
expect(await web3.op.getDecimals(numberFormat)).toBe(6))
test('getGasPrice', async () =>
expect(await web3.op.getGasPrice(numberFormat)).toBeTypeOf('number'))
test('getL1BaseFee', async () =>
expect(await web3.op.getL1BaseFee(numberFormat)).toBeTypeOf('number'))
test('getOverhead should return 188', async () =>
expect(await web3.op.getOverhead(numberFormat)).toBe(188))
test('getScalar should return 684000', async () =>
expect(await web3.op.getScalar(numberFormat)).toBe(684000))
})
test('getVersion should return the string 1.0.0', async () =>
expect(await web3.op.getVersion()).toBe('1.0.0'))
describe('Contract transaction gas estimates - optimistABI.burn', () => {
let optimistContract: Contract<typeof optimistABI>
let encodedBurnMethod: string
beforeAll(() => {
optimistContract = new web3.eth.Contract(optimistABI)
encodedBurnMethod = optimistContract.methods
.burn('0x77194aa25a06f932c10c0f25090f3046af2c85a6')
.encodeABI()
})
describe('should return a bigint by default', () => {
test('getL1Fee', async () => {
expect(
await web3.op.getL1Fee({
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
})
).toBeTypeOf('bigint')
})
test('getL1GasUsed should return 1884n', async () =>
expect(
await web3.op.getL1GasUsed({
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
})
).toBe(BigInt(1884)))
test('estimateFees', async () =>
expect(
await web3.op.estimateFees({
chainId: 10,
data: encodedBurnMethod,
type: 2,
to: optimistAddress[10],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
})
).toBeTypeOf('bigint'))
test('getL2Fee', async () => {
expect(
await web3.op.getL2Fee({
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
to: optimistAddress[10],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
})
).toBeTypeOf('bigint')
})
test('estimateFees', async () =>
expect(
await web3.op.estimateFees(
{
chainId: 10,
data: encodedBurnMethod,
type: 2,
to: optimistAddress[10],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
}
)
).toBeTypeOf('bigint'))
})
describe('should return a hexString', () => {
const hexStringFormat = { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.HEX }
test('getL1Fee', async () => {
expect(
await web3.op.getL1Fee(
{
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
},
hexStringFormat
)
).toBeTypeOf('string')
})
test('getL1GasUsed should return 0x75c', async () =>
expect(
await web3.op.getL1GasUsed(
{
chainId: '0xa',
data: encodedBurnMethod,
type: '0x2',
},
hexStringFormat
)
).toBe('0x75c'))
test('estimateFees', async () =>
expect(
await web3.op.estimateFees(
{
chainId: 10,
data: encodedBurnMethod,
type: 2,
to: optimistAddress[10],
from: '0x77194aa25a06f932c10c0f25090f3046af2c85a6',
},
hexStringFormat
)
).toBeTypeOf('string'))
})
})
describe('Contract transaction gas estimates - l2StandardBridgeABI.withdraw', () => {
let l2BridgeContract: Contract<typeof l2StandardBridgeABI>
let encodedWithdrawMethod: string
beforeAll(() => {
l2BridgeContract = new Contract(
l2StandardBridgeABI,
l2StandardBridgeAddress[420]
)
encodedWithdrawMethod = l2BridgeContract.methods
.withdraw(
// l2 token address
'0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000',
// amount
Web3.utils.toWei('0.00000001', 'ether'),
// l1 gas
0,
// extra data
'0x00'
)
.encodeABI()
})
describe('should return a bigint by default', () => {
test('getL1Fee', async () => {
expect(
await web3.op.getL1Fee({
chainId: '0xa',
data: encodedWithdrawMethod,
type: '0x2',
})
).toBeTypeOf('bigint')
})
test('getL1GasUsed should return 2592n', async () =>
expect(
await web3.op.getL1GasUsed({
chainId: '0xa',
data: encodedWithdrawMethod,
type: '0x2',
})
).toBe(BigInt(2592)))
test('estimateFees', async () =>
expect(
await web3.op.estimateFees({
chainId: 10,
data: encodedWithdrawMethod,
value: Web3.utils.toWei('0.00000001', 'ether'),
type: 2,
to: l2StandardBridgeAddress[420],
from: '0x6387a88a199120aD52Dd9742C7430847d3cB2CD4',
maxFeePerGas: Web3.utils.toWei('0.2', 'gwei'),
maxPriorityFeePerGas: Web3.utils.toWei('0.1', 'gwei'),
})
).toBeTypeOf('bigint'))
})
})
})
import Web3, {
type BlockNumberOrTag,
BlockTags,
Contract,
type DataFormat,
DEFAULT_RETURN_FORMAT,
FMT_BYTES,
FMT_NUMBER,
type Transaction,
Web3PluginBase,
} from 'web3'
import { TransactionFactory, type TxData } from 'web3-eth-accounts'
import { estimateGas, formatTransaction } from 'web3-eth'
import {
gasPriceOracleABI,
gasPriceOracleAddress,
} from '@eth-optimism/contracts-ts'
import { RLP } from '@ethereumjs/rlp'
export class OptimismFeeEstimationPlugin extends Web3PluginBase {
public pluginNamespace = 'op'
private _gasPriceOracleContract:
| Contract<typeof gasPriceOracleABI>
| undefined
/**
* Retrieves the current L2 base fee
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<bigint>} - The L2 base fee as a BigInt by default, but {returnFormat} determines type
* @example
* const baseFeeValue: bigint = await web3.op.getBaseFee();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const baseFeeValue: number = await web3.op.getBaseFee(numberFormat);
*/
public async getBaseFee<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.baseFee().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the decimals used in the scalar
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The number of decimals as a BigInt by default, but {returnFormat} determines type
* @example
* const decimalsValue: bigint = await web3.op.getDecimals();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const decimalsValue: number = await web3.op.getDecimals(numberFormat);
*/
public async getDecimals<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.decimals().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the current L2 gas price (base fee)
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The current L2 gas price as a BigInt by default, but {returnFormat} determines type
* @example
* const gasPriceValue: bigint = await web3.op.getGasPrice();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const gasPriceValue: number = await web3.op.getGasPrice(numberFormat);
*/
public async getGasPrice<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.gasPrice().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Computes the L1 portion of the fee based on the size of the rlp encoded input
* transaction, the current L1 base fee, and the various dynamic parameters
* @param transaction - An unsigned web3.js {Transaction} object
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The fee as a BigInt by default, but {returnFormat} determines type
* @example
* const l1FeeValue: bigint = await getL1Fee(transaction);
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const l1FeeValue: number = await getL1Fee(transaction, numberFormat);
*/
public async getL1Fee<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(transaction: Transaction, returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance()
.methods.getL1Fee(this._serializeTransaction(transaction))
.call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Computes the amount of L1 gas used for {transaction}. Adds the overhead which
* represents the per-transaction gas overhead of posting the {transaction} and state
* roots to L1. Adds 68 bytes of padding to account for the fact that the input does
* not have a signature.
* @param transaction - An unsigned web3.js {Transaction} object
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The amount gas as a BigInt by default, but {returnFormat} determines type
* @example
* const gasUsedValue: bigint = await getL1GasUsed(transaction);
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const gasUsedValue: number = await getL1GasUsed(transaction, numberFormat);
*/
public async getL1GasUsed<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(transaction: Transaction, returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance()
.methods.getL1GasUsed(
this._serializeTransaction(transaction)
)
.call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the latest known L1 base fee
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The L1 base fee as a BigInt by default, but {returnFormat} determines type
* @example
* const baseFeeValue: bigint = await web3.op.getL1BaseFee();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const baseFeeValue: number = await web3.op.getL1BaseFee(numberFormat);
*/
public async getL1BaseFee<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.l1BaseFee().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the current fee overhead
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The current overhead fee as a BigInt by default, but {returnFormat} determines type
* @example
* const overheadValue: bigint = await web3.op.getOverhead();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const overheadValue: number = await web3.op.getOverhead(numberFormat);
*/
public async getOverhead<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.overhead().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the current fee scalar
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The current scalar fee as a BigInt by default, but {returnFormat} determines type
* @example
* const scalarValue: bigint = await web3.op.getScalar();
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const scalarValue: number = await web3.op.getScalar(numberFormat);
*/
public async getScalar<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(returnFormat?: ReturnFormat) {
return Web3.utils.format(
{ format: 'uint' },
await this._getPriceOracleContractInstance().methods.scalar().call(),
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Retrieves the full semver version of GasPriceOracle
* @returns {Promise<string>} - The semver version
* @example
* const version = await web3.op.getVersion();
*/
public async getVersion() {
return this._getPriceOracleContractInstance().methods.version().call()
}
/**
* Retrieves the amount of L2 gas estimated to execute {transaction}
* @param transaction - An unsigned web3.js {Transaction} object
* @param {{ blockNumber: BlockNumberOrTag, returnFormat: DataFormat }} [options={blockNumber: BlockTags.LATEST, returnFormat: DEFAULT_RETURN_FORMAT}] -
* An options object specifying what block to use for gas estimates and the web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The gas estimate as a BigInt by default, but {returnFormat} determines type
* @example
* const l2Fee: bigint = await getL2Fee(transaction);
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const l2Fee: number = await getL2Fee(transaction, numberFormat);
*/
public async getL2Fee<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(
transaction: Transaction,
options?: {
blockNumber?: BlockNumberOrTag | undefined
returnFormat?: ReturnFormat
}
) {
const [gasCost, gasPrice] = await Promise.all([
estimateGas(
this,
transaction,
options?.blockNumber ?? BlockTags.LATEST,
DEFAULT_RETURN_FORMAT
),
this.getGasPrice(),
])
return Web3.utils.format(
{ format: 'uint' },
gasCost * gasPrice,
options?.returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Computes the total (L1 + L2) fee estimate to execute {transaction}
* @param transaction - An unsigned web3.js {Transaction} object
* @param {DataFormat} [returnFormat=DEFAULT_RETURN_FORMAT] - The web3.js format object that specifies how to format number and bytes values
* @returns {Promise<Numbers>} - The estimated total fee as a BigInt by default, but {returnFormat} determines type
* @example
* const estimatedFees: bigint = await estimateFees(transaction);
* @example
* const numberFormat = { number: FMT_NUMBER.NUMBER, bytes: FMT_BYTES.HEX }
* const estimatedFees: number = await estimateFees(transaction, numberFormat);
*/
public async estimateFees<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT
>(
transaction: Transaction,
returnFormat?: ReturnFormat
) {
const [l1Fee, l2Fee] = await Promise.all([
this.getL1Fee(transaction),
this.getL2Fee(transaction),
])
return Web3.utils.format(
{ format: 'uint' },
l1Fee + l2Fee,
returnFormat ?? DEFAULT_RETURN_FORMAT
)
}
/**
* Used to get the web3.js contract instance for gas price oracle contract
* @returns {Contract<typeof gasPriceOracleABI>} - A web.js contract instance with an RPC provider inherited from root {web3} instance
*/
private _getPriceOracleContractInstance() {
if (this._gasPriceOracleContract === undefined) {
this._gasPriceOracleContract = new Contract(
gasPriceOracleABI,
gasPriceOracleAddress[420]
)
// This plugin's Web3Context is overridden with main Web3 instance's context
// when the plugin is registered. This overwrites the Contract instance's context
this._gasPriceOracleContract.link(this)
}
return this._gasPriceOracleContract
}
/**
* Returns the RLP encoded hex string for {transaction}
* @param transaction - A web3.js {Transaction} object
* @returns {string} - The RLP encoded hex string
*/
private _serializeTransaction(transaction: Transaction) {
const ethereumjsTransaction = TransactionFactory.fromTxData(
formatTransaction(transaction, {
number: FMT_NUMBER.HEX,
bytes: FMT_BYTES.HEX,
}) as TxData
)
return Web3.utils.bytesToHex(
Web3.utils.uint8ArrayConcat(
Web3.utils.hexToBytes(
ethereumjsTransaction.type.toString(16).padStart(2, '0')
),
// If <transaction> doesn't include a signature,
// <ethereumjsTransaction.raw()> will autofill v, r, and s
// with empty uint8Array. Because L1 fee calculation
// is dependent on the number of bytes, we are removing
// the zero values bytes
RLP.encode(ethereumjsTransaction.raw().slice(0, -3))
)
)
}
}
// Module Augmentation to add op namespace to root {web3} instance
declare module 'web3' {
interface Web3Context {
op: OptimismFeeEstimationPlugin
}
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./src",
"noEmit": true,
"target": "ESNext",
"lib": ["esnext"],
"module": "esnext",
"moduleResolution": "Node",
"isolatedModules": true,
"allowUnreachableCode": false,
"skipLibCheck": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitOverride": true,
"noImplicitThis": true,
"forceConsistentCasingInFileNames": true,
"verbatimModuleSyntax": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true
},
"include": ["./src"]
}
import { defineConfig } from 'tsup'
import packageJson from './package.json'
// @see https://tsup.egoist.dev/
export default defineConfig({
name: packageJson.name,
entry: ['src/plugin.ts'],
outDir: 'dist',
format: ['esm', 'cjs'],
splitting: false,
sourcemap: true,
clean: false,
dts: true
})
import { defineConfig } from 'vitest/config'
// @see https://vitest.dev/config/
export default defineConfig({
test: {
environment: 'jsdom',
coverage: {
provider: 'istanbul',
},
},
})
...@@ -293,7 +293,7 @@ importers: ...@@ -293,7 +293,7 @@ importers:
version: 18.2.0(react@18.2.0) version: 18.2.0(react@18.2.0)
viem: viem:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.3.1(typescript@5.1.6)(zod@3.21.4) version: 1.3.1(typescript@5.1.6)
wagmi: wagmi:
specifier: '>1.0.0' specifier: '>1.0.0'
version: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(viem@1.3.1) version: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.6)(viem@1.3.1)
...@@ -321,7 +321,7 @@ importers: ...@@ -321,7 +321,7 @@ importers:
version: 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.3.1) version: 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.3.1)
abitype: abitype:
specifier: ^0.9.3 specifier: ^0.9.3
version: 0.9.3(typescript@5.1.6)(zod@3.21.4) version: 0.9.3(typescript@5.1.6)(zod@3.22.0)
glob: glob:
specifier: ^10.3.3 specifier: ^10.3.3
version: 10.3.3 version: 10.3.3
...@@ -415,7 +415,7 @@ importers: ...@@ -415,7 +415,7 @@ importers:
version: 0.34.1(vitest@0.33.0) version: 0.34.1(vitest@0.33.0)
abitype: abitype:
specifier: ^0.9.3 specifier: ^0.9.3
version: 0.9.3(typescript@5.1.6)(zod@3.21.4) version: 0.9.3(typescript@5.1.6)(zod@3.22.0)
isomorphic-fetch: isomorphic-fetch:
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.0 version: 3.0.0
...@@ -433,7 +433,7 @@ importers: ...@@ -433,7 +433,7 @@ importers:
version: 5.1.6 version: 5.1.6
viem: viem:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.3.1(typescript@5.1.6)(zod@3.21.4) version: 1.3.1(typescript@5.1.6)
vite: vite:
specifier: ^4.4.6 specifier: ^4.4.6
version: 4.4.6(@types/node@12.20.20) version: 4.4.6(@types/node@12.20.20)
...@@ -529,6 +529,49 @@ importers: ...@@ -529,6 +529,49 @@ importers:
specifier: ^3.11.6 specifier: ^3.11.6
version: 3.20.2 version: 3.20.2
packages/web3js-plugin:
dependencies:
'@ethereumjs/rlp':
specifier: ^5.0.0
version: 5.0.0
web3:
specifier: '>= 4.0.3 < 5.x'
version: 4.0.3
web3-eth:
specifier: ^4.0.3
version: 4.0.3
web3-eth-accounts:
specifier: ^4.0.3
version: 4.0.3
devDependencies:
'@eth-optimism/contracts-ts':
specifier: workspace:^
version: link:../contracts-ts
'@swc/core':
specifier: ^1.3.76
version: 1.3.76
'@vitest/coverage-istanbul':
specifier: ^0.34.1
version: 0.34.1(vitest@0.34.1)
tsup:
specifier: ^7.2.0
version: 7.2.0(@swc/core@1.3.76)(typescript@5.1.6)
typescript:
specifier: ^5.1.6
version: 5.1.6
viem:
specifier: ^1.6.0
version: 1.6.0(typescript@5.1.6)(zod@3.22.0)
vite:
specifier: ^4.4.9
version: 4.4.9(@types/node@12.20.20)
vitest:
specifier: ^0.34.1
version: 0.34.1
zod:
specifier: ^3.22.0
version: 3.22.0
packages: packages:
/@aashutoshrathi/word-wrap@1.2.6: /@aashutoshrathi/word-wrap@1.2.6:
...@@ -2021,7 +2064,12 @@ packages: ...@@ -2021,7 +2064,12 @@ packages:
resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==}
engines: {node: '>=14'} engines: {node: '>=14'}
hasBin: true hasBin: true
dev: true
/@ethereumjs/rlp@5.0.0:
resolution: {integrity: sha512-WuS1l7GJmB0n0HsXLozCoEFc9IwYgf3l0gCkKVYgR67puVF1O4OpEaN0hWmm1c+iHUHFCKt1hJrvy5toLg+6ag==}
engines: {node: '>=18'}
hasBin: true
dev: false
/@ethereumjs/tx@3.4.0: /@ethereumjs/tx@3.4.0:
resolution: {integrity: sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==} resolution: {integrity: sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==}
...@@ -2630,7 +2678,7 @@ packages: ...@@ -2630,7 +2678,7 @@ packages:
engines: {node: ^14.17.0 || >=16.0.0} engines: {node: ^14.17.0 || >=16.0.0}
dependencies: dependencies:
chalk: 4.1.2 chalk: 4.1.2
execa: 5.0.0 execa: 5.1.1
strong-log-transformer: 2.1.0 strong-log-transformer: 2.1.0
dev: true dev: true
...@@ -3583,7 +3631,7 @@ packages: ...@@ -3583,7 +3631,7 @@ packages:
resolution: {integrity: sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw==} resolution: {integrity: sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw==}
dependencies: dependencies:
'@safe-global/safe-gateway-typescript-sdk': 3.7.3 '@safe-global/safe-gateway-typescript-sdk': 3.7.3
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.6.0(typescript@5.1.6)(zod@3.22.0)
transitivePeerDependencies: transitivePeerDependencies:
- bufferutil - bufferutil
- encoding - encoding
...@@ -3615,7 +3663,6 @@ packages: ...@@ -3615,7 +3663,6 @@ packages:
'@noble/curves': 1.1.0 '@noble/curves': 1.1.0
'@noble/hashes': 1.3.1 '@noble/hashes': 1.3.1
'@scure/base': 1.1.1 '@scure/base': 1.1.1
dev: true
/@scure/bip39@1.2.0: /@scure/bip39@1.2.0:
resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==}
...@@ -3628,7 +3675,6 @@ packages: ...@@ -3628,7 +3675,6 @@ packages:
dependencies: dependencies:
'@noble/hashes': 1.3.1 '@noble/hashes': 1.3.1
'@scure/base': 1.1.1 '@scure/base': 1.1.1
dev: true
/@sentry/core@5.30.0: /@sentry/core@5.30.0:
resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==}
...@@ -3942,6 +3988,118 @@ packages: ...@@ -3942,6 +3988,118 @@ packages:
'@stablelib/random': 1.0.2 '@stablelib/random': 1.0.2
'@stablelib/wipe': 1.0.1 '@stablelib/wipe': 1.0.1
/@swc/core-darwin-arm64@1.3.76:
resolution: {integrity: sha512-ovviEhZ/1E81Z9OGrO0ivLWk4VCa3I3ZzM+cd3gugglRRwVwtlIaoIYqY5S3KiCAupDd1+UCl5X7Vbio7a/V8g==}
engines: {node: '>=10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-darwin-x64@1.3.76:
resolution: {integrity: sha512-tcySTDqs0SHCebtW35sCdcLWsmTEo7bEwx0gNL/spetqVT9fpFi6qU8qcnt7i2KaZHbeNl9g1aadu+Yrni+GzA==}
engines: {node: '>=10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm-gnueabihf@1.3.76:
resolution: {integrity: sha512-apgzpGWy1AwoMF4urAAASsAjE7rEzZFIF+p6utuxhS7cNHzE0AyEVDYJbo+pzBdlZ8orBdzzsHtFwoEgKOjebA==}
engines: {node: '>=10'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-gnu@1.3.76:
resolution: {integrity: sha512-c3c0zz6S0eludqidDpuqbadE0WT3OZczyQxe9Vw8lFFXES85mvNGtwYzyGK2o7TICpsuHrndwDIoYpmpWk879g==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-musl@1.3.76:
resolution: {integrity: sha512-Is3bpq7F2qtlnkzEeOD6HIZJPpOmu3q6c82lKww90Q0NnrlSluVMozTHJgwVoFZyizH7uLnk0LuNcEAWLnmJIw==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-gnu@1.3.76:
resolution: {integrity: sha512-iwCeRzd9oSvUzqt7nU6p/ztceAWfnO9XVxBn502R5gs6QCBbE1HCKrWHDO77aKPK7ss+0NcIGHvXTd9L8/wRzw==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-musl@1.3.76:
resolution: {integrity: sha512-a671g4tW8kyFeuICsgq4uB9ukQfiIyXJT4V6YSnmqhCTz5mazWuDxZ5wKnx/1g5nXTl+U5cWH2TZaCJatp4GKA==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-arm64-msvc@1.3.76:
resolution: {integrity: sha512-+swEFtjdMezS0vKUhJC3psdSDtOJGY5pEOt4e8XOPvn7aQpKQ9LfF49XVtIwDSk5SGuWtVoLFzkSY3reWUJCyg==}
engines: {node: '>=10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-ia32-msvc@1.3.76:
resolution: {integrity: sha512-5CqwAykpGBJ3PqGLOlWGLGIPpBAG1IwWVDUfro3hhjQ7XJxV5Z1aQf5V5OJ90HJVtrEAVx2xx59UV/Dh081LOg==}
engines: {node: '>=10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-x64-msvc@1.3.76:
resolution: {integrity: sha512-CiMpWLLlR3Cew9067E7XxaLBwYYJ90r9EhGSO6V1pvYSWj7ET/Ppmtj1ZhzPJMqRXAP6xflfl5R5o4ee1m4WLA==}
engines: {node: '>=10'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core@1.3.76:
resolution: {integrity: sha512-aYYTA2aVYkwJAZepQXtPnkUthhOfn8qd6rsh+lrJxonFrjmpI7RHt2tMDVTXP6XDX7fvnvrVtT1bwZfmBFPh0Q==}
engines: {node: '>=10'}
requiresBuild: true
peerDependencies:
'@swc/helpers': ^0.5.0
peerDependenciesMeta:
'@swc/helpers':
optional: true
optionalDependencies:
'@swc/core-darwin-arm64': 1.3.76
'@swc/core-darwin-x64': 1.3.76
'@swc/core-linux-arm-gnueabihf': 1.3.76
'@swc/core-linux-arm64-gnu': 1.3.76
'@swc/core-linux-arm64-musl': 1.3.76
'@swc/core-linux-x64-gnu': 1.3.76
'@swc/core-linux-x64-musl': 1.3.76
'@swc/core-win32-arm64-msvc': 1.3.76
'@swc/core-win32-ia32-msvc': 1.3.76
'@swc/core-win32-x64-msvc': 1.3.76
dev: true
/@tanstack/query-core@4.29.25: /@tanstack/query-core@4.29.25:
resolution: {integrity: sha512-DI4y4VC6Uw4wlTpOocEXDky69xeOScME1ezLKsj+hOk7DguC9fkqXtp6Hn39BVb9y0b5IBrY67q6kIX623Zj4Q==} resolution: {integrity: sha512-DI4y4VC6Uw4wlTpOocEXDky69xeOScME1ezLKsj+hOk7DguC9fkqXtp6Hn39BVb9y0b5IBrY67q6kIX623Zj4Q==}
...@@ -4521,6 +4679,18 @@ packages: ...@@ -4521,6 +4679,18 @@ packages:
dependencies: dependencies:
'@types/node': 20.5.0 '@types/node': 20.5.0
/@types/ws@8.5.3:
resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==}
dependencies:
'@types/node': 20.5.0
dev: false
/@types/ws@8.5.5:
resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==}
dependencies:
'@types/node': 20.5.0
dev: true
/@types/yargs-parser@21.0.0: /@types/yargs-parser@21.0.0:
resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==}
dev: true dev: true
...@@ -4812,6 +4982,22 @@ packages: ...@@ -4812,6 +4982,22 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@vitest/coverage-istanbul@0.34.1(vitest@0.34.1):
resolution: {integrity: sha512-5GprlyY2t1g6+RrssWcN/w5RnZV3qIOM0eoaSDJw3jXbHpBpMvAfTg791zXo7PIqNYs5ORUqBWXIIU0gyAfZxA==}
peerDependencies:
vitest: '>=0.32.0 <1'
dependencies:
istanbul-lib-coverage: 3.2.0
istanbul-lib-instrument: 6.0.0
istanbul-lib-report: 3.0.1
istanbul-lib-source-maps: 4.0.1
istanbul-reports: 3.1.5
test-exclude: 6.0.0
vitest: 0.34.1
transitivePeerDependencies:
- supports-color
dev: true
/@vitest/expect@0.28.3: /@vitest/expect@0.28.3:
resolution: {integrity: sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==} resolution: {integrity: sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==}
dependencies: dependencies:
...@@ -4828,6 +5014,14 @@ packages: ...@@ -4828,6 +5014,14 @@ packages:
chai: 4.3.7 chai: 4.3.7
dev: true dev: true
/@vitest/expect@0.34.1:
resolution: {integrity: sha512-q2CD8+XIsQ+tHwypnoCk8Mnv5e6afLFvinVGCq3/BOT4kQdVQmY6rRfyKkwcg635lbliLPqbunXZr+L1ssUWiQ==}
dependencies:
'@vitest/spy': 0.34.1
'@vitest/utils': 0.34.1
chai: 4.3.7
dev: true
/@vitest/runner@0.28.3: /@vitest/runner@0.28.3:
resolution: {integrity: sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==} resolution: {integrity: sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==}
dependencies: dependencies:
...@@ -4844,6 +5038,14 @@ packages: ...@@ -4844,6 +5038,14 @@ packages:
pathe: 1.1.1 pathe: 1.1.1
dev: true dev: true
/@vitest/runner@0.34.1:
resolution: {integrity: sha512-YfQMpYzDsYB7yqgmlxZ06NI4LurHWfrH7Wy3Pvf/z/vwUSgq1zLAb1lWcItCzQG+NVox+VvzlKQrYEXb47645g==}
dependencies:
'@vitest/utils': 0.34.1
p-limit: 4.0.0
pathe: 1.1.1
dev: true
/@vitest/snapshot@0.33.0: /@vitest/snapshot@0.33.0:
resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==} resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==}
dependencies: dependencies:
...@@ -4852,6 +5054,14 @@ packages: ...@@ -4852,6 +5054,14 @@ packages:
pretty-format: 29.6.1 pretty-format: 29.6.1
dev: true dev: true
/@vitest/snapshot@0.34.1:
resolution: {integrity: sha512-0O9LfLU0114OqdF8lENlrLsnn024Tb1CsS9UwG0YMWY2oGTQfPtkW+B/7ieyv0X9R2Oijhi3caB1xgGgEgclSQ==}
dependencies:
magic-string: 0.30.1
pathe: 1.1.1
pretty-format: 29.6.1
dev: true
/@vitest/spy@0.28.3: /@vitest/spy@0.28.3:
resolution: {integrity: sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==} resolution: {integrity: sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==}
dependencies: dependencies:
...@@ -4864,6 +5074,12 @@ packages: ...@@ -4864,6 +5074,12 @@ packages:
tinyspy: 2.1.1 tinyspy: 2.1.1
dev: true dev: true
/@vitest/spy@0.34.1:
resolution: {integrity: sha512-UT4WcI3EAPUNO8n6y9QoEqynGGEPmmRxC+cLzneFFXpmacivjHZsNbiKD88KUScv5DCHVDgdBsLD7O7s1enFcQ==}
dependencies:
tinyspy: 2.1.1
dev: true
/@vitest/utils@0.28.3: /@vitest/utils@0.28.3:
resolution: {integrity: sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==} resolution: {integrity: sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==}
dependencies: dependencies:
...@@ -4882,6 +5098,14 @@ packages: ...@@ -4882,6 +5098,14 @@ packages:
pretty-format: 29.6.1 pretty-format: 29.6.1
dev: true dev: true
/@vitest/utils@0.34.1:
resolution: {integrity: sha512-/ql9dsFi4iuEbiNcjNHQWXBum7aL8pyhxvfnD9gNtbjR9fUKAjxhj4AA3yfLXg6gJpMGGecvtF8Au2G9y3q47Q==}
dependencies:
diff-sequences: 29.4.3
loupe: 2.3.6
pretty-format: 29.6.1
dev: true
/@vue/compiler-core@3.2.36: /@vue/compiler-core@3.2.36:
resolution: {integrity: sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==} resolution: {integrity: sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==}
dependencies: dependencies:
...@@ -5046,7 +5270,7 @@ packages: ...@@ -5046,7 +5270,7 @@ packages:
abitype: 0.8.1(typescript@5.1.6) abitype: 0.8.1(typescript@5.1.6)
eventemitter3: 4.0.7 eventemitter3: 4.0.7
typescript: 5.1.6 typescript: 5.1.6
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.3.1(typescript@5.1.6)
transitivePeerDependencies: transitivePeerDependencies:
- '@react-native-async-storage/async-storage' - '@react-native-async-storage/async-storage'
- bufferutil - bufferutil
...@@ -5082,7 +5306,7 @@ packages: ...@@ -5082,7 +5306,7 @@ packages:
abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4) abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4)
eventemitter3: 4.0.7 eventemitter3: 4.0.7
typescript: 5.1.6 typescript: 5.1.6
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.3.1(typescript@5.1.6)
transitivePeerDependencies: transitivePeerDependencies:
- '@react-native-async-storage/async-storage' - '@react-native-async-storage/async-storage'
- bufferutil - bufferutil
...@@ -5108,7 +5332,7 @@ packages: ...@@ -5108,7 +5332,7 @@ packages:
abitype: 0.8.1(typescript@5.1.6) abitype: 0.8.1(typescript@5.1.6)
eventemitter3: 4.0.7 eventemitter3: 4.0.7
typescript: 5.1.6 typescript: 5.1.6
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.3.1(typescript@5.1.6)
zustand: 4.3.9(react@18.2.0) zustand: 4.3.9(react@18.2.0)
transitivePeerDependencies: transitivePeerDependencies:
- '@react-native-async-storage/async-storage' - '@react-native-async-storage/async-storage'
...@@ -5136,7 +5360,7 @@ packages: ...@@ -5136,7 +5360,7 @@ packages:
abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4) abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4)
eventemitter3: 4.0.7 eventemitter3: 4.0.7
typescript: 5.1.6 typescript: 5.1.6
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.3.1(typescript@5.1.6)
zustand: 4.3.9(react@18.2.0) zustand: 4.3.9(react@18.2.0)
transitivePeerDependencies: transitivePeerDependencies:
- '@react-native-async-storage/async-storage' - '@react-native-async-storage/async-storage'
...@@ -5753,6 +5977,21 @@ packages: ...@@ -5753,6 +5977,21 @@ packages:
dependencies: dependencies:
typescript: 5.1.6 typescript: 5.1.6
zod: 3.21.4 zod: 3.21.4
dev: true
/abitype@0.9.3(typescript@5.1.6)(zod@3.22.0):
resolution: {integrity: sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w==}
peerDependencies:
typescript: '>=5.0.4'
zod: ^3 >=3.19.1
peerDependenciesMeta:
typescript:
optional: true
zod:
optional: true
dependencies:
typescript: 5.1.6
zod: 3.22.0
/abort-controller@3.0.0: /abort-controller@3.0.0:
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
...@@ -7312,6 +7551,12 @@ packages: ...@@ -7312,6 +7551,12 @@ packages:
printj: 1.1.2 printj: 1.1.2
dev: true dev: true
/crc-32@1.2.2:
resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==}
engines: {node: '>=0.8'}
hasBin: true
dev: false
/create-hash@1.2.0: /create-hash@1.2.0:
resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==}
dependencies: dependencies:
...@@ -8944,7 +9189,6 @@ packages: ...@@ -8944,7 +9189,6 @@ packages:
'@noble/hashes': 1.3.1 '@noble/hashes': 1.3.1
'@scure/bip32': 1.3.1 '@scure/bip32': 1.3.1
'@scure/bip39': 1.2.1 '@scure/bip39': 1.2.1
dev: true
/ethereum-waffle@4.0.10(@ensdomains/ens@0.4.5)(@ensdomains/resolver@0.2.4)(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.1)(typescript@5.1.6): /ethereum-waffle@4.0.10(@ensdomains/ens@0.4.5)(@ensdomains/resolver@0.2.4)(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.1)(typescript@5.1.6):
resolution: {integrity: sha512-iw9z1otq7qNkGDNcMoeNeLIATF9yKl1M8AIeu42ElfNBplq0e+5PeasQmm8ybY/elkZ1XyRO0JBQxQdVRb8bqQ==} resolution: {integrity: sha512-iw9z1otq7qNkGDNcMoeNeLIATF9yKl1M8AIeu42ElfNBplq0e+5PeasQmm8ybY/elkZ1XyRO0JBQxQdVRb8bqQ==}
...@@ -9781,6 +10025,18 @@ packages: ...@@ -9781,6 +10025,18 @@ packages:
wide-align: 1.1.5 wide-align: 1.1.5
dev: true dev: true
/generate-function@2.3.1:
resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==}
dependencies:
is-property: 1.0.2
dev: false
/generate-object-property@1.2.0:
resolution: {integrity: sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ==}
dependencies:
is-property: 1.0.2
dev: false
/gensync@1.0.0-beta.2: /gensync@1.0.0-beta.2:
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
...@@ -10816,6 +11072,20 @@ packages: ...@@ -10816,6 +11072,20 @@ packages:
resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==}
dev: false dev: false
/is-my-ip-valid@1.0.1:
resolution: {integrity: sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==}
dev: false
/is-my-json-valid@2.20.6:
resolution: {integrity: sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==}
dependencies:
generate-function: 2.3.1
generate-object-property: 1.2.0
is-my-ip-valid: 1.0.1
jsonpointer: 5.0.1
xtend: 4.0.2
dev: false
/is-negative-zero@2.0.2: /is-negative-zero@2.0.2:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
...@@ -10875,6 +11145,10 @@ packages: ...@@ -10875,6 +11145,10 @@ packages:
resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==}
dev: true dev: true
/is-property@1.0.2:
resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==}
dev: false
/is-regex@1.1.4: /is-regex@1.1.4:
resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
...@@ -11045,6 +11319,14 @@ packages: ...@@ -11045,6 +11319,14 @@ packages:
dependencies: dependencies:
ws: 8.12.0 ws: 8.12.0
/isomorphic-ws@5.0.0(ws@8.13.0):
resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==}
peerDependencies:
ws: '*'
dependencies:
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
dev: false
/isstream@0.1.2: /isstream@0.1.2:
resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
...@@ -11081,8 +11363,8 @@ packages: ...@@ -11081,8 +11363,8 @@ packages:
resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==} resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==}
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
'@babel/core': 7.22.9 '@babel/core': 7.22.10
'@babel/parser': 7.22.7 '@babel/parser': 7.22.10
'@istanbuljs/schema': 0.1.3 '@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.0 istanbul-lib-coverage: 3.2.0
semver: 7.5.4 semver: 7.5.4
...@@ -11422,6 +11704,11 @@ packages: ...@@ -11422,6 +11704,11 @@ packages:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0} engines: {'0': node >= 0.2.0}
/jsonpointer@5.0.1:
resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==}
engines: {node: '>=0.10.0'}
dev: false
/jsprim@1.4.1: /jsprim@1.4.1:
resolution: {integrity: sha512-4Dj8Rf+fQ+/Pn7C5qeEX02op1WfOss3PKTE9Nsop3Dx+6UPxlm1dr/og7o2cRa5hNN07CACr4NFzRLtj/rjWog==} resolution: {integrity: sha512-4Dj8Rf+fQ+/Pn7C5qeEX02op1WfOss3PKTE9Nsop3Dx+6UPxlm1dr/og7o2cRa5hNN07CACr4NFzRLtj/rjWog==}
engines: {'0': node >=0.6.0} engines: {'0': node >=0.6.0}
...@@ -15204,6 +15491,14 @@ packages: ...@@ -15204,6 +15491,14 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
/rollup@3.28.0:
resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
fsevents: 2.3.2
dev: true
/rpc-websockets@7.5.1: /rpc-websockets@7.5.1:
resolution: {integrity: sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==} resolution: {integrity: sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==}
dependencies: dependencies:
...@@ -15441,7 +15736,6 @@ packages: ...@@ -15441,7 +15736,6 @@ packages:
/setimmediate@1.0.5: /setimmediate@1.0.5:
resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}
dev: true
/setprototypeof@1.1.1: /setprototypeof@1.1.1:
resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==}
...@@ -16207,7 +16501,7 @@ packages: ...@@ -16207,7 +16501,7 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
del: 6.1.1 del: 6.1.1
is-stream: 2.0.0 is-stream: 2.0.1
temp-dir: 2.0.0 temp-dir: 2.0.0
type-fest: 0.16.0 type-fest: 0.16.0
unique-string: 2.0.0 unique-string: 2.0.0
...@@ -16308,6 +16602,11 @@ packages: ...@@ -16308,6 +16602,11 @@ packages:
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
dev: true dev: true
/tinypool@0.7.0:
resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==}
engines: {node: '>=14.0.0'}
dev: true
/tinyspy@1.0.2: /tinyspy@1.0.2:
resolution: {integrity: sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==} resolution: {integrity: sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
...@@ -16596,6 +16895,43 @@ packages: ...@@ -16596,6 +16895,43 @@ packages:
- ts-node - ts-node
dev: true dev: true
/tsup@7.2.0(@swc/core@1.3.76)(typescript@5.1.6):
resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==}
engines: {node: '>=16.14'}
hasBin: true
peerDependencies:
'@swc/core': ^1
postcss: ^8.4.12
typescript: '>=4.1.0'
peerDependenciesMeta:
'@swc/core':
optional: true
postcss:
optional: true
typescript:
optional: true
dependencies:
'@swc/core': 1.3.76
bundle-require: 4.0.1(esbuild@0.18.15)
cac: 6.7.14
chokidar: 3.5.3
debug: 4.3.4(supports-color@8.1.1)
esbuild: 0.18.15
execa: 5.1.1
globby: 11.1.0
joycon: 3.1.1
postcss-load-config: 4.0.1
resolve-from: 5.0.0
rollup: 3.26.3
source-map: 0.8.0-beta.0
sucrase: 3.34.0
tree-kill: 1.2.2
typescript: 5.1.6
transitivePeerDependencies:
- supports-color
- ts-node
dev: true
/tsutils@3.21.0(typescript@5.1.6): /tsutils@3.21.0(typescript@5.1.6):
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'} engines: {node: '>= 6'}
...@@ -17158,7 +17494,7 @@ packages: ...@@ -17158,7 +17494,7 @@ packages:
- zod - zod
dev: true dev: true
/viem@1.3.1(typescript@5.1.6)(zod@3.21.4): /viem@1.3.1(typescript@5.1.6):
resolution: {integrity: sha512-Yv+y3/exrrEN4EAkVUtUuQxsjF4+3taHY2aSinJnNWtcA4fBZ+WfPJBTywcnFIa/Q5oDcQN85yqPFBbkXqWHdw==} resolution: {integrity: sha512-Yv+y3/exrrEN4EAkVUtUuQxsjF4+3taHY2aSinJnNWtcA4fBZ+WfPJBTywcnFIa/Q5oDcQN85yqPFBbkXqWHdw==}
peerDependencies: peerDependencies:
typescript: '>=5.0.4' typescript: '>=5.0.4'
...@@ -17172,7 +17508,7 @@ packages: ...@@ -17172,7 +17508,7 @@ packages:
'@scure/bip32': 1.3.0 '@scure/bip32': 1.3.0
'@scure/bip39': 1.2.0 '@scure/bip39': 1.2.0
'@wagmi/chains': 1.6.0(typescript@5.1.6) '@wagmi/chains': 1.6.0(typescript@5.1.6)
abitype: 0.9.3(typescript@5.1.6)(zod@3.21.4) abitype: 0.9.3(typescript@5.1.6)(zod@3.22.0)
isomorphic-ws: 5.0.0(ws@8.12.0) isomorphic-ws: 5.0.0(ws@8.12.0)
typescript: 5.1.6 typescript: 5.1.6
ws: 8.12.0 ws: 8.12.0
...@@ -17181,10 +17517,59 @@ packages: ...@@ -17181,10 +17517,59 @@ packages:
- utf-8-validate - utf-8-validate
- zod - zod
/vite-node@0.28.3(@types/node@20.5.0): /viem@1.3.1(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==} resolution: {integrity: sha512-Yv+y3/exrrEN4EAkVUtUuQxsjF4+3taHY2aSinJnNWtcA4fBZ+WfPJBTywcnFIa/Q5oDcQN85yqPFBbkXqWHdw==}
engines: {node: '>=v14.16.0'} peerDependencies:
hasBin: true typescript: '>=5.0.4'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@adraffy/ens-normalize': 1.9.0
'@noble/curves': 1.0.0
'@noble/hashes': 1.3.0
'@scure/bip32': 1.3.0
'@scure/bip39': 1.2.0
'@wagmi/chains': 1.6.0(typescript@5.1.6)
abitype: 0.9.3(typescript@5.1.6)(zod@3.21.4)
isomorphic-ws: 5.0.0(ws@8.12.0)
typescript: 5.1.6
ws: 8.12.0
transitivePeerDependencies:
- bufferutil
- utf-8-validate
- zod
dev: true
/viem@1.6.0(typescript@5.1.6)(zod@3.22.0):
resolution: {integrity: sha512-ae9Twkd0q2Qlj4yYpWjb4DzYAhKY0ibEpRH8FJaTywZXNpTjFidSdBaT0CVn1BaH7O7cnX4/O47zvDUMGJD1AA==}
peerDependencies:
typescript: '>=5.0.4'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@adraffy/ens-normalize': 1.9.0
'@noble/curves': 1.1.0
'@noble/hashes': 1.3.0
'@scure/bip32': 1.3.0
'@scure/bip39': 1.2.0
'@types/ws': 8.5.5
'@wagmi/chains': 1.6.0(typescript@5.1.6)
abitype: 0.9.3(typescript@5.1.6)(zod@3.22.0)
isomorphic-ws: 5.0.0(ws@8.12.0)
typescript: 5.1.6
ws: 8.12.0
transitivePeerDependencies:
- bufferutil
- utf-8-validate
- zod
dev: true
/vite-node@0.28.3(@types/node@20.5.0):
resolution: {integrity: sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==}
engines: {node: '>=v14.16.0'}
hasBin: true
dependencies: dependencies:
cac: 6.7.14 cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
...@@ -17193,7 +17578,7 @@ packages: ...@@ -17193,7 +17578,7 @@ packages:
picocolors: 1.0.0 picocolors: 1.0.0
source-map: 0.6.1 source-map: 0.6.1
source-map-support: 0.5.21 source-map-support: 0.5.21
vite: 4.4.6(@types/node@20.5.0) vite: 4.4.9(@types/node@20.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node' - '@types/node'
- less - less
...@@ -17215,7 +17600,29 @@ packages: ...@@ -17215,7 +17600,29 @@ packages:
mlly: 1.4.0 mlly: 1.4.0
pathe: 1.1.1 pathe: 1.1.1
picocolors: 1.0.0 picocolors: 1.0.0
vite: 4.4.6(@types/node@20.5.0) vite: 4.4.9(@types/node@20.5.0)
transitivePeerDependencies:
- '@types/node'
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vite-node@0.34.1(@types/node@20.5.0):
resolution: {integrity: sha512-odAZAL9xFMuAg8aWd7nSPT+hU8u2r9gU3LRm9QKjxBEF2rRdWpMuqkrkjvyVQEdNFiBctqr2Gg4uJYizm5Le6w==}
engines: {node: '>=v14.18.0'}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.4.9(@types/node@20.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node' - '@types/node'
- less - less
...@@ -17299,6 +17706,78 @@ packages: ...@@ -17299,6 +17706,78 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
/vite@4.4.9(@types/node@12.20.20):
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
'@types/node': '>= 14'
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
'@types/node': 12.20.20
esbuild: 0.18.15
postcss: 8.4.27
rollup: 3.28.0
optionalDependencies:
fsevents: 2.3.2
dev: true
/vite@4.4.9(@types/node@20.5.0):
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
'@types/node': '>= 14'
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
'@types/node': 20.5.0
esbuild: 0.18.15
postcss: 8.4.27
rollup: 3.28.0
optionalDependencies:
fsevents: 2.3.2
dev: true
/vitest@0.28.3: /vitest@0.28.3:
resolution: {integrity: sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==} resolution: {integrity: sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==}
engines: {node: '>=v14.16.0'} engines: {node: '>=v14.16.0'}
...@@ -17421,6 +17900,71 @@ packages: ...@@ -17421,6 +17900,71 @@ packages:
- terser - terser
dev: true dev: true
/vitest@0.34.1:
resolution: {integrity: sha512-G1PzuBEq9A75XSU88yO5G4vPT20UovbC/2osB2KEuV/FisSIIsw7m5y2xMdB7RsAGHAfg2lPmp2qKr3KWliVlQ==}
engines: {node: '>=v14.18.0'}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies:
'@types/chai': 4.3.5
'@types/chai-subset': 1.3.3
'@types/node': 20.5.0
'@vitest/expect': 0.34.1
'@vitest/runner': 0.34.1
'@vitest/snapshot': 0.34.1
'@vitest/spy': 0.34.1
'@vitest/utils': 0.34.1
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.7
debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3
magic-string: 0.30.1
pathe: 1.1.1
picocolors: 1.0.0
std-env: 3.3.3
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.4.9(@types/node@20.5.0)
vite-node: 0.34.1(@types/node@20.5.0)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vscode-oniguruma@1.6.2: /vscode-oniguruma@1.6.2:
resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==}
dev: true dev: true
...@@ -17454,7 +17998,7 @@ packages: ...@@ -17454,7 +17998,7 @@ packages:
react: 18.2.0 react: 18.2.0
typescript: 5.1.6 typescript: 5.1.6
use-sync-external-store: 1.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0)
viem: 1.3.1(typescript@5.1.6)(zod@3.21.4) viem: 1.3.1(typescript@5.1.6)
transitivePeerDependencies: transitivePeerDependencies:
- '@react-native-async-storage/async-storage' - '@react-native-async-storage/async-storage'
- bufferutil - bufferutil
...@@ -17482,6 +18026,243 @@ packages: ...@@ -17482,6 +18026,243 @@ packages:
engines: {node: '>= 8'} engines: {node: '>= 8'}
dev: true dev: true
/web3-core@4.1.0:
resolution: {integrity: sha512-fVGmPInWNlT/lGj1aKDmmSDIqYO5iwVlZ3NdD4q/u/i9j8/o7a8S0jz8Js8oS/fqoBqF25WSJ8il2KKdSDGzXw==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-errors: 1.1.0
web3-eth-iban: 4.0.4
web3-providers-http: 4.0.4
web3-providers-ws: 4.0.4
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
optionalDependencies:
web3-providers-ipc: 4.0.4
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-errors@1.1.0:
resolution: {integrity: sha512-XKkq4uLp/I75qid+/eXjc/veZywmcmsYy1yNZHePIS2riBcqTGKrdKiplyNCoVwY9OGWlKv9NpxZBd32k8a9mg==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-types: 1.1.0
dev: false
/web3-eth-abi@4.1.0:
resolution: {integrity: sha512-qd+zCGKi2YsL2KkbM5M8Qztles/WPOvFpw6Lg3a904DRIVxkIvWdQfoK0JbA6Vbt8DSVKCc4rpZ15D6I/wfBKQ==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
'@ethersproject/abi': 5.7.0
'@ethersproject/bignumber': 5.7.0
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
dev: false
/web3-eth-accounts@4.0.3:
resolution: {integrity: sha512-qS4r25weJYlKzHPIneL3g33LG+I6QkRCs25ZtooK6elurlZY4HyRE04BIWv12xZswtsvdmMt4HysMUNKgLrgPg==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
'@ethereumjs/rlp': 4.0.1
crc-32: 1.2.2
ethereum-cryptography: 2.1.2
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 1.0.2
dev: false
/web3-eth-accounts@4.0.4:
resolution: {integrity: sha512-Ed7WNLEv92CkdxB8iDkr4SOZ0L0jHBYFBcnPX8T0+QcqECU0REVOs5IBddm5dlSaAPRezaGT5mHDYNZhwhr02w==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
'@ethereumjs/rlp': 4.0.1
crc-32: 1.2.2
ethereum-cryptography: 2.1.2
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
dev: false
/web3-eth-contract@4.0.4:
resolution: {integrity: sha512-0WHAeNjJUQ47Ysijuf3oJAZ/ex+G3EgBvI590/wd7D7IA2WbhbpTyr9NPALHmnmO3zzF37FMKJp7mDwpm7hHXg==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-core: 4.1.0
web3-errors: 1.1.0
web3-eth: 4.1.0
web3-eth-abi: 4.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-eth-ens@4.0.4:
resolution: {integrity: sha512-CCaPO/EQZe4wJQp4SUVB75brEWPh+Sd/dUW6/vI41liurr8Q4yD86j2FfoQQScgQhvByMs4OKNQ3QuTVRIyVKA==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
'@adraffy/ens-normalize': 1.9.0
web3-core: 4.1.0
web3-errors: 1.1.0
web3-eth: 4.1.0
web3-eth-contract: 4.0.4
web3-net: 4.0.4
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-eth-iban@4.0.4:
resolution: {integrity: sha512-ukX2K45Hdn+sVdCqNzSJ1ztzouy/4V88vn4M6gCnpw7cc39uDprSmoMi8LEVEJbJM9BqeFN3FXaDQvZJIsv26A==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
dev: false
/web3-eth-personal@4.0.4:
resolution: {integrity: sha512-rZksHMLC1z9frT7sI9+aq3KqfxfZeTW/N7GVCoYVMtVTaTLBDO4n4++0It1KWeSogGE11niBxSev7nHsOVRRRw==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-core: 4.1.0
web3-eth: 4.1.0
web3-rpc-methods: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-eth@4.0.3:
resolution: {integrity: sha512-4t1+lpqzk3ljubr0CKE9Ila82p2Pim6Bn7ZIruVfMt9AOA5wL6M0OeMTy0fWBODLJiZJ7R77Ugm0kvEVWD3lqg==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
setimmediate: 1.0.5
web3-core: 4.1.0
web3-errors: 1.1.0
web3-eth-abi: 4.1.0
web3-eth-accounts: 4.0.3
web3-net: 4.0.4
web3-providers-ws: 4.0.4
web3-rpc-methods: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 1.0.2
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-eth@4.1.0:
resolution: {integrity: sha512-eZBmqRPnyLsgGsQrGV37g4MkS0a5YaMooDRv0Ye4a44ZCwd4wXlQu4zwFNdc+8esyJBhCzELwRDyHN/lSBwQNA==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
setimmediate: 1.0.5
web3-core: 4.1.0
web3-errors: 1.1.0
web3-eth-abi: 4.1.0
web3-eth-accounts: 4.0.4
web3-net: 4.0.4
web3-providers-ws: 4.0.4
web3-rpc-methods: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 2.0.0
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-net@4.0.4:
resolution: {integrity: sha512-t7Ribrohjkr/lKf8lopi1VJ2YsZ49QgOe3lWr+vlxwQH/KE383CixTEMTxldsM9uMUWVyg9ff2SN5p+Qle3l2Q==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-core: 4.1.0
web3-rpc-methods: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-providers-http@4.0.4:
resolution: {integrity: sha512-vybOsMlXW/sBp3mus6AKNvYobXPQx4F5K/1C2h8sBPszksXWdj7Wch/uDYSc+zYzc78yaByE0nxXmL6LfAJCKA==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
cross-fetch: 3.1.8
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
transitivePeerDependencies:
- encoding
dev: false
/web3-providers-ipc@4.0.4:
resolution: {integrity: sha512-mKzyPggFAw9t+SG0fwsMKoH2npfCzpeUeKfhqaTC/HLIquoI7djOyfV+MPe2p8w9QmstB+OGdRzirVWp2op11A==}
engines: {node: '>=14', npm: '>=6.12.0'}
requiresBuild: true
dependencies:
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
dev: false
optional: true
/web3-providers-ws@4.0.4:
resolution: {integrity: sha512-ygRuC73NxNItBg9E1AMBZHMQMddWLg+IE1WvYpCD4oRVw9yDB06/z5M/sGt7/Evx5NkK/qccqi1/4NZ7+HudEw==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
'@types/ws': 8.5.3
isomorphic-ws: 5.0.0(ws@8.13.0)
web3-errors: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dev: false
/web3-rpc-methods@1.1.0:
resolution: {integrity: sha512-4tYjn05NDZtHPpJz7dFfsdef+0mxM4NDva5S1Yqnxb3ar6ceIqiQuDRe2MB0Lg5gD3A93udrJ+Cu1EULPTS3qw==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
web3-core: 4.1.0
web3-types: 1.1.0
web3-validator: 2.0.0
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/web3-types@1.1.0:
resolution: {integrity: sha512-t/2kx8Is0EmQQYu+UU7riGmJB4oN4232r7r/mA7ZZmkBg3BjZmJGHhnmCllZOigbzdWBfw/rrxe+sLCKN+eDug==}
engines: {node: '>=14', npm: '>=6.12.0'}
dev: false
/web3-utils@1.10.1: /web3-utils@1.10.1:
resolution: {integrity: sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw==} resolution: {integrity: sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw==}
engines: {node: '>=8.0.0'} engines: {node: '>=8.0.0'}
...@@ -17509,6 +18290,64 @@ packages: ...@@ -17509,6 +18290,64 @@ packages:
utf8: 3.0.0 utf8: 3.0.0
dev: false dev: false
/web3-utils@4.0.4:
resolution: {integrity: sha512-DuoAMY6RQkiKsQ0fAHv+oAAYmCPWRv4PJMDsy5CJN5JaW021JtXtPsEQtVIQ3iYzgQgr3SRBfGyE78WyroIkdg==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
ethereum-cryptography: 2.1.2
web3-errors: 1.1.0
web3-types: 1.1.0
web3-validator: 2.0.0
dev: false
/web3-validator@1.0.2:
resolution: {integrity: sha512-orx1CQAEnwJUnl/8iF2II2zSA4wiooNJvFmVE0Dbmt/kE370SugIDViQP76snhxtouG2AXzz4GyKbPCMlLGh/A==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
ethereum-cryptography: 2.1.2
is-my-json-valid: 2.20.6
util: 0.12.5
web3-errors: 1.1.0
web3-types: 1.1.0
dev: false
/web3-validator@2.0.0:
resolution: {integrity: sha512-JGOuJFX4mjBMaR7e0VI1xrBXDHz1Z6+824eJiJZFaGOt1kjMsrbYX/z4cHJ8rgv+DdZqIFjOlxsAVJV5T8ODXQ==}
engines: {node: '>=14', npm: '>=6.12.0'}
dependencies:
ethereum-cryptography: 2.1.2
util: 0.12.5
web3-errors: 1.1.0
web3-types: 1.1.0
zod: 3.22.0
dev: false
/web3@4.0.3:
resolution: {integrity: sha512-rUMxui5f52yPWjiMRQV6xqIrTQSovYM2CNhl57y+xj/fGXNLbI1D5FsLPnUMZjMaFHJBTteaBxq/sTEaw/1jNA==}
engines: {node: '>=14.0.0', npm: '>=6.12.0'}
dependencies:
web3-core: 4.1.0
web3-errors: 1.1.0
web3-eth: 4.0.3
web3-eth-abi: 4.1.0
web3-eth-accounts: 4.0.3
web3-eth-contract: 4.0.4
web3-eth-ens: 4.0.4
web3-eth-iban: 4.0.4
web3-eth-personal: 4.0.4
web3-net: 4.0.4
web3-providers-http: 4.0.4
web3-providers-ws: 4.0.4
web3-rpc-methods: 1.1.0
web3-types: 1.1.0
web3-utils: 4.0.4
web3-validator: 1.0.2
transitivePeerDependencies:
- bufferutil
- encoding
- utf-8-validate
dev: false
/webidl-conversions@3.0.1: /webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
...@@ -18035,6 +18874,10 @@ packages: ...@@ -18035,6 +18874,10 @@ packages:
/zod@3.21.4: /zod@3.21.4:
resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
dev: true
/zod@3.22.0:
resolution: {integrity: sha512-y5KZY/ssf5n7hCGDGGtcJO/EBJEm5Pa+QQvFBeyMOtnFYOSflalxIFFvdaYevPhePcmcKC4aTbFkCcXN7D0O8Q==}
/zustand@4.3.9(react@18.2.0): /zustand@4.3.9(react@18.2.0):
resolution: {integrity: sha512-Tat5r8jOMG1Vcsj8uldMyqYKC5IZvQif8zetmLHs9WoZlntTHmIoNM8TpLRY31ExncuUvUOXehd0kvahkuHjDw==} resolution: {integrity: sha512-Tat5r8jOMG1Vcsj8uldMyqYKC5IZvQif8zetmLHs9WoZlntTHmIoNM8TpLRY31ExncuUvUOXehd0kvahkuHjDw==}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment