-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into LF-4961-Implementing-CCIP-support
- Loading branch information
Showing
39 changed files
with
1,344 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types' | ||
import { DeployFunction } from 'hardhat-deploy/types' | ||
import { ethers, network } from 'hardhat' | ||
import { addOrReplaceFacets } from '../utils/diamond' | ||
import { | ||
diamondContractName, | ||
updateDeploymentLogs, | ||
verifyContract, | ||
} from './9999_utils' | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
// Protect against unwanted redeployments | ||
if (network.name !== 'zksync' && network.name !== 'zksyncGoerli') { | ||
return | ||
} | ||
|
||
const { deployments, getNamedAccounts } = hre | ||
const { deploy } = deployments | ||
const { deployer } = await getNamedAccounts() | ||
|
||
const deployedFacet = await deploy('AccessManagerFacet', { | ||
from: deployer, | ||
log: true, | ||
skipIfAlreadyDeployed: true, | ||
}) | ||
|
||
const accessManagerFacet = await ethers.getContract('AccessManagerFacet') | ||
const diamond = await ethers.getContract(diamondContractName) | ||
|
||
await addOrReplaceFacets([accessManagerFacet], diamond.address) | ||
|
||
const isVerified = await verifyContract(hre, 'AccessManagerFacet', { | ||
address: accessManagerFacet.address, | ||
}) | ||
|
||
await updateDeploymentLogs('AccessManagerFacet', deployedFacet, isVerified) | ||
} | ||
|
||
export default func | ||
|
||
func.id = 'deploy_access_manager_facet' | ||
func.tags = ['DeployAccessManagerFacet'] | ||
func.dependencies = ['InitialFacets', diamondContractName, 'InitFacets'] |
Oops, something went wrong.