-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sdk-next tests run in ci (#10003)
Co-authored-by: Will Cory <[email protected]>
- Loading branch information
1 parent
6583735
commit 0832d78
Showing
7 changed files
with
123 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# test-next | ||
|
||
- The new tests for the next version of sdk will use vitest | ||
- The vitest tests are kept here seperated from mocha tests for now | ||
- Can find values needed in a `.env` file in `example.env` | ||
To run these tests it is expected that anvil is already running. | ||
|
||
See [circle config sdk-next tests](../../../.circleci/config.yml) for which anvil commands you should run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,58 @@ | ||
import ethers from 'ethers' | ||
import { z } from 'zod' | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
const E2E_RPC_URL_L1 = z | ||
.string() | ||
.url() | ||
.default('http://localhost:8545') | ||
.describe('L1 ethereum rpc Url') | ||
.parse(import.meta.env.VITE_E2E_RPC_URL_L1) | ||
/** | ||
* @deprecated | ||
*/ | ||
const E2E_RPC_URL_L2 = z | ||
.string() | ||
.url() | ||
.describe('L1 ethereum rpc Url') | ||
.default('http://localhost:9545') | ||
.describe('L2 ethereum rpc Url') | ||
.parse(import.meta.env.VITE_E2E_RPC_URL_L2) | ||
|
||
const jsonRpcHeaders = { 'User-Agent': 'eth-optimism/@gateway/backend' } | ||
/** | ||
* Initialize the signer, prover, and cross chain messenger | ||
* @deprecated | ||
*/ | ||
const l1Provider = new ethers.providers.JsonRpcProvider({ | ||
export const l1Provider = new ethers.providers.JsonRpcProvider({ | ||
url: E2E_RPC_URL_L1, | ||
headers: jsonRpcHeaders, | ||
}) | ||
const l2Provider = new ethers.providers.JsonRpcProvider({ | ||
/** | ||
* @deprecated | ||
*/ | ||
export const l2Provider = new ethers.providers.JsonRpcProvider({ | ||
url: E2E_RPC_URL_L2, | ||
headers: jsonRpcHeaders, | ||
}) | ||
|
||
export { l1Provider, l2Provider } | ||
export const E2E_RPC_URL_SEPOLIA = z | ||
.string() | ||
.url() | ||
.default('http://localhost:8545') | ||
.describe('SEPOLIA ethereum rpc Url') | ||
.parse(import.meta.env.VITE_E2E_RPC_URL_SEPOLIA) | ||
export const E2E_RPC_URL_OP_SEPOLIA = z | ||
.string() | ||
.url() | ||
.default('http://localhost:9545') | ||
.describe('OP_SEPOLIA ethereum rpc Url') | ||
.parse(import.meta.env.VITE_E2E_RPC_URL_OP_SEPOLIA) | ||
export const sepoliaProvider = new ethers.providers.JsonRpcProvider({ | ||
url: E2E_RPC_URL_SEPOLIA, | ||
headers: jsonRpcHeaders, | ||
}) | ||
export const opSepoliaProvider = new ethers.providers.JsonRpcProvider({ | ||
url: E2E_RPC_URL_OP_SEPOLIA, | ||
headers: jsonRpcHeaders, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters