Compare commits

..

No commits in common. "bc905d9f15625b658c7184969bbd75ed8f7647bb" and "0f23d7bd3daf69c2031a89b6a42a26d24f0628ad" have entirely different histories.

5 changed files with 8 additions and 41 deletions

View File

@ -88,20 +88,6 @@ STINKY_TOKEN_SYMBOL=
GHOST_TOKEN_NAME=
GHOST_TOKEN_SYMBOL=
################################# Governor values ###################################
## Default values for governor smart contract. ##
## extension - number of blocks to be extended if late quorum occured. ##
## delay - number of blocks before proposal becomes active. ##
## period - number of blocks for proposal to be voted on. ##
## threshold - number of votes required in order for a voter to become a proposer. ##
## fraction - percentage of supply, where denominator is 100 ##
#####################################################################################
GOVERNOR_VOTE_EXTENSION=
GOVERNOR_VOTING_DELAY=
GOVERNOR_VOTING_PERIOD=
GOVERNOR_PROPOSAL_THRESHOLD=
GOVERNOR_QUORUM_FRACTION=
## Initial ghosted supply on gatekeeper
INITIAL_GHOSTED_SUPPLY=

View File

@ -25,10 +25,9 @@ usage() {
echo "8) StakingDistributor"
echo "9) BondingCalculator"
echo "10) Gatekeeper"
echo "11) Governor"
echo "12) AfterPartyFirst"
echo "13) AfterPartySecond"
echo "14) AfterPartyThird"
echo "11) AfterPartyFirst"
echo "12) AfterPartySecond"
echo "13) AfterPartyThird"
exit 1
}
@ -109,12 +108,10 @@ for i in $(seq $START $END); do
elif [ "10" == "$i" ]; then
CONTRACT="Gatekeeper"
elif [ "11" == "$i" ]; then
CONTRACT="Governor"
elif [ "12" == "$i" ]; then
CONTRACT="AfterPartyFirst"
elif [ "13" == "$i" ]; then
elif [ "12" == "$i" ]; then
CONTRACT="AfterPartySecond"
elif [ "14" == "$i" ]; then
elif [ "13" == "$i" ]; then
CONTRACT="AfterPartyThird"
else
echo "No contract found for index $i"

View File

@ -130,12 +130,7 @@ contract GhostBondDepository is IBondDepository, NoteKeeper {
address _quoteToken,
uint32[2] calldata _intervals,
bool[2] calldata _booleans
) external override returns (uint256 id) {
if (
msg.sender != authority.governor() &&
msg.sender != authority.policy()
) revert NotGuardianOrPolicy();
) external override onlyPolicy returns (uint256 id) {
uint256 secondsToConclusion = _terms[1] - block.timestamp;
uint256 decimals = IERC20Metadata(_quoteToken).decimals();
uint64 targetDebt = uint64(_booleans[0]
@ -184,12 +179,7 @@ contract GhostBondDepository is IBondDepository, NoteKeeper {
emit MarketCreated(id, address(_ftso), _quoteToken, _market[1]);
}
function close(uint256 id) external override {
if (
msg.sender != authority.governor() &&
msg.sender != authority.policy()
) revert NotGuardianOrPolicy();
function close(uint256 id) external override onlyPolicy {
terms[id].conclusion = uint48(block.timestamp);
markets[id].capacity = 0;
emit MarketClosed(id);

View File

@ -149,12 +149,7 @@ contract GhostTreasury is GhostAccessControlled, ITreasury {
emit RepayDebt(msg.sender, ftso, amount, amount);
}
function auditReserves() external {
if (
msg.sender != authority.governor() &&
msg.sender != authority.guardian()
) revert NotApproved();
function auditReserves() external onlyGovernor {
uint256 reserves;
address[] memory reserveTokens = registry[STATUS.RESERVETOKEN];

View File

@ -7,7 +7,6 @@ interface IBondDepository {
error DepositoryConcluded(uint48 concludedTime);
error DepositoryMaxPrice(uint256 price, uint256 maxPrice);
error DepositoryMaxSize(uint256 payout, uint256 maxPayout);
error NotGuardianOrPolicy();
event MarketClosed(uint256 indexed id);
event Bond(uint256 indexed id, uint256 amount, uint256 price);