-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
1,626 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {DeployFunction} from 'hardhat-deploy/types'; | ||
import {HardhatRuntimeEnvironment} from 'hardhat/types'; | ||
import { skipUnlessL1 } from '../../utils/network'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const {deployments, getNamedAccounts} = hre; | ||
const {deploy, execute, read} = deployments; | ||
const {deployer, sandboxAccount} = await getNamedAccounts(); | ||
const batch = await deploy(`Batch-${sandboxAccount}`, { | ||
contract: `Batch`, | ||
from: deployer, | ||
args: [sandboxAccount], | ||
log: true, | ||
skipIfAlreadyDeployed: true, | ||
}); | ||
const isMinter = await read('Land', 'isMinter', batch.address); | ||
if (!isMinter) { | ||
const admin = await read('Land', 'getAdmin'); | ||
await execute( | ||
'Land', | ||
{from: admin, log: true}, | ||
'setMinter', | ||
batch.address, | ||
true | ||
); | ||
} | ||
}; | ||
export default func; | ||
func.skip = skipUnlessL1; | ||
func.tags = ['DeployerBatchMint', 'DeployerBatchMint_deploy']; |
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
Oops, something went wrong.
badf6e8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report