diff --git a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh index c558d9d3..813e7970 100755 --- a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh +++ b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Append tasks/index.ts file echo "import './rekey-json'" >> tasks/index.ts diff --git a/app/data/config/fixturenet-optimism/optimism-contracts/send-balance.ts b/app/data/config/fixturenet-optimism/optimism-contracts/send-balance.ts index 43976b94..54615647 100644 --- a/app/data/config/fixturenet-optimism/optimism-contracts/send-balance.ts +++ b/app/data/config/fixturenet-optimism/optimism-contracts/send-balance.ts @@ -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({