-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #557 from livepeer/rb/hardhat-geth-config
Rb/hardhat geth config
- Loading branch information
Showing
6 changed files
with
87 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.9; | ||
|
||
contract DummyL2LPTDataCache { | ||
function l1CirculatingSupply() external pure returns (uint256) { | ||
return 0; | ||
} | ||
} |
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 @@ | ||
import {HardhatRuntimeEnvironment} from "hardhat/types" | ||
import {DeployFunction} from "hardhat-deploy/types" | ||
import {contractId} from "../utils/helpers" | ||
|
||
const func: DeployFunction = async function(hre: HardhatRuntimeEnvironment) { | ||
const {deployments, getNamedAccounts, ethers} = hre | ||
const {deploy, get} = deployments | ||
|
||
const {deployer} = await getNamedAccounts() | ||
|
||
const deployResult = await deploy("DummyL2LPTDataCache", { | ||
from: deployer, | ||
log: true | ||
}) | ||
|
||
const controllerDeployment = await get("Controller") | ||
const controller = await ethers.getContractAt( | ||
"Controller", | ||
controllerDeployment.address | ||
) | ||
|
||
const id = contractId("L2LPTDataCache") | ||
await controller.setContractInfo( | ||
id, | ||
deployResult.address, | ||
"0x1111111111111111111111111111111111111111" | ||
) | ||
} | ||
|
||
func.tags = ["ARBITRUM_LPT_DUMMIES"] | ||
export default func |
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,9 @@ | ||
import {task} from "hardhat/config" | ||
|
||
task("print-contract-address", "Print a deployed contract address") | ||
.addParam("contract", "Contract name") | ||
.setAction(async (taskArgs, hre) => { | ||
const {deployments} = hre | ||
const contractDeployment = await deployments.get(taskArgs.contract) | ||
console.log(contractDeployment.address) | ||
}) |