-
Notifications
You must be signed in to change notification settings - Fork 3
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
22 changed files
with
4,980 additions
and
50 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 |
---|---|---|
@@ -1,15 +1 @@ | ||
{ | ||
"51": { | ||
"tokenAddress": "0x0000000000000000000000000000000000000000", | ||
"testOracle": "0x0000000000000000000000000000000000000000", | ||
"fathomProxyFactory": "0x0000000000000000000000000000000000000000", | ||
"fathomProxyAdmin": "0x0000000000000000000000000000000000000000" | ||
}, | ||
"31337": { | ||
"tokenAddress": "0x0000000000000000000000000000000000000000", | ||
"testOracle": "0x0000000000000000000000000000000000000000", | ||
"fathomProxyFactory": "0x0000000000000000000000000000000000000000", | ||
"fathomProxyAdmin": "0x0000000000000000000000000000000000000000" | ||
}, | ||
"token": "GLD" | ||
} | ||
{"51":{"tokenAddress":"0x0000000000000000000000000000000000000000","testOracle":"0x0000000000000000000000000000000000000000","fathomProxyFactory":"0x0000000000000000000000000000000000000000","fathomProxyAdmin":"0x0000000000000000000000000000000000000000"},"31337":{"tokenAddress":"0x828e4F72BC7B912f6Fde900071212aAA075BBd22","testOracle":"0x0dC763b6a547deb5ED263cdf26B5e4D456989582","fathomProxyFactory":"0x28c6408131836B0f1Adbae443b65B76487723C4b","fathomProxyAdmin":"0xc38d2D6bc857129aAAd365eDae5f7f286f4Ce994"},"token":"GLD"} |
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
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
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,67 @@ | ||
const { ethers } = require("hardhat"); | ||
const { expect } = require("chai"); | ||
|
||
const { getProxy } = require("../../common/proxies"); | ||
|
||
describe("AdminControls", () => { | ||
// Contract | ||
let adminControls; | ||
let positionManager; | ||
let bookKeeper; | ||
let liquidationEngine; | ||
let systemDebtEngine; | ||
let priceOracle; | ||
let stablecoinAdapter; | ||
let stableSwapModule; | ||
let flashMintModule; | ||
|
||
beforeEach(async () => { | ||
await deployments.fixture(["DeployTestFixture"]); | ||
|
||
const ProxyFactory = await deployments.get("FathomProxyFactory"); | ||
const proxyFactory = await ethers.getContractAt("FathomProxyFactory", ProxyFactory.address); | ||
|
||
adminControls = await getProxy(proxyFactory, "AdminControls"); | ||
liquidationEngine = await getProxy(proxyFactory, "LiquidationEngine"); | ||
positionManager = await getProxy(proxyFactory, "PositionManager"); | ||
stablecoinAdapter = await getProxy(proxyFactory, "StablecoinAdapter"); | ||
systemDebtEngine = await getProxy(proxyFactory, "SystemDebtEngine"); | ||
priceOracle = await getProxy(proxyFactory, "PriceOracle"); | ||
stableSwapModule = await getProxy(proxyFactory, "StableSwapModule"); | ||
flashMintModule = await getProxy(proxyFactory, "FlashMintModule"); | ||
bookKeeper = await getProxy(proxyFactory, "BookKeeper"); | ||
}); | ||
|
||
describe("#pause", () => { | ||
context("pause protocol", () => { | ||
it("protocol contracts should be paused", async () => { | ||
await adminControls.pauseProtocol(); | ||
|
||
expect(await bookKeeper.paused()).to.be.equal(true); | ||
expect(await liquidationEngine.paused()).to.be.equal(true); | ||
expect(await positionManager.paused()).to.be.equal(true); | ||
expect(await systemDebtEngine.paused()).to.be.equal(true); | ||
expect(await stablecoinAdapter.paused()).to.be.equal(true); | ||
expect(await priceOracle.paused()).to.be.equal(true); | ||
expect(await flashMintModule.paused()).to.be.equal(true); | ||
}); | ||
}); | ||
}); | ||
describe("#unpause", () => { | ||
context("unpause protocol", () => { | ||
it("protocol contracts should be unpaused", async () => { | ||
await adminControls.pauseProtocol(); | ||
|
||
await adminControls.unpauseProtocol(); | ||
|
||
expect(await bookKeeper.paused()).to.be.equal(false); | ||
expect(await liquidationEngine.paused()).to.be.equal(false); | ||
expect(await positionManager.paused()).to.be.equal(false); | ||
expect(await systemDebtEngine.paused()).to.be.equal(false); | ||
expect(await stablecoinAdapter.paused()).to.be.equal(false); | ||
expect(await priceOracle.paused()).to.be.equal(false); | ||
expect(await flashMintModule.paused()).to.be.equal(false); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.