Add Optimism Fixturenet stack #266

Merged
prathamesh0 merged 26 commits from pm-fixturenet-optimism into main 2023-04-03 07:03:47 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 66044072c2 - Show all commits

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -e
# Append tasks/index.ts file
echo "import './rekey-json'" >> tasks/index.ts

View File

@ -1,13 +1,15 @@
import { task } from 'hardhat/config'
import '@nomiclabs/hardhat-ethers'
import { ethers } from 'ethers'
task('send-balance', 'Sends Ether to a specified Ethereum account')
.addParam('to', 'The Ethereum address to send Ether to')
.addParam('amount', 'The amount of Ether to send, in Ether')
.addParam('privateKey', 'The private key of the sender')
.setAction(async ({ to, amount, privateKey }, { ethers }) => {
.setAction(async ({ to, amount, privateKey }, {}) => {
// Open the wallet using sender's private key
const wallet = new ethers.Wallet(privateKey, ethers.provider)
const provider = new ethers.providers.JsonRpcProvider(`${process.env.L1_RPC}`)
const wallet = new ethers.Wallet(privateKey, provider)
// Send amount to the specified address
const tx = await wallet.sendTransaction({