Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 25401931 | 79 days ago | 0 ETH | ||||
| 25296546 | 81 days ago | 0 ETH | ||||
| 25249728 | 83 days ago | 0 ETH | ||||
| 25249728 | 83 days ago | 0 ETH | ||||
| 25249728 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249586 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249521 | 83 days ago | 0 ETH | ||||
| 25249487 | 83 days ago | 0 ETH | ||||
| 25249487 | 83 days ago | 0 ETH | ||||
| 25249487 | 83 days ago | 0 ETH | ||||
| 25249460 | 83 days ago | 0 ETH | ||||
| 25249460 | 83 days ago | 0 ETH | ||||
| 25249460 | 83 days ago | 0 ETH | ||||
| 25249460 | 83 days ago | 0 ETH | ||||
| 25249427 | 83 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
AdminContract
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./Interfaces/IAdminContract.sol";
import "./Interfaces/IStabilityPool.sol";
import "./Interfaces/IActivePool.sol";
import "./Interfaces/IDefaultPool.sol";
import "./Addresses.sol";
contract AdminContract is IAdminContract, UUPSUpgradeable, OwnableUpgradeable, Addresses {
// Constants --------------------------------------------------------------------------------------------------------
string public constant NAME = "AdminContract";
uint256 public constant DECIMAL_PRECISION = 1 ether;
uint256 public constant _100pct = 1 ether; // 1e18 == 100%
uint256 private constant DEFAULT_DECIMALS = 18;
uint256 public constant BORROWING_FEE_DEFAULT = 0.005 ether; // 0.5%
uint256 public constant CCR_DEFAULT = 1.5 ether; // 150%
uint256 public constant MCR_DEFAULT = 1.1 ether; // 110%
uint256 public constant MIN_NET_DEBT_DEFAULT = 2_000 ether;
uint256 public constant MINT_CAP_DEFAULT = 1_000_000 ether; // 1 million GRAI
uint256 public constant PERCENT_DIVISOR_DEFAULT = 200; // dividing by 200 yields 0.5%
uint256 public constant REDEMPTION_FEE_FLOOR_DEFAULT = 0.005 ether; // 0.5%
uint256 public constant REDEMPTION_BLOCK_TIMESTAMP_DEFAULT = type(uint256).max; // never
// State ------------------------------------------------------------------------------------------------------------
/**
@dev Cannot be public as struct has too many variables for the stack.
@dev Create special view structs/getters instead.
*/
mapping(address => CollateralParams) internal collateralParams;
// list of all collateral types in collateralParams (active and deprecated)
// Addresses for easy access
address[] public validCollateral; // index maps to token address.
bool public isSetupInitialized;
// Modifiers --------------------------------------------------------------------------------------------------------
// Require that the collateral exists in the controller. If it is not the 0th index, and the
// index is still 0 then it does not exist in the mapping.
// no require here for valid collateral 0 index because that means it exists.
modifier exists(address _collateral) {
_exists(_collateral);
_;
}
modifier onlyTimelock() {
if (isSetupInitialized) {
if (msg.sender != timelockAddress) {
revert AdminContract__OnlyTimelock();
}
} else {
if (msg.sender != owner()) {
revert AdminContract__OnlyOwner();
}
}
_;
}
modifier safeCheck(
string memory parameter,
address _collateral,
uint256 enteredValue,
uint256 min,
uint256 max
) {
require(collateralParams[_collateral].active, "Collateral is not configured, use setCollateralParameters");
if (enteredValue < min || enteredValue > max) {
revert SafeCheckError(parameter, enteredValue, min, max);
}
_;
}
// Initializers -----------------------------------------------------------------------------------------------------
function initialize() public initializer {
__Ownable_init();
__UUPSUpgradeable_init();
}
/**
* @dev The deployment script will call this function when all initial collaterals have been configured;
* after this is set to true, all subsequent config/setters will need to go through the timelocks.
*/
function setSetupIsInitialized() external onlyTimelock {
isSetupInitialized = true;
}
// External Functions -----------------------------------------------------------------------------------------------
function addNewCollateral(
address _collateral,
uint256 _debtTokenGasCompensation, // the gas compensation is initialized here as it won't be changed
uint256 _decimals
) external override onlyTimelock {
require(collateralParams[_collateral].mcr == 0, "collateral already exists");
require(_decimals == DEFAULT_DECIMALS, "collaterals must have the default decimals");
validCollateral.push(_collateral);
collateralParams[_collateral] = CollateralParams({
decimals: _decimals,
index: validCollateral.length - 1,
active: false,
borrowingFee: BORROWING_FEE_DEFAULT,
ccr: CCR_DEFAULT,
mcr: MCR_DEFAULT,
debtTokenGasCompensation: _debtTokenGasCompensation,
minNetDebt: MIN_NET_DEBT_DEFAULT,
mintCap: MINT_CAP_DEFAULT,
percentDivisor: PERCENT_DIVISOR_DEFAULT,
redemptionFeeFloor: REDEMPTION_FEE_FLOOR_DEFAULT,
redemptionBlockTimestamp: REDEMPTION_BLOCK_TIMESTAMP_DEFAULT
});
IStabilityPool(stabilityPool).addCollateralType(_collateral);
// throw event
emit CollateralAdded(_collateral);
}
function setCollateralParameters(
address _collateral,
uint256 borrowingFee,
uint256 ccr,
uint256 mcr,
uint256 minNetDebt,
uint256 mintCap,
uint256 percentDivisor,
uint256 redemptionFeeFloor
) public override onlyTimelock {
collateralParams[_collateral].active = true;
setBorrowingFee(_collateral, borrowingFee);
setCCR(_collateral, ccr);
setMCR(_collateral, mcr);
setMinNetDebt(_collateral, minNetDebt);
setMintCap(_collateral, mintCap);
setPercentDivisor(_collateral, percentDivisor);
setRedemptionFeeFloor(_collateral, redemptionFeeFloor);
}
function setIsActive(address _collateral, bool _active) external onlyTimelock {
CollateralParams storage collParams = collateralParams[_collateral];
collParams.active = _active;
}
function setBorrowingFee(
address _collateral,
uint256 borrowingFee
)
public
override
onlyTimelock
safeCheck("Borrowing Fee", _collateral, borrowingFee, 0, 0.1 ether) // 0% - 10%
{
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldBorrowing = collParams.borrowingFee;
collParams.borrowingFee = borrowingFee;
emit BorrowingFeeChanged(oldBorrowing, borrowingFee);
}
function setCCR(
address _collateral,
uint256 newCCR
)
public
override
onlyTimelock
safeCheck("CCR", _collateral, newCCR, 1 ether, 10 ether) // 100% - 1,000%
{
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldCCR = collParams.ccr;
collParams.ccr = newCCR;
emit CCRChanged(oldCCR, newCCR);
}
function setMCR(
address _collateral,
uint256 newMCR
)
public
override
onlyTimelock
safeCheck("MCR", _collateral, newMCR, 1.01 ether, 10 ether) // 101% - 1,000%
{
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldMCR = collParams.mcr;
collParams.mcr = newMCR;
emit MCRChanged(oldMCR, newMCR);
}
function setMinNetDebt(
address _collateral,
uint256 minNetDebt
) public override onlyTimelock safeCheck("Min Net Debt", _collateral, minNetDebt, 0, 2_000 ether) {
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldMinNet = collParams.minNetDebt;
collParams.minNetDebt = minNetDebt;
emit MinNetDebtChanged(oldMinNet, minNetDebt);
}
function setMintCap(address _collateral, uint256 mintCap) public override onlyTimelock {
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldMintCap = collParams.mintCap;
collParams.mintCap = mintCap;
emit MintCapChanged(oldMintCap, mintCap);
}
function setPercentDivisor(
address _collateral,
uint256 percentDivisor
) public override onlyTimelock safeCheck("Percent Divisor", _collateral, percentDivisor, 2, 200) {
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldPercent = collParams.percentDivisor;
collParams.percentDivisor = percentDivisor;
emit PercentDivisorChanged(oldPercent, percentDivisor);
}
function setRedemptionFeeFloor(
address _collateral,
uint256 redemptionFeeFloor
)
public
override
onlyTimelock
safeCheck("Redemption Fee Floor", _collateral, redemptionFeeFloor, 0.001 ether, 0.1 ether) // 0.10% - 10%
{
CollateralParams storage collParams = collateralParams[_collateral];
uint256 oldRedemptionFeeFloor = collParams.redemptionFeeFloor;
collParams.redemptionFeeFloor = redemptionFeeFloor;
emit RedemptionFeeFloorChanged(oldRedemptionFeeFloor, redemptionFeeFloor);
}
function setRedemptionBlockTimestamp(address _collateral, uint256 _blockTimestamp) public override onlyTimelock {
collateralParams[_collateral].redemptionBlockTimestamp = _blockTimestamp;
emit RedemptionBlockTimestampChanged(_collateral, _blockTimestamp);
}
// View functions ---------------------------------------------------------------------------------------------------
function getValidCollateral() external view override returns (address[] memory) {
return validCollateral;
}
function getIsActive(address _collateral) external view override exists(_collateral) returns (bool) {
return collateralParams[_collateral].active;
}
function getDecimals(address _collateral) external view exists(_collateral) returns (uint256) {
return collateralParams[_collateral].decimals;
}
function getIndex(address _collateral) external view override exists(_collateral) returns (uint256) {
return (collateralParams[_collateral].index);
}
function getIndices(address[] memory _colls) external view returns (uint256[] memory indices) {
uint256 len = _colls.length;
indices = new uint256[](len);
for (uint256 i; i < len; ) {
_exists(_colls[i]);
indices[i] = collateralParams[_colls[i]].index;
unchecked {
i++;
}
}
}
function getMcr(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].mcr;
}
function getCcr(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].ccr;
}
function getDebtTokenGasCompensation(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].debtTokenGasCompensation;
}
function getMinNetDebt(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].minNetDebt;
}
function getPercentDivisor(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].percentDivisor;
}
function getBorrowingFee(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].borrowingFee;
}
function getRedemptionFeeFloor(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].redemptionFeeFloor;
}
function getRedemptionBlockTimestamp(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].redemptionBlockTimestamp;
}
function getMintCap(address _collateral) external view override returns (uint256) {
return collateralParams[_collateral].mintCap;
}
function getTotalAssetDebt(address _asset) external view override returns (uint256) {
return IActivePool(activePool).getDebtTokenBalance(_asset) + IDefaultPool(defaultPool).getDebtTokenBalance(_asset);
}
// Internal Functions -----------------------------------------------------------------------------------------------
function _exists(address _collateral) internal view {
require(collateralParams[_collateral].mcr != 0, "collateral does not exist");
}
function authorizeUpgrade(address newImplementation) public {
_authorizeUpgrade(newImplementation);
}
function _authorizeUpgrade(address) internal override onlyOwner {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*
* _Available since v4.8.3._
*/
interface IERC1967Upgradeable {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeTo(address newImplementation) public virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./Dependencies/AddressesConfigurable.sol";
contract Addresses is AddressesConfigurable {}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
abstract contract AddressesConfigurable is OwnableUpgradeable {
address public activePool;
address public adminContract;
address public borrowerOperations;
address public collSurplusPool;
address public communityIssuance;
address public debtToken;
address public defaultPool;
address public feeCollector;
address public gasPoolAddress;
address public grvtStaking;
address public priceFeed;
address public sortedVessels;
address public stabilityPool;
address public timelockAddress;
address public treasuryAddress;
address public vesselManager;
address public vesselManagerOperations;
bool public isAddressSetupInitialized;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[33] private __gap; // Goerli uses 47; Arbitrum uses 33
// Dependency setters -----------------------------------------------------------------------------------------------
function setAddresses(address[] calldata _addresses) external onlyOwner {
require(!isAddressSetupInitialized, "Setup is already initialized");
require(_addresses.length == 15, "Expected 15 addresses at setup");
for (uint i = 0; i < 15; i++) {
require(_addresses[i] != address(0), "Invalid address");
}
activePool = _addresses[0];
adminContract = _addresses[1];
borrowerOperations = _addresses[2];
collSurplusPool = _addresses[3];
debtToken = _addresses[4];
defaultPool = _addresses[5];
feeCollector = _addresses[6];
gasPoolAddress = _addresses[7];
priceFeed = _addresses[8];
sortedVessels = _addresses[9];
stabilityPool = _addresses[10];
timelockAddress = _addresses[11];
treasuryAddress = _addresses[12];
vesselManager = _addresses[13];
vesselManagerOperations = _addresses[14];
isAddressSetupInitialized = true;
}
function setCommunityIssuance(address _communityIssuance) public onlyOwner {
communityIssuance = _communityIssuance;
}
function setGRVTStaking(address _grvtStaking) public onlyOwner {
grvtStaking = _grvtStaking;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./IPool.sol";
interface IActivePool is IPool {
// --- Events ---
event ActivePoolDebtUpdated(address _asset, uint256 _debtTokenAmount);
event ActivePoolAssetBalanceUpdated(address _asset, uint256 _balance);
// --- Functions ---
function sendAsset(
address _asset,
address _account,
uint256 _amount
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./IActivePool.sol";
import "./IDefaultPool.sol";
import "./IPriceFeed.sol";
interface IAdminContract {
// Structs ----------------------------------------------------------------------------------------------------------
struct CollateralParams {
uint256 decimals;
uint256 index; // Maps to token address in validCollateral[]
bool active;
uint256 borrowingFee;
uint256 ccr;
uint256 mcr;
uint256 debtTokenGasCompensation; // Amount of debtToken to be locked in gas pool on opening vessels
uint256 minNetDebt; // Minimum amount of net debtToken a vessel must have
uint256 mintCap;
uint256 percentDivisor;
uint256 redemptionFeeFloor;
uint256 redemptionBlockTimestamp;
}
// Custom Errors ----------------------------------------------------------------------------------------------------
error SafeCheckError(string parameter, uint256 valueEntered, uint256 minValue, uint256 maxValue);
error AdminContract__OnlyOwner();
error AdminContract__OnlyTimelock();
error AdminContract__CollateralAlreadyInitialized();
// Events -----------------------------------------------------------------------------------------------------------
event CollateralAdded(address _collateral);
event MCRChanged(uint256 oldMCR, uint256 newMCR);
event CCRChanged(uint256 oldCCR, uint256 newCCR);
event MinNetDebtChanged(uint256 oldMinNet, uint256 newMinNet);
event PercentDivisorChanged(uint256 oldPercentDiv, uint256 newPercentDiv);
event BorrowingFeeChanged(uint256 oldBorrowingFee, uint256 newBorrowingFee);
event RedemptionFeeFloorChanged(uint256 oldRedemptionFeeFloor, uint256 newRedemptionFeeFloor);
event MintCapChanged(uint256 oldMintCap, uint256 newMintCap);
event RedemptionBlockTimestampChanged(address _collateral, uint256 _blockTimestamp);
// Functions --------------------------------------------------------------------------------------------------------
function DECIMAL_PRECISION() external view returns (uint256);
function _100pct() external view returns (uint256);
function addNewCollateral(address _collateral, uint256 _debtTokenGasCompensation, uint256 _decimals) external;
function setCollateralParameters(
address _collateral,
uint256 borrowingFee,
uint256 ccr,
uint256 mcr,
uint256 minNetDebt,
uint256 mintCap,
uint256 percentDivisor,
uint256 redemptionFeeFloor
) external;
function setMCR(address _collateral, uint256 newMCR) external;
function setCCR(address _collateral, uint256 newCCR) external;
function setMinNetDebt(address _collateral, uint256 minNetDebt) external;
function setPercentDivisor(address _collateral, uint256 precentDivisor) external;
function setBorrowingFee(address _collateral, uint256 borrowingFee) external;
function setRedemptionFeeFloor(address _collateral, uint256 redemptionFeeFloor) external;
function setMintCap(address _collateral, uint256 mintCap) external;
function setRedemptionBlockTimestamp(address _collateral, uint256 _blockTimestamp) external;
function getIndex(address _collateral) external view returns (uint256);
function getIsActive(address _collateral) external view returns (bool);
function getValidCollateral() external view returns (address[] memory);
function getMcr(address _collateral) external view returns (uint256);
function getCcr(address _collateral) external view returns (uint256);
function getDebtTokenGasCompensation(address _collateral) external view returns (uint256);
function getMinNetDebt(address _collateral) external view returns (uint256);
function getPercentDivisor(address _collateral) external view returns (uint256);
function getBorrowingFee(address _collateral) external view returns (uint256);
function getRedemptionFeeFloor(address _collateral) external view returns (uint256);
function getRedemptionBlockTimestamp(address _collateral) external view returns (uint256);
function getMintCap(address _collateral) external view returns (uint256);
function getTotalAssetDebt(address _asset) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./IPool.sol";
interface IDefaultPool is IPool {
// --- Events ---
event DefaultPoolDebtUpdated(address _asset, uint256 _debt);
event DefaultPoolAssetBalanceUpdated(address _asset, uint256 _balance);
// --- Functions ---
function sendAssetToActivePool(address _asset, uint256 _amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IDeposit {
function receivedERC20(address _asset, uint256 _amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./IDeposit.sol";
interface IPool is IDeposit {
// --- Events ---
event AssetSent(address _to, address indexed _asset, uint256 _amount);
// --- Functions ---
function getAssetBalance(address _asset) external view returns (uint256);
function getDebtTokenBalance(address _asset) external view returns (uint256);
function increaseDebt(address _asset, uint256 _amount) external;
function decreaseDebt(address _asset, uint256 _amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/*
* @dev from https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol
*/
interface ChainlinkAggregatorV3Interface {
function decimals() external view returns (uint8);
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
interface IPriceFeed {
// Enums ----------------------------------------------------------------------------------------------------------
enum ProviderType {
Chainlink
}
// Structs --------------------------------------------------------------------------------------------------------
struct OracleRecordV2 {
address oracleAddress;
ProviderType providerType;
uint256 timeoutSeconds;
uint256 decimals;
bool isEthIndexed;
}
/// @dev Deprecated, but retained for upgradeability
struct OracleRecord {
address chainLinkOracle;
uint256 maxDeviationBetweenRounds;
bool exists;
bool isFeedWorking;
bool isEthIndexed;
}
/// @dev Deprecated, but retained for upgradeability
struct PriceRecord {
uint256 scaledPrice;
uint256 timestamp;
}
/// @dev Deprecated, but retained for upgradeability
struct FeedResponse {
uint80 roundId;
int256 answer;
uint256 timestamp;
bool success;
uint8 decimals;
}
// Custom Errors --------------------------------------------------------------------------------------------------
error PriceFeed__ExistingOracleRequired();
error PriceFeed__InvalidDecimalsError();
error PriceFeed__InvalidOracleResponseError(address token);
error PriceFeed__TimelockOnlyError();
error PriceFeed__UnknownAssetError();
// Events ---------------------------------------------------------------------------------------------------------
event NewOracleRegistered(address token, address oracleAddress, bool isEthIndexed, bool isFallback);
// Functions ------------------------------------------------------------------------------------------------------
function fetchPrice(address _token) external view returns (uint256);
function setOracle(
address _token,
address _oracle,
ProviderType _type,
uint256 _timeoutSeconds,
bool _isEthIndexed,
bool _isFallback
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "./IDeposit.sol";
interface IStabilityPool is IDeposit {
// --- Structs ---
struct Snapshots {
mapping(address => uint256) S;
uint256 P;
uint256 G;
uint128 scale;
uint128 epoch;
}
// --- Events ---
event CommunityIssuanceAddressChanged(address newAddress);
event DepositSnapshotUpdated(address indexed _depositor, uint256 _P, uint256 _G);
event SystemSnapshotUpdated(uint256 _P, uint256 _G);
event AssetSent(address _asset, address _to, uint256 _amount);
event GainsWithdrawn(address indexed _depositor, address[] _collaterals, uint256[] _amounts, uint256 _debtTokenLoss);
event GRVTPaidToDepositor(address indexed _depositor, uint256 _GRVT);
event StabilityPoolAssetBalanceUpdated(address _asset, uint256 _newBalance);
event StabilityPoolDebtTokenBalanceUpdated(uint256 _newBalance);
event StakeChanged(uint256 _newSystemStake, address _depositor);
event UserDepositChanged(address indexed _depositor, uint256 _newDeposit);
event P_Updated(uint256 _P);
event S_Updated(address _asset, uint256 _S, uint128 _epoch, uint128 _scale);
event G_Updated(uint256 _G, uint128 _epoch, uint128 _scale);
event EpochUpdated(uint128 _currentEpoch);
event ScaleUpdated(uint128 _currentScale);
// --- Errors ---
error StabilityPool__ActivePoolOnly(address sender, address expected);
error StabilityPool__AdminContractOnly(address sender, address expected);
error StabilityPool__VesselManagerOnly(address sender, address expected);
error StabilityPool__ArrayNotInAscendingOrder();
// --- Functions ---
function addCollateralType(address _collateral) external;
/*
* Initial checks:
* - _amount is not zero
* ---
* - Triggers a GRVT issuance, based on time passed since the last issuance. The GRVT issuance is shared between *all* depositors.
* - Sends depositor's accumulated gains (GRVT, assets) to depositor
*/
function provideToSP(uint256 _amount, address[] calldata _assets) external;
/*
* Initial checks:
* - _amount is zero or there are no under collateralized vessels left in the system
* - User has a non zero deposit
* ---
* - Triggers a GRVT issuance, based on time passed since the last issuance. The GRVT issuance is shared between *all* depositors.
* - Sends all depositor's accumulated gains (GRVT, assets) to depositor
* - Decreases deposit's stake, and takes new snapshots.
*
* If _amount > userDeposit, the user withdraws all of their compounded deposit.
*/
function withdrawFromSP(uint256 _amount, address[] calldata _assets) external;
/*
Initial checks:
* - Caller is VesselManager
* ---
* Cancels out the specified debt against the debt token contained in the Stability Pool (as far as possible)
* and transfers the Vessel's collateral from ActivePool to StabilityPool.
* Only called by liquidation functions in the VesselManager.
*/
function offset(uint256 _debt, address _asset, uint256 _coll) external;
/*
* Returns debt tokens held in the pool. Changes when users deposit/withdraw, and when Vessel debt is offset.
*/
function getTotalDebtTokenDeposits() external view returns (uint256);
/*
* Calculates the asset gains earned by the deposit since its last snapshots were taken.
*/
function getDepositorGains(
address _depositor,
address[] calldata _assets
) external view returns (address[] memory, uint256[] memory);
/*
* Calculate the GRVT gain earned by a deposit since its last snapshots were taken.
*/
function getDepositorGRVTGain(address _depositor) external view returns (uint256);
/*
* Return the user's compounded deposits.
*/
function getCompoundedDebtTokenDeposits(address _depositor) external view returns (uint256);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AdminContract__CollateralAlreadyInitialized","type":"error"},{"inputs":[],"name":"AdminContract__OnlyOwner","type":"error"},{"inputs":[],"name":"AdminContract__OnlyTimelock","type":"error"},{"inputs":[{"internalType":"string","name":"parameter","type":"string"},{"internalType":"uint256","name":"valueEntered","type":"uint256"},{"internalType":"uint256","name":"minValue","type":"uint256"},{"internalType":"uint256","name":"maxValue","type":"uint256"}],"name":"SafeCheckError","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBorrowingFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBorrowingFee","type":"uint256"}],"name":"BorrowingFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCCR","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCCR","type":"uint256"}],"name":"CCRChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_collateral","type":"address"}],"name":"CollateralAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMCR","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMCR","type":"uint256"}],"name":"MCRChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMinNet","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinNet","type":"uint256"}],"name":"MinNetDebtChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMintCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMintCap","type":"uint256"}],"name":"MintCapChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPercentDiv","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPercentDiv","type":"uint256"}],"name":"PercentDivisorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_collateral","type":"address"},{"indexed":false,"internalType":"uint256","name":"_blockTimestamp","type":"uint256"}],"name":"RedemptionBlockTimestampChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRedemptionFeeFloor","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRedemptionFeeFloor","type":"uint256"}],"name":"RedemptionFeeFloorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"BORROWING_FEE_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CCR_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DECIMAL_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MCR_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_CAP_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_NET_DEBT_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_DIVISOR_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REDEMPTION_BLOCK_TIMESTAMP_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REDEMPTION_FEE_FLOOR_DEFAULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_100pct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activePool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"_debtTokenGasCompensation","type":"uint256"},{"internalType":"uint256","name":"_decimals","type":"uint256"}],"name":"addNewCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"authorizeUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowerOperations","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collSurplusPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityIssuance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debtToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getBorrowingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getCcr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getDebtTokenGasCompensation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_colls","type":"address[]"}],"name":"getIndices","outputs":[{"internalType":"uint256[]","name":"indices","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getMcr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getMinNetDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getMintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getPercentDivisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getRedemptionBlockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"}],"name":"getRedemptionFeeFloor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getTotalAssetDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getValidCollateral","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"grvtStaking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAddressSetupInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSetupInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"borrowingFee","type":"uint256"}],"name":"setBorrowingFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"newCCR","type":"uint256"}],"name":"setCCR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"borrowingFee","type":"uint256"},{"internalType":"uint256","name":"ccr","type":"uint256"},{"internalType":"uint256","name":"mcr","type":"uint256"},{"internalType":"uint256","name":"minNetDebt","type":"uint256"},{"internalType":"uint256","name":"mintCap","type":"uint256"},{"internalType":"uint256","name":"percentDivisor","type":"uint256"},{"internalType":"uint256","name":"redemptionFeeFloor","type":"uint256"}],"name":"setCollateralParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityIssuance","type":"address"}],"name":"setCommunityIssuance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_grvtStaking","type":"address"}],"name":"setGRVTStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"newMCR","type":"uint256"}],"name":"setMCR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"minNetDebt","type":"uint256"}],"name":"setMinNetDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"mintCap","type":"uint256"}],"name":"setMintCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"percentDivisor","type":"uint256"}],"name":"setPercentDivisor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"_blockTimestamp","type":"uint256"}],"name":"setRedemptionBlockTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"uint256","name":"redemptionFeeFloor","type":"uint256"}],"name":"setRedemptionFeeFloor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSetupIsInitialized","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sortedVessels","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stabilityPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"validCollateral","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesselManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesselManagerOperations","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a06040523060805234801561001457600080fd5b506080516135d161004c60003960008181611306015281816113460152818161154b0152818161158b015261161e01526135d16000f3fe6080604052600436106103fa5760003560e01c806391bbfd0d11610213578063c08261db11610123578063f2ecdcae116100ab578063f7e37b8d1161007a578063f7e37b8d14610cab578063f8d8989814610cc7578063fd092fc514610ce7578063fe06073314610d07578063fe9d032314610d2757600080fd5b8063f2ecdcae14610c15578063f2fde38b14610c32578063f454249414610c52578063f73acf6a14610c8b57600080fd5b8063c7eae303116100f2578063c7eae30314610b7f578063c8564c6214610b9f578063cda775f914610bc0578063cf54aaa014610be0578063e8ff898614610c0057600080fd5b8063c08261db14610ae6578063c0c067a414610b1f578063c415b95c14610b3f578063c5f956af14610b5f57600080fd5b8063a3f4df7e116101a6578063af7047d811610175578063af7047d814610a2d578063b31610db14610a66578063b957172114610a86578063c05c5e9414610aa6578063c06abe7714610ac657600080fd5b8063a3f4df7e14610991578063a72bd4e8146109d7578063a80f9aee146109ed578063aebe1ccb14610a0d57600080fd5b80639ec67e42116101e25780639ec67e4214610957578063a142f35a14610977578063a17e64cc146108ac578063a20baee61461071157600080fd5b806391bbfd0d146108c757806395fb16bb146109005780639d6aea0a146109205780639d8d5a171461094257600080fd5b806352d1902d1161030e57806378aaf4de116102a15780638129fc1c116102705780638129fc1c1461082057806386d10e8c1461083557806388ecb0db1461086e5780638da5cb5b1461088e57806390b988c6146108ac57600080fd5b806378aaf4de1461078d5780637a305122146107c65780637c120312146107e45780637f7dde4a1461080057600080fd5b806372fe25aa116102dd57806372fe25aa14610711578063741bef1a1461072d57806375e1c3d81461074d57806377553ad41461076d57600080fd5b806352d1902d1461068e57806362d460da146106a35780636a85d67d146106dc578063715018a6146106fc57600080fd5b80632d79b8eb116103915780633f8f5f42116103605780633f8f5f42146105e25780634284af1f14610602578063443c4fcb146106225780634bc66f321461065b5780634f1ef2861461067b57600080fd5b80632d79b8eb1461053c578063300581d9146105695780633659cfe6146105a25780633cc74225146105c257600080fd5b80630fe66cdd116103cd5780630fe66cdd1461049e57806317ae1fc5146104be57806318a15113146104ee5780632a6e76031461051c57600080fd5b8063048c661d146103ff5780630bc028c21461043c5780630e8dfa811461045e5780630f2343fd1461047e575b600080fd5b34801561040b57600080fd5b5060d55461041f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561044857600080fd5b5061045c610457366004612f25565b610d47565b005b34801561046a57600080fd5b5061045c610479366004612f25565b610ec7565b34801561048a57600080fd5b5060d85461041f906001600160a01b031681565b3480156104aa57600080fd5b5061045c6104b9366004612f4f565b61103d565b3480156104ca57600080fd5b506104de6104d9366004612f8b565b6110d1565b6040519015158152602001610433565b3480156104fa57600080fd5b5061050e610509366004612f8b565b611100565b604051908152602001610433565b34801561052857600080fd5b5061041f610537366004612fa6565b6111ed565b34801561054857600080fd5b5061055c610557366004613006565b611217565b60405161043391906130b3565b34801561057557600080fd5b5061050e610584366004612f8b565b6001600160a01b0316600090815260fb602052604090206003015490565b3480156105ae57600080fd5b5061045c6105bd366004612f8b565b6112fc565b3480156105ce57600080fd5b5060cf5461041f906001600160a01b031681565b3480156105ee57600080fd5b5061045c6105fd366004612f25565b6113db565b34801561060e57600080fd5b5060d95461041f906001600160a01b031681565b34801561062e57600080fd5b5061050e61063d366004612f8b565b6001600160a01b0316600090815260fb60205260409020600a015490565b34801561066757600080fd5b5060d65461041f906001600160a01b031681565b61045c6106893660046130f7565b611541565b34801561069a57600080fd5b5061050e611611565b3480156106af57600080fd5b5061050e6106be366004612f8b565b6001600160a01b0316600090815260fb602052604090206004015490565b3480156106e857600080fd5b5061045c6106f7366004612f8b565b6116c4565b34801561070857600080fd5b5061045c6116ee565b34801561071d57600080fd5b5061050e670de0b6b3a764000081565b34801561073957600080fd5b5060d35461041f906001600160a01b031681565b34801561075957600080fd5b5061045c610768366004612f25565b611702565b34801561077957600080fd5b5060cb5461041f906001600160a01b031681565b34801561079957600080fd5b5061050e6107a8366004612f8b565b6001600160a01b0316600090815260fb602052604090206005015490565b3480156107d257600080fd5b5061050e69d3c21bcecceda100000081565b3480156107f057600080fd5b5061050e670f43fc2c04ee000081565b34801561080c57600080fd5b5060c95461041f906001600160a01b031681565b34801561082c57600080fd5b5061045c611865565b34801561084157600080fd5b5061050e610850366004612f8b565b6001600160a01b0316600090815260fb602052604090206007015490565b34801561087a57600080fd5b5061045c610889366004612f25565b61197d565b34801561089a57600080fd5b506097546001600160a01b031661041f565b3480156108b857600080fd5b5061050e6611c37937e0800081565b3480156108d357600080fd5b5061050e6108e2366004612f8b565b6001600160a01b0316600090815260fb602052604090206008015490565b34801561090c57600080fd5b5060cd5461041f906001600160a01b031681565b34801561092c57600080fd5b50610935611ae3565b604051610433919061319d565b34801561094e57600080fd5b5061050e60c881565b34801561096357600080fd5b5060d25461041f906001600160a01b031681565b34801561098357600080fd5b5060fd546104de9060ff1681565b34801561099d57600080fd5b506109ca6040518060400160405280600d81526020016c10591b5a5b90dbdb9d1c9858dd609a1b81525081565b604051610433919061322e565b3480156109e357600080fd5b5061050e60001981565b3480156109f957600080fd5b5061045c610a08366004612f25565b611b45565b348015610a1957600080fd5b5061045c610a28366004612f25565b611cad565b348015610a3957600080fd5b5061050e610a48366004612f8b565b6001600160a01b0316600090815260fb602052604090206009015490565b348015610a7257600080fd5b5061050e610a81366004612f8b565b611d6e565b348015610a9257600080fd5b5061045c610aa1366004613241565b611d9a565b348015610ab257600080fd5b5060ca5461041f906001600160a01b031681565b348015610ad257600080fd5b5061045c610ae1366004612f25565b61231e565b348015610af257600080fd5b5061050e610b01366004612f8b565b6001600160a01b0316600090815260fb602052604090206006015490565b348015610b2b57600080fd5b5061045c610b3a3660046132b6565b6123ea565b348015610b4b57600080fd5b5060d05461041f906001600160a01b031681565b348015610b6b57600080fd5b5060d75461041f906001600160a01b031681565b348015610b8b57600080fd5b5060d45461041f906001600160a01b031681565b348015610bab57600080fd5b5060d9546104de90600160a01b900460ff1681565b348015610bcc57600080fd5b5060cc5461041f906001600160a01b031681565b348015610bec57600080fd5b5061050e610bfb366004612f8b565b6124c6565b348015610c0c57600080fd5b5061045c6124ef565b348015610c2157600080fd5b5061050e686c6b935b8bbd40000081565b348015610c3e57600080fd5b5061045c610c4d366004612f8b565b612564565b348015610c5e57600080fd5b5061050e610c6d366004612f8b565b6001600160a01b0316600090815260fb60205260409020600b015490565b348015610c9757600080fd5b5061045c610ca6366004613312565b6125da565b348015610cb757600080fd5b5061050e6714d1120d7b16000081565b348015610cd357600080fd5b5060ce5461041f906001600160a01b031681565b348015610cf357600080fd5b5061045c610d02366004612f8b565b61296c565b348015610d1357600080fd5b5061045c610d22366004612f8b565b612996565b348015610d3357600080fd5b5060d15461041f906001600160a01b031681565b60fd5460ff1615610d825760d6546001600160a01b03163314610d7d57604051631dc5ba9560e01b815260040160405180910390fd5b610dad565b6097546001600160a01b03163314610dad5760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600c81526b135a5b8813995d081119589d60a21b6020808301919091526001600160a01b038516600090815260fb9091529182206002015490918491849190686c6b935b8bbd4000009060ff16610e285760405162461bcd60e51b8152600401610e1f90613345565b60405180910390fd5b81831080610e3557508083115b15610e5b5784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600781018054908a905583518181529283018a9052909290917f794abdbe21b3b4556467be6af2b2d5e75ae16613bd128dbd47c3727bd52b4b5591015b60405180910390a1505050505050505050565b60fd5460ff1615610f025760d6546001600160a01b03163314610efd57604051631dc5ba9560e01b815260040160405180910390fd5b610f2d565b6097546001600160a01b03163314610f2d5760405163ec4adddf60e01b815260040160405180910390fd5b60408051808201825260148152732932b232b6b83a34b7b7102332b290233637b7b960611b6020808301919091526001600160a01b038516600090815260fb90915291909120600201548390839066038d7ea4c680009067016345785d8a00009060ff16610fad5760405162461bcd60e51b8152600401610e1f90613345565b81831080610fba57508083115b15610fe05784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600a81018054908a905583518181529283018a9052909290917fbb07ced1b1536afc600a5d97cba6e4b294731026286cddc33b98cb2d18569ab79101610eb4565b60fd5460ff16156110785760d6546001600160a01b0316331461107357604051631dc5ba9560e01b815260040160405180910390fd5b6110a3565b6097546001600160a01b031633146110a35760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b0391909116600090815260fb60205260409020600201805460ff1916911515919091179055565b6000816110dd8161299f565b50506001600160a01b0316600090815260fb602052604090206002015460ff1690565b60cf5460405163c5739d0b60e01b81526001600160a01b038381166004830152600092169063c5739d0b90602401602060405180830381865afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f91906133d1565b60c95460405163c5739d0b60e01b81526001600160a01b0385811660048301529091169063c5739d0b90602401602060405180830381865afa1580156111b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111dd91906133d1565b6111e79190613400565b92915050565b60fc81815481106111fd57600080fd5b6000918252602090912001546001600160a01b0316905081565b80516060908067ffffffffffffffff81111561123557611235612fbf565b60405190808252806020026020018201604052801561125e578160200160208202803683370190505b50915060005b818110156112f55761128e84828151811061128157611281613413565b602002602001015161299f565b60fb60008583815181106112a4576112a4613413565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600101548382815181106112e2576112e2613413565b6020908102919091010152600101611264565b5050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036113445760405162461bcd60e51b8152600401610e1f90613429565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661138d600080516020613555833981519152546001600160a01b031690565b6001600160a01b0316146113b35760405162461bcd60e51b8152600401610e1f90613475565b6113bc81612a09565b604080516000808252602082019092526113d891839190612a11565b50565b60fd5460ff16156114165760d6546001600160a01b0316331461141157604051631dc5ba9560e01b815260040160405180910390fd5b611441565b6097546001600160a01b031633146114415760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600381526221a1a960e91b6020808301919091526001600160a01b038516600090815260fb909152919091206002015483908390670de0b6b3a764000090678ac7230489e800009060ff166114b15760405162461bcd60e51b8152600401610e1f90613345565b818310806114be57508083115b156114e45784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600481018054908a905583518181529283018a9052909290917f8fef8cb3d376ea764ea9e41cc4380bb23ed262ed1883cfd0ee00f4b08a288b699101610eb4565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036115895760405162461bcd60e51b8152600401610e1f90613429565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115d2600080516020613555833981519152546001600160a01b031690565b6001600160a01b0316146115f85760405162461bcd60e51b8152600401610e1f90613475565b61160182612a09565b61160d82826001612a11565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116b15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610e1f565b5060008051602061355583398151915290565b6116cc612b81565b60cd80546001600160a01b0319166001600160a01b0392909216919091179055565b6116f6612b81565b6117006000612bdb565b565b60fd5460ff161561173d5760d6546001600160a01b0316331461173857604051631dc5ba9560e01b815260040160405180910390fd5b611768565b6097546001600160a01b031633146117685760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600f81526e2832b931b2b73a102234bb34b9b7b960891b6020808301919091526001600160a01b038516600090815260fb909152919091206002908101548491849160c89060ff166117d55760405162461bcd60e51b8152600401610e1f90613345565b818310806117e257508083115b156118085784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600981018054908a905583518181529283018a9052909290917fdfb04317e088794badba78956b7c092fac7986add660c0fc3d01569808c32b369101610eb4565b600054610100900460ff16158080156118855750600054600160ff909116105b8061189f5750303b15801561189f575060005460ff166001145b6119025760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e1f565b6000805460ff191660011790558015611925576000805461ff0019166101001790555b61192d612c2d565b611935612c5c565b80156113d8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60fd5460ff16156119b85760d6546001600160a01b031633146119b357604051631dc5ba9560e01b815260040160405180910390fd5b6119e3565b6097546001600160a01b031633146119e35760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600381526226a1a960e91b6020808301919091526001600160a01b038516600090815260fb909152919091206002015483908390670e043da61725000090678ac7230489e800009060ff16611a535760405162461bcd60e51b8152600401610e1f90613345565b81831080611a6057508083115b15611a865784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600581018054908a905583518181529283018a9052909290917fefeb589e088ecf2bc2a0b6d364f91a4fee37ee6b9c6f089c71169e86f03dc9449101610eb4565b606060fc805480602002602001604051908101604052809291908181526020018280548015611b3b57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b1d575b5050505050905090565b60fd5460ff1615611b805760d6546001600160a01b03163314611b7b57604051631dc5ba9560e01b815260040160405180910390fd5b611bab565b6097546001600160a01b03163314611bab5760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600d81526c426f72726f77696e672046656560981b6020808301919091526001600160a01b038516600090815260fb909152918220600201549091849184919067016345785d8a00009060ff16611c1d5760405162461bcd60e51b8152600401610e1f90613345565b81831080611c2a57508083115b15611c505784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600381018054908a905583518181529283018a9052909290917fa7beab75e7a7d89dcacb5a82b33606192c31b8bbc1868c5240f95abcd95bbeee9101610eb4565b60fd5460ff1615611ce85760d6546001600160a01b03163314611ce357604051631dc5ba9560e01b815260040160405180910390fd5b611d13565b6097546001600160a01b03163314611d135760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038216600081815260fb6020908152604091829020600b01849055815192835282018390527f2f92337ec07da93d49659c3dbafa91599df53c9c9147edcff44eabc99d945950910160405180910390a15050565b600081611d7a8161299f565b50506001600160a01b0316600090815260fb602052604090206001015490565b611da2612b81565b60d954600160a01b900460ff1615611dfc5760405162461bcd60e51b815260206004820152601c60248201527f536574757020697320616c726561647920696e697469616c697a6564000000006044820152606401610e1f565b600f8114611e4c5760405162461bcd60e51b815260206004820152601e60248201527f45787065637465642031352061646472657373657320617420736574757000006044820152606401610e1f565b60005b600f811015611edb576000838383818110611e6c57611e6c613413565b9050602002016020810190611e819190612f8b565b6001600160a01b031603611ec95760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610e1f565b80611ed3816134c1565b915050611e4f565b5081816000818110611eef57611eef613413565b9050602002016020810190611f049190612f8b565b60c980546001600160a01b0319166001600160a01b039290921691909117905581816001818110611f3757611f37613413565b9050602002016020810190611f4c9190612f8b565b60ca80546001600160a01b0319166001600160a01b039290921691909117905581816002818110611f7f57611f7f613413565b9050602002016020810190611f949190612f8b565b60cb80546001600160a01b0319166001600160a01b039290921691909117905581816003818110611fc757611fc7613413565b9050602002016020810190611fdc9190612f8b565b60cc80546001600160a01b0319166001600160a01b03929092169190911790558181600481811061200f5761200f613413565b90506020020160208101906120249190612f8b565b60ce80546001600160a01b0319166001600160a01b03929092169190911790558181600581811061205757612057613413565b905060200201602081019061206c9190612f8b565b60cf80546001600160a01b0319166001600160a01b03929092169190911790558181600681811061209f5761209f613413565b90506020020160208101906120b49190612f8b565b60d080546001600160a01b0319166001600160a01b0392909216919091179055818160078181106120e7576120e7613413565b90506020020160208101906120fc9190612f8b565b60d180546001600160a01b0319166001600160a01b03929092169190911790558181600881811061212f5761212f613413565b90506020020160208101906121449190612f8b565b60d380546001600160a01b0319166001600160a01b03929092169190911790558181600981811061217757612177613413565b905060200201602081019061218c9190612f8b565b60d480546001600160a01b0319166001600160a01b03929092169190911790558181600a8181106121bf576121bf613413565b90506020020160208101906121d49190612f8b565b60d580546001600160a01b0319166001600160a01b03929092169190911790558181600b81811061220757612207613413565b905060200201602081019061221c9190612f8b565b60d680546001600160a01b0319166001600160a01b03929092169190911790558181600c81811061224f5761224f613413565b90506020020160208101906122649190612f8b565b60d780546001600160a01b0319166001600160a01b03929092169190911790558181600d81811061229757612297613413565b90506020020160208101906122ac9190612f8b565b60d880546001600160a01b0319166001600160a01b03929092169190911790558181600e8181106122df576122df613413565b90506020020160208101906122f49190612f8b565b60d980546001600160a81b0319166001600160a01b039290921691909117600160a01b1790555050565b60fd5460ff16156123595760d6546001600160a01b0316331461235457604051631dc5ba9560e01b815260040160405180910390fd5b612384565b6097546001600160a01b031633146123845760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038216600090815260fb6020908152604091829020600881018054908590558351818152928301859052909290917f903452cfae6c90575a1e7327283877d56dda9ed43a4711f44bf796e103e4e120910160405180910390a150505050565b60fd5460ff16156124255760d6546001600160a01b0316331461242057604051631dc5ba9560e01b815260040160405180910390fd5b612450565b6097546001600160a01b031633146124505760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038816600090815260fb60205260409020600201805460ff191660011790556124808888611b45565b61248a88876113db565b612494888661197d565b61249e8885610d47565b6124a8888461231e565b6124b28883611702565b6124bc8882610ec7565b5050505050505050565b6000816124d28161299f565b50506001600160a01b0316600090815260fb602052604090205490565b60fd5460ff161561252a5760d6546001600160a01b0316331461252557604051631dc5ba9560e01b815260040160405180910390fd5b612555565b6097546001600160a01b031633146125555760405163ec4adddf60e01b815260040160405180910390fd5b60fd805460ff19166001179055565b61256c612b81565b6001600160a01b0381166125d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e1f565b6113d881612bdb565b60fd5460ff16156126155760d6546001600160a01b0316331461261057604051631dc5ba9560e01b815260040160405180910390fd5b612640565b6097546001600160a01b031633146126405760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038316600090815260fb6020526040902060050154156126a95760405162461bcd60e51b815260206004820152601960248201527f636f6c6c61746572616c20616c726561647920657869737473000000000000006044820152606401610e1f565b6012811461270c5760405162461bcd60e51b815260206004820152602a60248201527f636f6c6c61746572616c73206d7573742068617665207468652064656661756c6044820152697420646563696d616c7360b01b6064820152608401610e1f565b60fc80546001808201835560008390527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c090910180546001600160a01b0319166001600160a01b03871617905560408051610180810190915283815291546020830191612778916134da565b81526020016000151581526020016611c37937e0800081526020016714d1120d7b1600008152602001670f43fc2c04ee00008152602001838152602001686c6b935b8bbd400000815260200169d3c21bcecceda1000000815260200160c881526020016611c37937e08000815260200160001981525060fb6000856001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015590505060d560009054906101000a90046001600160a01b03166001600160a01b031663ec0d5e0c846040518263ffffffff1660e01b81526004016128f891906001600160a01b0391909116815260200190565b600060405180830381600087803b15801561291257600080fd5b505af1158015612926573d6000803e3d6000fd5b50506040516001600160a01b03861681527f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f9250602001905060405180910390a1505050565b612974612b81565b60d280546001600160a01b0319166001600160a01b0392909216919091179055565b6113d881612a09565b6001600160a01b038116600090815260fb602052604081206005015490036113d85760405162461bcd60e51b815260206004820152601960248201527f636f6c6c61746572616c20646f6573206e6f74206578697374000000000000006044820152606401610e1f565b6113d8612b81565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a4957612a4483612c83565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612aa3575060408051601f3d908101601f19168201909252612aa0918101906133d1565b60015b612b065760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610e1f565b6000805160206135558339815191528114612b755760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610e1f565b50612a44838383612d1f565b6097546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e1f565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16612c545760405162461bcd60e51b8152600401610e1f906134ed565b611700612d4a565b600054610100900460ff166117005760405162461bcd60e51b8152600401610e1f906134ed565b6001600160a01b0381163b612cf05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610e1f565b60008051602061355583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612d2883612d7a565b600082511180612d355750805b15612a4457612d448383612dba565b50505050565b600054610100900460ff16612d715760405162461bcd60e51b8152600401610e1f906134ed565b61170033612bdb565b612d8381612c83565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612ddf838360405180606001604052806027815260200161357560279139612de6565b9392505050565b6060600080856001600160a01b031685604051612e039190613538565b600060405180830381855af49150503d8060008114612e3e576040519150601f19603f3d011682016040523d82523d6000602084013e612e43565b606091505b5091509150612e5486838387612e5e565b9695505050505050565b60608315612ecd578251600003612ec6576001600160a01b0385163b612ec65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e1f565b5081612ed7565b612ed78383612edf565b949350505050565b815115612eef5781518083602001fd5b8060405162461bcd60e51b8152600401610e1f919061322e565b80356001600160a01b0381168114612f2057600080fd5b919050565b60008060408385031215612f3857600080fd5b612f4183612f09565b946020939093013593505050565b60008060408385031215612f6257600080fd5b612f6b83612f09565b915060208301358015158114612f8057600080fd5b809150509250929050565b600060208284031215612f9d57600080fd5b612ddf82612f09565b600060208284031215612fb857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ffe57612ffe612fbf565b604052919050565b6000602080838503121561301957600080fd5b823567ffffffffffffffff8082111561303157600080fd5b818501915085601f83011261304557600080fd5b81358181111561305757613057612fbf565b8060051b9150613068848301612fd5565b818152918301840191848101908884111561308257600080fd5b938501935b838510156130a75761309885612f09565b82529385019390850190613087565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156130eb578351835292840192918401916001016130cf565b50909695505050505050565b6000806040838503121561310a57600080fd5b61311383612f09565b915060208084013567ffffffffffffffff8082111561313157600080fd5b818601915086601f83011261314557600080fd5b81358181111561315757613157612fbf565b613169601f8201601f19168501612fd5565b9150808252878482850101111561317f57600080fd5b80848401858401376000848284010152508093505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156130eb5783516001600160a01b0316835292840192918401916001016131b9565b60005b838110156131f95781810151838201526020016131e1565b50506000910152565b6000815180845261321a8160208601602086016131de565b601f01601f19169290920160200192915050565b602081526000612ddf6020830184613202565b6000806020838503121561325457600080fd5b823567ffffffffffffffff8082111561326c57600080fd5b818501915085601f83011261328057600080fd5b81358181111561328f57600080fd5b8660208260051b85010111156132a457600080fd5b60209290920196919550909350505050565b600080600080600080600080610100898b0312156132d357600080fd5b6132dc89612f09565b9a60208a01359a5060408a013599606081013599506080810135985060a0810135975060c0810135965060e00135945092505050565b60008060006060848603121561332757600080fd5b61333084612f09565b95602085013595506040909401359392505050565b60208082526039908201527f436f6c6c61746572616c206973206e6f7420636f6e666967757265642c20757360408201527f6520736574436f6c6c61746572616c506172616d657465727300000000000000606082015260800190565b6080815260006133b56080830187613202565b6020830195909552506040810192909252606090910152919050565b6000602082840312156133e357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156111e7576111e76133ea565b634e487b7160e01b600052603260045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000600182016134d3576134d36133ea565b5060010190565b818103818111156111e7576111e76133ea565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161354a8184602087016131de565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200f3be6c525c97ce707e40b59ebad93e75a43cdbd66fc348a1a251fbf4898626364736f6c63430008130033
Deployed Bytecode
0x6080604052600436106103fa5760003560e01c806391bbfd0d11610213578063c08261db11610123578063f2ecdcae116100ab578063f7e37b8d1161007a578063f7e37b8d14610cab578063f8d8989814610cc7578063fd092fc514610ce7578063fe06073314610d07578063fe9d032314610d2757600080fd5b8063f2ecdcae14610c15578063f2fde38b14610c32578063f454249414610c52578063f73acf6a14610c8b57600080fd5b8063c7eae303116100f2578063c7eae30314610b7f578063c8564c6214610b9f578063cda775f914610bc0578063cf54aaa014610be0578063e8ff898614610c0057600080fd5b8063c08261db14610ae6578063c0c067a414610b1f578063c415b95c14610b3f578063c5f956af14610b5f57600080fd5b8063a3f4df7e116101a6578063af7047d811610175578063af7047d814610a2d578063b31610db14610a66578063b957172114610a86578063c05c5e9414610aa6578063c06abe7714610ac657600080fd5b8063a3f4df7e14610991578063a72bd4e8146109d7578063a80f9aee146109ed578063aebe1ccb14610a0d57600080fd5b80639ec67e42116101e25780639ec67e4214610957578063a142f35a14610977578063a17e64cc146108ac578063a20baee61461071157600080fd5b806391bbfd0d146108c757806395fb16bb146109005780639d6aea0a146109205780639d8d5a171461094257600080fd5b806352d1902d1161030e57806378aaf4de116102a15780638129fc1c116102705780638129fc1c1461082057806386d10e8c1461083557806388ecb0db1461086e5780638da5cb5b1461088e57806390b988c6146108ac57600080fd5b806378aaf4de1461078d5780637a305122146107c65780637c120312146107e45780637f7dde4a1461080057600080fd5b806372fe25aa116102dd57806372fe25aa14610711578063741bef1a1461072d57806375e1c3d81461074d57806377553ad41461076d57600080fd5b806352d1902d1461068e57806362d460da146106a35780636a85d67d146106dc578063715018a6146106fc57600080fd5b80632d79b8eb116103915780633f8f5f42116103605780633f8f5f42146105e25780634284af1f14610602578063443c4fcb146106225780634bc66f321461065b5780634f1ef2861461067b57600080fd5b80632d79b8eb1461053c578063300581d9146105695780633659cfe6146105a25780633cc74225146105c257600080fd5b80630fe66cdd116103cd5780630fe66cdd1461049e57806317ae1fc5146104be57806318a15113146104ee5780632a6e76031461051c57600080fd5b8063048c661d146103ff5780630bc028c21461043c5780630e8dfa811461045e5780630f2343fd1461047e575b600080fd5b34801561040b57600080fd5b5060d55461041f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561044857600080fd5b5061045c610457366004612f25565b610d47565b005b34801561046a57600080fd5b5061045c610479366004612f25565b610ec7565b34801561048a57600080fd5b5060d85461041f906001600160a01b031681565b3480156104aa57600080fd5b5061045c6104b9366004612f4f565b61103d565b3480156104ca57600080fd5b506104de6104d9366004612f8b565b6110d1565b6040519015158152602001610433565b3480156104fa57600080fd5b5061050e610509366004612f8b565b611100565b604051908152602001610433565b34801561052857600080fd5b5061041f610537366004612fa6565b6111ed565b34801561054857600080fd5b5061055c610557366004613006565b611217565b60405161043391906130b3565b34801561057557600080fd5b5061050e610584366004612f8b565b6001600160a01b0316600090815260fb602052604090206003015490565b3480156105ae57600080fd5b5061045c6105bd366004612f8b565b6112fc565b3480156105ce57600080fd5b5060cf5461041f906001600160a01b031681565b3480156105ee57600080fd5b5061045c6105fd366004612f25565b6113db565b34801561060e57600080fd5b5060d95461041f906001600160a01b031681565b34801561062e57600080fd5b5061050e61063d366004612f8b565b6001600160a01b0316600090815260fb60205260409020600a015490565b34801561066757600080fd5b5060d65461041f906001600160a01b031681565b61045c6106893660046130f7565b611541565b34801561069a57600080fd5b5061050e611611565b3480156106af57600080fd5b5061050e6106be366004612f8b565b6001600160a01b0316600090815260fb602052604090206004015490565b3480156106e857600080fd5b5061045c6106f7366004612f8b565b6116c4565b34801561070857600080fd5b5061045c6116ee565b34801561071d57600080fd5b5061050e670de0b6b3a764000081565b34801561073957600080fd5b5060d35461041f906001600160a01b031681565b34801561075957600080fd5b5061045c610768366004612f25565b611702565b34801561077957600080fd5b5060cb5461041f906001600160a01b031681565b34801561079957600080fd5b5061050e6107a8366004612f8b565b6001600160a01b0316600090815260fb602052604090206005015490565b3480156107d257600080fd5b5061050e69d3c21bcecceda100000081565b3480156107f057600080fd5b5061050e670f43fc2c04ee000081565b34801561080c57600080fd5b5060c95461041f906001600160a01b031681565b34801561082c57600080fd5b5061045c611865565b34801561084157600080fd5b5061050e610850366004612f8b565b6001600160a01b0316600090815260fb602052604090206007015490565b34801561087a57600080fd5b5061045c610889366004612f25565b61197d565b34801561089a57600080fd5b506097546001600160a01b031661041f565b3480156108b857600080fd5b5061050e6611c37937e0800081565b3480156108d357600080fd5b5061050e6108e2366004612f8b565b6001600160a01b0316600090815260fb602052604090206008015490565b34801561090c57600080fd5b5060cd5461041f906001600160a01b031681565b34801561092c57600080fd5b50610935611ae3565b604051610433919061319d565b34801561094e57600080fd5b5061050e60c881565b34801561096357600080fd5b5060d25461041f906001600160a01b031681565b34801561098357600080fd5b5060fd546104de9060ff1681565b34801561099d57600080fd5b506109ca6040518060400160405280600d81526020016c10591b5a5b90dbdb9d1c9858dd609a1b81525081565b604051610433919061322e565b3480156109e357600080fd5b5061050e60001981565b3480156109f957600080fd5b5061045c610a08366004612f25565b611b45565b348015610a1957600080fd5b5061045c610a28366004612f25565b611cad565b348015610a3957600080fd5b5061050e610a48366004612f8b565b6001600160a01b0316600090815260fb602052604090206009015490565b348015610a7257600080fd5b5061050e610a81366004612f8b565b611d6e565b348015610a9257600080fd5b5061045c610aa1366004613241565b611d9a565b348015610ab257600080fd5b5060ca5461041f906001600160a01b031681565b348015610ad257600080fd5b5061045c610ae1366004612f25565b61231e565b348015610af257600080fd5b5061050e610b01366004612f8b565b6001600160a01b0316600090815260fb602052604090206006015490565b348015610b2b57600080fd5b5061045c610b3a3660046132b6565b6123ea565b348015610b4b57600080fd5b5060d05461041f906001600160a01b031681565b348015610b6b57600080fd5b5060d75461041f906001600160a01b031681565b348015610b8b57600080fd5b5060d45461041f906001600160a01b031681565b348015610bab57600080fd5b5060d9546104de90600160a01b900460ff1681565b348015610bcc57600080fd5b5060cc5461041f906001600160a01b031681565b348015610bec57600080fd5b5061050e610bfb366004612f8b565b6124c6565b348015610c0c57600080fd5b5061045c6124ef565b348015610c2157600080fd5b5061050e686c6b935b8bbd40000081565b348015610c3e57600080fd5b5061045c610c4d366004612f8b565b612564565b348015610c5e57600080fd5b5061050e610c6d366004612f8b565b6001600160a01b0316600090815260fb60205260409020600b015490565b348015610c9757600080fd5b5061045c610ca6366004613312565b6125da565b348015610cb757600080fd5b5061050e6714d1120d7b16000081565b348015610cd357600080fd5b5060ce5461041f906001600160a01b031681565b348015610cf357600080fd5b5061045c610d02366004612f8b565b61296c565b348015610d1357600080fd5b5061045c610d22366004612f8b565b612996565b348015610d3357600080fd5b5060d15461041f906001600160a01b031681565b60fd5460ff1615610d825760d6546001600160a01b03163314610d7d57604051631dc5ba9560e01b815260040160405180910390fd5b610dad565b6097546001600160a01b03163314610dad5760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600c81526b135a5b8813995d081119589d60a21b6020808301919091526001600160a01b038516600090815260fb9091529182206002015490918491849190686c6b935b8bbd4000009060ff16610e285760405162461bcd60e51b8152600401610e1f90613345565b60405180910390fd5b81831080610e3557508083115b15610e5b5784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600781018054908a905583518181529283018a9052909290917f794abdbe21b3b4556467be6af2b2d5e75ae16613bd128dbd47c3727bd52b4b5591015b60405180910390a1505050505050505050565b60fd5460ff1615610f025760d6546001600160a01b03163314610efd57604051631dc5ba9560e01b815260040160405180910390fd5b610f2d565b6097546001600160a01b03163314610f2d5760405163ec4adddf60e01b815260040160405180910390fd5b60408051808201825260148152732932b232b6b83a34b7b7102332b290233637b7b960611b6020808301919091526001600160a01b038516600090815260fb90915291909120600201548390839066038d7ea4c680009067016345785d8a00009060ff16610fad5760405162461bcd60e51b8152600401610e1f90613345565b81831080610fba57508083115b15610fe05784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600a81018054908a905583518181529283018a9052909290917fbb07ced1b1536afc600a5d97cba6e4b294731026286cddc33b98cb2d18569ab79101610eb4565b60fd5460ff16156110785760d6546001600160a01b0316331461107357604051631dc5ba9560e01b815260040160405180910390fd5b6110a3565b6097546001600160a01b031633146110a35760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b0391909116600090815260fb60205260409020600201805460ff1916911515919091179055565b6000816110dd8161299f565b50506001600160a01b0316600090815260fb602052604090206002015460ff1690565b60cf5460405163c5739d0b60e01b81526001600160a01b038381166004830152600092169063c5739d0b90602401602060405180830381865afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f91906133d1565b60c95460405163c5739d0b60e01b81526001600160a01b0385811660048301529091169063c5739d0b90602401602060405180830381865afa1580156111b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111dd91906133d1565b6111e79190613400565b92915050565b60fc81815481106111fd57600080fd5b6000918252602090912001546001600160a01b0316905081565b80516060908067ffffffffffffffff81111561123557611235612fbf565b60405190808252806020026020018201604052801561125e578160200160208202803683370190505b50915060005b818110156112f55761128e84828151811061128157611281613413565b602002602001015161299f565b60fb60008583815181106112a4576112a4613413565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600101548382815181106112e2576112e2613413565b6020908102919091010152600101611264565b5050919050565b6001600160a01b037f000000000000000000000000db5dacb1dfbe16326c3656a88017f0cb4ece09771630036113445760405162461bcd60e51b8152600401610e1f90613429565b7f000000000000000000000000db5dacb1dfbe16326c3656a88017f0cb4ece09776001600160a01b031661138d600080516020613555833981519152546001600160a01b031690565b6001600160a01b0316146113b35760405162461bcd60e51b8152600401610e1f90613475565b6113bc81612a09565b604080516000808252602082019092526113d891839190612a11565b50565b60fd5460ff16156114165760d6546001600160a01b0316331461141157604051631dc5ba9560e01b815260040160405180910390fd5b611441565b6097546001600160a01b031633146114415760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600381526221a1a960e91b6020808301919091526001600160a01b038516600090815260fb909152919091206002015483908390670de0b6b3a764000090678ac7230489e800009060ff166114b15760405162461bcd60e51b8152600401610e1f90613345565b818310806114be57508083115b156114e45784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600481018054908a905583518181529283018a9052909290917f8fef8cb3d376ea764ea9e41cc4380bb23ed262ed1883cfd0ee00f4b08a288b699101610eb4565b6001600160a01b037f000000000000000000000000db5dacb1dfbe16326c3656a88017f0cb4ece09771630036115895760405162461bcd60e51b8152600401610e1f90613429565b7f000000000000000000000000db5dacb1dfbe16326c3656a88017f0cb4ece09776001600160a01b03166115d2600080516020613555833981519152546001600160a01b031690565b6001600160a01b0316146115f85760405162461bcd60e51b8152600401610e1f90613475565b61160182612a09565b61160d82826001612a11565b5050565b6000306001600160a01b037f000000000000000000000000db5dacb1dfbe16326c3656a88017f0cb4ece097716146116b15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610e1f565b5060008051602061355583398151915290565b6116cc612b81565b60cd80546001600160a01b0319166001600160a01b0392909216919091179055565b6116f6612b81565b6117006000612bdb565b565b60fd5460ff161561173d5760d6546001600160a01b0316331461173857604051631dc5ba9560e01b815260040160405180910390fd5b611768565b6097546001600160a01b031633146117685760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600f81526e2832b931b2b73a102234bb34b9b7b960891b6020808301919091526001600160a01b038516600090815260fb909152919091206002908101548491849160c89060ff166117d55760405162461bcd60e51b8152600401610e1f90613345565b818310806117e257508083115b156118085784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600981018054908a905583518181529283018a9052909290917fdfb04317e088794badba78956b7c092fac7986add660c0fc3d01569808c32b369101610eb4565b600054610100900460ff16158080156118855750600054600160ff909116105b8061189f5750303b15801561189f575060005460ff166001145b6119025760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e1f565b6000805460ff191660011790558015611925576000805461ff0019166101001790555b61192d612c2d565b611935612c5c565b80156113d8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60fd5460ff16156119b85760d6546001600160a01b031633146119b357604051631dc5ba9560e01b815260040160405180910390fd5b6119e3565b6097546001600160a01b031633146119e35760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600381526226a1a960e91b6020808301919091526001600160a01b038516600090815260fb909152919091206002015483908390670e043da61725000090678ac7230489e800009060ff16611a535760405162461bcd60e51b8152600401610e1f90613345565b81831080611a6057508083115b15611a865784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600581018054908a905583518181529283018a9052909290917fefeb589e088ecf2bc2a0b6d364f91a4fee37ee6b9c6f089c71169e86f03dc9449101610eb4565b606060fc805480602002602001604051908101604052809291908181526020018280548015611b3b57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b1d575b5050505050905090565b60fd5460ff1615611b805760d6546001600160a01b03163314611b7b57604051631dc5ba9560e01b815260040160405180910390fd5b611bab565b6097546001600160a01b03163314611bab5760405163ec4adddf60e01b815260040160405180910390fd5b604080518082018252600d81526c426f72726f77696e672046656560981b6020808301919091526001600160a01b038516600090815260fb909152918220600201549091849184919067016345785d8a00009060ff16611c1d5760405162461bcd60e51b8152600401610e1f90613345565b81831080611c2a57508083115b15611c505784838383604051630714ded760e31b8152600401610e1f94939291906133a2565b6001600160a01b038716600090815260fb6020908152604091829020600381018054908a905583518181529283018a9052909290917fa7beab75e7a7d89dcacb5a82b33606192c31b8bbc1868c5240f95abcd95bbeee9101610eb4565b60fd5460ff1615611ce85760d6546001600160a01b03163314611ce357604051631dc5ba9560e01b815260040160405180910390fd5b611d13565b6097546001600160a01b03163314611d135760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038216600081815260fb6020908152604091829020600b01849055815192835282018390527f2f92337ec07da93d49659c3dbafa91599df53c9c9147edcff44eabc99d945950910160405180910390a15050565b600081611d7a8161299f565b50506001600160a01b0316600090815260fb602052604090206001015490565b611da2612b81565b60d954600160a01b900460ff1615611dfc5760405162461bcd60e51b815260206004820152601c60248201527f536574757020697320616c726561647920696e697469616c697a6564000000006044820152606401610e1f565b600f8114611e4c5760405162461bcd60e51b815260206004820152601e60248201527f45787065637465642031352061646472657373657320617420736574757000006044820152606401610e1f565b60005b600f811015611edb576000838383818110611e6c57611e6c613413565b9050602002016020810190611e819190612f8b565b6001600160a01b031603611ec95760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610e1f565b80611ed3816134c1565b915050611e4f565b5081816000818110611eef57611eef613413565b9050602002016020810190611f049190612f8b565b60c980546001600160a01b0319166001600160a01b039290921691909117905581816001818110611f3757611f37613413565b9050602002016020810190611f4c9190612f8b565b60ca80546001600160a01b0319166001600160a01b039290921691909117905581816002818110611f7f57611f7f613413565b9050602002016020810190611f949190612f8b565b60cb80546001600160a01b0319166001600160a01b039290921691909117905581816003818110611fc757611fc7613413565b9050602002016020810190611fdc9190612f8b565b60cc80546001600160a01b0319166001600160a01b03929092169190911790558181600481811061200f5761200f613413565b90506020020160208101906120249190612f8b565b60ce80546001600160a01b0319166001600160a01b03929092169190911790558181600581811061205757612057613413565b905060200201602081019061206c9190612f8b565b60cf80546001600160a01b0319166001600160a01b03929092169190911790558181600681811061209f5761209f613413565b90506020020160208101906120b49190612f8b565b60d080546001600160a01b0319166001600160a01b0392909216919091179055818160078181106120e7576120e7613413565b90506020020160208101906120fc9190612f8b565b60d180546001600160a01b0319166001600160a01b03929092169190911790558181600881811061212f5761212f613413565b90506020020160208101906121449190612f8b565b60d380546001600160a01b0319166001600160a01b03929092169190911790558181600981811061217757612177613413565b905060200201602081019061218c9190612f8b565b60d480546001600160a01b0319166001600160a01b03929092169190911790558181600a8181106121bf576121bf613413565b90506020020160208101906121d49190612f8b565b60d580546001600160a01b0319166001600160a01b03929092169190911790558181600b81811061220757612207613413565b905060200201602081019061221c9190612f8b565b60d680546001600160a01b0319166001600160a01b03929092169190911790558181600c81811061224f5761224f613413565b90506020020160208101906122649190612f8b565b60d780546001600160a01b0319166001600160a01b03929092169190911790558181600d81811061229757612297613413565b90506020020160208101906122ac9190612f8b565b60d880546001600160a01b0319166001600160a01b03929092169190911790558181600e8181106122df576122df613413565b90506020020160208101906122f49190612f8b565b60d980546001600160a81b0319166001600160a01b039290921691909117600160a01b1790555050565b60fd5460ff16156123595760d6546001600160a01b0316331461235457604051631dc5ba9560e01b815260040160405180910390fd5b612384565b6097546001600160a01b031633146123845760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038216600090815260fb6020908152604091829020600881018054908590558351818152928301859052909290917f903452cfae6c90575a1e7327283877d56dda9ed43a4711f44bf796e103e4e120910160405180910390a150505050565b60fd5460ff16156124255760d6546001600160a01b0316331461242057604051631dc5ba9560e01b815260040160405180910390fd5b612450565b6097546001600160a01b031633146124505760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038816600090815260fb60205260409020600201805460ff191660011790556124808888611b45565b61248a88876113db565b612494888661197d565b61249e8885610d47565b6124a8888461231e565b6124b28883611702565b6124bc8882610ec7565b5050505050505050565b6000816124d28161299f565b50506001600160a01b0316600090815260fb602052604090205490565b60fd5460ff161561252a5760d6546001600160a01b0316331461252557604051631dc5ba9560e01b815260040160405180910390fd5b612555565b6097546001600160a01b031633146125555760405163ec4adddf60e01b815260040160405180910390fd5b60fd805460ff19166001179055565b61256c612b81565b6001600160a01b0381166125d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e1f565b6113d881612bdb565b60fd5460ff16156126155760d6546001600160a01b0316331461261057604051631dc5ba9560e01b815260040160405180910390fd5b612640565b6097546001600160a01b031633146126405760405163ec4adddf60e01b815260040160405180910390fd5b6001600160a01b038316600090815260fb6020526040902060050154156126a95760405162461bcd60e51b815260206004820152601960248201527f636f6c6c61746572616c20616c726561647920657869737473000000000000006044820152606401610e1f565b6012811461270c5760405162461bcd60e51b815260206004820152602a60248201527f636f6c6c61746572616c73206d7573742068617665207468652064656661756c6044820152697420646563696d616c7360b01b6064820152608401610e1f565b60fc80546001808201835560008390527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c090910180546001600160a01b0319166001600160a01b03871617905560408051610180810190915283815291546020830191612778916134da565b81526020016000151581526020016611c37937e0800081526020016714d1120d7b1600008152602001670f43fc2c04ee00008152602001838152602001686c6b935b8bbd400000815260200169d3c21bcecceda1000000815260200160c881526020016611c37937e08000815260200160001981525060fb6000856001600160a01b03166001600160a01b03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff021916908315150217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015590505060d560009054906101000a90046001600160a01b03166001600160a01b031663ec0d5e0c846040518263ffffffff1660e01b81526004016128f891906001600160a01b0391909116815260200190565b600060405180830381600087803b15801561291257600080fd5b505af1158015612926573d6000803e3d6000fd5b50506040516001600160a01b03861681527f7db05e63d635a68c62fd7fd8f3107ae8ab584a383e102d1bd8a40f4c977e465f9250602001905060405180910390a1505050565b612974612b81565b60d280546001600160a01b0319166001600160a01b0392909216919091179055565b6113d881612a09565b6001600160a01b038116600090815260fb602052604081206005015490036113d85760405162461bcd60e51b815260206004820152601960248201527f636f6c6c61746572616c20646f6573206e6f74206578697374000000000000006044820152606401610e1f565b6113d8612b81565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a4957612a4483612c83565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612aa3575060408051601f3d908101601f19168201909252612aa0918101906133d1565b60015b612b065760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610e1f565b6000805160206135558339815191528114612b755760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610e1f565b50612a44838383612d1f565b6097546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e1f565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16612c545760405162461bcd60e51b8152600401610e1f906134ed565b611700612d4a565b600054610100900460ff166117005760405162461bcd60e51b8152600401610e1f906134ed565b6001600160a01b0381163b612cf05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610e1f565b60008051602061355583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612d2883612d7a565b600082511180612d355750805b15612a4457612d448383612dba565b50505050565b600054610100900460ff16612d715760405162461bcd60e51b8152600401610e1f906134ed565b61170033612bdb565b612d8381612c83565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612ddf838360405180606001604052806027815260200161357560279139612de6565b9392505050565b6060600080856001600160a01b031685604051612e039190613538565b600060405180830381855af49150503d8060008114612e3e576040519150601f19603f3d011682016040523d82523d6000602084013e612e43565b606091505b5091509150612e5486838387612e5e565b9695505050505050565b60608315612ecd578251600003612ec6576001600160a01b0385163b612ec65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e1f565b5081612ed7565b612ed78383612edf565b949350505050565b815115612eef5781518083602001fd5b8060405162461bcd60e51b8152600401610e1f919061322e565b80356001600160a01b0381168114612f2057600080fd5b919050565b60008060408385031215612f3857600080fd5b612f4183612f09565b946020939093013593505050565b60008060408385031215612f6257600080fd5b612f6b83612f09565b915060208301358015158114612f8057600080fd5b809150509250929050565b600060208284031215612f9d57600080fd5b612ddf82612f09565b600060208284031215612fb857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ffe57612ffe612fbf565b604052919050565b6000602080838503121561301957600080fd5b823567ffffffffffffffff8082111561303157600080fd5b818501915085601f83011261304557600080fd5b81358181111561305757613057612fbf565b8060051b9150613068848301612fd5565b818152918301840191848101908884111561308257600080fd5b938501935b838510156130a75761309885612f09565b82529385019390850190613087565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156130eb578351835292840192918401916001016130cf565b50909695505050505050565b6000806040838503121561310a57600080fd5b61311383612f09565b915060208084013567ffffffffffffffff8082111561313157600080fd5b818601915086601f83011261314557600080fd5b81358181111561315757613157612fbf565b613169601f8201601f19168501612fd5565b9150808252878482850101111561317f57600080fd5b80848401858401376000848284010152508093505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156130eb5783516001600160a01b0316835292840192918401916001016131b9565b60005b838110156131f95781810151838201526020016131e1565b50506000910152565b6000815180845261321a8160208601602086016131de565b601f01601f19169290920160200192915050565b602081526000612ddf6020830184613202565b6000806020838503121561325457600080fd5b823567ffffffffffffffff8082111561326c57600080fd5b818501915085601f83011261328057600080fd5b81358181111561328f57600080fd5b8660208260051b85010111156132a457600080fd5b60209290920196919550909350505050565b600080600080600080600080610100898b0312156132d357600080fd5b6132dc89612f09565b9a60208a01359a5060408a013599606081013599506080810135985060a0810135975060c0810135965060e00135945092505050565b60008060006060848603121561332757600080fd5b61333084612f09565b95602085013595506040909401359392505050565b60208082526039908201527f436f6c6c61746572616c206973206e6f7420636f6e666967757265642c20757360408201527f6520736574436f6c6c61746572616c506172616d657465727300000000000000606082015260800190565b6080815260006133b56080830187613202565b6020830195909552506040810192909252606090910152919050565b6000602082840312156133e357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156111e7576111e76133ea565b634e487b7160e01b600052603260045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000600182016134d3576134d36133ea565b5060010190565b818103818111156111e7576111e76133ea565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161354a8184602087016131de565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200f3be6c525c97ce707e40b59ebad93e75a43cdbd66fc348a1a251fbf4898626364736f6c63430008130033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$23.45
Net Worth in ETH
Token Allocations
GRAI
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ARB | 100.00% | $0.979628 | 23.9401 | $23.45 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.