Skip to content

Commit

Permalink
slither run
Browse files Browse the repository at this point in the history
  • Loading branch information
princetonbishop committed Apr 21, 2024
1 parent ff3bb87 commit e2b9513
Show file tree
Hide file tree
Showing 6 changed files with 78,654 additions and 11 deletions.
3 changes: 0 additions & 3 deletions protocol/contracts/interfaces/templegold/IDaiGoldAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ interface IDaiGoldAuction is IAuctionBase {

/// @notice Keep track of next epoch auction Temple Gold amount
function nextAuctionGoldAmount() external view returns (uint256);

/// @notice Cool down in seconds for rewards distribution
function rewardDistributionCoolDown() external view returns (uint160);

/// @notice Timestamp for last reward notification
function lastRewardNotificationTimestamp() external view returns (uint96);
Expand Down
1 change: 0 additions & 1 deletion protocol/contracts/templegold/DaiGoldAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ contract DaiGoldAuction is IDaiGoldAuction, AuctionBase, TempleElevatedAccess {

/// @notice Keep track of next epoch auction Temple Gold amount
uint256 public override nextAuctionGoldAmount;
uint160 public override rewardDistributionCoolDown;
uint96 public override lastRewardNotificationTimestamp;

/// @notice Auctions run for minimum 1 week
Expand Down
2 changes: 1 addition & 1 deletion protocol/contracts/templegold/SpiceAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract SpiceAuction is ISpiceAuction, AuctionBase {
string public override name;

/// @notice Last time auction was started. For zero auctions, it is the contract deploy timestamp
uint256 private _deoloyTimestamp;
uint256 private immutable _deoloyTimestamp;

/// @notice Keep track of the different configurations for each auction
mapping(uint256 auctionId => SpiceAuctionConfig config) public auctionConfigs;
Expand Down
15 changes: 10 additions & 5 deletions protocol/contracts/templegold/TempleGold.sol
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,17 @@ import { TempleMath } from "contracts/common/TempleMath.sol";
return totalSupply();
}

function _beforeTokenTransfer(address from, address to /*uint256 amount*/) internal view {
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal override {
/// @notice can only transfer to or from whitelisted addreess
/// this also disables burn
if (from != address(0) || to != address(0)) {
if (!authorized[from] && !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }
}
if (!authorized[from] && !authorized[to]) { revert ITempleGold.NonTransferrable(from, to); }
super._update(from, to, value);
}

function _distribute(DistributionParams storage params, uint256 mintAmount) private {
Expand Down
2 changes: 1 addition & 1 deletion protocol/contracts/templegold/TempleGoldProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { IOAppPreCrimeSimulator } from "@layerzerolabs/lz-evm-oapp-v2/contracts/

contract TempleGoldProxy is ITempleGoldProxy, TempleElevatedAccess {
/// @notice Temple Gold
ITempleGold public override templeGold;
ITempleGold public immutable override templeGold;

constructor(address _rescuer, address _executor, address _templeGold) TempleElevatedAccess(_rescuer, _executor) {
templeGold = ITempleGold(_templeGold);
Expand Down
Loading

0 comments on commit e2b9513

Please sign in to comment.