Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Multichain Info
N/A
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 6 internal transactions
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
AccountantProxy
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.18; import {Governance} from "@periphery/utils/Governance.sol"; import {IVault} from "@yearn-vaults/interfaces/IVault.sol"; interface IAccountant { function turnOffHealthCheck(address vault, address strategy) external; } interface IERC20 { function balanceOf(address account) external view returns (uint256); } /** * @title AccountantProxy * @notice Proxy contract that wraps an Accountant to allow authorized addresses to trigger self-reporting * @dev Acts as a pass-through for all other accountant functions while adding self-reporting capability */ contract AccountantProxy is Governance { // Events event ReporterSet(address indexed reporter, bool authorized); // State variables address public immutable ACCOUNTANT; mapping(address => bool) public canReport; modifier onlyReporter() { require(canReport[msg.sender] || msg.sender == governance, "!authorized"); _; } /** * @notice Constructor to set the accountant address and governance * @param _accountant Address of the underlying accountant contract * @param _governance Address of the governance */ constructor( address _accountant, address _governance ) Governance(_governance) { require(_accountant != address(0), "zero address"); ACCOUNTANT = _accountant; } /** * @notice Allows authorized addresses to trigger self-reporting for a vault * @param vault Address of the vault to report on itself * @return gain Amount of gain reported * @return loss Amount of loss reported */ function reportOnSelf( address vault ) external onlyReporter returns (uint256 gain, uint256 loss) { // Store pre-report state uint256 preTotalAssets = IVault(vault).totalAssets(); uint256 preTotalIdle = IVault(vault).totalIdle(); uint256 prePPS = IVault(vault).pricePerShare(); // Get the actual asset balance to determine expected gain address asset = IVault(vault).asset(); uint256 vaultAssetBalance = IERC20(asset).balanceOf(vault); uint256 expectedGain = vaultAssetBalance - preTotalIdle; require(expectedGain > 0, "no gain"); // Turn off health check for self-reporting IAccountant(ACCOUNTANT).turnOffHealthCheck(vault, vault); // Trigger the vault to report on itself (gain, loss) = IVault(vault).process_report(vault); // Post-report sanity checks require(gain == expectedGain, "gain mismatch"); // Verify PPS hasn't increased require(IVault(vault).pricePerShare() == prePPS, "PPS changed"); // Total idle should have increased by the expected gain require( IVault(vault).totalIdle() == preTotalIdle + expectedGain, "Idle update incorrect" ); // Verify total assets changed as expected require( IVault(vault).totalAssets() == preTotalAssets + expectedGain, "Total assets mismatch" ); require(loss == 0, "loss is not 0"); return (gain, loss); } /** * @notice Set or remove reporter authorization for an address * @param reporter Address to set authorization for * @param authorized Whether the address should be authorized */ function setReporter( address reporter, bool authorized ) external onlyGovernance { require(reporter != address(0), "zero address"); require(canReport[reporter] != authorized, "already set"); canReport[reporter] = authorized; emit ReporterSet(reporter, authorized); } /** * @notice Fallback function to forward all other calls to the accountant * @dev Validates permissions based on function selector before forwarding */ fallback() external { _checkGovernance(); (bool success, bytes memory result) = ACCOUNTANT.call(msg.data); if (success) { assembly { return(add(result, 0x20), mload(result)) } } else { assembly { revert(add(result, 0x20), mload(result)) } } } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.8.18; contract Governance { /// @notice Emitted when the governance address is updated. event GovernanceTransferred( address indexed previousGovernance, address indexed newGovernance ); modifier onlyGovernance() { _checkGovernance(); _; } /// @notice Checks if the msg sender is the governance. function _checkGovernance() internal view virtual { require(governance == msg.sender, "!governance"); } /// @notice Address that can set the default base fee and provider address public governance; constructor(address _governance) { governance = _governance; emit GovernanceTransferred(address(0), _governance); } /** * @notice Sets a new address as the governance of the contract. * @dev Throws if the caller is not current governance. * @param _newGovernance The new governance address. */ function transferGovernance( address _newGovernance ) external virtual onlyGovernance { require(_newGovernance != address(0), "ZERO ADDRESS"); address oldGovernance = governance; governance = _newGovernance; emit GovernanceTransferred(oldGovernance, _newGovernance); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.8.18; import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol"; interface IVault is IERC4626 { // STRATEGY EVENTS event StrategyChanged(address indexed strategy, uint256 change_type); event StrategyReported( address indexed strategy, uint256 gain, uint256 loss, uint256 current_debt, uint256 protocol_fees, uint256 total_fees, uint256 total_refunds ); // DEBT MANAGEMENT EVENTS event DebtUpdated( address indexed strategy, uint256 current_debt, uint256 new_debt ); // ROLE UPDATES event RoleSet(address indexed account, uint256 role); event UpdateFutureRoleManager(address indexed future_role_manager); event UpdateRoleManager(address indexed role_manager); event UpdateAccountant(address indexed accountant); event UpdateDefaultQueue(address[] new_default_queue); event UpdateUseDefaultQueue(bool use_default_queue); event UpdatedMaxDebtForStrategy( address indexed sender, address indexed strategy, uint256 new_debt ); event UpdateAutoAllocate(bool auto_allocate); event UpdateDepositLimit(uint256 deposit_limit); event UpdateMinimumTotalIdle(uint256 minimum_total_idle); event UpdateProfitMaxUnlockTime(uint256 profit_max_unlock_time); event DebtPurchased(address indexed strategy, uint256 amount); event Shutdown(); struct StrategyParams { uint256 activation; uint256 last_report; uint256 current_debt; uint256 max_debt; } function FACTORY() external view returns (uint256); function strategies(address) external view returns (StrategyParams memory); function default_queue(uint256) external view returns (address); function use_default_queue() external view returns (bool); function auto_allocate() external view returns (bool); function minimum_total_idle() external view returns (uint256); function deposit_limit() external view returns (uint256); function deposit_limit_module() external view returns (address); function withdraw_limit_module() external view returns (address); function accountant() external view returns (address); function roles(address) external view returns (uint256); function role_manager() external view returns (address); function future_role_manager() external view returns (address); function isShutdown() external view returns (bool); function nonces(address) external view returns (uint256); function initialize( address, string memory, string memory, address, uint256 ) external; function setName(string memory) external; function setSymbol(string memory) external; function set_accountant(address new_accountant) external; function set_default_queue(address[] memory new_default_queue) external; function set_use_default_queue(bool) external; function set_auto_allocate(bool) external; function set_deposit_limit(uint256 deposit_limit) external; function set_deposit_limit( uint256 deposit_limit, bool should_override ) external; function set_deposit_limit_module( address new_deposit_limit_module ) external; function set_deposit_limit_module( address new_deposit_limit_module, bool should_override ) external; function set_withdraw_limit_module( address new_withdraw_limit_module ) external; function set_minimum_total_idle(uint256 minimum_total_idle) external; function setProfitMaxUnlockTime( uint256 new_profit_max_unlock_time ) external; function set_role(address account, uint256 role) external; function add_role(address account, uint256 role) external; function remove_role(address account, uint256 role) external; function transfer_role_manager(address role_manager) external; function accept_role_manager() external; function unlockedShares() external view returns (uint256); function pricePerShare() external view returns (uint256); function get_default_queue() external view returns (address[] memory); function process_report( address strategy ) external returns (uint256, uint256); function buy_debt(address strategy, uint256 amount) external; function add_strategy(address new_strategy) external; function revoke_strategy(address strategy) external; function force_revoke_strategy(address strategy) external; function update_max_debt_for_strategy( address strategy, uint256 new_max_debt ) external; function update_debt( address strategy, uint256 target_debt ) external returns (uint256); function update_debt( address strategy, uint256 target_debt, uint256 max_loss ) external returns (uint256); function shutdown_vault() external; function totalIdle() external view returns (uint256); function totalDebt() external view returns (uint256); function apiVersion() external view returns (string memory); function assess_share_of_unrealised_losses( address strategy, uint256 assets_needed ) external view returns (uint256); function profitMaxUnlockTime() external view returns (uint256); function fullProfitUnlockDate() external view returns (uint256); function profitUnlockingRate() external view returns (uint256); function lastProfitUpdate() external view returns (uint256); //// NON-STANDARD ERC-4626 FUNCTIONS \\\\ function withdraw( uint256 assets, address receiver, address owner, uint256 max_loss ) external returns (uint256); function withdraw( uint256 assets, address receiver, address owner, uint256 max_loss, address[] memory strategies ) external returns (uint256); function redeem( uint256 shares, address receiver, address owner, uint256 max_loss ) external returns (uint256); function redeem( uint256 shares, address receiver, address owner, uint256 max_loss, address[] memory strategies ) external returns (uint256); function maxWithdraw( address owner, uint256 max_loss ) external view returns (uint256); function maxWithdraw( address owner, uint256 max_loss, address[] memory strategies ) external view returns (uint256); function maxRedeem( address owner, uint256 max_loss ) external view returns (uint256); function maxRedeem( address owner, uint256 max_loss, address[] memory strategies ) external view returns (uint256); //// NON-STANDARD ERC-20 FUNCTIONS \\\\ function DOMAIN_SEPARATOR() external view returns (bytes32); function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol"; import "../token/ERC20/extensions/IERC20Metadata.sol"; /** * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. * * _Available since v4.7._ */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /** * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. * * - MUST be an ERC-20 token contract. * - MUST NOT revert. */ function asset() external view returns (address assetTokenAddress); /** * @dev Returns the total amount of the underlying asset that is “managed” by Vault. * * - SHOULD include any compounding that occurs from yield. * - MUST be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT revert. */ function totalAssets() external view returns (uint256 totalManagedAssets); /** * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, * through a deposit call. * * - MUST return a limited value if receiver is subject to some deposit limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. * - MUST NOT revert. */ function maxDeposit(address receiver) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given * current on-chain conditions. * * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called * in the same transaction. * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the * deposit would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewDeposit(uint256 assets) external view returns (uint256 shares); /** * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * deposit execution, and are accounted for during deposit. * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function deposit(uint256 assets, address receiver) external returns (uint256 shares); /** * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. * - MUST return a limited value if receiver is subject to some mint limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. * - MUST NOT revert. */ function maxMint(address receiver) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given * current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the * same transaction. * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint * would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by minting. */ function previewMint(uint256 shares) external view returns (uint256 assets); /** * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint * execution, and are accounted for during mint. * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function mint(uint256 shares, address receiver) external returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the * Vault, through a withdraw call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST NOT revert. */ function maxWithdraw(address owner) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, * given current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if * called * in the same transaction. * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though * the withdrawal would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewWithdraw(uint256 assets) external view returns (uint256 shares); /** * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * withdraw execution, and are accounted for during withdraw. * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); /** * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, * through a redeem call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. * - MUST NOT revert. */ function maxRedeem(address owner) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the * same transaction. * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the * redemption would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by redeeming. */ function previewRedeem(uint256 shares) external view returns (uint256 assets); /** * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * redeem execution, and are accounted for during redeem. * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts/", "forge-std/=lib/forge-std/src/", "@tokenized-strategy/=lib/tokenized-strategy/src/", "@periphery/=lib/tokenized-strategy-periphery/src/", "@yearn-vaults/=lib/tokenized-strategy-periphery/lib/yearn-vaults-v3/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/tokenized-strategy/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "tokenized-strategy-periphery/=lib/tokenized-strategy-periphery/", "tokenized-strategy/=lib/tokenized-strategy/", "yearn-vaults-v3/=lib/tokenized-strategy-periphery/lib/yearn-vaults-v3/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_accountant","type":"address"},{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"}],"name":"GovernanceTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reporter","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"}],"name":"ReporterSet","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"ACCOUNTANT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"canReport","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"}],"name":"reportOnSelf","outputs":[{"internalType":"uint256","name":"gain","type":"uint256"},{"internalType":"uint256","name":"loss","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"reporter","type":"address"},{"internalType":"bool","name":"authorized","type":"bool"}],"name":"setReporter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernance","type":"address"}],"name":"transferGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561000f575f80fd5b50604051610c62380380610c6283398101604081905261002e916100ec565b5f80546001600160a01b0319166001600160a01b03831690811782556040518392907f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80908290a3506001600160a01b0382166100bf5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015260640160405180910390fd5b506001600160a01b031660805261011d565b80516001600160a01b03811681146100e7575f80fd5b919050565b5f80604083850312156100fd575f80fd5b610106836100d1565b9150610114602084016100d1565b90509250929050565b608051610b206101425f395f8181606c0152818161018d01526104ea0152610b205ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c80633f85cea9146100ff5780635aa6e6751461013657806367144d51146101605780638b9d294014610188578063d38bfff4146101af578063e1bb5133146101c2575b6100686101d5565b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165f366040516100a49291906109d3565b5f604051808303815f865af19150503d805f81146100dd576040519150601f19603f3d011682016040523d82523d5f602084013e6100e2565b606091505b509150915081156100f557805160208201f35b805160208201fd5b005b61012161010d3660046109f9565b60016020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b5f54610148906001600160a01b031681565b6040516001600160a01b03909116815260200161012d565b61017361016e3660046109f9565b610223565b6040805192835260208301919091520161012d565b6101487f000000000000000000000000000000000000000000000000000000000000000081565b6100fd6101bd3660046109f9565b61082f565b6100fd6101d0366004610a1b565b6108cb565b5f546001600160a01b031633146102215760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b60448201526064015b60405180910390fd5b565b335f90815260016020526040812054819060ff168061024b57505f546001600160a01b031633145b6102855760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b6044820152606401610218565b5f836001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102e69190610a56565b90505f846001600160a01b0316639aa7df946040518163ffffffff1660e01b8152600401602060405180830381865afa158015610325573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103499190610a56565b90505f856001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610388573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ac9190610a56565b90505f866001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040f9190610a6d565b6040516370a0823160e01b81526001600160a01b0389811660048301529192505f918316906370a0823190602401602060405180830381865afa158015610458573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061047c9190610a56565b90505f6104898583610a9c565b90505f81116104c45760405162461bcd60e51b815260206004820152600760248201526637379033b0b4b760c91b6044820152606401610218565b604051632e76701d60e11b81526001600160a01b038a81166004830181905260248301527f00000000000000000000000000000000000000000000000000000000000000001690635cece03a906044015f604051808303815f87803b15801561052b575f80fd5b505af115801561053d573d5f803e3d5ffd5b5050604051631bb0ae3560e21b81526001600160a01b038c16600482018190529250636ec2b8d4915060240160408051808303815f875af1158015610584573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a89190610ab5565b90985096508088146105ec5760405162461bcd60e51b815260206004820152600d60248201526c0cec2d2dc40dad2e6dac2e8c6d609b1b6044820152606401610218565b83896001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610629573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064d9190610a56565b146106885760405162461bcd60e51b815260206004820152600b60248201526a141414c818da185b99d95960aa1b6044820152606401610218565b6106928186610ad7565b896001600160a01b0316639aa7df946040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f29190610a56565b146107375760405162461bcd60e51b815260206004820152601560248201527412591b19481d5c19185d19481a5b98dbdc9c9958dd605a1b6044820152606401610218565b6107418187610ad7565b896001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561077d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a19190610a56565b146107e65760405162461bcd60e51b81526020600482015260156024820152740a8dee8c2d840c2e6e6cae8e640dad2e6dac2e8c6d605b1b6044820152606401610218565b86156108245760405162461bcd60e51b815260206004820152600d60248201526c06c6f7373206973206e6f74203609c1b6044820152606401610218565b505050505050915091565b6108376101d5565b6001600160a01b03811661087c5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f204144445245535360a01b6044820152606401610218565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce809190a35050565b6108d36101d5565b6001600160a01b0382166109185760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610218565b6001600160a01b0382165f9081526001602052604090205481151560ff9091161515036109755760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b6044820152606401610218565b6001600160a01b0382165f81815260016020908152604091829020805460ff191685151590811790915591519182527f49414e0a37c19781141fced7b2dc68c560d888c72174623b7bba993149d9064d910160405180910390a25050565b818382375f9101908152919050565b6001600160a01b03811681146109f6575f80fd5b50565b5f60208284031215610a09575f80fd5b8135610a14816109e2565b9392505050565b5f8060408385031215610a2c575f80fd5b8235610a37816109e2565b915060208301358015158114610a4b575f80fd5b809150509250929050565b5f60208284031215610a66575f80fd5b5051919050565b5f60208284031215610a7d575f80fd5b8151610a14816109e2565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610aaf57610aaf610a88565b92915050565b5f8060408385031215610ac6575f80fd5b505080516020909101519092909150565b80820180821115610aaf57610aaf610a8856fea2646970667358221220cc6536a9a0ec7e59e1393ab059aedeb097b045c2b5a9bd9ee717ecd67bf5702d64736f6c634300081700330000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a000000000000000000000000be7c7efc1ef3245d37e3157f76a512108d6d7ae6
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610060575f3560e01c80633f85cea9146100ff5780635aa6e6751461013657806367144d51146101605780638b9d294014610188578063d38bfff4146101af578063e1bb5133146101c2575b6100686101d5565b5f807f0000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a6001600160a01b03165f366040516100a49291906109d3565b5f604051808303815f865af19150503d805f81146100dd576040519150601f19603f3d011682016040523d82523d5f602084013e6100e2565b606091505b509150915081156100f557805160208201f35b805160208201fd5b005b61012161010d3660046109f9565b60016020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b5f54610148906001600160a01b031681565b6040516001600160a01b03909116815260200161012d565b61017361016e3660046109f9565b610223565b6040805192835260208301919091520161012d565b6101487f0000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a81565b6100fd6101bd3660046109f9565b61082f565b6100fd6101d0366004610a1b565b6108cb565b5f546001600160a01b031633146102215760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b60448201526064015b60405180910390fd5b565b335f90815260016020526040812054819060ff168061024b57505f546001600160a01b031633145b6102855760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b6044820152606401610218565b5f836001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102e69190610a56565b90505f846001600160a01b0316639aa7df946040518163ffffffff1660e01b8152600401602060405180830381865afa158015610325573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103499190610a56565b90505f856001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610388573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ac9190610a56565b90505f866001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040f9190610a6d565b6040516370a0823160e01b81526001600160a01b0389811660048301529192505f918316906370a0823190602401602060405180830381865afa158015610458573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061047c9190610a56565b90505f6104898583610a9c565b90505f81116104c45760405162461bcd60e51b815260206004820152600760248201526637379033b0b4b760c91b6044820152606401610218565b604051632e76701d60e11b81526001600160a01b038a81166004830181905260248301527f0000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a1690635cece03a906044015f604051808303815f87803b15801561052b575f80fd5b505af115801561053d573d5f803e3d5ffd5b5050604051631bb0ae3560e21b81526001600160a01b038c16600482018190529250636ec2b8d4915060240160408051808303815f875af1158015610584573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a89190610ab5565b90985096508088146105ec5760405162461bcd60e51b815260206004820152600d60248201526c0cec2d2dc40dad2e6dac2e8c6d609b1b6044820152606401610218565b83896001600160a01b03166399530b066040518163ffffffff1660e01b8152600401602060405180830381865afa158015610629573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064d9190610a56565b146106885760405162461bcd60e51b815260206004820152600b60248201526a141414c818da185b99d95960aa1b6044820152606401610218565b6106928186610ad7565b896001600160a01b0316639aa7df946040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f29190610a56565b146107375760405162461bcd60e51b815260206004820152601560248201527412591b19481d5c19185d19481a5b98dbdc9c9958dd605a1b6044820152606401610218565b6107418187610ad7565b896001600160a01b03166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa15801561077d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a19190610a56565b146107e65760405162461bcd60e51b81526020600482015260156024820152740a8dee8c2d840c2e6e6cae8e640dad2e6dac2e8c6d605b1b6044820152606401610218565b86156108245760405162461bcd60e51b815260206004820152600d60248201526c06c6f7373206973206e6f74203609c1b6044820152606401610218565b505050505050915091565b6108376101d5565b6001600160a01b03811661087c5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f204144445245535360a01b6044820152606401610218565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce809190a35050565b6108d36101d5565b6001600160a01b0382166109185760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610218565b6001600160a01b0382165f9081526001602052604090205481151560ff9091161515036109755760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b6044820152606401610218565b6001600160a01b0382165f81815260016020908152604091829020805460ff191685151590811790915591519182527f49414e0a37c19781141fced7b2dc68c560d888c72174623b7bba993149d9064d910160405180910390a25050565b818382375f9101908152919050565b6001600160a01b03811681146109f6575f80fd5b50565b5f60208284031215610a09575f80fd5b8135610a14816109e2565b9392505050565b5f8060408385031215610a2c575f80fd5b8235610a37816109e2565b915060208301358015158114610a4b575f80fd5b809150509250929050565b5f60208284031215610a66575f80fd5b5051919050565b5f60208284031215610a7d575f80fd5b8151610a14816109e2565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610aaf57610aaf610a88565b92915050565b5f8060408385031215610ac6575f80fd5b505080516020909101519092909150565b80820180821115610aaf57610aaf610a8856fea2646970667358221220cc6536a9a0ec7e59e1393ab059aedeb097b045c2b5a9bd9ee717ecd67bf5702d64736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a000000000000000000000000be7c7efc1ef3245d37e3157f76a512108d6d7ae6
-----Decoded View---------------
Arg [0] : _accountant (address): 0x1f399808fE52d0E960CAB84b6b54d5707ab27c8a
Arg [1] : _governance (address): 0xBe7c7efc1ef3245d37E3157F76A512108D6D7aE6
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f399808fe52d0e960cab84b6b54d5707ab27c8a
Arg [1] : 000000000000000000000000be7c7efc1ef3245d37e3157f76a512108d6d7ae6
Loading...
Loading
Loading...
Loading

Loading...
Loading
Loading...
Loading
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.