-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support sepolia testnet and bump packages
- Loading branch information
Showing
16 changed files
with
19,135 additions
and
9,205 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
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,27 @@ | ||
export const addNetwork = async () => { | ||
const addNetworkRequest = window.ethereum.request({ | ||
method: "wallet_addEthereumChain", | ||
params: [ | ||
{ | ||
chainId: "0x539", | ||
chainName: "Localhost 8545", | ||
nativeCurrency: { | ||
name: "ETH", | ||
symbol: "ETH", | ||
decimals: 18, | ||
}, | ||
rpcUrls: ["http://localhost:8545"], | ||
}, | ||
], | ||
}); | ||
|
||
return new Promise((resolve) => { | ||
addNetworkRequest | ||
.then(() => { | ||
resolve(true); | ||
}) | ||
.catch(() => { | ||
resolve(false); | ||
}); | ||
}); | ||
}; |
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
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,13 @@ | ||
export const waitForAndClickElement = async (page, query) => { | ||
await waitForElement(page, query); | ||
const element = await page.$(query); | ||
await element.click(); | ||
}; | ||
|
||
export const waitForElement = async (page, query) => { | ||
await page.waitForSelector(query, { | ||
visible: true, | ||
}); | ||
}; | ||
|
||
export const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); |
Oops, something went wrong.