Skip to content

Commit

Permalink
Merge pull request #6 from LayerZero-Labs/riley/new-chains
Browse files Browse the repository at this point in the history
Riley/new chains
  • Loading branch information
TRileySchwarz authored Oct 25, 2023
2 parents ba570fb + 899a47b commit 65a8a71
Show file tree
Hide file tree
Showing 30 changed files with 10,557 additions and 25 deletions.
22 changes: 22 additions & 0 deletions constants/chainIds.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@
"optimism": 111,
"fantom": 112,

"dfk": 115,
"harmony": 116,
"dexalot": 118,
"celo": 125,
"fuse": 138,
"gnosis": 145,
"klaytn": 150,
"coredao": 153,
"okx": 155,
"canto": 159,
"moonriver": 167,
"tenet": 173,
"nova": 175,
"meter": 176,
"mantle": 181,
"zora": 195,
"tomo": 196,
"loot": 197,
"meritcircle": 198,
"telos": 199,
"scroll": 214,

"ethereum-goerli": 10121,
"bsc-testnet": 10102,
"fuji": 10106,
Expand Down
3 changes: 2 additions & 1 deletion constants/environments.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"polygon",
"arbitrum",
"optimism",
"fantom"
"fantom",
"scroll"
],
"testnet": [
"goerli",
Expand Down
1 change: 1 addition & 0 deletions constants/layerzeroEndpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"arbitrum": "0x3c2269811836af69497E5F486A85D7316753cf62",
"optimism": "0x3c2269811836af69497E5F486A85D7316753cf62",
"fantom": "0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7",
"scroll": "0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7",

"ethereum-goerli": "0xbfD2135BFfbb0B5378b56643c2Df8a87552Bfa23",
"bsc-testnet": "0x6Fcb97553D41516Cb228ac03FdC8B9a0a9df04A1",
Expand Down
27 changes: 26 additions & 1 deletion constants/multisig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,30 @@
"zk-evm": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"base-mainnet": "0x81EAb64E630C4a2E3E849268A6B64cb76D1C8109",
"kava": "0x424aCEFcd5E9fE8329e3530a214C5e88375b542f",
"linea": "0xdBd9E7f55C3a7A0F17cCAc06dD4f4cbf06f7AD5c"
"linea": "0xdBd9E7f55C3a7A0F17cCAc06dD4f4cbf06f7AD5c",

"moonbeam": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",

"dfk": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"harmony": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"dexalot": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"celo": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"fuse": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"gnosis": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"klaytn": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"coredao": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"okx": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"canto": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"moonriver": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"tenet": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"nova": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"meter": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"mantle": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"zora": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"tomo": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"loot": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"meritcircle": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",
"telos": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d",

"scroll": "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d"
}
46 changes: 23 additions & 23 deletions deploy/OFTWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@ module.exports = async function ({ deployments, getNamedAccounts }) {
console.log(`The message now is ${await contract.owner()}`);
} else {

// uncomment to tweek wallet indexes for same deployment addresses
if (hre.network.name == "kava") {
// uncomment to tweak wallet indexes for same deployment addresses
// if (hre.network.name == "kava") {
const signer = (await ethers.getSigners())[2]
//
// // includes pending TX count
// const currentWalletNonce = await ethers.provider.getTransactionCount(signer.address, 'pending')
// // gets wallet to this nonce, NOT the 'next' nonce to be used
// const desiredWalletNonce = 14
//
// // number of tx to achieve desired wallet nonce
// let txNum = desiredWalletNonce - currentWalletNonce
//
// // nonce starts at 0, so use <= in loop
// for (let i = 0 ; i <= txNum; i++) {
// await signer.sendTransaction({
// to: signer.address,
// value: ethers.utils.parseEther("0"), // Sends exactly 1.0 ether
// });
// }
}

// includes pending TX count
const currentWalletNonce = await ethers.provider.getTransactionCount(signer.address, 'pending')
// gets wallet to this nonce, NOT the 'next' nonce to be used
const desiredWalletNonce = 14

// number of tx to achieve desired wallet nonce
let txNum = desiredWalletNonce - currentWalletNonce

// nonce starts at 0, so use <= in loop
for (let i = 0 ; i <= txNum; i++) {
await signer.sendTransaction({
to: signer.address,
value: ethers.utils.parseEther("0"), // Sends exactly 1.0 ether
});
}
// }

const { deploy } = deployments
const { deployer } = await getNamedAccounts()
Expand All @@ -91,15 +91,15 @@ module.exports = async function ({ deployments, getNamedAccounts }) {
// waitConfirmations: 3,
// skipIfAlreadyDeployed: false,
// })

// const newOwner = hre.network.name == "moonbeam" ? "0x1D7C6783328C145393e84fb47a7f7C548f5Ee28d" : MULTI_SIGS[hre.network.name]
//
// const newOwner = MULTI_SIGS[hre.network.name]
// console.log("New owner: ", newOwner)
// let accounts = await ethers.getSigners()
// let owner = accounts[2] // me
// let oftWrapper = await ethers.getContract("OFTWrapper")
// await oftWrapper.connect(owner).transferOwnership(newOwner)

// await verify(hre.network.name, ["OFTWrapper"])
//
await verify(hre.network.name, ["OFTWrapper"])
}

}
Expand Down
1 change: 1 addition & 0 deletions deployments/celo/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42220
Loading

0 comments on commit 65a8a71

Please sign in to comment.