-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: PoR in _checkMint function
- Loading branch information
Showing
5 changed files
with
358 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { ethers } = require('hardhat'); | ||
|
||
async function deployAndGetMockAggregatorAddress() { | ||
console.log('Deploying mock aggregator...'); | ||
const MockAggregator = await ethers.getContractFactory('MockV3Aggregator'); | ||
const mockAggregator = await MockAggregator.deploy(8, 4049610000); // 40.4961 | ||
await mockAggregator.deployed(); | ||
console.log(`Mock aggregator deployed at ${mockAggregator.address}`); | ||
return mockAggregator.address; | ||
} | ||
|
||
module.exports = async function getPoRAddress(network) { | ||
switch (network) { | ||
case 'mainnet': | ||
return ''; | ||
case 'sepolia': | ||
return ''; | ||
case 'arbitrum': | ||
return '0x47A2fBEb46553F01E7133686Fb1b5349d4823a0C'; | ||
case 'arbsepolia': | ||
return ''; | ||
case 'base': | ||
return ''; | ||
case 'basesepolia': | ||
return ''; | ||
case 'localhost': | ||
return await deployAndGetMockAggregatorAddress(); | ||
default: | ||
throw new Error('Invalid network for Chainlink PoR address'); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.