This repository has been archived by the owner on Dec 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set a higher default gas limit and use gas instead of gasLimit on the…
… call params
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
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,52 @@ | ||
const { ethers } = require('ethers'); | ||
|
||
const ENDPOINT = 'http://127.0.0.1:3000/evm' | ||
|
||
// 0x9Aa4f3FaB9d1A953447E4b0613626576C87B8404 | ||
const SENDER_KEY = '0x13612b0f60ee2f1cc911053fb10d98f2d00bd49b484a3d99a59c1a2fb4c4f92f'; | ||
|
||
|
||
const provider = new ethers.getDefaultProvider(ENDPOINT); | ||
const wallet = new ethers.Wallet(SENDER_KEY, provider); | ||
|
||
async function blast() { | ||
|
||
let nonce = await provider.getTransactionCount(wallet.address) | ||
console.log(`Start of blast trx nonce: ${nonce}`) | ||
const sends = [] | ||
for (let i = 0; i < 100; i++) { | ||
console.log(`Sending nonce: ${nonce}`) | ||
const gasTx = await wallet.sendTransaction({ | ||
to: wallet.address, | ||
nonce: nonce++, | ||
gasLimit: 21000, | ||
gasPrice: 509760000000, | ||
value: 1 | ||
}) | ||
sends.push(gasTx) | ||
//console.log(`After trx nonce: ${await provider.getTransactionCount(wallet.address)}`) | ||
} | ||
|
||
/* | ||
console.log("Starting promise.all") | ||
try { | ||
await Promise.all(sends) | ||
console.log("Promise.all complete") | ||
} catch (e) { | ||
console.log(e) | ||
console.log("Promise.all exception") | ||
} | ||
*/ | ||
|
||
async function sleep(seconds) { | ||
return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); | ||
} | ||
|
||
let count = 0; | ||
while (count++ < 50) { | ||
console.log(`Watching nonce: ${await provider.getTransactionCount(wallet.address)}`) | ||
await sleep(1) | ||
} | ||
} | ||
|
||
blast() |
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 @@ | ||
export const ETH_CHAIN = 'mainnet' | ||
export const FORK = 'istanbul' | ||
export const DEFAULT_GAS_LIMIT = '0x1E8480' | ||
export const DEFAULT_GAS_LIMIT = '989680' | ||
export const DEFAULT_VALUE = '0x0' | ||
export const DEFAULT_CHAIN_ID = 1 |
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 @@ | ||
|
||
# Websocket | ||
ssh -L 7800:10.10.10.168:7301 [email protected] -p 42424 | ||
|
||
# Nodeos read | ||
# This nodeos does not have transaction retry configured | ||
#ssh -L 8989:10.10.10.168:8883 [email protected] -p 42424 | ||
|
||
# This node has the transaction retry settings enabled | ||
ssh -L 8891:10.10.10.200:8891 [email protected] -p 42424 | ||
|
||
# Elasticsearch | ||
ssh -L 9200:10.10.10.154:9200 [email protected] -p 42424 |