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_NAME=
GHOST_TOKEN_SYMBOL= 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 on gatekeeper
INITIAL_GHOSTED_SUPPLY= INITIAL_GHOSTED_SUPPLY=

View File

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

View File

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

View File

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

View File

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