endstep2
This commit is contained in:
22
tokenizerRendu/code/scripts/send-op-tx.ts
Normal file
22
tokenizerRendu/code/scripts/send-op-tx.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { network } from "hardhat";
|
||||
|
||||
const { ethers } = await network.create({
|
||||
network: "hardhatOp",
|
||||
chainType: "op",
|
||||
});
|
||||
|
||||
console.log("Sending transaction using the OP chain type");
|
||||
|
||||
const [sender] = await ethers.getSigners();
|
||||
|
||||
console.log("Sending 1 wei from", sender.address, "to itself");
|
||||
|
||||
console.log("Sending L2 transaction");
|
||||
const tx = await sender.sendTransaction({
|
||||
to: sender.address,
|
||||
value: 1n,
|
||||
});
|
||||
|
||||
await tx.wait();
|
||||
|
||||
console.log("Transaction sent successfully");
|
||||
Reference in New Issue
Block a user