Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Add Authorizatio... | 17248592 | 1037 days ago | IN | 0 ETH | 0.00212427 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xF6c35af0...AE33bD3b1 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
BasicCollateralJoin
Compiler Version
v0.6.7+commit.b8d736ae
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/// BasicTokenAdapters.sol // Copyright (C) 2018 Rain <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.6.7; abstract contract CollateralLike { function decimals() virtual public view returns (uint256); function transfer(address,uint256) virtual public returns (bool); function transferFrom(address,address,uint256) virtual public returns (bool); } abstract contract DSTokenLike { function mint(address,uint256) virtual external; function burn(address,uint256) virtual external; } abstract contract SAFEEngineLike { function modifyCollateralBalance(bytes32,address,int256) virtual external; function transferInternalCoins(address,address,uint256) virtual external; } abstract contract MultiSAFEEngineLike { function modifyCollateralBalance(bytes32,bytes32,address,int256) virtual external; function transferInternalCoins(bytes32,address,address,uint256) virtual external; } /* Here we provide *adapters* to connect the SAFEEngine to arbitrary external token implementations, creating a bounded context for the SAFEEngine. The adapters here are provided as working examples: - `BasicCollateralJoin`: For well behaved ERC20 tokens, with simple transfer semantics. - `ETHJoin`: For native Ether. - `CoinJoin`: For connecting internal coin balances to an external `Coin` implementation. In practice, adapter implementations will be varied and specific to individual collateral types, accounting for different transfer semantics and token standards. Adapters need to implement two basic methods: - `join`: enter collateral into the system - `exit`: remove collateral from the system */ contract BasicCollateralJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "BasicCollateralJoin/account-not-authorized"); _; } // SAFE database SAFEEngineLike public safeEngine; // Collateral type name bytes32 public collateralType; // Actual collateral token contract CollateralLike public collateral; // How many decimals the collateral token has uint256 public decimals; // Whether this adapter contract is enabled or not uint256 public contractEnabled; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(address safeEngine_, bytes32 collateralType_, address collateral_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = SAFEEngineLike(safeEngine_); collateralType = collateralType_; collateral = CollateralLike(collateral_); decimals = collateral.decimals(); require(decimals == 18, "BasicCollateralJoin/non-18-decimals"); emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } /** * @notice Join collateral in the system * @dev This function locks collateral in the adapter and creates a 'representation' of * the locked collateral inside the system. This adapter assumes that the collateral * has 18 decimals * @param account Account from which we transferFrom collateral and add it in the system * @param wad Amount of collateral to transfer in the system (represented as a number with 18 decimals) **/ function join(address account, uint256 wad) external { require(contractEnabled == 1, "BasicCollateralJoin/contract-not-enabled"); require(int256(wad) >= 0, "BasicCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, account, int256(wad)); require(collateral.transferFrom(msg.sender, address(this), wad), "BasicCollateralJoin/failed-transfer"); emit Join(msg.sender, account, wad); } /** * @notice Exit collateral from the system * @dev This function destroys the collateral representation from inside the system * and exits the collateral from this adapter. The adapter assumes that the collateral * has 18 decimals * @param account Account to which we transfer the collateral * @param wad Amount of collateral to transfer to 'account' (represented as a number with 18 decimals) **/ function exit(address account, uint256 wad) external { require(wad <= 2 ** 255, "BasicCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, msg.sender, -int256(wad)); require(collateral.transfer(account, wad), "BasicCollateralJoin/failed-transfer"); emit Exit(msg.sender, account, wad); } } contract MultiBasicCollateralJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "MultiBasicCollateralJoin/account-not-authorized"); _; } // SAFE database MultiSAFEEngineLike public safeEngine; // Collateral type name bytes32 public collateralType; // Actual collateral token contract CollateralLike public collateral; // How many decimals the collateral token has uint256 public decimals; // Whether this adapter contract is enabled or not uint256 public contractEnabled; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(address safeEngine_, bytes32 collateralType_, address collateral_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = MultiSAFEEngineLike(safeEngine_); collateralType = collateralType_; collateral = CollateralLike(collateral_); decimals = collateral.decimals(); require(decimals == 18, "MultiBasicCollateralJoin/non-18-decimals"); emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } /** * @notice Join collateral in the system * @dev This function locks collateral in the adapter and creates a 'representation' of * the locked collateral inside the system. This adapter assumes that the collateral * has 18 decimals * @param account Account from which we transferFrom collateral and add it in the system * @param wad Amount of collateral to transfer in the system (represented as a number with 18 decimals) **/ function join(address account, uint256 wad) external { require(contractEnabled == 1, "MultiBasicCollateralJoin/contract-not-enabled"); require(int256(wad) >= 0, "MultiBasicCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, collateralType, account, int256(wad)); require(collateral.transferFrom(msg.sender, address(this), wad), "MultiBasicCollateralJoin/failed-transfer"); emit Join(msg.sender, account, wad); } /** * @notice Exit collateral from the system * @dev This function destroys the collateral representation from inside the system * and exits the collateral from this adapter. The adapter assumes that the collateral * has 18 decimals * @param account Account to which we transfer the collateral * @param wad Amount of collateral to transfer to 'account' (represented as a number with 18 decimals) **/ function exit(address account, uint256 wad) external { require(wad <= 2 ** 255, "MultiBasicCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, collateralType, msg.sender, -int256(wad)); require(collateral.transfer(account, wad), "MultiBasicCollateralJoin/failed-transfer"); emit Exit(msg.sender, account, wad); } } contract MultiSubCollateralJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "MultiSubCollateralJoin/account-not-authorized"); _; } // Base collateral type bytes32 public collateralType; // SAFE database MultiSAFEEngineLike public safeEngine; // How many decimals the sub-collateral tokens have uint256 public decimals; // Whether this adapter contract is enabled or not uint256 public contractEnabled; // Sub-collateral names and token contracts mapping(bytes32 => address) public subCollaterals; // Whether a token contract has already been onboarded mapping(address => uint256) public tokenOnboarded; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(bytes32 subCollateral, address sender, address account, uint256 wad); event Exit(bytes32 subCollateral, address sender, address account, uint256 wad); event AddSubCollateral(bytes32 subCollateral, address token); constructor(address safeEngine_, bytes32 collateralType_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = MultiSAFEEngineLike(safeEngine_); collateralType = collateralType_; decimals = 18; emit AddAuthorization(msg.sender); } /** * @notice Add a subcollateral * @param subCollateral Sub-collateral name * @param token Address of the collateral token contract */ function addSubCollateral(bytes32 subCollateral, address token) external isAuthorized { require(tokenOnboarded[token] == 0, "MultiSubCollateralJoin/token-already-onboarded"); require(subCollaterals[subCollateral] == address(0), "MultiSubCollateralJoin/subcollateral-already-onboarded"); require(CollateralLike(token).decimals() == decimals, "MultiSubCollateralJoin/invalid-decimal-number"); tokenOnboarded[token] = 1; subCollaterals[subCollateral] = token; emit AddSubCollateral(subCollateral, token); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } /** * @notice Join sub-collateral in the system * @dev This function locks sub-collateral in the adapter and creates a 'representation' of * the locked collateral inside the system. This adapter assumes that the collateral * has 18 decimals * @param subCollateral The sub-collateral to join * @param account Account from which we transferFrom collateral and add it in the system * @param wad Amount of collateral to transfer in the system (represented as a number with 18 decimals) **/ function join(bytes32 subCollateral, address account, uint256 wad) external { require(contractEnabled == 1, "MultiSubCollateralJoin/contract-not-enabled"); require(subCollaterals[subCollateral] != address(0), "MultiSubCollateralJoin/subcollateral-not-onboarded"); require(int256(wad) >= 0, "MultiSubCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, subCollateral, account, int256(wad)); require(CollateralLike(subCollaterals[subCollateral]).transferFrom(msg.sender, address(this), wad), "MultiSubCollateralJoin/failed-transfer"); emit Join(subCollateral, msg.sender, account, wad); } /** * @notice Exit collateral from the system * @dev This function destroys the collateral representation from inside the system * and exits the collateral from this adapter. The adapter assumes that the collateral * has 18 decimals * @param subCollateral The sub-collateral to exit * @param account Account to which we transfer the collateral * @param wad Amount of collateral to transfer to 'account' (represented as a number with 18 decimals) **/ function exit(bytes32 subCollateral, address account, uint256 wad) external { require(wad <= 2 ** 255, "MultiSubCollateralJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, subCollateral, msg.sender, -int256(wad)); require(CollateralLike(subCollaterals[subCollateral]).transfer(account, wad), "MultiSubCollateralJoin/failed-transfer"); emit Exit(subCollateral, msg.sender, account, wad); } } contract ETHJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call a restricted function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "ETHJoin/account-not-authorized"); _; } // SAFE database SAFEEngineLike public safeEngine; // Collateral type name bytes32 public collateralType; // Whether this contract is enabled or not uint256 public contractEnabled; // Number of decimals ETH has uint256 public decimals; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(address safeEngine_, bytes32 collateralType_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = SAFEEngineLike(safeEngine_); collateralType = collateralType_; decimals = 18; emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } /** * @notice Join ETH in the system * @param account Account that will receive the ETH representation inside the system **/ function join(address account) external payable { require(contractEnabled == 1, "ETHJoin/contract-not-enabled"); require(int256(msg.value) >= 0, "ETHJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, account, int256(msg.value)); emit Join(msg.sender, account, msg.value); } /** * @notice Exit ETH from the system * @param account Account that will receive the ETH representation inside the system **/ function exit(address payable account, uint256 wad) external { require(int256(wad) >= 0, "ETHJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, msg.sender, -int256(wad)); emit Exit(msg.sender, account, wad); account.transfer(wad); } } contract MultiETHJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call a restricted function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "MultiETHJoin/account-not-authorized"); _; } // SAFE database MultiSAFEEngineLike public safeEngine; // Collateral type name bytes32 public collateralType; // Whether this contract is enabled or not uint256 public contractEnabled; // Number of decimals ETH has uint256 public decimals; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(address safeEngine_, bytes32 collateralType_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = MultiSAFEEngineLike(safeEngine_); collateralType = collateralType_; decimals = 18; emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } /** * @notice Join ETH in the system * @param account Account that will receive the ETH representation inside the system **/ function join(address account) external payable { require(contractEnabled == 1, "MultiETHJoin/contract-not-enabled"); require(int256(msg.value) >= 0, "MultiETHJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, collateralType, account, int256(msg.value)); emit Join(msg.sender, account, msg.value); } /** * @notice Exit ETH from the system * @param account Account that will receive the ETH representation inside the system **/ function exit(address payable account, uint256 wad) external { require(int256(wad) >= 0, "MultiETHJoin/overflow"); safeEngine.modifyCollateralBalance(collateralType, collateralType, msg.sender, -int256(wad)); emit Exit(msg.sender, account, wad); account.transfer(wad); } } contract CoinJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "CoinJoin/account-not-authorized"); _; } // SAFE database SAFEEngineLike public safeEngine; // Coin created by the system; this is the external, ERC-20 representation, not the internal 'coinBalance' DSTokenLike public systemCoin; // Whether this contract is enabled or not uint256 public contractEnabled; // Number of decimals the system coin has uint256 public decimals; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(address safeEngine_, address systemCoin_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; safeEngine = SAFEEngineLike(safeEngine_); systemCoin = DSTokenLike(systemCoin_); decimals = 18; emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } uint256 constant RAY = 10 ** 27; function multiply(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, "CoinJoin/mul-overflow"); } /** * @notice Join system coins in the system * @dev Exited coins have 18 decimals but inside the system they have 45 (rad) decimals. When we join, the amount (wad) is multiplied by 10**27 (ray) * @param account Account that will receive the joined coins * @param wad Amount of external coins to join (18 decimal number) **/ function join(address account, uint256 wad) external { safeEngine.transferInternalCoins(address(this), account, multiply(RAY, wad)); systemCoin.burn(msg.sender, wad); emit Join(msg.sender, account, wad); } /** * @notice Exit system coins from the system and inside 'Coin.sol' * @dev Inside the system, coins have 45 (rad) decimals but outside of it they have 18 decimals (wad). When we exit, we specify a wad amount of coins and then the contract automatically multiplies wad by 10**27 to move the correct 45 decimal coin amount to this adapter * @param account Account that will receive the exited coins * @param wad Amount of internal coins to join (18 decimal number that will be multiplied by ray) **/ function exit(address account, uint256 wad) external { require(contractEnabled == 1, "CoinJoin/contract-not-enabled"); safeEngine.transferInternalCoins(msg.sender, address(this), multiply(RAY, wad)); systemCoin.mint(account, wad); emit Exit(msg.sender, account, wad); } } contract MultiCoinJoin { // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "MultiCoinJoin/account-not-authorized"); _; } // Multi synth SAFE database MultiSAFEEngineLike public safeEngine; // Coin created by the system; this is the external, ERC-20 representation, not the internal 'coinBalance' DSTokenLike public systemCoin; // Whether this contract is enabled or not uint256 public contractEnabled; // Number of decimals the system coin has uint256 public decimals; // The name of the synth bytes32 public coinName; // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event DisableContract(); event Join(address sender, address account, uint256 wad); event Exit(address sender, address account, uint256 wad); constructor(bytes32 coinName_, address safeEngine_, address systemCoin_) public { authorizedAccounts[msg.sender] = 1; contractEnabled = 1; coinName = coinName_; safeEngine = MultiSAFEEngineLike(safeEngine_); systemCoin = DSTokenLike(systemCoin_); decimals = 18; emit AddAuthorization(msg.sender); } /** * @notice Disable this contract */ function disableContract() external isAuthorized { contractEnabled = 0; emit DisableContract(); } uint256 constant RAY = 10 ** 27; function multiply(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, "MultiCoinJoin/mul-overflow"); } /** * @notice Join system coins in the system * @dev Exited coins have 18 decimals but inside the system they have 45 (rad) decimals. When we join, the amount (wad) is multiplied by 10**27 (ray) * @param account Account that will receive the joined coins * @param wad Amount of external coins to join (18 decimal number) **/ function join(address account, uint256 wad) external { safeEngine.transferInternalCoins(coinName, address(this), account, multiply(RAY, wad)); systemCoin.burn(msg.sender, wad); emit Join(msg.sender, account, wad); } /** * @notice Exit system coins from the system and inside 'Coin.sol' * @dev Inside the system, coins have 45 (rad) decimals but outside of it they have 18 decimals (wad). When we exit, we specify a wad amount of coins and then the contract automatically multiplies wad by 10**27 to move the correct 45 decimal coin amount to this adapter * @param account Account that will receive the exited coins * @param wad Amount of internal coins to join (18 decimal number that will be multiplied by ray) **/ function exit(address account, uint256 wad) external { require(contractEnabled == 1, "MultiCoinJoin/contract-not-enabled"); safeEngine.transferInternalCoins(coinName, msg.sender, address(this), multiply(RAY, wad)); systemCoin.mint(account, wad); emit Exit(msg.sender, account, wad); } }
{
"remappings": [
"ds-auth/=lib/ds-proxy/lib/ds-auth/src/",
"ds-exec/=lib/ds-pause/lib/ds-spell/lib/ds-exec/src/",
"ds-guard/=lib/geb-deploy/lib/ds-guard/src/",
"ds-math/=lib/esm/lib/ds-token/lib/ds-math/src/",
"ds-note/=lib/ds-proxy/lib/ds-note/src/",
"ds-pause/=lib/ds-pause/src/",
"ds-proxy/=lib/ds-proxy/src/",
"ds-roles/=lib/ds-pause/lib/ds-vote-quorum/lib/ds-roles/src/",
"ds-spell/=lib/ds-pause/lib/ds-spell/src/",
"ds-stop/=lib/geb-fsm/lib/ds-stop/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"ds-thing/=lib/ds-value/lib/ds-thing/src/",
"ds-token/=lib/esm/lib/ds-token/src/",
"ds-value/=lib/ds-value/src/",
"ds-vote-quorum/=lib/ds-pause/lib/ds-vote-quorum/src/",
"ds-weth/=lib/ds-weth/",
"erc20/=lib/ds-weth/lib/erc20/src/",
"esm/=lib/esm/src/",
"forge-std/=lib/forge-std/src/",
"geb-basic-multisig/=lib/ds-pause/lib/geb-basic-multisig/src/",
"geb-chainlink-median/=lib/geb-chainlink-median/src/",
"geb-debt-popper-rewards/=lib/geb-debt-popper-rewards/src/",
"geb-deploy/=lib/geb-deploy/src/",
"geb-esm-threshold-setter/=lib/geb-esm-threshold-setter/src/",
"geb-fsm/=lib/geb-fsm/src/",
"geb-incentives/=lib/geb-proxy-actions/lib/geb-incentives/src/",
"geb-lender-first-resort/=lib/geb-lender-first-resort/src/",
"geb-pit/=lib/geb-pit/src/",
"geb-protocol-token-authority/=lib/geb-protocol-token-authority/src/",
"geb-proxy-actions/=lib/geb-proxy-actions/src/",
"geb-proxy-registry/=lib/geb-proxy-registry/src/",
"geb-rrfm-calculators/=lib/geb-rrfm-calculators/src/",
"geb-rrfm-rate-setter/=lib/geb-rrfm-rate-setter/src/",
"geb-safe-manager/=lib/geb-safe-manager/src/",
"geb-safe-saviours/=lib/geb-proxy-actions/lib/geb-safe-saviours/src/",
"geb-treasury-reimbursement/=lib/geb-debt-popper-rewards/lib/geb-treasury-reimbursement/src/",
"geb-uniswap-median/=lib/geb-uniswap-median/src/",
"geb/=lib/geb/src/",
"mgl-debt-minter-rewards/=lib/mgl-debt-minter-rewards/",
"mgl-emitter/=lib/mgl-emitter/src/",
"multicall/=lib/multicall/src/"
],
"optimizer": {
"enabled": false,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "istanbul",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"safeEngine_","type":"address"},{"internalType":"bytes32","name":"collateralType_","type":"bytes32"},{"internalType":"address","name":"collateral_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"AddAuthorization","type":"event"},{"anonymous":false,"inputs":[],"name":"DisableContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Exit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Join","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"RemoveAuthorization","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedAccounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateral","outputs":[{"internalType":"contract CollateralLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractEnabled","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"safeEngine","outputs":[{"internalType":"contract SAFEEngineLike","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b506040516111483803806111488339818101604052606081101561003357600080fd5b8101908080519060200190929190805190602001909291908051906020019092919050505060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160058190555082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160028190555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561019557600080fd5b505afa1580156101a9573d6000803e3d6000fd5b505050506040513d60208110156101bf57600080fd5b8101908080519060200190929190505050600481905550601260045414610231576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111256023913960400191505060405180910390fd5b7f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f700010233604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050610e7f806102a66000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806367aea3131161007157806367aea313146101d4578063894ba8331461021e57806394f3f81d14610228578063d8dfeb451461026c578063e824600f146102b6578063ef693bed146102d4576100a9565b806324ba5884146100ae578063313ce5671461010657806335b28153146101245780633b4da69f1461016857806341b3a0d9146101b6575b600080fd5b6100f0600480360360208110156100c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610322565b6040518082815260200191505060405180910390f35b61010e61033a565b6040518082815260200191505060405180910390f35b6101666004803603602081101561013a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610340565b005b6101b46004803603604081101561017e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610481565b005b6101be61082e565b6040518082815260200191505060405180910390f35b6101dc610834565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61022661085a565b005b61026a6004803603602081101561023e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610927565b005b610274610a68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102be610a8e565b6040518082815260200191505060405180910390f35b610320600480360360408110156102ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a94565b005b60006020528060005260406000206000915090505481565b60045481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146103d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f700010281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6001600554146104dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610df86028913960400191505060405180910390fd5b6000811215610553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261736963436f6c6c61746572616c4a6f696e2f6f766572666c6f770000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a11825e60025484846040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b505050506040513d602081101561072557600080fd5b810190808051906020019092919050505061078b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610dd56023913960400191505060405180910390fd5b7f0e64978d073561c3dfd4d4e3e4dce066cde2ab246a44f990fabb0a21a4a3bd95338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146108f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60006005819055507f2d4b4ecff7bd7503135271925520a2f6c0d98c9473ffc1a1e72c92502f51b25e60405160405180910390a1565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146109be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f8834a87e641e9716be4f34527af5d23e11624f1ddeefede6ad75a9acfc31b90381604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b7f8000000000000000000000000000000000000000000000000000000000000000811115610b2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261736963436f6c6c61746572616c4a6f696e2f6f766572666c6f770000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a11825e60025433846000036040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610be057600080fd5b505af1158015610bf4573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ca157600080fd5b505af1158015610cb5573d6000803e3d6000fd5b505050506040513d6020811015610ccb57600080fd5b8101908080519060200190929190505050610d31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610dd56023913960400191505060405180910390fd5b7fbc2a67d422c268da6fe45f3e7d194e1d98906d221f1cfad62a5c80f2cd209f4c338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505056fe4261736963436f6c6c61746572616c4a6f696e2f6661696c65642d7472616e736665724261736963436f6c6c61746572616c4a6f696e2f636f6e74726163742d6e6f742d656e61626c65644261736963436f6c6c61746572616c4a6f696e2f6163636f756e742d6e6f742d617574686f72697a6564a26469706673582212205d8a9e8eb8395913824fd295f6cfad84e98b772113aff476344dfb5c9bda141e64736f6c634300060700334261736963436f6c6c61746572616c4a6f696e2f6e6f6e2d31382d646563696d616c730000000000000000000000003ad2f30266b35f775d58aecde3fbb7ea8b83bf2b4554482d43000000000000000000000000000000000000000000000000000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806367aea3131161007157806367aea313146101d4578063894ba8331461021e57806394f3f81d14610228578063d8dfeb451461026c578063e824600f146102b6578063ef693bed146102d4576100a9565b806324ba5884146100ae578063313ce5671461010657806335b28153146101245780633b4da69f1461016857806341b3a0d9146101b6575b600080fd5b6100f0600480360360208110156100c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610322565b6040518082815260200191505060405180910390f35b61010e61033a565b6040518082815260200191505060405180910390f35b6101666004803603602081101561013a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610340565b005b6101b46004803603604081101561017e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610481565b005b6101be61082e565b6040518082815260200191505060405180910390f35b6101dc610834565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61022661085a565b005b61026a6004803603602081101561023e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610927565b005b610274610a68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102be610a8e565b6040518082815260200191505060405180910390f35b610320600480360360408110156102ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a94565b005b60006020528060005260406000206000915090505481565b60045481565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146103d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f700010281604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6001600554146104dc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610df86028913960400191505060405180910390fd5b6000811215610553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261736963436f6c6c61746572616c4a6f696e2f6f766572666c6f770000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a11825e60025484846040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561060657600080fd5b505af115801561061a573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156106fb57600080fd5b505af115801561070f573d6000803e3d6000fd5b505050506040513d602081101561072557600080fd5b810190808051906020019092919050505061078b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610dd56023913960400191505060405180910390fd5b7f0e64978d073561c3dfd4d4e3e4dce066cde2ab246a44f990fabb0a21a4a3bd95338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146108f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60006005819055507f2d4b4ecff7bd7503135271925520a2f6c0d98c9473ffc1a1e72c92502f51b25e60405160405180910390a1565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054146109be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180610e20602a913960400191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f8834a87e641e9716be4f34527af5d23e11624f1ddeefede6ad75a9acfc31b90381604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b7f8000000000000000000000000000000000000000000000000000000000000000811115610b2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4261736963436f6c6c61746572616c4a6f696e2f6f766572666c6f770000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634a11825e60025433846000036040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610be057600080fd5b505af1158015610bf4573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ca157600080fd5b505af1158015610cb5573d6000803e3d6000fd5b505050506040513d6020811015610ccb57600080fd5b8101908080519060200190929190505050610d31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610dd56023913960400191505060405180910390fd5b7fbc2a67d422c268da6fe45f3e7d194e1d98906d221f1cfad62a5c80f2cd209f4c338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505056fe4261736963436f6c6c61746572616c4a6f696e2f6661696c65642d7472616e736665724261736963436f6c6c61746572616c4a6f696e2f636f6e74726163742d6e6f742d656e61626c65644261736963436f6c6c61746572616c4a6f696e2f6163636f756e742d6e6f742d617574686f72697a6564a26469706673582212205d8a9e8eb8395913824fd295f6cfad84e98b772113aff476344dfb5c9bda141e64736f6c63430006070033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.