Skip to content

Commit

Permalink
Unpause contract
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Dec 6, 2023
1 parent c681fd5 commit 5bddb9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 1 addition & 5 deletions contracts/ethereum/scripts/report.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ethers } from "hardhat"
import { CasimirFactory, CasimirManager, CasimirUpkeep } from "../build/@types"
import { CasimirFactory, CasimirUpkeep } from "../build/@types"
import { waitForNetwork } from "../helpers/network"

void async function() {
Expand All @@ -11,12 +11,8 @@ void async function() {
const factory = await ethers.getContractAt("CasimirFactory", process.env.FACTORY_ADDRESS) as CasimirFactory
const [managerId] = await factory.getManagerIds()
const managerConfig = await factory.getManagerConfig(managerId)
const manager = await ethers.getContractAt("CasimirManager", managerConfig.managerAddress) as CasimirManager
const upkeep = await ethers.getContractAt("CasimirUpkeep", managerConfig.upkeepAddress) as CasimirUpkeep

const requestReport = await upkeep.connect(owner).requestReport()
await requestReport.wait()

// const unpause = await manager.connect(owner).setPaused(true)
// await unpause.wait()
}()
11 changes: 4 additions & 7 deletions scripts/ethereum/report.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { loadCredentials, getSecret } from "@casimir/aws"
import { ETHEREUM_CONTRACTS, ETHEREUM_NETWORK_NAME } from "@casimir/env"
import { ETHEREUM_NETWORK_NAME } from "@casimir/env"
import { run } from "@casimir/shell"

/**
* Run a report on testnet
* Request a new report on testnet
*/
void async function () {
if (process.env.USE_SECRETS !== "false") {
Expand All @@ -13,10 +13,7 @@ void async function () {
process.env.BIP39_SEED = process.env.BIP39_SEED || "inflict ball claim confirm cereal cost note dad mix donate traffic patient"
}
console.log(`Your mnemonic seed is ${process.env.BIP39_SEED}`)
const networkName = process.env.NETWORK?.toUpperCase() || "TESTNET"

process.env.SSV_NETWORK_ADDRESS = ETHEREUM_CONTRACTS["TESTNET"].SSV_NETWORK_ADDRESS
process.env.SSV_VIEWS_ADDRESS = ETHEREUM_CONTRACTS["TESTNET"].SSV_VIEWS_ADDRESS
process.env.SWAP_FACTORY_ADDRESS = ETHEREUM_CONTRACTS["TESTNET"].SWAP_FACTORY_ADDRESS

run(`npm run report --workspace @casimir/ethereum -- --network ${ETHEREUM_NETWORK_NAME["TESTNET"]}`)
run(`npm run report --workspace @casimir/ethereum -- --network ${ETHEREUM_NETWORK_NAME[networkName]}`)
}()

0 comments on commit 5bddb9b

Please sign in to comment.