File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ const { ethers } = require ( 'hardhat' ) ;
12const { testArgs } = require ( '../utils/configs' ) ;
3+ const { setupProof, membershipMintAndDelegate, isLocalhost } = require ( '../utils/helpers' ) ;
24
3- module . exports = async ( { getNamedAccounts, deployments } ) => {
5+ module . exports = async ( { getNamedAccounts, deployments, getChainId } ) => {
46 const { deploy } = deployments ;
57 const { deployer } = await getNamedAccounts ( ) ;
8+ const chainId = await getChainId ( ) ;
69
710 await deploy ( 'Membership' , {
811 from : deployer ,
912 args : testArgs ( ) ,
1013 log : true ,
1114 } ) ;
15+
16+ if ( isLocalhost ( chainId ) ) {
17+ const deps = { } ;
18+ await setupProof ( deps ) ;
19+
20+ if ( process . env . TEST_STAGE === 'MINT_READY' ) {
21+ await membershipMintAndDelegate ( await ethers . getContract ( 'Membership' ) , deps ) ;
22+ }
23+ }
1224} ;
1325
1426module . exports . tags = [ 'Membership' ] ;
Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "scripts" : {
77 "start" : " npx hardhat node --network hardhat --no-deploy" ,
8+ "dev" : " npx hardhat node --export-all ../website/contracts/localhost.json" ,
9+ "dev:mint_ready" : " TEST_STAGE=MINT_READY npx hardhat node --export-all ../website/contracts/localhost.json" ,
810 "test" : " npx hardhat test --network hardhat" ,
911 "test:membership" : " npx hardhat test --network hardhat tests/membership.js" ,
1012 "test:governor" : " npx hardhat test --network hardhat tests/governor.js" ,
You can’t perform that action at this time.
0 commit comments