Contract Overview
Balance:
0 FTM
FTM Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | ||
---|---|---|---|---|---|---|---|---|
0xba6c8ac5cbbaa1fb0ad1172f814fd51e449bb906aa8cf72dfdf71acbb7353336 | 0x60a06040 | 19737156 | 472 days 17 hrs ago | 0x55d56e1bb2fc8280a775ccfe9ececcecf1a01562 | IN | Create: ForceTransferAssetStore | 0 FTM | 0.037383240118 |
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xba6c8ac5cbbaa1fb0ad1172f814fd51e449bb906aa8cf72dfdf71acbb7353336 | 19737156 | 472 days 17 hrs ago | 0x55d56e1bb2fc8280a775ccfe9ececcecf1a01562 | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Name:
ForceTransferAssetStore
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: bsl-1.1 /* Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]). */ pragma solidity 0.7.6; import "../VaultParameters.sol"; import "../interfaces/IForceTransferAssetStore.sol"; /** * @title ForceTransferAssetStore **/ contract ForceTransferAssetStore is Auth, IForceTransferAssetStore { /* Mapping of assets that require a transfer of at least 1 unit of token to update internal logic related to staking rewards in case of full liquidation */ mapping(address => bool) public override shouldForceTransfer; event ForceTransferAssetAdded(address indexed asset); constructor(address _vaultParameters, address[] memory initialAssets) Auth(_vaultParameters) { for (uint i = 0; i < initialAssets.length; i++) { require(!shouldForceTransfer[initialAssets[i]], "Unit Protocol: Already exists"); shouldForceTransfer[initialAssets[i]] = true; emit ForceTransferAssetAdded(initialAssets[i]); } } /** * @notice Only manager is able to call this function * @dev Mark asset as `shouldForceTransfer` * @param asset The address of the asset **/ function add(address asset) external override onlyManager { require(!shouldForceTransfer[asset], "Unit Protocol: Already exists"); require(asset != address(0), "Unit Protocol: ZERO_ADDRESS"); shouldForceTransfer[asset] = true; emit ForceTransferAssetAdded(asset); } }
// SPDX-License-Identifier: bsl-1.1 /* Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]). */ pragma solidity 0.7.6; /** * @title Auth * @dev Manages USDP's system access **/ contract Auth { // address of the the contract with vault parameters VaultParameters public immutable vaultParameters; constructor(address _parameters) { vaultParameters = VaultParameters(_parameters); } // ensures tx's sender is a manager modifier onlyManager() { require(vaultParameters.isManager(msg.sender), "Unit Protocol: AUTH_FAILED"); _; } // ensures tx's sender is able to modify the Vault modifier hasVaultAccess() { require(vaultParameters.canModifyVault(msg.sender), "Unit Protocol: AUTH_FAILED"); _; } // ensures tx's sender is the Vault modifier onlyVault() { require(msg.sender == vaultParameters.vault(), "Unit Protocol: AUTH_FAILED"); _; } } /** * @title VaultParameters **/ contract VaultParameters is Auth { // map token to stability fee percentage; 3 decimals mapping(address => uint) public stabilityFee; // map token to liquidation fee percentage, 0 decimals mapping(address => uint) public liquidationFee; // map token to USDP mint limit mapping(address => uint) public tokenDebtLimit; // permissions to modify the Vault mapping(address => bool) public canModifyVault; // managers mapping(address => bool) public isManager; // enabled oracle types mapping(uint => mapping (address => bool)) public isOracleTypeEnabled; // address of the Vault address payable public immutable vault; // The foundation address address public foundation; /** * The address for an Ethereum contract is deterministically computed from the address of its creator (sender) * and how many transactions the creator has sent (nonce). The sender and nonce are RLP encoded and then * hashed with Keccak-256. * Therefore, the Vault address can be pre-computed and passed as an argument before deployment. **/ constructor(address payable _vault, address _foundation) Auth(address(this)) { require(_vault != address(0), "Unit Protocol: ZERO_ADDRESS"); require(_foundation != address(0), "Unit Protocol: ZERO_ADDRESS"); isManager[msg.sender] = true; vault = _vault; foundation = _foundation; } /** * @notice Only manager is able to call this function * @dev Grants and revokes manager's status of any address * @param who The target address * @param permit The permission flag **/ function setManager(address who, bool permit) external onlyManager { isManager[who] = permit; } /** * @notice Only manager is able to call this function * @dev Sets the foundation address * @param newFoundation The new foundation address **/ function setFoundation(address newFoundation) external onlyManager { require(newFoundation != address(0), "Unit Protocol: ZERO_ADDRESS"); foundation = newFoundation; } /** * @notice Only manager is able to call this function * @dev Sets ability to use token as the main collateral * @param asset The address of the main collateral token * @param stabilityFeeValue The percentage of the year stability fee (3 decimals) * @param liquidationFeeValue The liquidation fee percentage (0 decimals) * @param usdpLimit The USDP token issue limit * @param oracles The enables oracle types **/ function setCollateral( address asset, uint stabilityFeeValue, uint liquidationFeeValue, uint usdpLimit, uint[] calldata oracles ) external onlyManager { setStabilityFee(asset, stabilityFeeValue); setLiquidationFee(asset, liquidationFeeValue); setTokenDebtLimit(asset, usdpLimit); for (uint i=0; i < oracles.length; i++) { setOracleType(oracles[i], asset, true); } } /** * @notice Only manager is able to call this function * @dev Sets a permission for an address to modify the Vault * @param who The target address * @param permit The permission flag **/ function setVaultAccess(address who, bool permit) external onlyManager { canModifyVault[who] = permit; } /** * @notice Only manager is able to call this function * @dev Sets the percentage of the year stability fee for a particular collateral * @param asset The address of the main collateral token * @param newValue The stability fee percentage (3 decimals) **/ function setStabilityFee(address asset, uint newValue) public onlyManager { stabilityFee[asset] = newValue; } /** * @notice Only manager is able to call this function * @dev Sets the percentage of the liquidation fee for a particular collateral * @param asset The address of the main collateral token * @param newValue The liquidation fee percentage (0 decimals) **/ function setLiquidationFee(address asset, uint newValue) public onlyManager { require(newValue <= 100, "Unit Protocol: VALUE_OUT_OF_RANGE"); liquidationFee[asset] = newValue; } /** * @notice Only manager is able to call this function * @dev Enables/disables oracle types * @param _type The type of the oracle * @param asset The address of the main collateral token * @param enabled The control flag **/ function setOracleType(uint _type, address asset, bool enabled) public onlyManager { isOracleTypeEnabled[_type][asset] = enabled; } /** * @notice Only manager is able to call this function * @dev Sets USDP limit for a specific collateral * @param asset The address of the main collateral token * @param limit The limit number **/ function setTokenDebtLimit(address asset, uint limit) public onlyManager { tokenDebtLimit[asset] = limit; } }
// SPDX-License-Identifier: bsl-1.1 /* Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]). */ pragma solidity ^0.7.6; interface IForceTransferAssetStore { function shouldForceTransfer ( address ) external view returns ( bool ); function add ( address asset ) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_vaultParameters","type":"address"},{"internalType":"address[]","name":"initialAssets","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"ForceTransferAssetAdded","type":"event"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"shouldForceTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultParameters","outputs":[{"internalType":"contract VaultParameters","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516105663803806105668339818101604052604081101561003357600080fd5b81516020830180516040519294929383019291908464010000000082111561005a57600080fd5b90830190602082018581111561006f57600080fd5b825186602082028301116401000000008211171561008c57600080fd5b82525081516020918201928201910280838360005b838110156100b95781810151838201526020016100a1565b50505050919091016040525050506001600160601b0319606084901b166080525060005b815181101561020f576000808383815181106100f557fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff161561016e576040805162461bcd60e51b815260206004820152601d60248201527f556e69742050726f746f636f6c3a20416c726561647920657869737473000000604482015290519081900360640190fd5b600160008084848151811061017f57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181106101ca57fe5b60200260200101516001600160a01b03167f799b33818cb29135e2e57456d981aac69014e29866c0e6c4182da17e944d690360405160405180910390a26001016100dd565b50505060805160601c6103336102336000398060ec52806102db52506103336000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630a3b0a4f1461004657806311f2e4ca1461006e578063aca345ee146100a8575b600080fd5b61006c6004803603602081101561005c57600080fd5b50356001600160a01b03166100cc565b005b6100946004803603602081101561008457600080fd5b50356001600160a01b03166102c4565b604080519115158252519081900360200190f35b6100b06102d9565b604080516001600160a01b039092168252519081900360200190f35b6040805163f3ae241560e01b815233600482015290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163f3ae2415916024808301926020929190829003018186803b15801561013257600080fd5b505afa158015610146573d6000803e3d6000fd5b505050506040513d602081101561015c57600080fd5b50516101af576040805162461bcd60e51b815260206004820152601a60248201527f556e69742050726f746f636f6c3a20415554485f4641494c4544000000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526020819052604090205460ff161561021d576040805162461bcd60e51b815260206004820152601d60248201527f556e69742050726f746f636f6c3a20416c726561647920657869737473000000604482015290519081900360640190fd5b6001600160a01b038116610278576040805162461bcd60e51b815260206004820152601b60248201527f556e69742050726f746f636f6c3a205a45524f5f414444524553530000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260208190526040808220805460ff19166001179055517f799b33818cb29135e2e57456d981aac69014e29866c0e6c4182da17e944d69039190a250565b60006020819052908152604090205460ff1681565b7f00000000000000000000000000000000000000000000000000000000000000008156fea264697066735822122029640beaa581779ca9c2e44d9384d339e95230556abfa6e9e593ba6fe12b81c564736f6c63430007060033000000000000000000000000a8f0b5758041158cf0375b7adc8ac175ff031b6c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a8f0b5758041158cf0375b7adc8ac175ff031b6c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _vaultParameters (address): 0xa8f0b5758041158cf0375b7adc8ac175ff031b6c
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a8f0b5758041158cf0375b7adc8ac175ff031b6c
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.