Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
42421ce9
Unverified
Commit
42421ce9
authored
Feb 03, 2023
by
Matthew Slipper
Committed by
GitHub
Feb 03, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4836 from ethereum-optimism/willc/assert
Remove node built in from sdk
parents
5573e3e1
5372c9f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
4 deletions
+55
-4
quick-crabs-argue.md
.changeset/quick-crabs-argue.md
+5
-0
.eslintrc.js
packages/sdk/.eslintrc.js
+43
-0
l2-provider.ts
packages/sdk/src/l2-provider.ts
+1
-2
assert.ts
packages/sdk/src/utils/assert.ts
+5
-0
coercion.ts
packages/sdk/src/utils/coercion.ts
+1
-2
No files found.
.changeset/quick-crabs-argue.md
0 → 100644
View file @
42421ce9
---
'
@eth-optimism/sdk'
:
patch
---
Remove assert node builtin from sdk
packages/sdk/.eslintrc.js
View file @
42421ce9
module
.
exports
=
{
module
.
exports
=
{
extends
:
'
../../.eslintrc.js
'
,
extends
:
'
../../.eslintrc.js
'
,
overrides
:
[
{
files
:
[
'
src/**/*.ts
'
],
rules
:
{
'
no-restricted-imports
'
:
[
'
error
'
,
'
assert
'
,
'
buffer
'
,
'
child_process
'
,
'
cluster
'
,
'
crypto
'
,
'
dgram
'
,
'
dns
'
,
'
domain
'
,
'
events
'
,
'
freelist
'
,
'
fs
'
,
'
http
'
,
'
https
'
,
'
module
'
,
'
net
'
,
'
os
'
,
'
path
'
,
'
punycode
'
,
'
querystring
'
,
'
readline
'
,
'
repl
'
,
'
smalloc
'
,
'
stream
'
,
'
string_decoder
'
,
'
sys
'
,
'
timers
'
,
'
tls
'
,
'
tracing
'
,
'
tty
'
,
'
url
'
,
'
util
'
,
'
vm
'
,
'
zlib
'
,
],
},
},
],
}
}
packages/sdk/src/l2-provider.ts
View file @
42421ce9
import
assert
from
'
assert
'
import
{
Provider
,
TransactionRequest
}
from
'
@ethersproject/abstract-provider
'
import
{
Provider
,
TransactionRequest
}
from
'
@ethersproject/abstract-provider
'
import
{
serialize
}
from
'
@ethersproject/transactions
'
import
{
serialize
}
from
'
@ethersproject/transactions
'
import
{
Contract
,
BigNumber
}
from
'
ethers
'
import
{
Contract
,
BigNumber
}
from
'
ethers
'
import
{
predeploys
,
getContractInterface
}
from
'
@eth-optimism/contracts
'
import
{
predeploys
,
getContractInterface
}
from
'
@eth-optimism/contracts
'
import
cloneDeep
from
'
lodash/cloneDeep
'
import
cloneDeep
from
'
lodash/cloneDeep
'
import
{
assert
}
from
'
./utils/assert
'
import
{
L2Provider
,
ProviderLike
,
NumberLike
}
from
'
./interfaces
'
import
{
L2Provider
,
ProviderLike
,
NumberLike
}
from
'
./interfaces
'
import
{
toProvider
,
toNumber
,
toBigNumber
}
from
'
./utils
'
import
{
toProvider
,
toNumber
,
toBigNumber
}
from
'
./utils
'
...
...
packages/sdk/src/utils/assert.ts
0 → 100644
View file @
42421ce9
export
const
assert
=
(
condition
:
boolean
,
message
:
string
):
void
=>
{
if
(
!
condition
)
{
throw
new
Error
(
message
)
}
}
packages/sdk/src/utils/coercion.ts
View file @
42421ce9
import
assert
from
'
assert
'
import
{
import
{
Provider
,
Provider
,
TransactionReceipt
,
TransactionReceipt
,
...
@@ -8,6 +6,7 @@ import {
...
@@ -8,6 +6,7 @@ import {
import
{
Signer
}
from
'
@ethersproject/abstract-signer
'
import
{
Signer
}
from
'
@ethersproject/abstract-signer
'
import
{
ethers
,
BigNumber
}
from
'
ethers
'
import
{
ethers
,
BigNumber
}
from
'
ethers
'
import
{
assert
}
from
'
./assert
'
import
{
import
{
SignerOrProviderLike
,
SignerOrProviderLike
,
ProviderLike
,
ProviderLike
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment