Commit 47082045 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into...

Merge branch 'develop' into 08-16-fix_contracts-bedrock_Use_npx_in_contracts-bedrock_so_it_doesn_t_depend_on_pnpm_i
parents f460a2a1 bd07e6e6
......@@ -115,20 +115,23 @@ jobs:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile
# Fetch node_modules into the pnpm store
# This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline`
# --prefer-offline installs node_modules instantly by just reading from cache if it exists rather than fetching from network
# when installing node_modules pnpm simply adds symlinks instead of copying the files which is why it is pretty much instant to run --prefer-offline
# this allows a caching strategy of only checking pnpm-lockfile so we don't have to keep it in sync with our packages
# For more information see https://pnpm.io/cli/fetch
- run:
name: Fetch dependencies
command: pnpm fetch --frozen-lockfile --prefer-offline
- save_cache:
name: Save PNPM Package Cache
key: pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
paths:
- "node_modules"
- "packages/chain-mon/node_modules"
- "packages/common-ts/node_modules"
- "packages/contracts-bedrock/node_modules"
- "packages/core-utils/node_modules"
- "packages/sdk/node_modules"
- "packages/contracts-ts/node_modules"
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --offline
- run:
name: print forge version
command: forge --version
......@@ -469,6 +472,10 @@ jobs:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
- check-changed:
patterns: contracts-bedrock
- run:
......@@ -476,51 +483,6 @@ jobs:
command: pnpm validate-spacers
working_directory: packages/contracts-bedrock
bedrock-echidna-build:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
steps:
- checkout
- attach_workspace: { at: "." }
- check-changed:
patterns: contracts-bedrock
- run:
name: Compile with metadata hash
command: pnpm clean && pnpm build:with-metadata
working_directory: packages/contracts-bedrock
- persist_to_workspace:
root: .
paths:
- "node_modules"
- packages/contracts-bedrock
bedrock-echidna-run:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
parameters:
echidna_target:
description: Which echidna fuzz contract to run
type: string
size:
description: Custom resource class size for the run
type: string
default: large
resource_class: <<parameters.size>>
steps:
- checkout
- attach_workspace: { at: "." }
- restore_cache:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: contracts-bedrock
- run:
name: Echidna Fuzz <<parameters.echidna_target>>
command: pnpm echidna:<<parameters.echidna_target>>
working_directory: packages/contracts-bedrock
no_output_timeout: 15m
op-bindings-build:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:latest
......@@ -556,6 +518,10 @@ jobs:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- check-changed:
patterns: <<parameters.package_name>>,<<parameters.dependencies>>
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
- run:
name: Lint
command: pnpm lint && git diff --exit-code
......@@ -581,6 +547,10 @@ jobs:
- pnpm-packages-v2-{{ checksum "pnpm.lock.yaml" }}
- check-changed:
patterns: sdk,contracts-bedrock,contracts
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
- run:
name: Check generated and build
command: pnpm generate:check
......@@ -599,6 +569,10 @@ jobs:
- pnpm-packages-v2-{{ checksum "pnpm.lock.yaml" }}
- check-changed:
patterns: sdk,contracts-bedrock,contracts
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
- run:
name: anvil-l1
background: true
......@@ -643,22 +617,13 @@ jobs:
- checkout
- check-changed:
patterns: specs/(.*)\.md$
# TODO remove me after ci builder updated
- run:
name: Install pnpm package manager
command: |
npm i pnpm --global
# TODO remove me after ci builder updated
# A github dep clones-with-immutable-args is installed via github
# packages installed via npm via github automatically run postpack scripts
# their postpack script happens to use yarn so we need it here
- run:
name: Install yarn package manager
command: |
npm i yarn@1 --global
- run:
name: pnpm dev deps
command: pnpm install
command: pnpm install --frozen-lockfile --prefer-offline
- run:
name: specs toc
command: pnpm lint:specs:toc && git diff --exit-code ./specs
......@@ -671,7 +636,6 @@ jobs:
image: ubuntu-2204:2022.07.1
steps:
- checkout
# TODO remove me after ci builder updated
- run:
name: Install pnpm package manager
command: |
......@@ -679,7 +643,7 @@ jobs:
- run:
name: Install node_modules
command: |
pnpm install
pnpm install --frozen-lockfile --prefer-offline
- run:
name: Lint check
command: |
......@@ -981,7 +945,7 @@ jobs:
- run:
name: Install and build
command: |
pnpm install && pnpm build
pnpm install --frozen-lockfile --prefer-offline && pnpm build
- run:
name: generate cannon prestate
command: make cannon-prestate
......
......@@ -11,6 +11,7 @@ require (
github.com/ethereum/go-ethereum v1.12.0
github.com/fsnotify/fsnotify v1.6.0
github.com/go-chi/chi/v5 v5.0.10
github.com/go-chi/docgen v1.2.0
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb
github.com/google/go-cmp v0.5.9
github.com/google/gofuzz v1.2.1-0.20220503160820-4a35382e8fc8
......
......@@ -192,8 +192,12 @@ github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/docgen v1.2.0 h1:da0Nq2PKU9W9pSOTUfVrKI1vIgTGpauo9cfh4Iwivek=
github.com/go-chi/docgen v1.2.0/go.mod h1:G9W0G551cs2BFMSn/cnGwX+JBHEloAgo17MBhyrnhPI=
github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
......
......@@ -21,7 +21,7 @@ func NewApi(bv database.BridgeTransfersView, logger log.Logger) *Api {
r := chi.NewRouter()
h := routes.NewRoutes(logger, bv)
h := routes.NewRoutes(logger, bv, r)
api := &Api{Router: r}
......
package routes
import (
"net/http"
"github.com/go-chi/docgen"
)
func (h Routes) DocsHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(http.StatusOK)
docs := docgen.MarkdownRoutesDoc(h.Router, docgen.MarkdownOpts{
ProjectPath: "github.com/ethereum-optimism/optimism/indexer",
// Intro text included at the top of the generated markdown file.
Intro: "Generated documentation for Optimism indexer",
})
_, err := w.Write([]byte(docs))
if err != nil {
h.Logger.Error("error writing docs", "err", err)
http.Error(w, "Internal server error fetching docs", http.StatusInternalServerError)
}
}
......@@ -3,16 +3,19 @@ package routes
import (
"github.com/ethereum-optimism/optimism/indexer/database"
"github.com/ethereum/go-ethereum/log"
"github.com/go-chi/chi/v5"
)
type Routes struct {
Logger log.Logger
BridgeTransfersView database.BridgeTransfersView
Router *chi.Mux
}
func NewRoutes(logger log.Logger, bv database.BridgeTransfersView) Routes {
func NewRoutes(logger log.Logger, bv database.BridgeTransfersView, r *chi.Mux) Routes {
return Routes{
Logger: logger,
BridgeTransfersView: bv,
Router: r,
}
}
......@@ -125,6 +125,7 @@ l1_bridge_deposits.*,
l1_contract_events.transaction_hash AS l1_transaction_hash,
l1_transaction_deposits.l2_transaction_hash`)
// TODO join with l1_tokens and l2_tokens
depositsQuery = depositsQuery.Joins("INNER JOIN l1_transaction_deposits ON l1_bridge_deposits.transaction_source_hash = l1_transaction_deposits.source_hash")
depositsQuery = depositsQuery.Joins("INNER JOIN l1_contract_events ON l1_transaction_deposits.initiated_l1_event_guid = l1_contract_events.guid")
......
......@@ -84,6 +84,31 @@ CREATE TABLE IF NOT EXISTS output_proposals (
* BRIDGING DATA
*/
/**
* TOKEN DATA
*/
-- L1 Token table
CREATE TABLE IF NOT EXISTS l1_tokens (
address VARCHAR PRIMARY KEY,
bridge_address VARCHAR NOT NULL,
l2_token_address VARCHAR NOT NULL,
name VARCHAR NOT NULL,
symbol VARCHAR NOT NULL,
decimals INTEGER NOT NULL CHECK (decimals >= 0 AND decimals <= 18)
);
-- L2 Token table
CREATE TABLE IF NOT EXISTS l2_tokens (
address VARCHAR PRIMARY KEY,
bridge_address VARCHAR NOT NULL,
l1_token_address VARCHAR REFERENCES l1_tokens(address),
name VARCHAR NOT NULL,
symbol VARCHAR NOT NULL,
decimals INTEGER NOT NULL CHECK (decimals >= 0 AND decimals <= 18)
);
-- OptimismPortal/L2ToL1MessagePasser
CREATE TABLE IF NOT EXISTS l1_transaction_deposits (
source_hash VARCHAR NOT NULL PRIMARY KEY,
......@@ -170,8 +195,8 @@ CREATE TABLE IF NOT EXISTS l1_bridge_deposits (
-- Deposit information
from_address VARCHAR NOT NULL,
to_address VARCHAR NOT NULL,
l1_token_address VARCHAR NOT NULL,
l2_token_address VARCHAR NOT NULL,
l1_token_address VARCHAR NOT NULL, -- REFERENCES l1_tokens(address), uncomment me in future pr
l2_token_address VARCHAR NOT NULL, -- REFERENCES l2_tokens(address), uncomment me in future pr
amount UINT256 NOT NULL,
data VARCHAR NOT NULL,
timestamp INTEGER NOT NULL CHECK (timestamp > 0)
......@@ -186,8 +211,8 @@ CREATE TABLE IF NOT EXISTS l2_bridge_withdrawals (
-- Withdrawal information
from_address VARCHAR NOT NULL,
to_address VARCHAR NOT NULL,
l1_token_address VARCHAR NOT NULL,
l2_token_address VARCHAR NOT NULL,
l1_token_address VARCHAR NOT NULL, -- REFERENCES l1_tokens(address), uncomment me in future pr
l2_token_address VARCHAR NOT NULL, -- REFERENCES l2_tokens(address), uncomment me in future pr
amount UINT256 NOT NULL,
data VARCHAR NOT NULL,
timestamp INTEGER NOT NULL CHECK (timestamp > 0)
......
......@@ -15,7 +15,7 @@ var MIPSStorageLayout = new(solc.StorageLayout)
var MIPSDeployedBin = "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100af575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610062565b6100c26100bd366004611bdb565b6100d0565b604051908152602001610062565b60006100da611b08565b608081146100e757600080fd5b604051610600146100f757600080fd5b6064861461010457600080fd5b610184841461011257600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101bd57823560e01c8252600490920191602090910190600101610199565b505050806101200151156101db576101d3610619565b915050610611565b6101408101805160010167ffffffffffffffff169052606081015160009061020390826106c1565b9050603f601a82901c16600281148061022257508063ffffffff166003145b156102775760006002836303ffffff1663ffffffff16901b846080015163f00000001617905061026c8263ffffffff1660021461026057601f610263565b60005b60ff168261077d565b945050505050610611565b6101608301516000908190601f601086901c81169190601587901c16602081106102a3576102a3611c47565b602002015192508063ffffffff851615806102c457508463ffffffff16601c145b156102fb578661016001518263ffffffff16602081106102e6576102e6611c47565b6020020151925050601f600b86901c166103b7565b60208563ffffffff16101561035d578463ffffffff16600c148061032557508463ffffffff16600d145b8061033657508463ffffffff16600e145b15610347578561ffff1692506103b7565b6103568661ffff166010610877565b92506103b7565b60288563ffffffff1610158061037957508463ffffffff166022145b8061038a57508463ffffffff166026145b156103b7578661016001518263ffffffff16602081106103ac576103ac611c47565b602002015192508190505b60048563ffffffff16101580156103d4575060088563ffffffff16105b806103e557508463ffffffff166001145b15610404576103f6858784876108ea565b975050505050505050610611565b63ffffffff6000602087831610610469576104248861ffff166010610877565b9095019463fffffffc861661043a8160016106c1565b915060288863ffffffff161015801561045a57508763ffffffff16603014155b1561046757809250600093505b505b600061047789888885610afa565b63ffffffff9081169150603f8a1690891615801561049c575060088163ffffffff1610155b80156104ae5750601c8163ffffffff16105b1561058a578063ffffffff16600814806104ce57508063ffffffff166009145b15610505576104f38163ffffffff166008146104ea57856104ed565b60005b8961077d565b9b505050505050505050505050610611565b8063ffffffff16600a03610525576104f3858963ffffffff8a16156111a7565b8063ffffffff16600b03610546576104f3858963ffffffff8a1615156111a7565b8063ffffffff16600c0361055c576104f361128d565b60108163ffffffff16101580156105795750601c8163ffffffff16105b1561058a576104f3818989886117c1565b8863ffffffff1660381480156105a5575063ffffffff861615155b156105da5760018b61016001518763ffffffff16602081106105c9576105c9611c47565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f7576105f7846001846119bb565b610603858360016111a7565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106ac57601c8401518252602090930192600490910190600101610688565b506000815281810382a0819003902092915050565b6000806106cd83611a5f565b905060038416156106dd57600080fd5b6020810190358460051c8160005b601b8110156107435760208501943583821c6001168015610713576001811461072857610739565b60008481526020839052604090209350610739565b600082815260208590526040902093505b50506001016106eb565b50608051915081811461075e57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b6000610787611b08565b60809050806060015160040163ffffffff16816080015163ffffffff1614610810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6a756d7020696e2064656c617920736c6f74000000000000000000000000000060448201526064015b60405180910390fd5b60608101805160808301805163ffffffff90811690935285831690529085161561086657806008018261016001518663ffffffff166020811061085557610855611c47565b63ffffffff90921660209290920201525b61086e610619565b95945050505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826108d45760006108d6565b815b90861663ffffffff16179250505092915050565b60006108f4611b08565b608090506000816060015160040163ffffffff16826080015163ffffffff161461097a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6272616e636820696e2064656c617920736c6f740000000000000000000000006044820152606401610807565b8663ffffffff166004148061099557508663ffffffff166005145b15610a115760008261016001518663ffffffff16602081106109b9576109b9611c47565b602002015190508063ffffffff168563ffffffff161480156109e157508763ffffffff166004145b80610a0957508063ffffffff168563ffffffff1614158015610a0957508763ffffffff166005145b915050610a8e565b8663ffffffff16600603610a2e5760008460030b13159050610a8e565b8663ffffffff16600703610a4a5760008460030b139050610a8e565b8663ffffffff16600103610a8e57601f601087901c166000819003610a735760008560030b1291505b8063ffffffff16600103610a8c5760008560030b121591505b505b606082018051608084015163ffffffff169091528115610ad4576002610ab98861ffff166010610877565b63ffffffff90811690911b8201600401166080840152610ae6565b60808301805160040163ffffffff1690525b610aee610619565b98975050505050505050565b6000603f601a86901c81169086166020821015610ec85760088263ffffffff1610158015610b2e5750600f8263ffffffff16105b15610bce578163ffffffff16600803610b4957506020610bc9565b8163ffffffff16600903610b5f57506021610bc9565b8163ffffffff16600a03610b755750602a610bc9565b8163ffffffff16600b03610b8b5750602b610bc9565b8163ffffffff16600c03610ba157506024610bc9565b8163ffffffff16600d03610bb757506025610bc9565b8163ffffffff16600e03610bc9575060265b600091505b8163ffffffff16600003610e1c57601f600688901c16602063ffffffff83161015610cf65760088263ffffffff1610610c0c57869350505050610611565b8163ffffffff16600003610c2f5763ffffffff86811691161b9250610611915050565b8163ffffffff16600203610c525763ffffffff86811691161c9250610611915050565b8163ffffffff16600303610c8657610c7c8163ffffffff168763ffffffff16901c82602003610877565b9350505050610611565b8163ffffffff16600403610ca9575050505063ffffffff8216601f84161b610611565b8163ffffffff16600603610ccc575050505063ffffffff8216601f84161c610611565b8163ffffffff16600703610cf657610c7c8763ffffffff168763ffffffff16901c88602003610877565b8163ffffffff1660201480610d1157508163ffffffff166021145b15610d23578587019350505050610611565b8163ffffffff1660221480610d3e57508163ffffffff166023145b15610d50578587039350505050610611565b8163ffffffff16602403610d6b578587169350505050610611565b8163ffffffff16602503610d86578587179350505050610611565b8163ffffffff16602603610da1578587189350505050610611565b8163ffffffff16602703610dbc575050505082821719610611565b8163ffffffff16602a03610dee578560030b8760030b12610dde576000610de1565b60015b60ff169350505050610611565b8163ffffffff16602b03610e16578563ffffffff168763ffffffff1610610dde576000610de1565b50611145565b8163ffffffff16600f03610e3e5760108563ffffffff16901b92505050610611565b8163ffffffff16601c03610ec3578063ffffffff16600203610e6557505050828202610611565b8063ffffffff1660201480610e8057508063ffffffff166021145b15610ec3578063ffffffff16602003610e97579419945b60005b6380000000871615610eb9576401fffffffe600197881b169601610e9a565b9250610611915050565b611145565b60288263ffffffff16101561102b578163ffffffff16602003610f1457610f0b8660031660080260180363ffffffff168563ffffffff16901c60ff166008610877565b92505050610611565b8163ffffffff16602103610f4957610f0b8660021660080260100363ffffffff168563ffffffff16901c61ffff166010610877565b8163ffffffff16602203610f795750505063ffffffff60086003851602811681811b198416918316901b17610611565b8163ffffffff16602303610f91578392505050610611565b8163ffffffff16602403610fc4578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610611565b8163ffffffff16602503610ff8578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610611565b8163ffffffff16602603610ec35750505063ffffffff60086003851602601803811681811c198416918316901c17610611565b8163ffffffff166028036110625750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610611565b8163ffffffff1660290361109a5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610611565b8163ffffffff16602a036110ca5750505063ffffffff60086003851602811681811c198316918416901c17610611565b8163ffffffff16602b036110e2578492505050610611565b8163ffffffff16602e036111155750505063ffffffff60086003851602601803811681811b198316918416901b17610611565b8163ffffffff1660300361112d578392505050610611565b8163ffffffff16603803611145578492505050610611565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e000000000000000000000000006044820152606401610807565b60006111b1611b08565b506080602063ffffffff861610611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401610807565b63ffffffff8516158015906112365750825b1561126a57838161016001518663ffffffff166020811061125957611259611c47565b63ffffffff90921660209290920201525b60808101805163ffffffff8082166060850152600490910116905261086e610619565b6000611297611b08565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036113115781610fff8116156112e057610fff811661100003015b8363ffffffff166000036113075760e08801805163ffffffff83820116909152955061130b565b8395505b50611780565b8563ffffffff16610fcd0361132c5763400000009450611780565b8563ffffffff16611018036113445760019450611780565b8563ffffffff166110960361137957600161012088015260ff831661010088015261136d610619565b97505050505050505090565b8563ffffffff16610fa3036115e35763ffffffff831615611780577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff84160161159d5760006113d48363fffffffc1660016106c1565b60208901519091508060001a6001036114415761143e81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6040808a015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810183905263ffffffff9091166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e03110e1906044016040805180830381865afa1580156114e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115069190611c76565b9150915060038616806004038281101561151e578092505b508186101561152b578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119871617955050506115828663fffffffc166001866119bb565b60408b018051820163ffffffff16905297506115de92505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff8416016115d257809450611780565b63ffffffff9450600993505b611780565b8563ffffffff16610fa4036116d45763ffffffff83166001148061160d575063ffffffff83166002145b8061161e575063ffffffff83166004145b1561162b57809450611780565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff8416016115d257600061166b8363fffffffc1660016106c1565b60208901519091506003841660040383811015611686578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b17602088015260006040880152935083611780565b8563ffffffff16610fd703611780578163ffffffff166003036117745763ffffffff8316158061170a575063ffffffff83166005145b8061171b575063ffffffff83166003145b156117295760009450611780565b63ffffffff831660011480611744575063ffffffff83166002145b80611755575063ffffffff83166006145b80611766575063ffffffff83166004145b156115d25760019450611780565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b0152600401909116905261136d610619565b60006117cb611b08565b506080600063ffffffff87166010036117e9575060c0810151611952565b8663ffffffff166011036118085763ffffffff861660c0830152611952565b8663ffffffff16601203611821575060a0810151611952565b8663ffffffff166013036118405763ffffffff861660a0830152611952565b8663ffffffff166018036118745763ffffffff600387810b9087900b02602081901c821660c08501521660a0830152611952565b8663ffffffff166019036118a55763ffffffff86811681871602602081901c821660c08501521660a0830152611952565b8663ffffffff16601a036118fb578460030b8660030b816118c8576118c8611c9a565b0763ffffffff1660c0830152600385810b9087900b816118ea576118ea611c9a565b0563ffffffff1660a0830152611952565b8663ffffffff16601b03611952578463ffffffff168663ffffffff168161192457611924611c9a565b0663ffffffff90811660c08401528581169087168161194557611945611c9a565b0463ffffffff1660a08301525b63ffffffff84161561198d57808261016001518563ffffffff166020811061197c5761197c611c47565b63ffffffff90921660209290920201525b60808201805163ffffffff808216606086015260049091011690526119b0610619565b979650505050505050565b60006119c683611a5f565b905060038416156119d657600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b811015611a545760208401933582821c6001168015611a245760018114611a3957611a4a565b60008581526020839052604090209450611a4a565b600082815260208690526040902094505b50506001016119fc565b505060805250505050565b60ff811661038002610184810190369061050401811015611b02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401610807565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611b6e611b73565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611ba457600080fd5b50813567ffffffffffffffff811115611bbc57600080fd5b602083019150836020828501011115611bd457600080fd5b9250929050565b60008060008060408587031215611bf157600080fd5b843567ffffffffffffffff80821115611c0957600080fd5b611c1588838901611b92565b90965094506020870135915080821115611c2e57600080fd5b50611c3b87828801611b92565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611c8957600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
var MIPSDeployedSourceMap = "1131:37346:104:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:45;;1745:10;1710:45;;;;;188:10:254;176:23;;;158:42;;146:2;131:18;1710:45:104;;;;;;;;2448:99;;;412:42:254;2534:6:104;400:55:254;382:74;;370:2;355:18;2448:99:104;211:251:254;24925:6339:104;;;;;;:::i;:::-;;:::i;:::-;;;1687:25:254;;;1675:2;1660:18;24925:6339:104;1541:177:254;24925:6339:104;25003:7;25046:18;;:::i;:::-;25193:4;25186:5;25183:15;25173:134;;25287:1;25284;25277:12;25173:134;25343:4;25337:11;25350;25334:28;25324:137;;25441:1;25438;25431:12;25324:137;25509:3;25491:16;25488:25;25478:150;;25608:1;25605;25598:12;25478:150;25672:3;25658:12;25655:21;25645:145;;25770:1;25767;25760:12;25645:145;26050:24;;26394:4;26096:20;26452:2;26154:21;;26050:24;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;;;26154:21;;;26050:24;26023:52;;26096:20;;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;27070:10;26212:18;27060:21;;;26154;;;;27168:1;27153:77;27178:2;27175:1;27172:9;27153:77;;;26050:24;;26027:21;26023:52;26096:20;;27226:1;26154:21;;;;26038:2;26212:18;;;;27196:1;27189:9;27153:77;;;27157:14;;;27308:5;:12;;;27304:71;;;27347:13;:11;:13::i;:::-;27340:20;;;;;27304:71;27389:10;;;:15;;27403:1;27389:15;;;;;27474:8;;;;-1:-1:-1;;27466:20:104;;-1:-1:-1;27466:7:104;:20::i;:::-;27452:34;-1:-1:-1;27516:10:104;27524:2;27516:10;;;;27593:1;27583:11;;;:26;;;27598:6;:11;;27608:1;27598:11;27583:26;27579:310;;;27739:13;27808:1;27786:4;27793:10;27786:17;27785:24;;;;27756:5;:12;;;27771:10;27756:25;27755:54;27739:70;;27834:40;27845:6;:11;;27855:1;27845:11;:20;;27863:2;27845:20;;;27859:1;27845:20;27834:40;;27867:6;27834:10;:40::i;:::-;27827:47;;;;;;;;27579:310;28138:15;;;;27933:9;;;;28070:4;28064:2;28056:10;;;28055:19;;;28138:15;28163:2;28155:10;;;28154:19;28138:36;;;;;;;:::i;:::-;;;;;;-1:-1:-1;28203:5:104;28227:11;;;;;:29;;;28242:6;:14;;28252:4;28242:14;28227:29;28223:832;;;28319:5;:15;;;28335:5;28319:22;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;28382:4:104;28376:2;28368:10;;;28367:19;28223:832;;;28420:4;28411:6;:13;;;28407:648;;;28541:6;:13;;28551:3;28541:13;:30;;;;28558:6;:13;;28568:3;28558:13;28541:30;:47;;;;28575:6;:13;;28585:3;28575:13;28541:47;28537:253;;;28651:4;28658:6;28651:13;28646:18;;28407:648;;28537:253;28750:21;28753:4;28760:6;28753:13;28768:2;28750;:21::i;:::-;28745:26;;28407:648;;;28824:4;28814:6;:14;;;;:32;;;;28832:6;:14;;28842:4;28832:14;28814:32;:50;;;;28850:6;:14;;28860:4;28850:14;28814:50;28810:245;;;28934:5;:15;;;28950:5;28934:22;;;;;;;;;:::i;:::-;;;;;28929:27;;29035:5;29027:13;;28810:245;29084:1;29074:6;:11;;;;:25;;;;;29098:1;29089:6;:10;;;29074:25;29073:42;;;;29104:6;:11;;29114:1;29104:11;29073:42;29069:125;;;29142:37;29155:6;29163:4;29169:5;29176:2;29142:12;:37::i;:::-;29135:44;;;;;;;;;;;29069:125;29227:13;29208:16;29379:4;29369:14;;;;29365:446;;29448:21;29451:4;29458:6;29451:13;29466:2;29448;:21::i;:::-;29442:27;;;;29506:10;29501:15;;29540:16;29501:15;29554:1;29540:7;:16::i;:::-;29534:22;;29588:4;29578:6;:14;;;;:32;;;;;29596:6;:14;;29606:4;29596:14;;29578:32;29574:223;;;29675:4;29663:16;;29777:1;29769:9;;29574:223;29385:426;29365:446;29844:10;29857:26;29865:4;29871:2;29875;29879:3;29857:7;:26::i;:::-;29886:10;29857:39;;;;-1:-1:-1;29982:4:104;29975:11;;;30014;;;:24;;;;;30037:1;30029:4;:9;;;;30014:24;:39;;;;;30049:4;30042;:11;;;30014:39;30010:847;;;30077:4;:9;;30085:1;30077:9;:22;;;;30090:4;:9;;30098:1;30090:9;30077:22;30073:144;;;30161:37;30172:4;:9;;30180:1;30172:9;:21;;30188:5;30172:21;;;30184:1;30172:21;30195:2;30161:10;:37::i;:::-;30154:44;;;;;;;;;;;;;;;30073:144;30239:4;:11;;30247:3;30239:11;30235:121;;30309:28;30318:5;30325:2;30329:7;;;;30309:8;:28::i;30235:121::-;30377:4;:11;;30385:3;30377:11;30373:121;;30447:28;30456:5;30463:2;30467:7;;;;;30447:8;:28::i;30373:121::-;30564:4;:11;;30572:3;30564:11;30560:80;;30606:15;:13;:15::i;30560:80::-;30743:4;30735;:12;;;;:27;;;;;30758:4;30751;:11;;;30735:27;30731:112;;;30793:31;30804:4;30810:2;30814;30818:5;30793:10;:31::i;30731:112::-;30917:6;:14;;30927:4;30917:14;:28;;;;-1:-1:-1;30935:10:104;;;;;30917:28;30913:93;;;30990:1;30965:5;:15;;;30981:5;30965:22;;;;;;;;;:::i;:::-;:26;;;;:22;;;;;;:26;30913:93;31052:9;:26;;31065:13;31052:26;31048:92;;31098:27;31107:9;31118:1;31121:3;31098:8;:27::i;:::-;31221:26;31230:5;31237:3;31242:4;31221:8;:26::i;:::-;31214:33;;;;;;;;;;;;;24925:6339;;;;;;;:::o;3087:1709::-;3634:4;3628:11;;3550:4;3353:31;3342:43;;3413:13;3353:31;3752:2;3452:13;;3342:43;3359:24;3353:31;3452:13;;;3342:43;;;;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3128:12;;4337:13;;3452;;;3128:12;4417:84;4442:2;4439:1;4436:9;4417:84;;;3369:13;3359:24;;3353:31;3342:43;;3373:2;3413:13;;;;4497:1;3452:13;;;;4460:1;4453:9;4417:84;;;4421:14;4564:1;4560:2;4553:13;4659:5;4655:2;4651:14;4644:5;4639:27;4765:14;;;4748:32;;;3087:1709;-1:-1:-1;;3087:1709:104:o;20980:1831::-;21053:11;21164:14;21181:24;21193:11;21181;:24::i;:::-;21164:41;;21313:1;21306:5;21302:13;21299:33;;;21328:1;21325;21318:12;21299:33;21461:2;21449:15;;;21402:20;21891:5;21888:1;21884:13;21926:4;21962:1;21947:343;21972:2;21969:1;21966:9;21947:343;;;22095:2;22083:15;;;22032:20;22130:12;;;22144:1;22126:20;22167:42;;;;22235:1;22230:42;;;;22119:153;;22167:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22176:31;;22167:42;;22230;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22239:31;;22119:153;-1:-1:-1;;21990:1:104;21983:9;21947:343;;;21951:14;22400:4;22394:11;22379:26;;22486:7;22480:4;22477:17;22467:124;;22528:10;22525:1;22518:21;22570:2;22567:1;22560:13;22467:124;-1:-1:-1;;22718:2:104;22707:14;;;;22695:10;22691:31;22688:1;22684:39;22752:16;;;;22770:10;22748:33;;20980:1831;-1:-1:-1;;;20980:1831:104:o;18090:823::-;18159:12;18246:18;;:::i;:::-;18314:4;18305:13;;18366:5;:8;;;18377:1;18366:12;18350:28;;:5;:12;;;:28;;;18346:95;;18398:28;;;;;2114:2:254;18398:28:104;;;2096:21:254;2153:2;2133:18;;;2126:30;2192:20;2172:18;;;2165:48;2230:18;;18398:28:104;;;;;;;;18346:95;18530:8;;;;;18563:12;;;;;18552:23;;;;;;;18589:20;;;;;18530:8;18721:13;;;18717:90;;18782:6;18791:1;18782:10;18754:5;:15;;;18770:8;18754:25;;;;;;;;;:::i;:::-;:38;;;;:25;;;;;;:38;18717:90;18883:13;:11;:13::i;:::-;18876:20;18090:823;-1:-1:-1;;;;;18090:823:104:o;2645:334::-;2706:6;2765:18;;;;2774:8;;;;2765:18;;;;;;2764:25;;;;;2781:1;2828:2;:9;;;2822:16;;;;;2821:22;;2820:32;;;;;;;2882:9;;2881:15;2764:25;2939:21;;2959:1;2939:21;;;2950:6;2939:21;2924:11;;;;;:37;;-1:-1:-1;;;2645:334:104;;;;:::o;12951:2026::-;13048:12;13134:18;;:::i;:::-;13202:4;13193:13;;13234:17;13294:5;:8;;;13305:1;13294:12;13278:28;;:5;:12;;;:28;;;13274:97;;13326:30;;;;;2461:2:254;13326:30:104;;;2443:21:254;2500:2;2480:18;;;2473:30;2539:22;2519:18;;;2512:50;2579:18;;13326:30:104;2259:344:254;13274:97:104;13441:7;:12;;13452:1;13441:12;:28;;;;13457:7;:12;;13468:1;13457:12;13441:28;13437:947;;;13489:9;13501:5;:15;;;13517:6;13501:23;;;;;;;;;:::i;:::-;;;;;13489:35;;13565:2;13558:9;;:3;:9;;;:25;;;;;13571:7;:12;;13582:1;13571:12;13558:25;13557:58;;;;13596:2;13589:9;;:3;:9;;;;:25;;;;;13602:7;:12;;13613:1;13602:12;13589:25;13542:73;;13471:159;13437:947;;;13727:7;:12;;13738:1;13727:12;13723:661;;13788:1;13780:3;13774:15;;;;13759:30;;13723:661;;;13892:7;:12;;13903:1;13892:12;13888:496;;13952:1;13945:3;13939:14;;;13924:29;;13888:496;;;14073:7;:12;;14084:1;14073:12;14069:315;;14161:4;14155:2;14146:11;;;14145:20;14131:10;14188:8;;;14184:84;;14248:1;14241:3;14235:14;;;14220:29;;14184:84;14289:3;:8;;14296:1;14289:8;14285:85;;14350:1;14342:3;14336:15;;;;14321:30;;14285:85;14087:297;14069:315;14460:8;;;;;14538:12;;;;14527:23;;;;;14694:178;;;;14785:1;14759:22;14762:5;14770:6;14762:14;14778:2;14759;:22::i;:::-;:27;;;;;;;14745:42;;14754:1;14745:42;14730:57;:12;;;:57;14694:178;;;14841:12;;;;;14856:1;14841:16;14826:31;;;;14694:178;14947:13;:11;:13::i;:::-;14940:20;12951:2026;-1:-1:-1;;;;;;;;12951:2026:104:o;31310:7165::-;31397:6;31455:10;31463:2;31455:10;;;;;;31503:11;;31552:4;31543:13;;31539:6876;;;31683:1;31673:6;:11;;;;:27;;;;;31697:3;31688:6;:12;;;31673:27;31669:537;;;31728:6;:11;;31738:1;31728:11;31724:423;;-1:-1:-1;31748:4:104;31724:423;;;31792:6;:11;;31802:1;31792:11;31788:359;;-1:-1:-1;31812:4:104;31788:359;;;31857:6;:13;;31867:3;31857:13;31853:294;;-1:-1:-1;31879:4:104;31853:294;;;31923:6;:13;;31933:3;31923:13;31919:228;;-1:-1:-1;31945:4:104;31919:228;;;31990:6;:13;;32000:3;31990:13;31986:161;;-1:-1:-1;32012:4:104;31986:161;;;32056:6;:13;;32066:3;32056:13;32052:95;;-1:-1:-1;32078:4:104;32052:95;;;32121:6;:13;;32131:3;32121:13;32117:30;;-1:-1:-1;32143:4:104;32117:30;32186:1;32177:10;;31669:537;32267:6;:11;;32277:1;32267:11;32263:3554;;32331:4;32326:1;32318:9;;;32317:18;32368:4;32318:9;32361:11;;;32357:1319;;;32460:4;32452;:12;;;32448:1206;;32503:2;32496:9;;;;;;;32448:1206;32617:4;:12;;32625:4;32617:12;32613:1041;;32668:11;;;;;;;;-1:-1:-1;32661:18:104;;-1:-1:-1;;32661:18:104;32613:1041;32792:4;:12;;32800:4;32792:12;32788:866;;32843:11;;;;;;;;-1:-1:-1;32836:18:104;;-1:-1:-1;;32836:18:104;32788:866;32970:4;:12;;32978:4;32970:12;32966:688;;33021:27;33030:5;33024:11;;:2;:11;;;;33042:5;33037:2;:10;33021:2;:27::i;:::-;33014:34;;;;;;;32966:688;33170:4;:12;;33178:4;33170:12;33166:488;;-1:-1:-1;;;;33221:17:104;;;33233:4;33228:9;;33221:17;33214:24;;33166:488;33361:4;:12;;33369:4;33361:12;33357:297;;-1:-1:-1;;;;33412:17:104;;;33424:4;33419:9;;33412:17;33405:24;;33357:297;33555:4;:12;;33563:4;33555:12;33551:103;;33606:21;33615:2;33609:8;;:2;:8;;;;33624:2;33619;:7;33606:2;:21::i;33551:103::-;33836:4;:12;;33844:4;33836:12;:28;;;;33852:4;:12;;33860:4;33852:12;33836:28;33832:1151;;;33904:2;33899;:7;33892:14;;;;;;;33832:1151;33994:4;:12;;34002:4;33994:12;:28;;;;34010:4;:12;;34018:4;34010:12;33994:28;33990:993;;;34062:2;34057;:7;34050:14;;;;;;;33990:993;34144:4;:12;;34152:4;34144:12;34140:843;;34196:2;34191;:7;34184:14;;;;;;;34140:843;34277:4;:12;;34285:4;34277:12;34273:710;;34330:2;34325;:7;34317:16;;;;;;;34273:710;34413:4;:12;;34421:4;34413:12;34409:574;;34466:2;34461;:7;34453:16;;;;;;;34409:574;34549:4;:12;;34557:4;34549:12;34545:438;;-1:-1:-1;;;;34598:7:104;;;34596:10;34589:17;;34545:438;34709:4;:12;;34717:4;34709:12;34705:278;;34774:2;34756:21;;34762:2;34756:21;;;:29;;34784:1;34756:29;;;34780:1;34756:29;34749:36;;;;;;;;;34705:278;34898:4;:12;;34906:4;34898:12;34894:89;;34950:2;34945:7;;:2;:7;;;:15;;34959:1;34945:15;;34894:89;32280:2721;31539:6876;;32263:3554;35072:6;:13;;35082:3;35072:13;35068:749;;35122:2;35116;:8;;;;35109:15;;;;;;35068:749;35197:6;:14;;35207:4;35197:14;35193:624;;35266:4;:9;;35274:1;35266:9;35262:100;;-1:-1:-1;;;35317:21:104;;;35303:36;;35262:100;35414:4;:12;;35422:4;35414:12;:28;;;;35430:4;:12;;35438:4;35430:12;35414:28;35410:389;;;35474:4;:12;;35482:4;35474:12;35470:83;;35523:3;;;35470:83;35578:8;35616:127;35628:10;35623:15;;:20;35616:127;;35708:8;35675:3;35708:8;;;;;35675:3;35616:127;;;35775:1;-1:-1:-1;35768:8:104;;-1:-1:-1;;35768:8:104;35410:389;31539:6876;;;35850:4;35841:6;:13;;;35837:2578;;;35900:6;:14;;35910:4;35900:14;35896:1208;;35945:42;35963:2;35968:1;35963:6;35973:1;35962:12;35957:2;:17;35949:26;;:3;:26;;;;35979:4;35948:35;35985:1;35945:2;:42::i;:::-;35938:49;;;;;;35896:1208;36054:6;:14;;36064:4;36054:14;36050:1054;;36099:45;36117:2;36122:1;36117:6;36127:1;36116:12;36111:2;:17;36103:26;;:3;:26;;;;36133:6;36102:37;36141:2;36099;:45::i;36050:1054::-;36212:6;:14;;36222:4;36212:14;36208:896;;-1:-1:-1;;;36263:21:104;36282:1;36277;36272:6;;36271:12;36263:21;;36320:36;;;36391:5;36386:10;;36263:21;;;;;36385:18;36378:25;;36208:896;36470:6;:14;;36480:4;36470:14;36466:638;;36515:3;36508:10;;;;;;36466:638;36586:6;:14;;36596:4;36586:14;36582:522;;36646:2;36651:1;36646:6;36656:1;36645:12;36640:2;:17;36632:26;;:3;:26;;;;36662:4;36631:35;36624:42;;;;;;36582:522;36734:6;:14;;36744:4;36734:14;36730:374;;36794:2;36799:1;36794:6;36804:1;36793:12;36788:2;:17;36780:26;;:3;:26;;;;36810:6;36779:37;36772:44;;;;;;36730:374;36884:6;:14;;36894:4;36884:14;36880:224;;-1:-1:-1;;;36935:26:104;36959:1;36954;36949:6;;36948:12;36943:2;:17;36935:26;;36997:41;;;37073:5;37068:10;;36935:26;;;;;37067:18;37060:25;;35837:2578;37158:6;:14;;37168:4;37158:14;37154:1261;;-1:-1:-1;;;37211:4:104;37205:34;37237:1;37232;37227:6;;37226:12;37221:2;:17;37205:34;;37291:27;;;37271:48;;;37345:10;;37206:9;;;37205:34;;37344:18;37337:25;;37154:1261;37417:6;:14;;37427:4;37417:14;37413:1002;;-1:-1:-1;;;37470:6:104;37464:36;37498:1;37493;37488:6;;37487:12;37482:2;:17;37464:36;;37552:29;;;37532:50;;;37608:10;;37465:11;;;37464:36;;37607:18;37600:25;;37413:1002;37681:6;:14;;37691:4;37681:14;37677:738;;-1:-1:-1;;;37728:20:104;37746:1;37741;37736:6;;37735:12;37728:20;;37780:36;;;37848:5;37842:11;;37728:20;;;;;37841:19;37834:26;;37677:738;37915:6;:14;;37925:4;37915:14;37911:504;;37956:2;37949:9;;;;;;37911:504;38014:6;:14;;38024:4;38014:14;38010:405;;-1:-1:-1;;;38061:25:104;38084:1;38079;38074:6;;38073:12;38068:2;:17;38061:25;;38118:41;;;38191:5;38185:11;;38061:25;;;;;38184:19;38177:26;;38010:405;38258:6;:14;;38268:4;38258:14;38254:161;;38299:3;38292:10;;;;;;38254:161;38357:6;:14;;38367:4;38357:14;38353:62;;38398:2;38391:9;;;;;;38353:62;38429:29;;;;;2810:2:254;38429:29:104;;;2792:21:254;2849:2;2829:18;;;2822:30;2888:21;2868:18;;;2861:49;2927:18;;38429:29:104;2608:343:254;19194:782:104;19280:12;19367:18;;:::i;:::-;-1:-1:-1;19435:4:104;19542:2;19530:14;;;;19522:41;;;;;;;3158:2:254;19522:41:104;;;3140:21:254;3197:2;3177:18;;;3170:30;3236:16;3216:18;;;3209:44;3270:18;;19522:41:104;2956:338:254;19522:41:104;19659:14;;;;;;;:30;;;19677:12;19659:30;19655:102;;;19738:4;19709:5;:15;;;19725:9;19709:26;;;;;;;;;:::i;:::-;:33;;;;:26;;;;;;:33;19655:102;19812:12;;;;;19801:23;;;;:8;;;:23;19868:1;19853:16;;;19838:31;;;19946:13;:11;:13::i;4837:7728::-;4880:12;4966:18;;:::i;:::-;-1:-1:-1;5144:15:104;;:18;;;;5034:4;5304:18;;;;5348;;;;5392;;;;;5034:4;;5124:17;;;;5304:18;5348;5482;;;5496:4;5482:18;5478:6777;;5532:2;5561:4;5556:9;;:14;5552:144;;5672:4;5667:9;;5659:4;:18;5653:24;5552:144;5717:2;:7;;5723:1;5717:7;5713:161;;5753:10;;;;;5785:16;;;;;;;;5753:10;-1:-1:-1;5713:161:104;;;5853:2;5848:7;;5713:161;5502:386;5478:6777;;;5990:10;:18;;6004:4;5990:18;5986:6269;;1745:10;6028:14;;5986:6269;;;6126:10;:18;;6140:4;6126:18;6122:6133;;6169:1;6164:6;;6122:6133;;;6294:10;:18;;6308:4;6294:18;6290:5965;;6347:4;6332:12;;;:19;6369:26;;;:14;;;:26;6420:13;:11;:13::i;:::-;6413:20;;;;;;;;;4837:7728;:::o;6290:5965::-;6559:10;:18;;6573:4;6559:18;6555:5700;;6710:14;;;6706:2708;6555:5700;6706:2708;6880:22;;;;;6876:2538;;7005:10;7018:27;7026:2;7031:10;7026:15;7043:1;7018:7;:27::i;:::-;7129:17;;;;7005:40;;-1:-1:-1;7129:17:104;7107:19;7279:14;7298:1;7273:26;7269:131;;7341:36;7365:11;1277:21:105;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;7341:36:104;7327:50;;7269:131;7486:20;;;;;7453:54;;;;;;;;3472:25:254;;;7453:54:104;3533:23:254;;;3513:18;;;3506:51;7422:11:104;;;;7453:19;:6;:19;;;;3445:18:254;;7453:54:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7421:86;;;;7734:1;7730:2;7726:10;7831:9;7828:1;7824:17;7913:6;7906:5;7903:17;7900:40;;;7933:5;7923:15;;7900:40;;8016:6;8012:2;8009:14;8006:34;;;8036:2;8026:12;;8006:34;8142:3;8137:1;8129:6;8125:14;8120:3;8116:24;8112:34;8105:41;;8242:3;8238:1;8226:9;8217:6;8214:1;8210:14;8206:30;8202:38;8198:48;8191:55;;8397:1;8393;8389;8377:9;8374:1;8370:17;8366:25;8362:33;8358:41;8524:1;8520;8516;8507:6;8495:9;8492:1;8488:17;8484:30;8480:38;8476:46;8472:54;8454:72;;8655:10;8651:15;8645:4;8641:26;8633:34;;8771:3;8763:4;8759:9;8754:3;8750:19;8747:28;8740:35;;;;8917:33;8926:2;8931:10;8926:15;8943:1;8946:3;8917:8;:33::i;:::-;8972:20;;;:38;;;;;;;;;-1:-1:-1;6876:2538:104;;-1:-1:-1;;;6876:2538:104;;9129:18;;;;;9125:289;;9299:2;9294:7;;6555:5700;;9125:289;9353:10;9348:15;;2053:3;9385:10;;9125:289;6555:5700;;;9543:10;:18;;9557:4;9543:18;9539:2716;;9697:15;;;1824:1;9697:15;;:34;;-1:-1:-1;9716:15:104;;;1859:1;9716:15;9697:34;:57;;;-1:-1:-1;9735:19:104;;;1936:1;9735:19;9697:57;9693:1593;;;9783:2;9778:7;;9539:2716;;9693:1593;9909:23;;;;;9905:1381;;9956:10;9969:27;9977:2;9982:10;9977:15;9994:1;9969:7;:27::i;:::-;10072:17;;;;9956:40;;-1:-1:-1;10315:1:104;10307:10;;10409:1;10405:17;10484:13;;;10481:32;;;10506:5;10500:11;;10481:32;10792:14;;;10598:1;10788:22;;;10784:32;;;;10681:26;10705:1;10590:10;;;10685:18;;;10681:26;10780:43;10586:20;;10888:12;11016:17;;;:23;11084:1;11061:20;;;:24;10594:2;-1:-1:-1;10594:2:104;6555:5700;;9539:2716;11488:10;:18;;11502:4;11488:18;11484:771;;11598:2;:7;;11604:1;11598:7;11594:647;;11691:14;;;;;:40;;-1:-1:-1;11709:22:104;;;1978:1;11709:22;11691:40;:62;;;-1:-1:-1;11735:18:104;;;1897:1;11735:18;11691:62;11687:404;;;11786:1;11781:6;;11594:647;;11687:404;11832:15;;;1824:1;11832:15;;:34;;-1:-1:-1;11851:15:104;;;1859:1;11851:15;11832:34;:61;;;-1:-1:-1;11870:23:104;;;2021:1;11870:23;11832:61;:84;;;-1:-1:-1;11897:19:104;;;1936:1;11897:19;11832:84;11828:263;;;11949:1;11944:6;;6555:5700;;11594:647;12142:10;12137:15;;2087:4;12174:11;;11594:647;12330:15;;;;;:23;;;;:18;;;;:23;;;;12367:15;;:23;;;:18;;;;:23;-1:-1:-1;12456:12:104;;;;12445:23;;;:8;;;:23;12512:1;12497:16;12482:31;;;;;12535:13;:11;:13::i;15318:2480::-;15412:12;15498:18;;:::i;:::-;-1:-1:-1;15566:4:104;15598:10;15706:13;;;15715:4;15706:13;15702:1705;;-1:-1:-1;15745:8:104;;;;15702:1705;;;15864:5;:13;;15873:4;15864:13;15860:1547;;15897:14;;;:8;;;:14;15860:1547;;;16027:5;:13;;16036:4;16027:13;16023:1384;;-1:-1:-1;16066:8:104;;;;16023:1384;;;16185:5;:13;;16194:4;16185:13;16181:1226;;16218:14;;;:8;;;:14;16181:1226;;;16359:5;:13;;16368:4;16359:13;16355:1052;;16486:9;16432:17;16412;;;16432;;;;16412:37;16493:2;16486:9;;;;;16468:8;;;:28;16514:22;:8;;;:22;16355:1052;;;16673:5;:13;;16682:4;16673:13;16669:738;;16740:11;16726;;;16740;;;16726:25;16795:2;16788:9;;;;;16770:8;;;:28;16816:22;:8;;;:22;16669:738;;;16997:5;:13;;17006:4;16997:13;16993:414;;17067:3;17048:23;;17054:3;17048:23;;;;;;;:::i;:::-;;17030:42;;:8;;;:42;17108:23;;;;;;;;;;;;;:::i;:::-;;17090:42;;:8;;;:42;16993:414;;;17301:5;:13;;17310:4;17301:13;17297:110;;17351:3;17345:9;;:3;:9;;;;;;;:::i;:::-;;17334:20;;;;:8;;;:20;17383:9;;;;;;;;;;;:::i;:::-;;17372:20;;:8;;;:20;17297:110;17500:14;;;;17496:85;;17563:3;17534:5;:15;;;17550:9;17534:26;;;;;;;;;:::i;:::-;:32;;;;:26;;;;;;:32;17496:85;17635:12;;;;;17624:23;;;;:8;;;:23;17691:1;17676:16;;;17661:31;;;17768:13;:11;:13::i;:::-;17761:20;15318:2480;-1:-1:-1;;;;;;;15318:2480:104:o;23147:1654::-;23323:14;23340:24;23352:11;23340;:24::i;:::-;23323:41;;23472:1;23465:5;23461:13;23458:33;;;23487:1;23484;23477:12;23458:33;23626:2;23820:15;;;23645:2;23634:14;;23622:10;23618:31;23615:1;23611:39;23776:16;;;23561:20;;23761:10;23750:22;;;23746:27;23736:38;23733:60;24262:5;24259:1;24255:13;24333:1;24318:343;24343:2;24340:1;24337:9;24318:343;;;24466:2;24454:15;;;24403:20;24501:12;;;24515:1;24497:20;24538:42;;;;24606:1;24601:42;;;;24490:153;;24538:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24547:31;;24538:42;;24601;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24610:31;;24490:153;-1:-1:-1;;24361:1:104;24354:9;24318:343;;;-1:-1:-1;;24760:4:104;24753:18;-1:-1:-1;;;;23147:1654:104:o;20180:586::-;20502:20;;;20526:7;20502:32;20495:3;:40;;;20608:14;;20663:17;;20657:24;;;20649:72;;;;;;;4209:2:254;20649:72:104;;;4191:21:254;4248:2;4228:18;;;4221:30;4287:34;4267:18;;;4260:62;4358:5;4338:18;;;4331:33;4381:19;;20649:72:104;4007:399:254;20649:72:104;20735:14;20180:586;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;467:347:254:-;518:8;528:6;582:3;575:4;567:6;563:17;559:27;549:55;;600:1;597;590:12;549:55;-1:-1:-1;623:20:254;;666:18;655:30;;652:50;;;698:1;695;688:12;652:50;735:4;727:6;723:17;711:29;;787:3;780:4;771:6;763;759:19;755:30;752:39;749:59;;;804:1;801;794:12;749:59;467:347;;;;;:::o;819:717::-;909:6;917;925;933;986:2;974:9;965:7;961:23;957:32;954:52;;;1002:1;999;992:12;954:52;1042:9;1029:23;1071:18;1112:2;1104:6;1101:14;1098:34;;;1128:1;1125;1118:12;1098:34;1167:58;1217:7;1208:6;1197:9;1193:22;1167:58;:::i;:::-;1244:8;;-1:-1:-1;1141:84:254;-1:-1:-1;1332:2:254;1317:18;;1304:32;;-1:-1:-1;1348:16:254;;;1345:36;;;1377:1;1374;1367:12;1345:36;;1416:60;1468:7;1457:8;1446:9;1442:24;1416:60;:::i;:::-;819:717;;;;-1:-1:-1;1495:8:254;-1:-1:-1;;;;819:717:254:o;1723:184::-;1775:77;1772:1;1765:88;1872:4;1869:1;1862:15;1896:4;1893:1;1886:15;3568:245;3647:6;3655;3708:2;3696:9;3687:7;3683:23;3679:32;3676:52;;;3724:1;3721;3714:12;3676:52;-1:-1:-1;;3747:16:254;;3803:2;3788:18;;;3782:25;3747:16;;3782:25;;-1:-1:-1;3568:245:254:o;3818:184::-;3870:77;3867:1;3860:88;3967:4;3964:1;3957:15;3991:4;3988:1;3981:15"
var MIPSDeployedSourceMap = "1131:37346:105:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1710:45;;1745:10;1710:45;;;;;188:10:255;176:23;;;158:42;;146:2;131:18;1710:45:105;;;;;;;;2448:99;;;412:42:255;2534:6:105;400:55:255;382:74;;370:2;355:18;2448:99:105;211:251:255;24925:6339:105;;;;;;:::i;:::-;;:::i;:::-;;;1687:25:255;;;1675:2;1660:18;24925:6339:105;1541:177:255;24925:6339:105;25003:7;25046:18;;:::i;:::-;25193:4;25186:5;25183:15;25173:134;;25287:1;25284;25277:12;25173:134;25343:4;25337:11;25350;25334:28;25324:137;;25441:1;25438;25431:12;25324:137;25509:3;25491:16;25488:25;25478:150;;25608:1;25605;25598:12;25478:150;25672:3;25658:12;25655:21;25645:145;;25770:1;25767;25760:12;25645:145;26050:24;;26394:4;26096:20;26452:2;26154:21;;26050:24;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;;;26154:21;;;26050:24;26023:52;;26096:20;;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26027:21;26023:52;;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;26154:21;;;26050:24;26023:52;;26212:18;26096:20;27070:10;26212:18;27060:21;;;26154;;;;27168:1;27153:77;27178:2;27175:1;27172:9;27153:77;;;26050:24;;26027:21;26023:52;26096:20;;27226:1;26154:21;;;;26038:2;26212:18;;;;27196:1;27189:9;27153:77;;;27157:14;;;27308:5;:12;;;27304:71;;;27347:13;:11;:13::i;:::-;27340:20;;;;;27304:71;27389:10;;;:15;;27403:1;27389:15;;;;;27474:8;;;;-1:-1:-1;;27466:20:105;;-1:-1:-1;27466:7:105;:20::i;:::-;27452:34;-1:-1:-1;27516:10:105;27524:2;27516:10;;;;27593:1;27583:11;;;:26;;;27598:6;:11;;27608:1;27598:11;27583:26;27579:310;;;27739:13;27808:1;27786:4;27793:10;27786:17;27785:24;;;;27756:5;:12;;;27771:10;27756:25;27755:54;27739:70;;27834:40;27845:6;:11;;27855:1;27845:11;:20;;27863:2;27845:20;;;27859:1;27845:20;27834:40;;27867:6;27834:10;:40::i;:::-;27827:47;;;;;;;;27579:310;28138:15;;;;27933:9;;;;28070:4;28064:2;28056:10;;;28055:19;;;28138:15;28163:2;28155:10;;;28154:19;28138:36;;;;;;;:::i;:::-;;;;;;-1:-1:-1;28203:5:105;28227:11;;;;;:29;;;28242:6;:14;;28252:4;28242:14;28227:29;28223:832;;;28319:5;:15;;;28335:5;28319:22;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;28382:4:105;28376:2;28368:10;;;28367:19;28223:832;;;28420:4;28411:6;:13;;;28407:648;;;28541:6;:13;;28551:3;28541:13;:30;;;;28558:6;:13;;28568:3;28558:13;28541:30;:47;;;;28575:6;:13;;28585:3;28575:13;28541:47;28537:253;;;28651:4;28658:6;28651:13;28646:18;;28407:648;;28537:253;28750:21;28753:4;28760:6;28753:13;28768:2;28750;:21::i;:::-;28745:26;;28407:648;;;28824:4;28814:6;:14;;;;:32;;;;28832:6;:14;;28842:4;28832:14;28814:32;:50;;;;28850:6;:14;;28860:4;28850:14;28814:50;28810:245;;;28934:5;:15;;;28950:5;28934:22;;;;;;;;;:::i;:::-;;;;;28929:27;;29035:5;29027:13;;28810:245;29084:1;29074:6;:11;;;;:25;;;;;29098:1;29089:6;:10;;;29074:25;29073:42;;;;29104:6;:11;;29114:1;29104:11;29073:42;29069:125;;;29142:37;29155:6;29163:4;29169:5;29176:2;29142:12;:37::i;:::-;29135:44;;;;;;;;;;;29069:125;29227:13;29208:16;29379:4;29369:14;;;;29365:446;;29448:21;29451:4;29458:6;29451:13;29466:2;29448;:21::i;:::-;29442:27;;;;29506:10;29501:15;;29540:16;29501:15;29554:1;29540:7;:16::i;:::-;29534:22;;29588:4;29578:6;:14;;;;:32;;;;;29596:6;:14;;29606:4;29596:14;;29578:32;29574:223;;;29675:4;29663:16;;29777:1;29769:9;;29574:223;29385:426;29365:446;29844:10;29857:26;29865:4;29871:2;29875;29879:3;29857:7;:26::i;:::-;29886:10;29857:39;;;;-1:-1:-1;29982:4:105;29975:11;;;30014;;;:24;;;;;30037:1;30029:4;:9;;;;30014:24;:39;;;;;30049:4;30042;:11;;;30014:39;30010:847;;;30077:4;:9;;30085:1;30077:9;:22;;;;30090:4;:9;;30098:1;30090:9;30077:22;30073:144;;;30161:37;30172:4;:9;;30180:1;30172:9;:21;;30188:5;30172:21;;;30184:1;30172:21;30195:2;30161:10;:37::i;:::-;30154:44;;;;;;;;;;;;;;;30073:144;30239:4;:11;;30247:3;30239:11;30235:121;;30309:28;30318:5;30325:2;30329:7;;;;30309:8;:28::i;30235:121::-;30377:4;:11;;30385:3;30377:11;30373:121;;30447:28;30456:5;30463:2;30467:7;;;;;30447:8;:28::i;30373:121::-;30564:4;:11;;30572:3;30564:11;30560:80;;30606:15;:13;:15::i;30560:80::-;30743:4;30735;:12;;;;:27;;;;;30758:4;30751;:11;;;30735:27;30731:112;;;30793:31;30804:4;30810:2;30814;30818:5;30793:10;:31::i;30731:112::-;30917:6;:14;;30927:4;30917:14;:28;;;;-1:-1:-1;30935:10:105;;;;;30917:28;30913:93;;;30990:1;30965:5;:15;;;30981:5;30965:22;;;;;;;;;:::i;:::-;:26;;;;:22;;;;;;:26;30913:93;31052:9;:26;;31065:13;31052:26;31048:92;;31098:27;31107:9;31118:1;31121:3;31098:8;:27::i;:::-;31221:26;31230:5;31237:3;31242:4;31221:8;:26::i;:::-;31214:33;;;;;;;;;;;;;24925:6339;;;;;;;:::o;3087:1709::-;3634:4;3628:11;;3550:4;3353:31;3342:43;;3413:13;3353:31;3752:2;3452:13;;3342:43;3359:24;3353:31;3452:13;;;3342:43;;;;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3359:24;3353:31;3452:13;;;3342:43;3128:12;;4337:13;;3452;;;3128:12;4417:84;4442:2;4439:1;4436:9;4417:84;;;3369:13;3359:24;;3353:31;3342:43;;3373:2;3413:13;;;;4497:1;3452:13;;;;4460:1;4453:9;4417:84;;;4421:14;4564:1;4560:2;4553:13;4659:5;4655:2;4651:14;4644:5;4639:27;4765:14;;;4748:32;;;3087:1709;-1:-1:-1;;3087:1709:105:o;20980:1831::-;21053:11;21164:14;21181:24;21193:11;21181;:24::i;:::-;21164:41;;21313:1;21306:5;21302:13;21299:33;;;21328:1;21325;21318:12;21299:33;21461:2;21449:15;;;21402:20;21891:5;21888:1;21884:13;21926:4;21962:1;21947:343;21972:2;21969:1;21966:9;21947:343;;;22095:2;22083:15;;;22032:20;22130:12;;;22144:1;22126:20;22167:42;;;;22235:1;22230:42;;;;22119:153;;22167:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22176:31;;22167:42;;22230;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;22239:31;;22119:153;-1:-1:-1;;21990:1:105;21983:9;21947:343;;;21951:14;22400:4;22394:11;22379:26;;22486:7;22480:4;22477:17;22467:124;;22528:10;22525:1;22518:21;22570:2;22567:1;22560:13;22467:124;-1:-1:-1;;22718:2:105;22707:14;;;;22695:10;22691:31;22688:1;22684:39;22752:16;;;;22770:10;22748:33;;20980:1831;-1:-1:-1;;;20980:1831:105:o;18090:823::-;18159:12;18246:18;;:::i;:::-;18314:4;18305:13;;18366:5;:8;;;18377:1;18366:12;18350:28;;:5;:12;;;:28;;;18346:95;;18398:28;;;;;2114:2:255;18398:28:105;;;2096:21:255;2153:2;2133:18;;;2126:30;2192:20;2172:18;;;2165:48;2230:18;;18398:28:105;;;;;;;;18346:95;18530:8;;;;;18563:12;;;;;18552:23;;;;;;;18589:20;;;;;18530:8;18721:13;;;18717:90;;18782:6;18791:1;18782:10;18754:5;:15;;;18770:8;18754:25;;;;;;;;;:::i;:::-;:38;;;;:25;;;;;;:38;18717:90;18883:13;:11;:13::i;:::-;18876:20;18090:823;-1:-1:-1;;;;;18090:823:105:o;2645:334::-;2706:6;2765:18;;;;2774:8;;;;2765:18;;;;;;2764:25;;;;;2781:1;2828:2;:9;;;2822:16;;;;;2821:22;;2820:32;;;;;;;2882:9;;2881:15;2764:25;2939:21;;2959:1;2939:21;;;2950:6;2939:21;2924:11;;;;;:37;;-1:-1:-1;;;2645:334:105;;;;:::o;12951:2026::-;13048:12;13134:18;;:::i;:::-;13202:4;13193:13;;13234:17;13294:5;:8;;;13305:1;13294:12;13278:28;;:5;:12;;;:28;;;13274:97;;13326:30;;;;;2461:2:255;13326:30:105;;;2443:21:255;2500:2;2480:18;;;2473:30;2539:22;2519:18;;;2512:50;2579:18;;13326:30:105;2259:344:255;13274:97:105;13441:7;:12;;13452:1;13441:12;:28;;;;13457:7;:12;;13468:1;13457:12;13441:28;13437:947;;;13489:9;13501:5;:15;;;13517:6;13501:23;;;;;;;;;:::i;:::-;;;;;13489:35;;13565:2;13558:9;;:3;:9;;;:25;;;;;13571:7;:12;;13582:1;13571:12;13558:25;13557:58;;;;13596:2;13589:9;;:3;:9;;;;:25;;;;;13602:7;:12;;13613:1;13602:12;13589:25;13542:73;;13471:159;13437:947;;;13727:7;:12;;13738:1;13727:12;13723:661;;13788:1;13780:3;13774:15;;;;13759:30;;13723:661;;;13892:7;:12;;13903:1;13892:12;13888:496;;13952:1;13945:3;13939:14;;;13924:29;;13888:496;;;14073:7;:12;;14084:1;14073:12;14069:315;;14161:4;14155:2;14146:11;;;14145:20;14131:10;14188:8;;;14184:84;;14248:1;14241:3;14235:14;;;14220:29;;14184:84;14289:3;:8;;14296:1;14289:8;14285:85;;14350:1;14342:3;14336:15;;;;14321:30;;14285:85;14087:297;14069:315;14460:8;;;;;14538:12;;;;14527:23;;;;;14694:178;;;;14785:1;14759:22;14762:5;14770:6;14762:14;14778:2;14759;:22::i;:::-;:27;;;;;;;14745:42;;14754:1;14745:42;14730:57;:12;;;:57;14694:178;;;14841:12;;;;;14856:1;14841:16;14826:31;;;;14694:178;14947:13;:11;:13::i;:::-;14940:20;12951:2026;-1:-1:-1;;;;;;;;12951:2026:105:o;31310:7165::-;31397:6;31455:10;31463:2;31455:10;;;;;;31503:11;;31552:4;31543:13;;31539:6876;;;31683:1;31673:6;:11;;;;:27;;;;;31697:3;31688:6;:12;;;31673:27;31669:537;;;31728:6;:11;;31738:1;31728:11;31724:423;;-1:-1:-1;31748:4:105;31724:423;;;31792:6;:11;;31802:1;31792:11;31788:359;;-1:-1:-1;31812:4:105;31788:359;;;31857:6;:13;;31867:3;31857:13;31853:294;;-1:-1:-1;31879:4:105;31853:294;;;31923:6;:13;;31933:3;31923:13;31919:228;;-1:-1:-1;31945:4:105;31919:228;;;31990:6;:13;;32000:3;31990:13;31986:161;;-1:-1:-1;32012:4:105;31986:161;;;32056:6;:13;;32066:3;32056:13;32052:95;;-1:-1:-1;32078:4:105;32052:95;;;32121:6;:13;;32131:3;32121:13;32117:30;;-1:-1:-1;32143:4:105;32117:30;32186:1;32177:10;;31669:537;32267:6;:11;;32277:1;32267:11;32263:3554;;32331:4;32326:1;32318:9;;;32317:18;32368:4;32318:9;32361:11;;;32357:1319;;;32460:4;32452;:12;;;32448:1206;;32503:2;32496:9;;;;;;;32448:1206;32617:4;:12;;32625:4;32617:12;32613:1041;;32668:11;;;;;;;;-1:-1:-1;32661:18:105;;-1:-1:-1;;32661:18:105;32613:1041;32792:4;:12;;32800:4;32792:12;32788:866;;32843:11;;;;;;;;-1:-1:-1;32836:18:105;;-1:-1:-1;;32836:18:105;32788:866;32970:4;:12;;32978:4;32970:12;32966:688;;33021:27;33030:5;33024:11;;:2;:11;;;;33042:5;33037:2;:10;33021:2;:27::i;:::-;33014:34;;;;;;;32966:688;33170:4;:12;;33178:4;33170:12;33166:488;;-1:-1:-1;;;;33221:17:105;;;33233:4;33228:9;;33221:17;33214:24;;33166:488;33361:4;:12;;33369:4;33361:12;33357:297;;-1:-1:-1;;;;33412:17:105;;;33424:4;33419:9;;33412:17;33405:24;;33357:297;33555:4;:12;;33563:4;33555:12;33551:103;;33606:21;33615:2;33609:8;;:2;:8;;;;33624:2;33619;:7;33606:2;:21::i;33551:103::-;33836:4;:12;;33844:4;33836:12;:28;;;;33852:4;:12;;33860:4;33852:12;33836:28;33832:1151;;;33904:2;33899;:7;33892:14;;;;;;;33832:1151;33994:4;:12;;34002:4;33994:12;:28;;;;34010:4;:12;;34018:4;34010:12;33994:28;33990:993;;;34062:2;34057;:7;34050:14;;;;;;;33990:993;34144:4;:12;;34152:4;34144:12;34140:843;;34196:2;34191;:7;34184:14;;;;;;;34140:843;34277:4;:12;;34285:4;34277:12;34273:710;;34330:2;34325;:7;34317:16;;;;;;;34273:710;34413:4;:12;;34421:4;34413:12;34409:574;;34466:2;34461;:7;34453:16;;;;;;;34409:574;34549:4;:12;;34557:4;34549:12;34545:438;;-1:-1:-1;;;;34598:7:105;;;34596:10;34589:17;;34545:438;34709:4;:12;;34717:4;34709:12;34705:278;;34774:2;34756:21;;34762:2;34756:21;;;:29;;34784:1;34756:29;;;34780:1;34756:29;34749:36;;;;;;;;;34705:278;34898:4;:12;;34906:4;34898:12;34894:89;;34950:2;34945:7;;:2;:7;;;:15;;34959:1;34945:15;;34894:89;32280:2721;31539:6876;;32263:3554;35072:6;:13;;35082:3;35072:13;35068:749;;35122:2;35116;:8;;;;35109:15;;;;;;35068:749;35197:6;:14;;35207:4;35197:14;35193:624;;35266:4;:9;;35274:1;35266:9;35262:100;;-1:-1:-1;;;35317:21:105;;;35303:36;;35262:100;35414:4;:12;;35422:4;35414:12;:28;;;;35430:4;:12;;35438:4;35430:12;35414:28;35410:389;;;35474:4;:12;;35482:4;35474:12;35470:83;;35523:3;;;35470:83;35578:8;35616:127;35628:10;35623:15;;:20;35616:127;;35708:8;35675:3;35708:8;;;;;35675:3;35616:127;;;35775:1;-1:-1:-1;35768:8:105;;-1:-1:-1;;35768:8:105;35410:389;31539:6876;;;35850:4;35841:6;:13;;;35837:2578;;;35900:6;:14;;35910:4;35900:14;35896:1208;;35945:42;35963:2;35968:1;35963:6;35973:1;35962:12;35957:2;:17;35949:26;;:3;:26;;;;35979:4;35948:35;35985:1;35945:2;:42::i;:::-;35938:49;;;;;;35896:1208;36054:6;:14;;36064:4;36054:14;36050:1054;;36099:45;36117:2;36122:1;36117:6;36127:1;36116:12;36111:2;:17;36103:26;;:3;:26;;;;36133:6;36102:37;36141:2;36099;:45::i;36050:1054::-;36212:6;:14;;36222:4;36212:14;36208:896;;-1:-1:-1;;;36263:21:105;36282:1;36277;36272:6;;36271:12;36263:21;;36320:36;;;36391:5;36386:10;;36263:21;;;;;36385:18;36378:25;;36208:896;36470:6;:14;;36480:4;36470:14;36466:638;;36515:3;36508:10;;;;;;36466:638;36586:6;:14;;36596:4;36586:14;36582:522;;36646:2;36651:1;36646:6;36656:1;36645:12;36640:2;:17;36632:26;;:3;:26;;;;36662:4;36631:35;36624:42;;;;;;36582:522;36734:6;:14;;36744:4;36734:14;36730:374;;36794:2;36799:1;36794:6;36804:1;36793:12;36788:2;:17;36780:26;;:3;:26;;;;36810:6;36779:37;36772:44;;;;;;36730:374;36884:6;:14;;36894:4;36884:14;36880:224;;-1:-1:-1;;;36935:26:105;36959:1;36954;36949:6;;36948:12;36943:2;:17;36935:26;;36997:41;;;37073:5;37068:10;;36935:26;;;;;37067:18;37060:25;;35837:2578;37158:6;:14;;37168:4;37158:14;37154:1261;;-1:-1:-1;;;37211:4:105;37205:34;37237:1;37232;37227:6;;37226:12;37221:2;:17;37205:34;;37291:27;;;37271:48;;;37345:10;;37206:9;;;37205:34;;37344:18;37337:25;;37154:1261;37417:6;:14;;37427:4;37417:14;37413:1002;;-1:-1:-1;;;37470:6:105;37464:36;37498:1;37493;37488:6;;37487:12;37482:2;:17;37464:36;;37552:29;;;37532:50;;;37608:10;;37465:11;;;37464:36;;37607:18;37600:25;;37413:1002;37681:6;:14;;37691:4;37681:14;37677:738;;-1:-1:-1;;;37728:20:105;37746:1;37741;37736:6;;37735:12;37728:20;;37780:36;;;37848:5;37842:11;;37728:20;;;;;37841:19;37834:26;;37677:738;37915:6;:14;;37925:4;37915:14;37911:504;;37956:2;37949:9;;;;;;37911:504;38014:6;:14;;38024:4;38014:14;38010:405;;-1:-1:-1;;;38061:25:105;38084:1;38079;38074:6;;38073:12;38068:2;:17;38061:25;;38118:41;;;38191:5;38185:11;;38061:25;;;;;38184:19;38177:26;;38010:405;38258:6;:14;;38268:4;38258:14;38254:161;;38299:3;38292:10;;;;;;38254:161;38357:6;:14;;38367:4;38357:14;38353:62;;38398:2;38391:9;;;;;;38353:62;38429:29;;;;;2810:2:255;38429:29:105;;;2792:21:255;2849:2;2829:18;;;2822:30;2888:21;2868:18;;;2861:49;2927:18;;38429:29:105;2608:343:255;19194:782:105;19280:12;19367:18;;:::i;:::-;-1:-1:-1;19435:4:105;19542:2;19530:14;;;;19522:41;;;;;;;3158:2:255;19522:41:105;;;3140:21:255;3197:2;3177:18;;;3170:30;3236:16;3216:18;;;3209:44;3270:18;;19522:41:105;2956:338:255;19522:41:105;19659:14;;;;;;;:30;;;19677:12;19659:30;19655:102;;;19738:4;19709:5;:15;;;19725:9;19709:26;;;;;;;;;:::i;:::-;:33;;;;:26;;;;;;:33;19655:102;19812:12;;;;;19801:23;;;;:8;;;:23;19868:1;19853:16;;;19838:31;;;19946:13;:11;:13::i;4837:7728::-;4880:12;4966:18;;:::i;:::-;-1:-1:-1;5144:15:105;;:18;;;;5034:4;5304:18;;;;5348;;;;5392;;;;;5034:4;;5124:17;;;;5304:18;5348;5482;;;5496:4;5482:18;5478:6777;;5532:2;5561:4;5556:9;;:14;5552:144;;5672:4;5667:9;;5659:4;:18;5653:24;5552:144;5717:2;:7;;5723:1;5717:7;5713:161;;5753:10;;;;;5785:16;;;;;;;;5753:10;-1:-1:-1;5713:161:105;;;5853:2;5848:7;;5713:161;5502:386;5478:6777;;;5990:10;:18;;6004:4;5990:18;5986:6269;;1745:10;6028:14;;5986:6269;;;6126:10;:18;;6140:4;6126:18;6122:6133;;6169:1;6164:6;;6122:6133;;;6294:10;:18;;6308:4;6294:18;6290:5965;;6347:4;6332:12;;;:19;6369:26;;;:14;;;:26;6420:13;:11;:13::i;:::-;6413:20;;;;;;;;;4837:7728;:::o;6290:5965::-;6559:10;:18;;6573:4;6559:18;6555:5700;;6710:14;;;6706:2708;6555:5700;6706:2708;6880:22;;;;;6876:2538;;7005:10;7018:27;7026:2;7031:10;7026:15;7043:1;7018:7;:27::i;:::-;7129:17;;;;7005:40;;-1:-1:-1;7129:17:105;7107:19;7279:14;7298:1;7273:26;7269:131;;7341:36;7365:11;1277:21:106;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;7341:36:105;7327:50;;7269:131;7486:20;;;;;7453:54;;;;;;;;3472:25:255;;;7453:54:105;3533:23:255;;;3513:18;;;3506:51;7422:11:105;;;;7453:19;:6;:19;;;;3445:18:255;;7453:54:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7421:86;;;;7734:1;7730:2;7726:10;7831:9;7828:1;7824:17;7913:6;7906:5;7903:17;7900:40;;;7933:5;7923:15;;7900:40;;8016:6;8012:2;8009:14;8006:34;;;8036:2;8026:12;;8006:34;8142:3;8137:1;8129:6;8125:14;8120:3;8116:24;8112:34;8105:41;;8242:3;8238:1;8226:9;8217:6;8214:1;8210:14;8206:30;8202:38;8198:48;8191:55;;8397:1;8393;8389;8377:9;8374:1;8370:17;8366:25;8362:33;8358:41;8524:1;8520;8516;8507:6;8495:9;8492:1;8488:17;8484:30;8480:38;8476:46;8472:54;8454:72;;8655:10;8651:15;8645:4;8641:26;8633:34;;8771:3;8763:4;8759:9;8754:3;8750:19;8747:28;8740:35;;;;8917:33;8926:2;8931:10;8926:15;8943:1;8946:3;8917:8;:33::i;:::-;8972:20;;;:38;;;;;;;;;-1:-1:-1;6876:2538:105;;-1:-1:-1;;;6876:2538:105;;9129:18;;;;;9125:289;;9299:2;9294:7;;6555:5700;;9125:289;9353:10;9348:15;;2053:3;9385:10;;9125:289;6555:5700;;;9543:10;:18;;9557:4;9543:18;9539:2716;;9697:15;;;1824:1;9697:15;;:34;;-1:-1:-1;9716:15:105;;;1859:1;9716:15;9697:34;:57;;;-1:-1:-1;9735:19:105;;;1936:1;9735:19;9697:57;9693:1593;;;9783:2;9778:7;;9539:2716;;9693:1593;9909:23;;;;;9905:1381;;9956:10;9969:27;9977:2;9982:10;9977:15;9994:1;9969:7;:27::i;:::-;10072:17;;;;9956:40;;-1:-1:-1;10315:1:105;10307:10;;10409:1;10405:17;10484:13;;;10481:32;;;10506:5;10500:11;;10481:32;10792:14;;;10598:1;10788:22;;;10784:32;;;;10681:26;10705:1;10590:10;;;10685:18;;;10681:26;10780:43;10586:20;;10888:12;11016:17;;;:23;11084:1;11061:20;;;:24;10594:2;-1:-1:-1;10594:2:105;6555:5700;;9539:2716;11488:10;:18;;11502:4;11488:18;11484:771;;11598:2;:7;;11604:1;11598:7;11594:647;;11691:14;;;;;:40;;-1:-1:-1;11709:22:105;;;1978:1;11709:22;11691:40;:62;;;-1:-1:-1;11735:18:105;;;1897:1;11735:18;11691:62;11687:404;;;11786:1;11781:6;;11594:647;;11687:404;11832:15;;;1824:1;11832:15;;:34;;-1:-1:-1;11851:15:105;;;1859:1;11851:15;11832:34;:61;;;-1:-1:-1;11870:23:105;;;2021:1;11870:23;11832:61;:84;;;-1:-1:-1;11897:19:105;;;1936:1;11897:19;11832:84;11828:263;;;11949:1;11944:6;;6555:5700;;11594:647;12142:10;12137:15;;2087:4;12174:11;;11594:647;12330:15;;;;;:23;;;;:18;;;;:23;;;;12367:15;;:23;;;:18;;;;:23;-1:-1:-1;12456:12:105;;;;12445:23;;;:8;;;:23;12512:1;12497:16;12482:31;;;;;12535:13;:11;:13::i;15318:2480::-;15412:12;15498:18;;:::i;:::-;-1:-1:-1;15566:4:105;15598:10;15706:13;;;15715:4;15706:13;15702:1705;;-1:-1:-1;15745:8:105;;;;15702:1705;;;15864:5;:13;;15873:4;15864:13;15860:1547;;15897:14;;;:8;;;:14;15860:1547;;;16027:5;:13;;16036:4;16027:13;16023:1384;;-1:-1:-1;16066:8:105;;;;16023:1384;;;16185:5;:13;;16194:4;16185:13;16181:1226;;16218:14;;;:8;;;:14;16181:1226;;;16359:5;:13;;16368:4;16359:13;16355:1052;;16486:9;16432:17;16412;;;16432;;;;16412:37;16493:2;16486:9;;;;;16468:8;;;:28;16514:22;:8;;;:22;16355:1052;;;16673:5;:13;;16682:4;16673:13;16669:738;;16740:11;16726;;;16740;;;16726:25;16795:2;16788:9;;;;;16770:8;;;:28;16816:22;:8;;;:22;16669:738;;;16997:5;:13;;17006:4;16997:13;16993:414;;17067:3;17048:23;;17054:3;17048:23;;;;;;;:::i;:::-;;17030:42;;:8;;;:42;17108:23;;;;;;;;;;;;;:::i;:::-;;17090:42;;:8;;;:42;16993:414;;;17301:5;:13;;17310:4;17301:13;17297:110;;17351:3;17345:9;;:3;:9;;;;;;;:::i;:::-;;17334:20;;;;:8;;;:20;17383:9;;;;;;;;;;;:::i;:::-;;17372:20;;:8;;;:20;17297:110;17500:14;;;;17496:85;;17563:3;17534:5;:15;;;17550:9;17534:26;;;;;;;;;:::i;:::-;:32;;;;:26;;;;;;:32;17496:85;17635:12;;;;;17624:23;;;;:8;;;:23;17691:1;17676:16;;;17661:31;;;17768:13;:11;:13::i;:::-;17761:20;15318:2480;-1:-1:-1;;;;;;;15318:2480:105:o;23147:1654::-;23323:14;23340:24;23352:11;23340;:24::i;:::-;23323:41;;23472:1;23465:5;23461:13;23458:33;;;23487:1;23484;23477:12;23458:33;23626:2;23820:15;;;23645:2;23634:14;;23622:10;23618:31;23615:1;23611:39;23776:16;;;23561:20;;23761:10;23750:22;;;23746:27;23736:38;23733:60;24262:5;24259:1;24255:13;24333:1;24318:343;24343:2;24340:1;24337:9;24318:343;;;24466:2;24454:15;;;24403:20;24501:12;;;24515:1;24497:20;24538:42;;;;24606:1;24601:42;;;;24490:153;;24538:42;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24547:31;;24538:42;;24601;21625:1;21618:12;;;21658:2;21651:13;;;21703:2;21690:16;;24610:31;;24490:153;-1:-1:-1;;24361:1:105;24354:9;24318:343;;;-1:-1:-1;;24760:4:105;24753:18;-1:-1:-1;;;;23147:1654:105:o;20180:586::-;20502:20;;;20526:7;20502:32;20495:3;:40;;;20608:14;;20663:17;;20657:24;;;20649:72;;;;;;;4209:2:255;20649:72:105;;;4191:21:255;4248:2;4228:18;;;4221:30;4287:34;4267:18;;;4260:62;4358:5;4338:18;;;4331:33;4381:19;;20649:72:105;4007:399:255;20649:72:105;20735:14;20180:586;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;467:347:255:-;518:8;528:6;582:3;575:4;567:6;563:17;559:27;549:55;;600:1;597;590:12;549:55;-1:-1:-1;623:20:255;;666:18;655:30;;652:50;;;698:1;695;688:12;652:50;735:4;727:6;723:17;711:29;;787:3;780:4;771:6;763;759:19;755:30;752:39;749:59;;;804:1;801;794:12;749:59;467:347;;;;;:::o;819:717::-;909:6;917;925;933;986:2;974:9;965:7;961:23;957:32;954:52;;;1002:1;999;992:12;954:52;1042:9;1029:23;1071:18;1112:2;1104:6;1101:14;1098:34;;;1128:1;1125;1118:12;1098:34;1167:58;1217:7;1208:6;1197:9;1193:22;1167:58;:::i;:::-;1244:8;;-1:-1:-1;1141:84:255;-1:-1:-1;1332:2:255;1317:18;;1304:32;;-1:-1:-1;1348:16:255;;;1345:36;;;1377:1;1374;1367:12;1345:36;;1416:60;1468:7;1457:8;1446:9;1442:24;1416:60;:::i;:::-;819:717;;;;-1:-1:-1;1495:8:255;-1:-1:-1;;;;819:717:255:o;1723:184::-;1775:77;1772:1;1765:88;1872:4;1869:1;1862:15;1896:4;1893:1;1886:15;3568:245;3647:6;3655;3708:2;3696:9;3687:7;3683:23;3679:32;3676:52;;;3724:1;3721;3714:12;3676:52;-1:-1:-1;;3747:16:255;;3803:2;3788:18;;;3782:25;3747:16;;3782:25;;-1:-1:-1;3568:245:255:o;3818:184::-;3870:77;3867:1;3860:88;3967:4;3964:1;3957:15;3991:4;3988:1;3981:15"
func init() {
if err := json.Unmarshal([]byte(MIPSStorageLayoutJSON), MIPSStorageLayout); err != nil {
......
......@@ -15,7 +15,7 @@ var PreimageOracleStorageLayout = new(solc.StorageLayout)
var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063e03110e11161005b578063e03110e114610111578063e159261114610139578063fe4ac08e1461014e578063fef2b4ed146101c357600080fd5b806361238bde146100825780638542cf50146100c05780639a1f5e7f146100fe575b600080fd5b6100ad610090366004610551565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100ee6100ce366004610551565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100b7565b6100ad61010c366004610573565b6101e3565b61012461011f366004610551565b6102b6565b604080519283526020830191909152016100b7565b61014c6101473660046105a5565b6103a7565b005b61014c61015c366004610573565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100ad6101d1366004610621565b60006020819052908152604090205481565b60006101ee856104b0565b90506101fb836008610669565b8211806102085750602083115b1561023f576040517ffe25498700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602081815260c085901b82526008959095528251828252600286526040808320858452875280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845287528083209483529386528382205581815293849052922055919050565b6000828152600260209081526040808320848452909152812054819060ff1661033f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461035b816008610669565b610366856020610669565b106103845783610377826008610669565b6103819190610681565b91505b506000938452600160209081526040808620948652939052919092205492909150565b604435600080600883018611156103c65763fe2549876000526004601cfd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82161761054b81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b92915050565b6000806040838503121561056457600080fd5b50508035926020909101359150565b6000806000806080858703121561058957600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000604084860312156105ba57600080fd5b83359250602084013567ffffffffffffffff808211156105d957600080fd5b818601915086601f8301126105ed57600080fd5b8135818111156105fc57600080fd5b87602082850101111561060e57600080fd5b6020830194508093505050509250925092565b60006020828403121561063357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561067c5761067c61063a565b500190565b6000828210156106935761069361063a565b50039056fea164736f6c634300080f000a"
var PreimageOracleDeployedSourceMap = "306:4436:106:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:254;;;401:2;386:18;537:68:106;;;;;;;;680:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:254;;607:22;589:41;;577:2;562:18;680:66:106;449:187:254;1938:1165:106;;;;;;:::i;:::-;;:::i;789:536::-;;;;;;:::i;:::-;;:::i;:::-;;;;1205:25:254;;;1261:2;1246:18;;1239:34;;;;1178:18;789:536:106;1031:248:254;3145:1595:106;;;;;;:::i;:::-;;:::i;:::-;;1672:224;;;;;;:::i;:::-;1767:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1801:4;1767:38;;;;;;1815:18;;;;;;;;:30;;;;;;;;;:37;;;;1862:20;;;;;;;;;;:27;1672:224;419:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;1938:1165;2100:12;2205:36;2234:6;2205:28;:36::i;:::-;2198:43;-1:-1:-1;2335:9:106;:5;2343:1;2335:9;:::i;:::-;2321:11;:23;:37;;;;2356:2;2348:5;:10;2321:37;2317:90;;;2381:15;;;;;;;;;;;;;;2317:90;2476:12;2576:4;2569:18;;;2677:3;2673:15;;;2660:29;;2709:4;2702:19;;;;2811:18;;2901:20;;;:14;:20;;;;;;:33;;;;;;;;:40;;;;2937:4;2901:40;;;;;;2951:19;;;;;;;;:32;;;;;;;;;:39;3067:21;;;;;;;;;:29;2916:4;1938:1165;-1:-1:-1;1938:1165:106:o;789:536::-;865:12;914:20;;;:14;:20;;;;;;;;:29;;;;;;;;;865:12;;914:29;;906:62;;;;;;;3229:2:254;906:62:106;;;3211:21:254;3268:2;3248:18;;;3241:30;3307:22;3287:18;;;3280:50;3347:18;;906:62:106;;;;;;;;-1:-1:-1;1099:14:106;1116:21;;;1087:2;1116:21;;;;;;;;1167:10;1116:21;1176:1;1167:10;:::i;:::-;1151:12;:7;1161:2;1151:12;:::i;:::-;:26;1147:87;;1216:7;1203:10;:6;1212:1;1203:10;:::i;:::-;:20;;;;:::i;:::-;1193:30;;1147:87;-1:-1:-1;1290:19:106;;;;:13;:19;;;;;;;;:28;;;;;;;;;;;;789:536;;-1:-1:-1;789:536:106:o;3145:1595::-;3441:4;3428:18;3246:12;;3570:1;3560:12;;3544:29;;3541:210;;;3645:10;3642:1;3635:21;3735:1;3729:4;3722:15;3541:210;3994:3;3990:14;;;3894:4;3978:27;4025:11;3999:4;4144:16;4025:11;4126:41;4357:29;;;4361:11;4357:29;4351:36;4409:20;;;;4556:19;4549:27;4578:11;4546:44;4609:19;;;;4587:1;4609:19;;;;;;;;:32;;;;;;;;:39;;;;4644:4;4609:39;;;;;;4658:18;;;;;;;;:31;;;;;;;;;:38;;;;4706:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;3145:1595:106:o;492:353:105:-;752:11;777:19;765:32;;749:49;824:14;749:49;1277:21;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;824:14;817:21;492:353;-1:-1:-1;;492:353:105:o;14:248:254:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:254;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:254:o;641:385::-;727:6;735;743;751;804:3;792:9;783:7;779:23;775:33;772:53;;;821:1;818;811:12;772:53;-1:-1:-1;;844:23:254;;;914:2;899:18;;886:32;;-1:-1:-1;965:2:254;950:18;;937:32;;1016:2;1001:18;988:32;;-1:-1:-1;641:385:254;-1:-1:-1;641:385:254:o;1284:659::-;1363:6;1371;1379;1432:2;1420:9;1411:7;1407:23;1403:32;1400:52;;;1448:1;1445;1438:12;1400:52;1484:9;1471:23;1461:33;;1545:2;1534:9;1530:18;1517:32;1568:18;1609:2;1601:6;1598:14;1595:34;;;1625:1;1622;1615:12;1595:34;1663:6;1652:9;1648:22;1638:32;;1708:7;1701:4;1697:2;1693:13;1689:27;1679:55;;1730:1;1727;1720:12;1679:55;1770:2;1757:16;1796:2;1788:6;1785:14;1782:34;;;1812:1;1809;1802:12;1782:34;1857:7;1852:2;1843:6;1839:2;1835:15;1831:24;1828:37;1825:57;;;1878:1;1875;1868:12;1825:57;1909:2;1905;1901:11;1891:21;;1931:6;1921:16;;;;;1284:659;;;;;:::o;2338:180::-;2397:6;2450:2;2438:9;2429:7;2425:23;2421:32;2418:52;;;2466:1;2463;2456:12;2418:52;-1:-1:-1;2489:23:254;;2338:180;-1:-1:-1;2338:180:254:o;2705:184::-;2757:77;2754:1;2747:88;2854:4;2851:1;2844:15;2878:4;2875:1;2868:15;2894:128;2934:3;2965:1;2961:6;2958:1;2955:13;2952:39;;;2971:18;;:::i;:::-;-1:-1:-1;3007:9:254;;2894:128::o;3376:125::-;3416:4;3444:1;3441;3438:8;3435:34;;;3449:18;;:::i;:::-;-1:-1:-1;3486:9:254;;3376:125::o"
var PreimageOracleDeployedSourceMap = "306:4436:107:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:255;;;401:2;386:18;537:68:107;;;;;;;;680:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:255;;607:22;589:41;;577:2;562:18;680:66:107;449:187:255;1938:1165:107;;;;;;:::i;:::-;;:::i;789:536::-;;;;;;:::i;:::-;;:::i;:::-;;;;1205:25:255;;;1261:2;1246:18;;1239:34;;;;1178:18;789:536:107;1031:248:255;3145:1595:107;;;;;;:::i;:::-;;:::i;:::-;;1672:224;;;;;;:::i;:::-;1767:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1801:4;1767:38;;;;;;1815:18;;;;;;;;:30;;;;;;;;;:37;;;;1862:20;;;;;;;;;;:27;1672:224;419:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;1938:1165;2100:12;2205:36;2234:6;2205:28;:36::i;:::-;2198:43;-1:-1:-1;2335:9:107;:5;2343:1;2335:9;:::i;:::-;2321:11;:23;:37;;;;2356:2;2348:5;:10;2321:37;2317:90;;;2381:15;;;;;;;;;;;;;;2317:90;2476:12;2576:4;2569:18;;;2677:3;2673:15;;;2660:29;;2709:4;2702:19;;;;2811:18;;2901:20;;;:14;:20;;;;;;:33;;;;;;;;:40;;;;2937:4;2901:40;;;;;;2951:19;;;;;;;;:32;;;;;;;;;:39;3067:21;;;;;;;;;:29;2916:4;1938:1165;-1:-1:-1;1938:1165:107:o;789:536::-;865:12;914:20;;;:14;:20;;;;;;;;:29;;;;;;;;;865:12;;914:29;;906:62;;;;;;;3229:2:255;906:62:107;;;3211:21:255;3268:2;3248:18;;;3241:30;3307:22;3287:18;;;3280:50;3347:18;;906:62:107;;;;;;;;-1:-1:-1;1099:14:107;1116:21;;;1087:2;1116:21;;;;;;;;1167:10;1116:21;1176:1;1167:10;:::i;:::-;1151:12;:7;1161:2;1151:12;:::i;:::-;:26;1147:87;;1216:7;1203:10;:6;1212:1;1203:10;:::i;:::-;:20;;;;:::i;:::-;1193:30;;1147:87;-1:-1:-1;1290:19:107;;;;:13;:19;;;;;;;;:28;;;;;;;;;;;;789:536;;-1:-1:-1;789:536:107:o;3145:1595::-;3441:4;3428:18;3246:12;;3570:1;3560:12;;3544:29;;3541:210;;;3645:10;3642:1;3635:21;3735:1;3729:4;3722:15;3541:210;3994:3;3990:14;;;3894:4;3978:27;4025:11;3999:4;4144:16;4025:11;4126:41;4357:29;;;4361:11;4357:29;4351:36;4409:20;;;;4556:19;4549:27;4578:11;4546:44;4609:19;;;;4587:1;4609:19;;;;;;;;:32;;;;;;;;:39;;;;4644:4;4609:39;;;;;;4658:18;;;;;;;;:31;;;;;;;;;:38;;;;4706:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;3145:1595:107:o;492:353:106:-;752:11;777:19;765:32;;749:49;824:14;749:49;1277:21;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;824:14;817:21;492:353;-1:-1:-1;;492:353:106:o;14:248:255:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:255;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:255:o;641:385::-;727:6;735;743;751;804:3;792:9;783:7;779:23;775:33;772:53;;;821:1;818;811:12;772:53;-1:-1:-1;;844:23:255;;;914:2;899:18;;886:32;;-1:-1:-1;965:2:255;950:18;;937:32;;1016:2;1001:18;988:32;;-1:-1:-1;641:385:255;-1:-1:-1;641:385:255:o;1284:659::-;1363:6;1371;1379;1432:2;1420:9;1411:7;1407:23;1403:32;1400:52;;;1448:1;1445;1438:12;1400:52;1484:9;1471:23;1461:33;;1545:2;1534:9;1530:18;1517:32;1568:18;1609:2;1601:6;1598:14;1595:34;;;1625:1;1622;1615:12;1595:34;1663:6;1652:9;1648:22;1638:32;;1708:7;1701:4;1697:2;1693:13;1689:27;1679:55;;1730:1;1727;1720:12;1679:55;1770:2;1757:16;1796:2;1788:6;1785:14;1782:34;;;1812:1;1809;1802:12;1782:34;1857:7;1852:2;1843:6;1839:2;1835:15;1831:24;1828:37;1825:57;;;1878:1;1875;1868:12;1825:57;1909:2;1905;1901:11;1891:21;;1931:6;1921:16;;;;;1284:659;;;;;:::o;2338:180::-;2397:6;2450:2;2438:9;2429:7;2425:23;2421:32;2418:52;;;2466:1;2463;2456:12;2418:52;-1:-1:-1;2489:23:255;;2338:180;-1:-1:-1;2338:180:255:o;2705:184::-;2757:77;2754:1;2747:88;2854:4;2851:1;2844:15;2878:4;2875:1;2868:15;2894:128;2934:3;2965:1;2961:6;2958:1;2955:13;2952:39;;;2971:18;;:::i;:::-;-1:-1:-1;3007:9:255;;2894:128::o;3376:125::-;3416:4;3444:1;3441;3438:8;3435:34;;;3449:18;;:::i;:::-;-1:-1:-1;3486:9:255;;3376:125::o"
func init() {
if err := json.Unmarshal([]byte(PreimageOracleStorageLayoutJSON), PreimageOracleStorageLayout); err != nil {
......
......@@ -401,6 +401,7 @@ MintManager_mint_Test:test_mint_moreThanCap_reverts() (gas: 142523)
MintManager_upgrade_Test:test_upgrade_fromNotOwner_reverts() (gas: 10974)
MintManager_upgrade_Test:test_upgrade_fromOwner_succeeds() (gas: 23434)
MintManager_upgrade_Test:test_upgrade_toZeroAddress_reverts() (gas: 11003)
Multichain:test_script_succeeds() (gas: 3078)
OptimismMintableERC20_Test:test_bridge_succeeds() (gas: 7621)
OptimismMintableERC20_Test:test_burn_notBridge_reverts() (gas: 11164)
OptimismMintableERC20_Test:test_burn_succeeds() (gas: 50996)
......@@ -517,8 +518,6 @@ OptimistTest:test_supportsInterface_returnsCorrectInterfaceForERC721_succeeds()
OptimistTest:test_tokenIdOfAddress_returnsOwnerID_succeeds() (gas: 63730)
OptimistTest:test_tokenURI_returnsCorrectTokenURI_succeeds() (gas: 195908)
OptimistTest:test_transferFrom_soulbound_reverts() (gas: 75512)
PostSherlockL1:test_script_succeeds() (gas: 3078)
PostSherlockL2:test_script_succeeds() (gas: 3078)
PreimageOracle_Test:test_keccak256PreimageKey_succeeds() (gas: 319)
PreimageOracle_Test:test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() (gas: 8993)
PreimageOracle_Test:test_loadKeccak256PreimagePart_succeeds() (gas: 76098)
......
......@@ -52,5 +52,7 @@
"l2GenesisRegolithTimeOffset": "0x0",
"eip1559Denominator": 50,
"eip1559Elasticity": 10
"eip1559Elasticity": 10,
"systemConfigStartBlock": 0
}
......@@ -38,5 +38,6 @@
"numDeployConfirmations": 1,
"eip1559Denominator": 50,
"eip1559Elasticity": 10,
"l2GenesisRegolithTimeOffset": "0x0"
"l2GenesisRegolithTimeOffset": "0x0",
"systemConfigStartBlock": 0
}
......@@ -65,13 +65,20 @@ abstract contract Deployer is Script {
/// bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)
bytes32 internal constant OWNER_KEY = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/// @notice Create the global variables and set up the filesystem
/// @notice Create the global variables and set up the filesystem.
/// Forge script will create a file where the prefix is the
/// name of the function that runs with the suffix `-latest.json`.
/// By default, `run()` is called. Allow the user to use the SIG
/// env var to specify what function signature was called so that
/// the `sync()` method can be used to create hardhat deploy style
/// artifacts.
function setUp() public virtual {
string memory root = vm.projectRoot();
deployScript = vm.envOr("DEPLOY_SCRIPT", name());
deploymentContext = _getDeploymentContext();
string memory deployFile = vm.envOr("DEPLOY_FILE", string("run-latest.json"));
string memory sig = vm.envOr("SIG", string("run"));
string memory deployFile = vm.envOr("DEPLOY_FILE", string.concat(sig, "-latest.json"));
uint256 chainId = vm.envOr("CHAIN_ID", block.chainid);
deployPath = string.concat(root, "/broadcast/", deployScript, ".s.sol/", vm.toString(chainId), "/", deployFile);
......
......@@ -97,7 +97,7 @@ contract DeleteOutput is SafeBuilder {
_postCheck();
}
function buildCalldata(address _proxyAdmin) internal view override returns (bytes memory) {
function buildCalldata(address) internal view override returns (bytes memory) {
IMulticall3.Call3[] memory calls = new IMulticall3.Call3[](1);
calls[0] = IMulticall3.Call3({
......
......@@ -56,7 +56,13 @@ abstract contract SafeBuilder is EnhancedScript, GlobalConstants {
if (block.chainid == OP_GOERLI) {
safe = 0xE534ccA2753aCFbcDBCeB2291F596fc60495257e;
proxyAdmin = 0x4200000000000000000000000000000000000018;
} else if (block.chainid == GOERLI) {
safe = 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f;
proxyAdmin = 0x01d3670863c3F4b24D7b107900f0b75d4BbC6e0d;
}
console.log("ChainID: %s", block.chainid);
console.log("Using Safe: %s", safe);
console.log("Using ProxyAdmin: %s", proxyAdmin);
return run(safe, proxyAdmin);
}
......
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { console } from "forge-std/console.sol";
import { SafeBuilder } from "../universal/SafeBuilder.sol";
import { IMulticall3 } from "forge-std/interfaces/IMulticall3.sol";
import { IGnosisSafe, Enum } from "../interfaces/IGnosisSafe.sol";
import { LibSort } from "../libraries/LibSort.sol";
import { ProxyAdmin } from "src/universal/ProxyAdmin.sol";
import { Constants } from "src/libraries/Constants.sol";
import { SystemConfig } from "src/L1/SystemConfig.sol";
import { ResourceMetering } from "src/L1/ResourceMetering.sol";
import { Semver } from "src/universal/Semver.sol";
import { DeployConfig } from "scripts/DeployConfig.s.sol";
import { SystemConfig } from "src/L1/SystemConfig.sol";
import { L1StandardBridge } from "src/L1/L1StandardBridge.sol";
import { L2OutputOracle } from "src/L1/L2OutputOracle.sol";
import { OptimismPortal } from "src/L1/OptimismPortal.sol";
import { L1CrossDomainMessenger } from "src/L1/L1CrossDomainMessenger.sol";
import { OptimismMintableERC20Factory } from "src/universal/OptimismMintableERC20Factory.sol";
import { L1ERC721Bridge } from "src/L1/L1ERC721Bridge.sol";
import { Predeploys } from "src/libraries/Predeploys.sol";
/// @title Multichain
/// @notice Upgrade script for upgrading the L1 contracts after the multichain upgrade.
/// This upgrade involves all of the contracts having the same implementations.
/// The implementation addresses are known ahead of time.
/// Configure the network using the `NETWORK` env var, the options are:
/// `goerli-prod`, `chaosnet` and `devnet`.
contract Multichain is SafeBuilder {
/// @notice Address of the ProxyAdmin, passed in via constructor of `run`.
ProxyAdmin internal PROXY_ADMIN;
/// @notice An instance of the deployconfig contract, the NETWORK env var determines
/// which file is read from disk to populate this contract.
DeployConfig internal cfg;
/// @notice Represents a set of L1 contracts. Used to represent a set of proxies.
struct ContractSet {
address L1CrossDomainMessenger;
address L1StandardBridge;
address L2OutputOracle;
address OptimismMintableERC20Factory;
address OptimismPortal;
address SystemConfig;
address L1ERC721Bridge;
}
/// @notice Possible value of NETWORK env var, for goerli
string internal constant GOERLI_PROD = "goerli-prod";
/// @notice Possible value of NETWORK env var, for chaosnet
string internal constant CHAOSNET = "chaosnet";
/// @notice Possible value of NETWORK env var, for devnet
string internal constant DEVNET = "devnet";
/// @notice Digest of goerli-prod for comparison purposes
bytes32 internal goerli = keccak256(bytes(GOERLI_PROD));
/// @notice Digest of chaosnet for comparison purposes
bytes32 internal chaosnet = keccak256(bytes(CHAOSNET));
/// @notice Digest of devnet for comparison purposes
bytes32 internal devnet = keccak256(bytes(DEVNET));
/// @notice L1CrossDomainMessenger implementation to upgrade to
address internal constant L1CrossDomainMessengerImplementation = 0xb5df97bB67f5AA7254d40E1B7034bBFF7F183a38;
/// @notice L1StandardBridge implementation to upgrade to
address internal constant L1StandardBridgeImplementation = 0xd9aA10f75a2a93Bfc73AaDD41ae777e900CEdBc9;
/// @notice L2OutputOracle implementation to upgrade to
address internal constant L2OutputOracleImplementation = 0xaBd96C062c6B640d5670455E9d1cD98383Dd23CA;
/// @notice OptimismMintableERC20Factory to upgrade to
address internal constant OptimismMintableERC20FactoryImplementation = 0xE220F7D7fF39837003A1835fCefFa8bCA4098582;
/// @notice OptimismPortal implementation to upgrade to
address internal constant OptimismPortalImplementation = 0x345D27c7B6C90fef5beA9631037C36119f4bF93e;
/// @notice SystemConfig implementation to upgrade to
address internal constant SystemConfigImplementation = 0x00CB689221540dEd0FA5247dbE7Fc66621F431a6;
/// @notice L1ERC721Bridge implementation to upgrade to
address internal constant L1ERC721BridgeImplementation = 0x53C115eD8D9902f4999fDBd8B93Ea79BF37cb588;
/// @notice A mapping of deployment name to ContractSet of proxy addresses.
ContractSet internal proxies;
/// @notice The expected versions for the contracts to be upgraded to.
string internal constant L1CrossDomainMessengerVersion = "1.5.1";
string internal constant L1StandardBridgeVersion = "1.2.1";
string internal constant L2OutputOracleVersion = "1.4.1";
string internal constant OptimismMintableERC20FactoryVersion = "1.1.2";
string internal constant OptimismPortalVersion = "1.8.1";
string internal constant SystemConfigVersion = "1.5.0";
string internal constant L1ERC721BridgeVersion = "1.2.1";
/// @notice The value of the NETWORK env var
string internal NETWORK;
// @notice Cache a non view function call to the SystemConfig contract
uint256 internal l2OutputOracleStartingTimestamp;
/// @notice Place the contract addresses in storage so they can be used when building calldata.
function setUp() external {
// Set the network in storage
NETWORK = vm.envOr("NETWORK", GOERLI_PROD);
// For simple comparisons of dynamic types
bytes32 network = keccak256(bytes(NETWORK));
string memory deployConfigPath;
if (network == goerli) {
deployConfigPath = string.concat(vm.projectRoot(), "/deploy-config/goerli.json");
proxies = ContractSet({
L1CrossDomainMessenger: 0x5086d1eEF304eb5284A0f6720f79403b4e9bE294,
L1StandardBridge: 0x636Af16bf2f682dD3109e60102b8E1A089FedAa8,
L2OutputOracle: 0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0,
OptimismMintableERC20Factory: 0x883dcF8B05364083D849D8bD226bC8Cb4c42F9C5,
OptimismPortal: 0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383,
SystemConfig: 0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60,
L1ERC721Bridge: 0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9
});
} else if (network == chaosnet) {
deployConfigPath = string.concat(vm.projectRoot(), "/deploy-config/chaosnet.json");
proxies = ContractSet({
L1CrossDomainMessenger: 0xfc428D28D197fFf99A5EbAc6be8B761FEd8718Da,
L1StandardBridge: 0x60859421Ed85C0B11071230cf61dcEeEf54630Ff,
L2OutputOracle: 0x7D00A03f180d8C07B88d8c1384a15326c38FF9Ff,
OptimismMintableERC20Factory: 0x526920419b61153c1F80fD306B5Ab52b69110A6C,
OptimismPortal: 0x1566c8Eea4A255C07Ef58edF91431c8A73ae0B62,
SystemConfig: 0xf2Fa3621cAa534a2AE9Eb36667da57890E5C9E6a,
L1ERC721Bridge: 0x058BBf091232afE99BC2481F809254cD15e64Df5
});
} else if (network == devnet) {
deployConfigPath = string.concat(vm.projectRoot(), "/deploy-config/internal-devnet.json");
proxies = ContractSet({
L1CrossDomainMessenger: 0x71A046D793C71af209960DCb8bD5388d2c5D2a78,
L1StandardBridge: 0x791590936abB3531c9d54CD10CEC4B14415B0Ba7,
L2OutputOracle: 0xA57B9f15AA204b9D68DF58849b02Df16c80C0999,
OptimismMintableERC20Factory: 0x2998dDaF6AaA00Fa8A7104214688d29Bc749B78F,
OptimismPortal: 0x83a242F8481D4F8a605Aa82BA9D42BA574054258,
SystemConfig: 0x9673B370b773D9FFc4C282B3aF315ab05f17E20C,
L1ERC721Bridge: 0x60e0f047FfA2Fad2AF197c9CDb404bDF47277Ed4
});
} else {
revert("Invalid network");
}
cfg = new DeployConfig(deployConfigPath);
// cache the starting timestamp here as to not break the view functions below
l2OutputOracleStartingTimestamp = cfg.l2OutputOracleStartingTimestamp();
}
/// @notice Follow up assertions to ensure that the script ran to completion.
function _postCheck() internal view override {
ContractSet memory prox = getProxies();
require(
_versionHash(prox.L1CrossDomainMessenger) == keccak256(bytes(L1CrossDomainMessengerVersion)),
"L1CrossDomainMessenger"
);
require(_versionHash(prox.L1StandardBridge) == keccak256(bytes(L1StandardBridgeVersion)), "L1StandardBridge");
require(_versionHash(prox.L2OutputOracle) == keccak256(bytes(L2OutputOracleVersion)), "L2OutputOracle");
require(
_versionHash(prox.OptimismMintableERC20Factory) == keccak256(bytes(OptimismMintableERC20FactoryVersion)),
"OptimismMintableERC20Factory"
);
require(_versionHash(prox.OptimismPortal) == keccak256(bytes(OptimismPortalVersion)), "OptimismPortal");
require(_versionHash(prox.SystemConfig) == keccak256(bytes(SystemConfigVersion)), "SystemConfig");
require(_versionHash(prox.L1ERC721Bridge) == keccak256(bytes(L1ERC721BridgeVersion)), "L1ERC721Bridge");
ResourceMetering.ResourceConfig memory rcfg = SystemConfig(prox.SystemConfig).resourceConfig();
ResourceMetering.ResourceConfig memory dflt = Constants.DEFAULT_RESOURCE_CONFIG();
require(keccak256(abi.encode(rcfg)) == keccak256(abi.encode(dflt)));
// Check that the codehashes of all implementations match the proxies set implementations.
require(
PROXY_ADMIN.getProxyImplementation(prox.L1CrossDomainMessenger).codehash
== L1CrossDomainMessengerImplementation.codehash,
"L1CrossDomainMessenger codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.L1StandardBridge).codehash
== L1StandardBridgeImplementation.codehash,
"L1StandardBridge codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.L2OutputOracle).codehash == L2OutputOracleImplementation.codehash,
"L2OutputOracle codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.OptimismMintableERC20Factory).codehash
== OptimismMintableERC20FactoryImplementation.codehash,
"OptimismMintableERC20Factory codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.OptimismPortal).codehash == OptimismPortalImplementation.codehash,
"OptimismPortal codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.SystemConfig).codehash == SystemConfigImplementation.codehash,
"SystemConfig codehash"
);
require(
PROXY_ADMIN.getProxyImplementation(prox.L1ERC721Bridge).codehash == L1ERC721BridgeImplementation.codehash,
"L1ERC721Bridge codehash"
);
_postCheckSystemConfig();
_postCheckL1CrossDomainMessenger();
_postCheckL1StandardBridge();
_postCheckL2OutputOracle();
_postCheckOptimismMintableERC20Factory();
_postCheckL1ERC721Bridge();
_postCheckOptimismPortal();
}
/// @notice Post check hook for the system config
function _postCheckSystemConfig() internal view {
SystemConfig config = SystemConfig(proxies.SystemConfig);
require(config.owner() == cfg.finalSystemOwner());
require(config.overhead() == cfg.gasPriceOracleOverhead());
require(config.scalar() == cfg.gasPriceOracleScalar());
require(config.unsafeBlockSigner() == cfg.p2pSequencerAddress());
require(config.batcherHash() == bytes32(uint256(uint160(cfg.batchSenderAddress()))));
ResourceMetering.ResourceConfig memory rconfig = Constants.DEFAULT_RESOURCE_CONFIG();
ResourceMetering.ResourceConfig memory resourceConfig = config.resourceConfig();
require(resourceConfig.maxResourceLimit == rconfig.maxResourceLimit);
require(resourceConfig.elasticityMultiplier == rconfig.elasticityMultiplier);
require(resourceConfig.baseFeeMaxChangeDenominator == rconfig.baseFeeMaxChangeDenominator);
require(resourceConfig.systemTxMaxGas == rconfig.systemTxMaxGas);
require(resourceConfig.minimumBaseFee == rconfig.minimumBaseFee);
require(resourceConfig.maximumBaseFee == rconfig.maximumBaseFee);
require(config.l1ERC721Bridge() == proxies.L1ERC721Bridge);
require(config.l1StandardBridge() == proxies.L1StandardBridge);
require(config.l2OutputOracle() == proxies.L2OutputOracle);
require(config.optimismPortal() == proxies.OptimismPortal);
require(config.l1CrossDomainMessenger() == proxies.L1CrossDomainMessenger);
// A non zero start block is an override
uint256 startBlock = cfg.systemConfigStartBlock();
if (startBlock != 0) {
require(config.startBlock() == startBlock);
} else {
require(config.startBlock() == block.number);
}
}
/// @notice Post check hook for the L1CrossDomainMessenger
function _postCheckL1CrossDomainMessenger() internal view {
L1CrossDomainMessenger messenger = L1CrossDomainMessenger(proxies.L1CrossDomainMessenger);
require(address(messenger.portal()) == proxies.OptimismPortal);
}
/// @notice Post check hook for the L1StandardBridge
function _postCheckL1StandardBridge() internal view {
L1StandardBridge bridge = L1StandardBridge(payable(proxies.L1StandardBridge));
require(address(bridge.MESSENGER()) == proxies.L1CrossDomainMessenger);
require(address(bridge.messenger()) == proxies.L1CrossDomainMessenger);
require(address(bridge.OTHER_BRIDGE()) == Predeploys.L2_STANDARD_BRIDGE);
require(address(bridge.otherBridge()) == Predeploys.L2_STANDARD_BRIDGE);
// Ensures that the legacy slot is modified correctly. This will fail
// during predeployment simulation on OP Mainnet if there is a bug.
bytes32 slot0 = vm.load(address(bridge), bytes32(uint256(0)));
require(slot0 == bytes32(uint256(2)));
}
/// @notice Post check hook for the L2OutputOracle
function _postCheckL2OutputOracle() internal view {
L2OutputOracle oracle = L2OutputOracle(proxies.L2OutputOracle);
require(oracle.SUBMISSION_INTERVAL() == cfg.l2OutputOracleSubmissionInterval());
require(oracle.submissionInterval() == cfg.l2OutputOracleSubmissionInterval());
require(oracle.L2_BLOCK_TIME() == cfg.l2BlockTime());
require(oracle.l2BlockTime() == cfg.l2BlockTime());
require(oracle.PROPOSER() == cfg.l2OutputOracleProposer());
require(oracle.proposer() == cfg.l2OutputOracleProposer());
require(oracle.CHALLENGER() == cfg.l2OutputOracleChallenger());
require(oracle.challenger() == cfg.l2OutputOracleChallenger());
require(oracle.FINALIZATION_PERIOD_SECONDS() == cfg.finalizationPeriodSeconds());
require(oracle.finalizationPeriodSeconds() == cfg.finalizationPeriodSeconds());
require(oracle.startingBlockNumber() == cfg.l2OutputOracleStartingBlockNumber());
require(oracle.startingTimestamp() == l2OutputOracleStartingTimestamp);
}
/// @notice Post check hook for the OptimismMintableERC20Factory
function _postCheckOptimismMintableERC20Factory() internal view {
OptimismMintableERC20Factory factory = OptimismMintableERC20Factory(proxies.OptimismMintableERC20Factory);
require(factory.BRIDGE() == proxies.L1StandardBridge);
}
/// @notice Post check hook for the L1ERC721Bridge
function _postCheckL1ERC721Bridge() internal view {
L1ERC721Bridge bridge = L1ERC721Bridge(proxies.L1ERC721Bridge);
require(address(bridge.MESSENGER()) == proxies.L1CrossDomainMessenger);
require(bridge.OTHER_BRIDGE() == Predeploys.L2_ERC721_BRIDGE);
}
/// @notice Post check hook for the OptimismPortal
function _postCheckOptimismPortal() internal view {
OptimismPortal portal = OptimismPortal(payable(proxies.OptimismPortal));
require(address(portal.L2_ORACLE()) == proxies.L2OutputOracle);
require(portal.GUARDIAN() == cfg.portalGuardian());
require(address(portal.SYSTEM_CONFIG()) == proxies.SystemConfig);
require(portal.paused() == false);
}
/// @notice Test coverage of the logic. Should only run on goerli but other chains
/// could be added.
function test_script_succeeds() external skipWhenNotForking {
address _safe;
address _proxyAdmin;
if (block.chainid == GOERLI) {
_safe = 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f;
_proxyAdmin = 0x01d3670863c3F4b24D7b107900f0b75d4BbC6e0d;
// Set the proxy admin for the `_postCheck` function
PROXY_ADMIN = ProxyAdmin(_proxyAdmin);
}
require(_safe != address(0) && _proxyAdmin != address(0));
address[] memory owners = IGnosisSafe(payable(_safe)).getOwners();
for (uint256 i; i < owners.length; i++) {
address owner = owners[i];
vm.startBroadcast(owner);
bool success = _run(_safe, _proxyAdmin);
vm.stopBroadcast();
if (success) {
console.log("tx success");
break;
}
}
_postCheck();
}
/// @notice Builds the calldata that the multisig needs to make for the upgrade to happen.
/// A total of 8 calls are made, 7 upgrade implementations and 1 sets the resource
/// config to the default value in the SystemConfig contract.
function buildCalldata(address _proxyAdmin) internal view override returns (bytes memory) {
IMulticall3.Call3[] memory calls = new IMulticall3.Call3[](7);
ContractSet memory prox = getProxies();
// Upgrade the L1CrossDomainMessenger
calls[0] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.L1CrossDomainMessenger), // proxy
L1CrossDomainMessengerImplementation, // implementation
abi.encodeCall( // data
L1CrossDomainMessenger.initialize, (OptimismPortal(payable(prox.OptimismPortal))))
)
)
});
// Upgrade the L1StandardBridge
calls[1] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.L1StandardBridge), // proxy
L1StandardBridgeImplementation, // implementation
abi.encodeCall(L1StandardBridge.initialize, (L1CrossDomainMessenger(prox.L1CrossDomainMessenger))) // data
)
)
});
// Upgrade the L2OutputOracle
calls[2] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.L2OutputOracle), // proxy
L2OutputOracleImplementation, // implementation
abi.encodeCall( // data
L2OutputOracle.initialize,
(
cfg.l2OutputOracleStartingBlockNumber(),
l2OutputOracleStartingTimestamp,
cfg.l2OutputOracleProposer(),
cfg.l2OutputOracleChallenger()
)
)
)
)
});
// Upgrade the OptimismMintableERC20Factory. No initialize function.
calls[3] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgrade, (payable(prox.OptimismMintableERC20Factory), OptimismMintableERC20FactoryImplementation)
)
});
// Upgrade the OptimismPortal
calls[4] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.OptimismPortal), // proxy
OptimismPortalImplementation, // implementation
abi.encodeCall( // data
OptimismPortal.initialize,
(
L2OutputOracle(prox.L2OutputOracle),
cfg.portalGuardian(),
SystemConfig(prox.SystemConfig),
false
)
)
)
)
});
// Upgrade the SystemConfig
calls[5] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.SystemConfig), // proxy
SystemConfigImplementation, // implementation
abi.encodeCall( // data
SystemConfig.initialize,
(
cfg.finalSystemOwner(),
cfg.gasPriceOracleOverhead(),
cfg.gasPriceOracleScalar(),
bytes32(uint256(uint160(cfg.batchSenderAddress()))),
uint64(cfg.l2GenesisBlockGasLimit()),
cfg.p2pSequencerAddress(),
Constants.DEFAULT_RESOURCE_CONFIG(),
cfg.systemConfigStartBlock(),
cfg.batchInboxAddress(),
SystemConfig.Addresses({
l1CrossDomainMessenger: prox.L1CrossDomainMessenger,
l1ERC721Bridge: prox.L1ERC721Bridge,
l1StandardBridge: prox.L1StandardBridge,
l2OutputOracle: prox.L2OutputOracle,
optimismPortal: prox.OptimismPortal,
optimismMintableERC20Factory: prox.OptimismMintableERC20Factory
})
)
)
)
)
});
// Upgrade the L1ERC721Bridge
calls[6] = IMulticall3.Call3({
target: _proxyAdmin,
allowFailure: false,
callData: abi.encodeCall(
ProxyAdmin.upgradeAndCall,
(
payable(prox.L1ERC721Bridge),
L1ERC721BridgeImplementation,
abi.encodeCall(L1ERC721Bridge.initialize, (L1CrossDomainMessenger(prox.L1CrossDomainMessenger)))
)
)
});
return abi.encodeCall(IMulticall3.aggregate3, (calls));
}
/// @notice Returns the ContractSet that represents the proxies for a given network.
/// Configure the network with the NETWORK env var.
function getProxies() internal view returns (ContractSet memory) {
require(proxies.L1CrossDomainMessenger != address(0), "no proxies for this network");
return proxies;
}
}
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:
version: 18.2.0(react@18.2.0)
viem:
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:
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)
......@@ -321,7 +321,7 @@ importers:
version: 1.3.8(react@18.2.0)(typescript@5.1.6)(viem@1.3.1)
abitype:
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:
specifier: ^10.3.3
version: 10.3.3
......@@ -415,7 +415,7 @@ importers:
version: 0.34.1(vitest@0.33.0)
abitype:
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:
specifier: ^3.0.0
version: 3.0.0
......@@ -433,7 +433,7 @@ importers:
version: 5.1.6
viem:
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:
specifier: ^4.4.6
version: 4.4.6(@types/node@12.20.20)
......@@ -529,6 +529,49 @@ importers:
specifier: ^3.11.6
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:
/@aashutoshrathi/word-wrap@1.2.6:
......@@ -2021,7 +2064,12 @@ packages:
resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==}
engines: {node: '>=14'}
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:
resolution: {integrity: sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==}
......@@ -2630,7 +2678,7 @@ packages:
engines: {node: ^14.17.0 || >=16.0.0}
dependencies:
chalk: 4.1.2
execa: 5.0.0
execa: 5.1.1
strong-log-transformer: 2.1.0
dev: true
......@@ -3583,7 +3631,7 @@ packages:
resolution: {integrity: sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw==}
dependencies:
'@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:
- bufferutil
- encoding
......@@ -3615,7 +3663,6 @@ packages:
'@noble/curves': 1.1.0
'@noble/hashes': 1.3.1
'@scure/base': 1.1.1
dev: true
/@scure/bip39@1.2.0:
resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==}
......@@ -3628,7 +3675,6 @@ packages:
dependencies:
'@noble/hashes': 1.3.1
'@scure/base': 1.1.1
dev: true
/@sentry/core@5.30.0:
resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==}
......@@ -3942,6 +3988,118 @@ packages:
'@stablelib/random': 1.0.2
'@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:
resolution: {integrity: sha512-DI4y4VC6Uw4wlTpOocEXDky69xeOScME1ezLKsj+hOk7DguC9fkqXtp6Hn39BVb9y0b5IBrY67q6kIX623Zj4Q==}
......@@ -4521,6 +4679,18 @@ packages:
dependencies:
'@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:
resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==}
dev: true
......@@ -4812,6 +4982,22 @@ packages:
- supports-color
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:
resolution: {integrity: sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==}
dependencies:
......@@ -4828,6 +5014,14 @@ packages:
chai: 4.3.7
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:
resolution: {integrity: sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==}
dependencies:
......@@ -4844,6 +5038,14 @@ packages:
pathe: 1.1.1
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:
resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==}
dependencies:
......@@ -4852,6 +5054,14 @@ packages:
pretty-format: 29.6.1
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:
resolution: {integrity: sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==}
dependencies:
......@@ -4864,6 +5074,12 @@ packages:
tinyspy: 2.1.1
dev: true
/@vitest/spy@0.34.1:
resolution: {integrity: sha512-UT4WcI3EAPUNO8n6y9QoEqynGGEPmmRxC+cLzneFFXpmacivjHZsNbiKD88KUScv5DCHVDgdBsLD7O7s1enFcQ==}
dependencies:
tinyspy: 2.1.1
dev: true
/@vitest/utils@0.28.3:
resolution: {integrity: sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==}
dependencies:
......@@ -4882,6 +5098,14 @@ packages:
pretty-format: 29.6.1
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:
resolution: {integrity: sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==}
dependencies:
......@@ -5046,7 +5270,7 @@ packages:
abitype: 0.8.1(typescript@5.1.6)
eventemitter3: 4.0.7
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:
- '@react-native-async-storage/async-storage'
- bufferutil
......@@ -5082,7 +5306,7 @@ packages:
abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4)
eventemitter3: 4.0.7
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:
- '@react-native-async-storage/async-storage'
- bufferutil
......@@ -5108,7 +5332,7 @@ packages:
abitype: 0.8.1(typescript@5.1.6)
eventemitter3: 4.0.7
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)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
......@@ -5136,7 +5360,7 @@ packages:
abitype: 0.8.7(typescript@5.1.6)(zod@3.21.4)
eventemitter3: 4.0.7
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)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
......@@ -5753,6 +5977,21 @@ packages:
dependencies:
typescript: 5.1.6
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:
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
......@@ -7312,6 +7551,12 @@ packages:
printj: 1.1.2
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:
resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==}
dependencies:
......@@ -8944,7 +9189,6 @@ packages:
'@noble/hashes': 1.3.1
'@scure/bip32': 1.3.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):
resolution: {integrity: sha512-iw9z1otq7qNkGDNcMoeNeLIATF9yKl1M8AIeu42ElfNBplq0e+5PeasQmm8ybY/elkZ1XyRO0JBQxQdVRb8bqQ==}
......@@ -9781,6 +10025,18 @@ packages:
wide-align: 1.1.5
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:
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
......@@ -10816,6 +11072,20 @@ packages:
resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==}
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:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'}
......@@ -10875,6 +11145,10 @@ packages:
resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==}
dev: true
/is-property@1.0.2:
resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==}
dev: false
/is-regex@1.1.4:
resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
engines: {node: '>= 0.4'}
......@@ -11045,6 +11319,14 @@ packages:
dependencies:
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:
resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
......@@ -11081,8 +11363,8 @@ packages:
resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==}
engines: {node: '>=10'}
dependencies:
'@babel/core': 7.22.9
'@babel/parser': 7.22.7
'@babel/core': 7.22.10
'@babel/parser': 7.22.10
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.0
semver: 7.5.4
......@@ -11422,6 +11704,11 @@ packages:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
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:
resolution: {integrity: sha512-4Dj8Rf+fQ+/Pn7C5qeEX02op1WfOss3PKTE9Nsop3Dx+6UPxlm1dr/og7o2cRa5hNN07CACr4NFzRLtj/rjWog==}
engines: {'0': node >=0.6.0}
......@@ -15204,6 +15491,14 @@ packages:
fsevents: 2.3.2
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:
resolution: {integrity: sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==}
dependencies:
......@@ -15441,7 +15736,6 @@ packages:
/setimmediate@1.0.5:
resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}
dev: true
/setprototypeof@1.1.1:
resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==}
......@@ -16207,7 +16501,7 @@ packages:
engines: {node: '>=10'}
dependencies:
del: 6.1.1
is-stream: 2.0.0
is-stream: 2.0.1
temp-dir: 2.0.0
type-fest: 0.16.0
unique-string: 2.0.0
......@@ -16308,6 +16602,11 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
/tinypool@0.7.0:
resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==}
engines: {node: '>=14.0.0'}
dev: true
/tinyspy@1.0.2:
resolution: {integrity: sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==}
engines: {node: '>=14.0.0'}
......@@ -16596,6 +16895,43 @@ packages:
- ts-node
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):
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
......@@ -17158,7 +17494,7 @@ packages:
- zod
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==}
peerDependencies:
typescript: '>=5.0.4'
......@@ -17172,7 +17508,7 @@ packages:
'@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)
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
......@@ -17181,10 +17517,59 @@ packages:
- utf-8-validate
- zod
/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
/viem@1.3.1(typescript@5.1.6)(zod@3.21.4):
resolution: {integrity: sha512-Yv+y3/exrrEN4EAkVUtUuQxsjF4+3taHY2aSinJnNWtcA4fBZ+WfPJBTywcnFIa/Q5oDcQN85yqPFBbkXqWHdw==}
peerDependencies:
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:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
......@@ -17193,7 +17578,7 @@ packages:
picocolors: 1.0.0
source-map: 0.6.1
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:
- '@types/node'
- less
......@@ -17215,7 +17600,29 @@ packages:
mlly: 1.4.0
pathe: 1.1.1
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:
- '@types/node'
- less
......@@ -17299,6 +17706,78 @@ packages:
fsevents: 2.3.2
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:
resolution: {integrity: sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==}
engines: {node: '>=v14.16.0'}
......@@ -17421,6 +17900,71 @@ packages:
- terser
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:
resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==}
dev: true
......@@ -17454,7 +17998,7 @@ packages:
react: 18.2.0
typescript: 5.1.6
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:
- '@react-native-async-storage/async-storage'
- bufferutil
......@@ -17482,6 +18026,243 @@ packages:
engines: {node: '>= 8'}
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:
resolution: {integrity: sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw==}
engines: {node: '>=8.0.0'}
......@@ -17509,6 +18290,64 @@ packages:
utf8: 3.0.0
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:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
......@@ -18035,6 +18874,10 @@ packages:
/zod@3.21.4:
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):
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