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
a7456065
Commit
a7456065
authored
May 18, 2023
by
James Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix semgrep
parent
355cec28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
bridgeEcoToken.spec.ts
packages/sdk/test-next/bridgeEcoToken.spec.ts
+2
-4
viemClients.ts
packages/sdk/test-next/testUtils/viemClients.ts
+1
-1
No files found.
packages/sdk/test-next/bridgeEcoToken.spec.ts
View file @
a7456065
...
@@ -13,7 +13,7 @@ import { l1Provider, l2Provider } from './testUtils/ethersProviders'
...
@@ -13,7 +13,7 @@ import { l1Provider, l2Provider } from './testUtils/ethersProviders'
const
ECO_WHALE
:
Address
=
'
0xBd11c836279a1352ce737FbBFba36b20734B04e7
'
const
ECO_WHALE
:
Address
=
'
0xBd11c836279a1352ce737FbBFba36b20734B04e7
'
//
TODO:
use tokenlist as source of truth
//
we should instead
use tokenlist as source of truth
const
ECO_L1_TOKEN_ADDRESS
:
Address
=
'
0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3
'
const
ECO_L1_TOKEN_ADDRESS
:
Address
=
'
0x3E87d4d9E69163E7590f9b39a70853cf25e5ABE3
'
const
ECO_L2_TOKEN_ADDRESS
:
Address
=
'
0x54bBECeA38ff36D32323f8A754683C1F5433A89f
'
const
ECO_L2_TOKEN_ADDRESS
:
Address
=
'
0x54bBECeA38ff36D32323f8A754683C1F5433A89f
'
...
@@ -46,11 +46,9 @@ const getL2ERC20TokenBalance = async (ownerAddress: Address) => {
...
@@ -46,11 +46,9 @@ const getL2ERC20TokenBalance = async (ownerAddress: Address) => {
describe
(
'
ECO token
'
,
()
=>
{
describe
(
'
ECO token
'
,
()
=>
{
it
(
'
sdk should be able to deposit to l1 bridge contract correctly
'
,
async
()
=>
{
it
(
'
sdk should be able to deposit to l1 bridge contract correctly
'
,
async
()
=>
{
// this code is a bit whack because of the mix of viem + ethers
// TODO: use anviljs, and use viem entirely once the sdk supports it
await
l1TestClient
.
impersonateAccount
({
address
:
ECO_WHALE
})
await
l1TestClient
.
impersonateAccount
({
address
:
ECO_WHALE
})
const
l1EcoWhaleSigner
=
await
l1Provider
.
getSigner
(
ECO_WHALE
);
const
l1EcoWhaleSigner
=
await
l1Provider
.
getSigner
(
ECO_WHALE
);
const
preBridgeL1EcoWhaleBalance
=
await
getL1ERC20TokenBalance
(
ECO_WHALE
)
const
preBridgeL1EcoWhaleBalance
=
await
getL1ERC20TokenBalance
(
ECO_WHALE
)
const
crossChainMessenger
=
new
CrossChainMessenger
({
const
crossChainMessenger
=
new
CrossChainMessenger
({
...
...
packages/sdk/test-next/testUtils/viemClients.ts
View file @
a7456065
...
@@ -6,7 +6,7 @@ import {
...
@@ -6,7 +6,7 @@ import {
}
from
'
viem
'
}
from
'
viem
'
import
{
goerli
,
optimismGoerli
}
from
'
viem/chains
'
import
{
goerli
,
optimismGoerli
}
from
'
viem/chains
'
//
TODO:
use env vars to determine chain so we can support alternate l1/l2 pairs
//
we should instead
use env vars to determine chain so we can support alternate l1/l2 pairs
const
L1_CHAIN
=
goerli
;
const
L1_CHAIN
=
goerli
;
const
L2_CHAIN
=
optimismGoerli
;
const
L2_CHAIN
=
optimismGoerli
;
const
L1_RPC_URL
=
'
http://localhost:8545
'
;
const
L1_RPC_URL
=
'
http://localhost:8545
'
;
...
...
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