-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from flashbots/brock/testnet-support-2024
testnet support 2024
- Loading branch information
Showing
5 changed files
with
57 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"default": true | ||
} | ||
} | ||
} |
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,19 +1,21 @@ | ||
import { JsonRpcProvider, Network, Wallet } from 'ethers' | ||
import { JsonRpcProvider, Wallet } from 'ethers' | ||
import MevShareClient from '../..' | ||
import Env from './env' | ||
import networks from '../../api/networks' | ||
|
||
export function getProvider() { | ||
return new JsonRpcProvider(Env.providerUrl, new Network("goerli", 5)) | ||
return new JsonRpcProvider(Env.providerUrl, networks.sepolia) | ||
} | ||
|
||
/** Initializes wallet and provider for examples, using Sepolia. */ | ||
export async function initExample(provider: JsonRpcProvider) { | ||
const authSigner = new Wallet(Env.authKey).connect(provider) | ||
|
||
return { | ||
provider, | ||
wallet: new Wallet(Env.senderKey).connect(provider), | ||
authSigner, | ||
mevshare: MevShareClient.useEthereumGoerli(authSigner), | ||
mevshare: MevShareClient.useEthereumSepolia(authSigner), | ||
feeData: await provider.getFeeData(), | ||
} | ||
} |
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