Skip to content

Commit

Permalink
feat: set constants and immutables
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Sep 10, 2024
1 parent 73bb161 commit 701a83b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/contracts/src/dollar/core/UbiquityAMOMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ contract UbiquityAMOMinter is Ownable {
/* ========== STATE VARIABLES ========== */

// Core
IUbiquityDollarToken public dollar =
IUbiquityDollarToken public constant dollar =
IUbiquityDollarToken(0x0F644658510c95CB46955e55D7BA9DDa9E9fBEc6);
IUbiquityGovernanceToken public governance =
IUbiquityGovernanceToken public constant governance =
IUbiquityGovernanceToken(0x4e38D89362f7e5db0096CE44ebD021c3962aA9a0);
ERC20 public collateral_token;
ERC20 public immutable collateral_token;
IUbiquityPool public pool =

Check failure on line 24 in packages/contracts/src/dollar/core/UbiquityAMOMinter.sol

View workflow job for this annotation

GitHub Actions / check_storage_layout (src/dollar/core/UbiquityAMOMinter.sol:UbiquityAMOMinter)

Variable diff

variable "dollar" of type "contract IUbiquityDollarToken" was replaced by variable "pool" of type "contract IUbiquityPool" (storage slot 0x0000000000000000000000000000000000000000000000000000000000000001, byte #0)
IUbiquityPool(0xED3084c98148e2528DaDCB53C56352e549C488fA);

address public timelock_address;

Check failure on line 27 in packages/contracts/src/dollar/core/UbiquityAMOMinter.sol

View workflow job for this annotation

GitHub Actions / check_storage_layout (src/dollar/core/UbiquityAMOMinter.sol:UbiquityAMOMinter)

Variable diff

variable "governance" of type "contract IUbiquityGovernanceToken" was replaced by variable "timelock_address" of type "address" (storage slot 0x0000000000000000000000000000000000000000000000000000000000000002, byte #0)
address public custodian_address;

Check failure on line 28 in packages/contracts/src/dollar/core/UbiquityAMOMinter.sol

View workflow job for this annotation

GitHub Actions / check_storage_layout (src/dollar/core/UbiquityAMOMinter.sol:UbiquityAMOMinter)

Variable diff

variable "collateral_token" of type "contract ERC20" was replaced by variable "custodian_address" of type "address" (storage slot 0x0000000000000000000000000000000000000000000000000000000000000003, byte #0)

// Collateral related
address public collateral_address;
uint256 public col_idx;
address public immutable collateral_address;
uint256 public immutable col_idx;

// AMO addresses
address[] public amos_array;

Check failure on line 35 in packages/contracts/src/dollar/core/UbiquityAMOMinter.sol

View workflow job for this annotation

GitHub Actions / check_storage_layout (src/dollar/core/UbiquityAMOMinter.sol:UbiquityAMOMinter)

Variable diff

variable "pool" of type "contract IUbiquityPool" was replaced by variable "amos_array" of type "address[]" (storage slot 0x0000000000000000000000000000000000000000000000000000000000000004, byte #0)
Expand Down Expand Up @@ -64,7 +64,7 @@ contract UbiquityAMOMinter is Ownable {
uint256 public ubiquityDollarBalanceStored = 0;

// Collateral balance related
uint256 public missing_decimals;
uint256 public immutable missing_decimals;
uint256 public collatDollarBalanceStored = 0;

// AMO balance corrections
Expand Down Expand Up @@ -341,9 +341,9 @@ contract UbiquityAMOMinter is Ownable {
function addAMO(address amo_address, bool sync_too) public onlyByOwnGov {
require(amo_address != address(0), "Zero address detected");

// This checks if the AMO adheres to the AMO interface
(uint256 dollar_val_e18, uint256 collat_val_e18) = IAMO(amo_address)
.dollarBalances();
require(dollar_val_e18 >= 0 && collat_val_e18 >= 0, "Invalid AMO");

require(amos[amo_address] == false, "Address already exists");
amos[amo_address] = true;
Expand Down

0 comments on commit 701a83b

Please sign in to comment.