-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckPeer.js
More file actions
23 lines (20 loc) · 729 Bytes
/
checkPeer.js
File metadata and controls
23 lines (20 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const { ethers } = require("hardhat");
async function main() {
const [account] = await ethers.getSigners();
const holeskyOFTAddress = "0x4461b34d90aDDc7C42Ba2436fEA7f69c9355D62C";
const baseSepoliaEid = 40245;
const baseSepoliaOFTAddress = "0x4883ea19C731Eb9Da7A6E1Cf23AA8B7A6f6313c3";
const MyOFT = await ethers.getContractAt("MyOFT", holeskyOFTAddress, account);
const peer = await MyOFT.peers(baseSepoliaEid);
console.log("Peer for Base Sepolia (EID 40245) on Holesky:", peer);
console.log(
"Expected peer:",
ethers.utils.hexlify(ethers.utils.zeroPad(baseSepoliaOFTAddress, 32))
);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});