Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
anS
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 100 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title anS Token Contract * @dev ERC20 compatible contract for anS * @dev Implements an elastic supply * @author Angles */ import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; import { Initializable } from "./utils/Initializable.sol"; import { InitializableERC20Detailed } from "./utils/InitializableERC20Detailed.sol"; import { StableMath } from "./utils/StableMath.sol"; import { Governable } from "./governance/Governable.sol"; /** * NOTE that this is an ERC20 token but the invariant that the sum of * balanceOf(x) for all x is not >= totalSupply(). This is a consequence of the * rebasing design. Any integrations with anS should be aware. */ contract anS is Initializable, InitializableERC20Detailed, Governable { using SafeMath for uint256; using StableMath for uint256; event TotalSupplyUpdatedHighres( uint256 totalSupply, uint256 rebasingCredits, uint256 rebasingCreditsPerToken ); event AccountRebasingEnabled(address account); event AccountRebasingDisabled(address account); enum RebaseOptions { NotSet, OptOut, OptIn } uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1 uint256 public _totalSupply; mapping(address => mapping(address => uint256)) private _allowances; address public vaultAddress = address(0); mapping(address => uint256) private _creditBalances; uint256 private _rebasingCredits; uint256 private _rebasingCreditsPerToken; // Frozen address/credits are non rebasing (value is held in contracts which // do not receive yield unless they explicitly opt in) uint256 public nonRebasingSupply; mapping(address => uint256) public nonRebasingCreditsPerToken; mapping(address => RebaseOptions) public rebaseState; mapping(address => uint256) public isUpgraded; uint256 private constant RESOLUTION_INCREASE = 1e9; event creditBalanceUpdate(address account, uint256 totalCredits, uint256 nonRebasingCredits); function initialize( string calldata _nameArg, string calldata _symbolArg, address _vaultAddress, uint256 _initialCreditsPerToken ) external onlyGovernor initializer { InitializableERC20Detailed._initialize(_nameArg, _symbolArg, 18); _rebasingCreditsPerToken = _initialCreditsPerToken; vaultAddress = _vaultAddress; } /** * @dev Verifies that the caller is the Vault contract */ modifier onlyVault() { require(vaultAddress == msg.sender, "Caller is not the Vault"); _; } /** * @dev Only for dev purposes */ function changeVault(address _newVault) public onlyGovernor { vaultAddress = _newVault; } /** * @return The total supply of anS. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @return Low resolution rebasingCreditsPerToken */ function rebasingCreditsPerToken() public view returns (uint256) { return _rebasingCreditsPerToken / RESOLUTION_INCREASE; } /** * @return Low resolution total number of rebasing credits */ function rebasingCredits() public view returns (uint256) { return _rebasingCredits / RESOLUTION_INCREASE; } /** * @return High resolution rebasingCreditsPerToken */ function rebasingCreditsPerTokenHighres() public view returns (uint256) { return _rebasingCreditsPerToken; } /** * @return High resolution total number of rebasing credits */ function rebasingCreditsHighres() public view returns (uint256) { return _rebasingCredits; } /** * @dev Gets the balance of the specified address. * @param _account Address to query the balance of. * @return A uint256 representing the amount of base units owned by the * specified address. */ function balanceOf(address _account) public view override returns (uint256) { if (_creditBalances[_account] == 0) return 0; return _creditBalances[_account].divPrecisely(_creditsPerToken(_account)); } /** * @dev Gets the credits balance of the specified address. * @dev Backwards compatible with old low res credits per token. * @param _account The address to query the balance of. * @return (uint256, uint256) Credit balance and credits per token of the * address */ function creditsBalanceOf(address _account) public view returns (uint256, uint256) { uint256 cpt = _creditsPerToken(_account); if (cpt == 1e27) { // For a period before the resolution upgrade, we created all new // contract accounts at high resolution. Since they are not changing // as a result of this upgrade, we will return their true values return (_creditBalances[_account], cpt); } else { return ( _creditBalances[_account] / RESOLUTION_INCREASE, cpt / RESOLUTION_INCREASE ); } } /** * @dev Gets the credits balance of the specified address. * @param _account The address to query the balance of. * @return (uint256, uint256, bool) Credit balance, credits per token of the * address, and isUpgraded */ function creditsBalanceOfHighres(address _account) public view returns ( uint256, uint256, bool ) { return ( _creditBalances[_account], _creditsPerToken(_account), isUpgraded[_account] == 1 ); } /** * @dev Transfer tokens to a specified address. * @param _to the address to transfer to. * @param _value the amount to be transferred. * @return true on success. */ function transfer(address _to, uint256 _value) public override returns (bool) { require(_to != address(0), "Transfer to zero address"); require( _value <= balanceOf(msg.sender), "Transfer greater than balance" ); _executeTransfer(msg.sender, _to, _value); emit creditBalanceUpdate(msg.sender, _creditBalances[msg.sender], nonRebasingCreditsPerToken[msg.sender]); emit creditBalanceUpdate(_to, _creditBalances[_to], nonRebasingCreditsPerToken[_to]); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another. * @param _from The address you want to send tokens from. * @param _to The address you want to transfer to. * @param _value The amount of tokens to be transferred. */ function transferFrom( address _from, address _to, uint256 _value ) public override returns (bool) { require(_to != address(0), "Transfer to zero address"); require(_value <= balanceOf(_from), "Transfer greater than balance"); _allowances[_from][msg.sender] = _allowances[_from][msg.sender].sub( _value ); _executeTransfer(_from, _to, _value); emit creditBalanceUpdate(_from, _creditBalances[_from], nonRebasingCreditsPerToken[_from]); emit creditBalanceUpdate(_to, _creditBalances[_to], nonRebasingCreditsPerToken[_to]); emit Transfer(_from, _to, _value); return true; } /** * @dev Update the count of non rebasing credits in response to a transfer * @param _from The address you want to send tokens from. * @param _to The address you want to transfer to. * @param _value Amount of anS to transfer */ function _executeTransfer( address _from, address _to, uint256 _value ) internal { bool isNonRebasingTo = _isNonRebasingAccount(_to); bool isNonRebasingFrom = _isNonRebasingAccount(_from); // Credits deducted and credited might be different due to the // differing creditsPerToken used by each account uint256 creditsCredited = _value.mulTruncate(_creditsPerToken(_to)); uint256 creditsDeducted = _value.mulTruncate(_creditsPerToken(_from)); _creditBalances[_from] = _creditBalances[_from].sub( creditsDeducted, "Transfer amount exceeds balance" ); _creditBalances[_to] = _creditBalances[_to].add(creditsCredited); if (isNonRebasingTo && !isNonRebasingFrom) { // Transfer to non-rebasing account from rebasing account, credits // are removed from the non rebasing tally nonRebasingSupply = nonRebasingSupply.add(_value); // Update rebasingCredits by subtracting the deducted amount _rebasingCredits = _rebasingCredits.sub(creditsDeducted); } else if (!isNonRebasingTo && isNonRebasingFrom) { // Transfer to rebasing account from non-rebasing account // Decreasing non-rebasing credits by the amount that was sent nonRebasingSupply = nonRebasingSupply.sub(_value); // Update rebasingCredits by adding the credited amount _rebasingCredits = _rebasingCredits.add(creditsCredited); } } /** * @dev Function to check the amount of tokens that _owner has allowed to * `_spender`. * @param _owner The address which owns the funds. * @param _spender The address which will spend the funds. * @return The number of tokens still available for the _spender. */ function allowance(address _owner, address _spender) public view override returns (uint256) { return _allowances[_owner][_spender]; } /** * @dev Approve the passed address to spend the specified amount of tokens * on behalf of msg.sender. This method is included for ERC20 * compatibility. `increaseAllowance` and `decreaseAllowance` should be * used instead. * * Changing an allowance with this method brings the risk that someone * may transfer both the old and the new allowance - if they are both * greater than zero - if a transfer transaction is mined before the * later approve() call is mined. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool) { _allowances[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to * `_spender`. * This method should be used instead of approve() to avoid the double * approval vulnerability described above. * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address _spender, uint256 _addedValue) public returns (bool) { _allowances[msg.sender][_spender] = _allowances[msg.sender][_spender] .add(_addedValue); emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to `_spender`. * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance * by. */ function decreaseAllowance(address _spender, uint256 _subtractedValue) public returns (bool) { uint256 oldValue = _allowances[msg.sender][_spender]; if (_subtractedValue >= oldValue) { _allowances[msg.sender][_spender] = 0; } else { _allowances[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]); return true; } /** * @dev Mints new tokens, increasing totalSupply. */ function mint(address _account, uint256 _amount) external onlyVault { _mint(_account, _amount); } /** * @dev Creates `_amount` tokens and assigns them to `_account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address _account, uint256 _amount) internal nonReentrant { require(_account != address(0), "Mint to the zero address"); bool isNonRebasingAccount = _isNonRebasingAccount(_account); uint256 creditAmount = _amount.mulTruncate(_creditsPerToken(_account)); _creditBalances[_account] = _creditBalances[_account].add(creditAmount); // If the account is non rebasing and doesn't have a set creditsPerToken // then set it i.e. this is a mint from a fresh contract if (isNonRebasingAccount) { nonRebasingSupply = nonRebasingSupply.add(_amount); } else { _rebasingCredits = _rebasingCredits.add(creditAmount); } _totalSupply = _totalSupply.add(_amount); require(_totalSupply < MAX_SUPPLY, "Max supply"); emit creditBalanceUpdate(_account, _creditBalances[_account], nonRebasingCreditsPerToken[_account]); emit Transfer(address(0), _account, _amount); } /** * @dev Burns tokens, decreasing totalSupply. */ function burn(address account, uint256 amount) external onlyVault { _burn(account, amount); } /** * @dev Destroys `_amount` tokens from `_account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `_account` cannot be the zero address. * - `_account` must have at least `_amount` tokens. */ function _burn(address _account, uint256 _amount) internal nonReentrant { require(_account != address(0), "Burn from the zero address"); if (_amount == 0) { return; } bool isNonRebasingAccount = _isNonRebasingAccount(_account); uint256 creditAmount = _amount.mulTruncate(_creditsPerToken(_account)); uint256 currentCredits = _creditBalances[_account]; // Remove the credits, burning rounding errors if ( currentCredits == creditAmount || currentCredits - 1 == creditAmount ) { // Handle dust from rounding _creditBalances[_account] = 0; } else if (currentCredits > creditAmount) { _creditBalances[_account] = _creditBalances[_account].sub( creditAmount ); } else { revert("Remove exceeds balance"); } // Remove from the credit tallies and non-rebasing supply if (isNonRebasingAccount) { nonRebasingSupply = nonRebasingSupply.sub(_amount); } else { _rebasingCredits = _rebasingCredits.sub(creditAmount); } _totalSupply = _totalSupply.sub(_amount); emit creditBalanceUpdate(_account, _creditBalances[_account], nonRebasingCreditsPerToken[_account]); emit Transfer(_account, address(0), _amount); } /** * @dev Get the credits per token for an account. Returns a fixed amount * if the account is non-rebasing. * @param _account Address of the account. */ function _creditsPerToken(address _account) internal view returns (uint256) { if (nonRebasingCreditsPerToken[_account] != 0) { return nonRebasingCreditsPerToken[_account]; } else { return _rebasingCreditsPerToken; } } /** * @dev Is an account using rebasing accounting or non-rebasing accounting? * Also, ensure contracts are non-rebasing if they have not opted in. * @param _account Address of the account. */ function _isNonRebasingAccount(address _account) internal returns (bool) { bool isContract = Address.isContract(_account); if (isContract && rebaseState[_account] == RebaseOptions.NotSet) { _ensureRebasingMigration(_account); } return nonRebasingCreditsPerToken[_account] > 0; } /** * @dev Ensures internal account for rebasing and non-rebasing credits and * supply is updated following deployment of frozen yield change. */ function _ensureRebasingMigration(address _account) internal { if (nonRebasingCreditsPerToken[_account] == 0) { emit AccountRebasingDisabled(_account); if (_creditBalances[_account] == 0) { // Since there is no existing balance, we can directly set to // high resolution, and do not have to do any other bookkeeping nonRebasingCreditsPerToken[_account] = 1e27; } else { // Migrate an existing account: // Set fixed credits per token for this account nonRebasingCreditsPerToken[_account] = _rebasingCreditsPerToken; // Update non rebasing supply nonRebasingSupply = nonRebasingSupply.add(balanceOf(_account)); // Update credit tallies _rebasingCredits = _rebasingCredits.sub( _creditBalances[_account] ); } } } /** * @notice Enable rebasing for an account. * @dev Add a contract address to the non-rebasing exception list. The * address's balance will be part of rebases and the account will be exposed * to upside and downside. * @param _account Address of the account. */ function governanceRebaseOptIn(address _account) public nonReentrant onlyGovernor { _rebaseOptIn(_account); } /** * @dev Add a contract address to the non-rebasing exception list. The * address's balance will be part of rebases and the account will be exposed * to upside and downside. */ function rebaseOptIn() public nonReentrant { _rebaseOptIn(msg.sender); } function _rebaseOptIn(address _account) internal { require(_isNonRebasingAccount(_account), "Account has not opted out"); // Convert balance into the same amount at the current exchange rate uint256 newCreditBalance = _creditBalances[_account] .mul(_rebasingCreditsPerToken) .div(_creditsPerToken(_account)); // Decreasing non rebasing supply nonRebasingSupply = nonRebasingSupply.sub(balanceOf(_account)); _creditBalances[_account] = newCreditBalance; // Increase rebasing credits, totalSupply remains unchanged so no // adjustment necessary _rebasingCredits = _rebasingCredits.add(_creditBalances[_account]); rebaseState[_account] = RebaseOptions.OptIn; // Delete any fixed credits per token delete nonRebasingCreditsPerToken[_account]; emit AccountRebasingEnabled(_account); } /** * @dev Explicitly mark that an address is non-rebasing. */ function rebaseOptOut() public nonReentrant { require(!_isNonRebasingAccount(msg.sender), "Account has not opted in"); // Increase non rebasing supply nonRebasingSupply = nonRebasingSupply.add(balanceOf(msg.sender)); // Set fixed credits per token nonRebasingCreditsPerToken[msg.sender] = _rebasingCreditsPerToken; // Decrease rebasing credits, total supply remains unchanged so no // adjustment necessary _rebasingCredits = _rebasingCredits.sub(_creditBalances[msg.sender]); // Mark explicitly opted out of rebasing rebaseState[msg.sender] = RebaseOptions.OptOut; emit AccountRebasingDisabled(msg.sender); } /** * @dev Modify the supply without minting new tokens. This uses a change in * the exchange rate between "credits" and anS tokens to change balances. * @param _newTotalSupply New total supply of anS. */ function changeSupply(uint256 _newTotalSupply) external onlyVault nonReentrant { require(_totalSupply > 0, "Cannot increase 0 supply"); if (_totalSupply == _newTotalSupply) { emit TotalSupplyUpdatedHighres( _totalSupply, _rebasingCredits, _rebasingCreditsPerToken ); return; } _totalSupply = _newTotalSupply > MAX_SUPPLY ? MAX_SUPPLY : _newTotalSupply; _rebasingCreditsPerToken = _rebasingCredits.divPrecisely( _totalSupply.sub(nonRebasingSupply) ); require(_rebasingCreditsPerToken > 0, "Invalid change in supply"); _totalSupply = _rebasingCredits .divPrecisely(_rebasingCreditsPerToken) .add(nonRebasingSupply); emit TotalSupplyUpdatedHighres( _totalSupply, _rebasingCredits, _rebasingCreditsPerToken ); } }
// 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 (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Base for contracts that are managed by the Origin Protocol's Governor. * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change * from owner to governor and renounce methods removed. Does not use * Context.sol like Ownable.sol does for simplification. * @author Origin Protocol Inc */ contract Governable { // Storage position of the owner and pendingOwner of the contract // keccak256("OUSD.governor"); bytes32 private constant governorPosition = 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a; // keccak256("OUSD.pending.governor"); bytes32 private constant pendingGovernorPosition = 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db; // keccak256("OUSD.reentry.status"); bytes32 private constant reentryStatusPosition = 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535; // See OpenZeppelin ReentrancyGuard implementation uint256 constant _NOT_ENTERED = 1; uint256 constant _ENTERED = 2; event PendingGovernorshipTransfer( address indexed previousGovernor, address indexed newGovernor ); event GovernorshipTransferred( address indexed previousGovernor, address indexed newGovernor ); /** * @dev Initializes the contract setting the deployer as the initial Governor. */ constructor() { _setGovernor(msg.sender); emit GovernorshipTransferred(address(0), _governor()); } /** * @notice Returns the address of the current Governor. */ function governor() public view returns (address) { return _governor(); } /** * @dev Returns the address of the current Governor. */ function _governor() internal view returns (address governorOut) { bytes32 position = governorPosition; // solhint-disable-next-line no-inline-assembly assembly { governorOut := sload(position) } } /** * @dev Returns the address of the pending Governor. */ function _pendingGovernor() internal view returns (address pendingGovernor) { bytes32 position = pendingGovernorPosition; // solhint-disable-next-line no-inline-assembly assembly { pendingGovernor := sload(position) } } /** * @dev Throws if called by any account other than the Governor. */ modifier onlyGovernor() { require(isGovernor(), "Caller is not the Governor"); _; } /** * @notice Returns true if the caller is the current Governor. */ function isGovernor() public view returns (bool) { return msg.sender == _governor(); } function _setGovernor(address newGovernor) internal { bytes32 position = governorPosition; // solhint-disable-next-line no-inline-assembly assembly { sstore(position, newGovernor) } } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { bytes32 position = reentryStatusPosition; uint256 _reentry_status; // solhint-disable-next-line no-inline-assembly assembly { _reentry_status := sload(position) } // On the first call to nonReentrant, _notEntered will be true require(_reentry_status != _ENTERED, "Reentrant call"); // Any calls to nonReentrant after this point will fail // solhint-disable-next-line no-inline-assembly assembly { sstore(position, _ENTERED) } _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) // solhint-disable-next-line no-inline-assembly assembly { sstore(position, _NOT_ENTERED) } } function _setPendingGovernor(address newGovernor) internal { bytes32 position = pendingGovernorPosition; // solhint-disable-next-line no-inline-assembly assembly { sstore(position, newGovernor) } } /** * @notice Transfers Governance of the contract to a new account (`newGovernor`). * Can only be called by the current Governor. Must be claimed for this to complete * @param _newGovernor Address of the new Governor */ function transferGovernance(address _newGovernor) external onlyGovernor { _setPendingGovernor(_newGovernor); emit PendingGovernorshipTransfer(_governor(), _newGovernor); } /** * @notice Claim Governance of the contract to a new account (`newGovernor`). * Can only be called by the new Governor. */ function claimGovernance() external { require( msg.sender == _pendingGovernor(), "Only the pending Governor can complete the claim" ); _changeGovernor(msg.sender); } /** * @dev Change Governance of the contract to a new account (`newGovernor`). * @param _newGovernor Address of the new Governor */ function _changeGovernor(address _newGovernor) internal { require(_newGovernor != address(0), "New Governor is address(0)"); emit GovernorshipTransferred(_governor(), _newGovernor); _setGovernor(_newGovernor); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Base contract any contracts that need to initialize state after deployment. * @author Origin Protocol Inc */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require( initializing || !initialized, "Initializable: contract is already initialized" ); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } uint256[50] private ______gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @dev Optional functions from the ERC20 standard. * Converted from openzeppelin/contracts/token/ERC20/ERC20Detailed.sol * @author Origin Protocol Inc */ abstract contract InitializableERC20Detailed is IERC20 { // Storage gap to skip storage from prior to OUSD reset uint256[100] private _____gap; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. * @notice To avoid variable shadowing appended `Arg` after arguments name. */ function _initialize( string memory nameArg, string memory symbolArg, uint8 decimalsArg ) internal { _name = nameArg; _symbol = symbolArg; _decimals = decimalsArg; } /** * @notice Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @notice Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @notice Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; // Based on StableMath from Stability Labs Pty. Ltd. // https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol library StableMath { using SafeMath for uint256; /** * @dev Scaling unit for use in specific calculations, * where 1 * 10**18, or 1e18 represents a unit '1' */ uint256 private constant FULL_SCALE = 1e18; /*************************************** Helpers ****************************************/ /** * @dev Adjust the scale of an integer * @param to Decimals to scale to * @param from Decimals to scale from */ function scaleBy( uint256 x, uint256 to, uint256 from ) internal pure returns (uint256) { if (to > from) { x = x.mul(10**(to - from)); } else if (to < from) { // slither-disable-next-line divide-before-multiply x = x.div(10**(from - to)); } return x; } /*************************************** Precise Arithmetic ****************************************/ /** * @dev Multiplies two precise units, and then truncates by the full scale * @param x Left hand input to multiplication * @param y Right hand input to multiplication * @return Result after multiplying the two inputs and then dividing by the shared * scale unit */ function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) { return mulTruncateScale(x, y, FULL_SCALE); } /** * @dev Multiplies two precise units, and then truncates by the given scale. For example, * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18 * @param x Left hand input to multiplication * @param y Right hand input to multiplication * @param scale Scale unit * @return Result after multiplying the two inputs and then dividing by the shared * scale unit */ function mulTruncateScale( uint256 x, uint256 y, uint256 scale ) internal pure returns (uint256) { // e.g. assume scale = fullScale // z = 10e18 * 9e17 = 9e36 uint256 z = x.mul(y); // return 9e36 / 1e18 = 9e18 return z.div(scale); } /** * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result * @param x Left hand input to multiplication * @param y Right hand input to multiplication * @return Result after multiplying the two inputs and then dividing by the shared * scale unit, rounded up to the closest base unit. */ function mulTruncateCeil(uint256 x, uint256 y) internal pure returns (uint256) { // e.g. 8e17 * 17268172638 = 138145381104e17 uint256 scaled = x.mul(y); // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17 uint256 ceil = scaled.add(FULL_SCALE.sub(1)); // e.g. 13814538111.399...e18 / 1e18 = 13814538111 return ceil.div(FULL_SCALE); } /** * @dev Precisely divides two units, by first scaling the left hand operand. Useful * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17) * @param x Left hand input to division * @param y Right hand input to division * @return Result after multiplying the left operand by the scale, and * executing the division on the right hand input. */ function divPrecisely(uint256 x, uint256 y) internal pure returns (uint256) { // e.g. 8e18 * 1e18 = 8e36 uint256 z = x.mul(FULL_SCALE); // e.g. 8e36 / 10e18 = 8e17 return z.div(y); } }
{ "optimizer": { "enabled": true, "runs": 100 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"AccountRebasingDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"AccountRebasingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"GovernorshipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"PendingGovernorshipTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rebasingCredits","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rebasingCreditsPerToken","type":"uint256"}],"name":"TotalSupplyUpdatedHighres","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalCredits","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonRebasingCredits","type":"uint256"}],"name":"creditBalanceUpdate","type":"event"},{"inputs":[],"name":"_totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTotalSupply","type":"uint256"}],"name":"changeSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newVault","type":"address"}],"name":"changeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"creditsBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"creditsBalanceOfHighres","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"governanceRebaseOptIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_nameArg","type":"string"},{"internalType":"string","name":"_symbolArg","type":"string"},{"internalType":"address","name":"_vaultAddress","type":"address"},{"internalType":"uint256","name":"_initialCreditsPerToken","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isGovernor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUpgraded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonRebasingCreditsPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonRebasingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebaseOptIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rebaseOptOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rebaseState","outputs":[{"internalType":"enum anS.RebaseOptions","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebasingCredits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebasingCreditsHighres","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebasingCreditsPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebasingCreditsPerTokenHighres","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernor","type":"address"}],"name":"transferGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052609c80546001600160a01b0319169055348015601f57600080fd5b5060353360008051602061234883398151915255565b600080516020612348833981519152546040516001600160a01b03909116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a36122bd8061008b6000396000f3fe608060405234801561001057600080fd5b50600436106101d15760003560e01c806370a0823111610105578063c2376dff1161009d578063c2376dff146103d3578063c7af3352146103db578063d38bfff4146103e3578063dd62ed3e146103f6578063e5c4fffe1461042f578063e696393a1461045f578063f51b0fd414610468578063f542033f14610470578063f9854bfc1461048357600080fd5b806370a082311461033c5780637a46a9c51461034f5780637d0d66ff1461035757806395d89b411461035f57806395ef84b9146103675780639dc29fac14610387578063a457c2d71461039a578063a9059cbb146103ad578063baa9c9db146103c057600080fd5b806339a7919f1161017857806339a7919f146102855780633eaaf86b1461029a57806340c10f19146102a3578063430bf08a146102b6578063456ee286146102c95780635d36b190146102f9578063609350cd1461030157806360e232a9146103215780636691cb3d1461033457600080fd5b806306fdde03146101d6578063077f22b7146101f4578063095ea7b31461020a5780630c340a241461022d57806318160ddd1461024257806323b872dd1461024a578063313ce5671461025d5780633950935114610272575b600080fd5b6101de6104ab565b6040516101eb9190611cbc565b60405180910390f35b6101fc61053d565b6040519081526020016101eb565b61021d610218366004611d21565b610556565b60405190151581526020016101eb565b6102356105b1565b6040516101eb9190611d4b565b609a546101fc565b61021d610258366004611d5f565b6105bb565b60995460405160ff90911681526020016101eb565b61021d610280366004611d21565b610752565b610298610293366004611d9c565b6107c5565b005b6101fc609a5481565b6102986102b1366004611d21565b6109c3565b609c54610235906001600160a01b031681565b6102ec6102d7366004611db5565b60a26020526000908152604090205460ff1681565b6040516101eb9190611de6565b6102986109fb565b6101fc61030f366004611db5565b60a16020526000908152604090205481565b61029861032f366004611db5565b610aa1565b6101fc610ae7565b6101fc61034a366004611db5565b610afb565b609f546101fc565b609e546101fc565b6101de610b4d565b6101fc610375366004611db5565b60a36020526000908152604090205481565b610298610395366004611d21565b610b5c565b61021d6103a8366004611d21565b610b90565b61021d6103bb366004611d21565b610c65565b6102986103ce366004611db5565b610d7c565b610298610ddf565b61021d610f03565b6102986103f1366004611db5565b610f26565b6101fc610404366004611e0e565b6001600160a01b039182166000908152609b6020908152604080832093909416825291909152205490565b61044261043d366004611db5565b610fbc565b6040805193845260208401929092521515908201526060016101eb565b6101fc60a05481565b61029861100b565b61029861047e366004611e8a565b611051565b610496610491366004611db5565b6111c4565b604080519283526020830191909152016101eb565b6060609780546104ba90611f1a565b80601f01602080910402602001604051908101604052809291908181526020018280546104e690611f1a565b80156105335780601f1061050857610100808354040283529160200191610533565b820191906000526020600020905b81548152906001019060200180831161051657829003601f168201915b5050505050905090565b6000633b9aca00609e546105519190611f6a565b905090565b336000818152609b602090815260408083206001600160a01b038716808552925280832085905551919290916000805160206122688339815191529061059f9086815260200190565b60405180910390a35060015b92915050565b6000610551611247565b60006001600160a01b0383166105ec5760405162461bcd60e51b81526004016105e390611f8c565b60405180910390fd5b6105f584610afb565b8211156106145760405162461bcd60e51b81526004016105e390611fbe565b6001600160a01b0384166000908152609b60209081526040808320338452909152902054610642908361126c565b6001600160a01b0385166000908152609b6020908152604080832033845290915290205561067184848461127f565b6001600160a01b0384166000908152609d602090815260408083205460a190925291829020549151600080516020612208833981519152926106b7928892909190611ff5565b60405180910390a16001600160a01b0383166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292610705928792909190611ff5565b60405180910390a1826001600160a01b0316846001600160a01b03166000805160206122488339815191528460405161074091815260200190565b60405180910390a35060019392505050565b336000908152609b602090815260408083206001600160a01b038616845290915281205461078090836113ec565b336000818152609b602090815260408083206001600160a01b03891680855290835292819020859055519384529092600080516020612268833981519152910161059f565b609c546001600160a01b031633146107ef5760405162461bcd60e51b81526004016105e390612016565b600080516020612228833981519152805460011981016108215760405162461bcd60e51b81526004016105e390612047565b600282556000609a54116108725760405162461bcd60e51b815260206004820152601860248201527743616e6e6f7420696e637265617365203020737570706c7960401b60448201526064016105e3565b82609a54036108c757609a54609e54609f5460408051938452602084019290925282820152517f41645eb819d3011b13f97696a8109d14bfcddfaca7d063ec0564d62a3e2572359181900360600190a16109bb565b6001600160801b0383116108db57826108e4565b6001600160801b035b609a81905560a054610902916108f99161126c565b609e54906113f8565b609f81905561094e5760405162461bcd60e51b8152602060048201526018602482015277496e76616c6964206368616e676520696e20737570706c7960401b60448201526064016105e3565b61097160a05461096b609f54609e546113f890919063ffffffff16565b906113ec565b609a819055609e54609f5460408051938452602084019290925282820152517f41645eb819d3011b13f97696a8109d14bfcddfaca7d063ec0564d62a3e2572359181900360600190a15b506001905550565b609c546001600160a01b031633146109ed5760405162461bcd60e51b81526004016105e390612016565b6109f78282611421565b5050565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b031614610a965760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016105e3565b610a9f3361160b565b565b610aa9610f03565b610ac55760405162461bcd60e51b81526004016105e39061206f565b609c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000633b9aca00609f546105519190611f6a565b6001600160a01b0381166000908152609d60205260408120548103610b2257506000919050565b6105ab610b2e836116d3565b6001600160a01b0384166000908152609d6020526040902054906113f8565b6060609880546104ba90611f1a565b609c546001600160a01b03163314610b865760405162461bcd60e51b81526004016105e390612016565b6109f7828261171a565b336000908152609b602090815260408083206001600160a01b0386168452909152812054808310610be457336000908152609b602090815260408083206001600160a01b0388168452909152812055610c13565b610bee818461126c565b336000908152609b602090815260408083206001600160a01b03891684529091529020555b336000818152609b602090815260408083206001600160a01b03891680855290835292819020549051908152919291600080516020612268833981519152910160405180910390a35060019392505050565b60006001600160a01b038316610c8d5760405162461bcd60e51b81526004016105e390611f8c565b610c9633610afb565b821115610cb55760405162461bcd60e51b81526004016105e390611fbe565b610cc033848461127f565b336000818152609d602090815260408083205460a19092529182902054915160008051602061220883398151915293610cfb93909291611ff5565b60405180910390a16001600160a01b0383166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292610d49928792909190611ff5565b60405180910390a16040518281526001600160a01b0384169033906000805160206122488339815191529060200161059f565b60008051602061222883398151915280546001198101610dae5760405162461bcd60e51b81526004016105e390612047565b60028255610dba610f03565b610dd65760405162461bcd60e51b81526004016105e39061206f565b6109bb8361196d565b60008051602061222883398151915280546001198101610e115760405162461bcd60e51b81526004016105e390612047565b60028255610e1e33611aa8565b15610e665760405162461bcd60e51b815260206004820152601860248201527720b1b1b7bab73a103430b9903737ba1037b83a32b21034b760411b60448201526064016105e3565b610e7b610e7233610afb565b60a054906113ec565b60a055609f5433600090815260a16020908152604080832093909355609d90522054609e54610ea99161126c565b609e5533600081815260a2602052604090819020805460ff19166001179055517f201ace89ad3f5ab7428b91989f6a50d1998791c7b94a0fa812fd64a57687165e91610ef491611d4b565b60405180910390a15060019055565b6000610f0d611247565b6001600160a01b0316336001600160a01b031614905090565b610f2e610f03565b610f4a5760405162461bcd60e51b81526004016105e39061206f565b610f72817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b0316610f84611247565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b0381166000908152609d602052604081205481908190610fe2856116d3565b6001600160a01b0395909516600090815260a36020526040902054909560019091149350915050565b6000805160206122288339815191528054600119810161103d5760405162461bcd60e51b81526004016105e390612047565b6002825561104a3361196d565b5060019055565b611059610f03565b6110755760405162461bcd60e51b81526004016105e39061206f565b600054610100900460ff168061108e575060005460ff16155b6110f15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e3565b600054610100900460ff16158015611113576000805461ffff19166101011790555b61118987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525060129250611b1c915050565b609f829055609c80546001600160a01b0319166001600160a01b03851617905580156111bb576000805461ff00191690555b50505050505050565b60008060006111d2846116d3565b9050806b033b2e3c9fd0803ce800000003611207576001600160a01b039093166000908152609d602052604090205493915050565b6001600160a01b0384166000908152609d602052604090205461122f90633b9aca0090611f6a565b61123d633b9aca0083611f6a565b9250925050915091565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a5490565b600061127882846120a6565b9392505050565b600061128a83611aa8565b9050600061129785611aa8565b905060006112ae6112a7866116d3565b8590611b4e565b905060006112c56112be886116d3565b8690611b4e565b9050611336816040518060400160405280601f81526020017f5472616e7366657220616d6f756e7420657863656564732062616c616e636500815250609d60008b6001600160a01b03166001600160a01b0316815260200190815260200160002054611b639092919063ffffffff16565b6001600160a01b038089166000908152609d6020526040808220939093559088168152205461136590836113ec565b6001600160a01b0387166000908152609d6020526040902055838015611389575082155b156113b35760a05461139b90866113ec565b60a055609e546113ab908261126c565b609e556111bb565b831580156113be5750825b156111bb5760a0546113d0908661126c565b60a055609e546113e090836113ec565b609e5550505050505050565b600061127882846120b9565b60008061140d84670de0b6b3a7640000611b8f565b90506114198184611b9b565b949350505050565b600080516020612228833981519152805460011981016114535760405162461bcd60e51b81526004016105e390612047565b600282556001600160a01b0384166114a85760405162461bcd60e51b81526020600482015260186024820152774d696e7420746f20746865207a65726f206164647265737360401b60448201526064016105e3565b60006114b385611aa8565b905060006114c36112be876116d3565b6001600160a01b0387166000908152609d60205260409020549091506114e990826113ec565b6001600160a01b0387166000908152609d6020526040902055811561151d5760a05461151590866113ec565b60a05561152e565b609e5461152a90826113ec565b609e555b609a5461153b90866113ec565b609a8190556001600160801b03116115825760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b60448201526064016105e3565b6001600160a01b0386166000908152609d602090815260408083205460a190925291829020549151600080516020612208833981519152926115c8928a92909190611ff5565b60405180910390a16040518581526001600160a01b038716906000906000805160206122488339815191529060200160405180910390a350506001825550505050565b6001600160a01b0381166116615760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016105e3565b806001600160a01b0316611673611247565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a36116d0817f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a55565b50565b6001600160a01b038116600090815260a160205260408120541561170d57506001600160a01b0316600090815260a1602052604090205490565b5050609f5490565b919050565b6000805160206122288339815191528054600119810161174c5760405162461bcd60e51b81526004016105e390612047565b600282556001600160a01b0384166117a65760405162461bcd60e51b815260206004820152601a60248201527f4275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016105e3565b82156119645760006117b785611aa8565b905060006117c76112be876116d3565b6001600160a01b0387166000908152609d6020526040902054909150808214806117fa5750816117f86001836120a6565b145b1561181d576001600160a01b0387166000908152609d60205260408120556118a7565b81811115611866576001600160a01b0387166000908152609d6020526040902054611848908361126c565b6001600160a01b0388166000908152609d60205260409020556118a7565b60405162461bcd60e51b815260206004820152601660248201527552656d6f766520657863656564732062616c616e636560501b60448201526064016105e3565b82156118c25760a0546118ba908761126c565b60a0556118d3565b609e546118cf908361126c565b609e555b609a546118e0908761126c565b609a556001600160a01b0387166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292611929928b92909190611ff5565b60405180910390a16040518681526000906001600160a01b038916906000805160206122488339815191529060200160405180910390a35050505b50600190555050565b61197681611aa8565b6119be5760405162461bcd60e51b81526020600482015260196024820152781058d8dbdd5b9d081a185cc81b9bdd081bdc1d1959081bdd5d603a1b60448201526064016105e3565b60006119f76119cc836116d3565b609f546001600160a01b0385166000908152609d60205260409020546119f191611b8f565b90611b9b565b9050611a0e611a0583610afb565b60a0549061126c565b60a0556001600160a01b0382166000908152609d60205260409020819055609e54611a3990826113ec565b609e556001600160a01b038216600090815260a260209081526040808320805460ff1916600217905560a190915280822091909155517f19a249fa2050bac8314ac10e3ad420bd9825574bf750f58810c3c7adfc7b1c6f90611a9c908490611d4b565b60405180910390a15050565b60006001600160a01b0382163b158015908190611aef57506001600160a01b038316600090815260a2602052604081205460ff166002811115611aed57611aed611dd0565b145b15611afd57611afd83611ba7565b50506001600160a01b0316600090815260a16020526040902054151590565b6097611b288482612131565b506098611b358382612131565b506099805460ff191660ff929092169190911790555050565b60006112788383670de0b6b3a7640000611c9a565b60008184841115611b875760405162461bcd60e51b81526004016105e39190611cbc565b505050900390565b600061127882846121f0565b60006112788284611f6a565b6001600160a01b038116600090815260a1602052604081205490036116d0577f201ace89ad3f5ab7428b91989f6a50d1998791c7b94a0fa812fd64a57687165e81604051611bf59190611d4b565b60405180910390a16001600160a01b0381166000908152609d60205260408120549003611c44576001600160a01b0316600090815260a1602052604090206b033b2e3c9fd0803ce80000009055565b609f546001600160a01b038216600090815260a16020526040902055611c6c610e7282610afb565b60a0556001600160a01b0381166000908152609d6020526040902054609e54611c949161126c565b609e5550565b600080611ca78585611b8f565b9050611cb38184611b9b565b95945050505050565b602081526000825180602084015260005b81811015611cea5760208186018101516040868401015201611ccd565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461171557600080fd5b60008060408385031215611d3457600080fd5b611d3d83611d0a565b946020939093013593505050565b6001600160a01b0391909116815260200190565b600080600060608486031215611d7457600080fd5b611d7d84611d0a565b9250611d8b60208501611d0a565b929592945050506040919091013590565b600060208284031215611dae57600080fd5b5035919050565b600060208284031215611dc757600080fd5b61127882611d0a565b634e487b7160e01b600052602160045260246000fd5b6020810160038310611e0857634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611e2157600080fd5b611e2a83611d0a565b9150611e3860208401611d0a565b90509250929050565b60008083601f840112611e5357600080fd5b50813567ffffffffffffffff811115611e6b57600080fd5b602083019150836020828501011115611e8357600080fd5b9250929050565b60008060008060008060808789031215611ea357600080fd5b863567ffffffffffffffff811115611eba57600080fd5b611ec689828a01611e41565b909750955050602087013567ffffffffffffffff811115611ee657600080fd5b611ef289828a01611e41565b9095509350611f05905060408801611d0a565b95989497509295919493606090920135925050565b600181811c90821680611f2e57607f821691505b602082108103611f4e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082611f8757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601890820152775472616e7366657220746f207a65726f206164647265737360401b604082015260600190565b6020808252601d908201527f5472616e736665722067726561746572207468616e2062616c616e6365000000604082015260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b60208082526017908201527610d85b1b195c881a5cc81b9bdd081d1a194815985d5b1d604a1b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b818103818111156105ab576105ab611f54565b808201808211156105ab576105ab611f54565b634e487b7160e01b600052604160045260246000fd5b601f82111561212c57806000526020600020601f840160051c810160208510156121095750805b601f840160051c820191505b818110156121295760008155600101612115565b50505b505050565b815167ffffffffffffffff81111561214b5761214b6120cc565b61215f816121598454611f1a565b846120e2565b6020601f821160018114612193576000831561217b5750848201515b600019600385901b1c1916600184901b178455612129565b600084815260208120601f198516915b828110156121c357878501518255602094850194600190920191016121a3565b50848210156121e15786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b80820281158282048414176105ab576105ab611f5456fe9f40d0ae2b10a75d189297ef5199ed9e175c6fbae06c171584d6bc77c9a1072c53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212202254e73ca58a6e4b3836748e30aa643f8e73c1a8c051fabaccf78f71ae8031dc64736f6c634300081c00337bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101d15760003560e01c806370a0823111610105578063c2376dff1161009d578063c2376dff146103d3578063c7af3352146103db578063d38bfff4146103e3578063dd62ed3e146103f6578063e5c4fffe1461042f578063e696393a1461045f578063f51b0fd414610468578063f542033f14610470578063f9854bfc1461048357600080fd5b806370a082311461033c5780637a46a9c51461034f5780637d0d66ff1461035757806395d89b411461035f57806395ef84b9146103675780639dc29fac14610387578063a457c2d71461039a578063a9059cbb146103ad578063baa9c9db146103c057600080fd5b806339a7919f1161017857806339a7919f146102855780633eaaf86b1461029a57806340c10f19146102a3578063430bf08a146102b6578063456ee286146102c95780635d36b190146102f9578063609350cd1461030157806360e232a9146103215780636691cb3d1461033457600080fd5b806306fdde03146101d6578063077f22b7146101f4578063095ea7b31461020a5780630c340a241461022d57806318160ddd1461024257806323b872dd1461024a578063313ce5671461025d5780633950935114610272575b600080fd5b6101de6104ab565b6040516101eb9190611cbc565b60405180910390f35b6101fc61053d565b6040519081526020016101eb565b61021d610218366004611d21565b610556565b60405190151581526020016101eb565b6102356105b1565b6040516101eb9190611d4b565b609a546101fc565b61021d610258366004611d5f565b6105bb565b60995460405160ff90911681526020016101eb565b61021d610280366004611d21565b610752565b610298610293366004611d9c565b6107c5565b005b6101fc609a5481565b6102986102b1366004611d21565b6109c3565b609c54610235906001600160a01b031681565b6102ec6102d7366004611db5565b60a26020526000908152604090205460ff1681565b6040516101eb9190611de6565b6102986109fb565b6101fc61030f366004611db5565b60a16020526000908152604090205481565b61029861032f366004611db5565b610aa1565b6101fc610ae7565b6101fc61034a366004611db5565b610afb565b609f546101fc565b609e546101fc565b6101de610b4d565b6101fc610375366004611db5565b60a36020526000908152604090205481565b610298610395366004611d21565b610b5c565b61021d6103a8366004611d21565b610b90565b61021d6103bb366004611d21565b610c65565b6102986103ce366004611db5565b610d7c565b610298610ddf565b61021d610f03565b6102986103f1366004611db5565b610f26565b6101fc610404366004611e0e565b6001600160a01b039182166000908152609b6020908152604080832093909416825291909152205490565b61044261043d366004611db5565b610fbc565b6040805193845260208401929092521515908201526060016101eb565b6101fc60a05481565b61029861100b565b61029861047e366004611e8a565b611051565b610496610491366004611db5565b6111c4565b604080519283526020830191909152016101eb565b6060609780546104ba90611f1a565b80601f01602080910402602001604051908101604052809291908181526020018280546104e690611f1a565b80156105335780601f1061050857610100808354040283529160200191610533565b820191906000526020600020905b81548152906001019060200180831161051657829003601f168201915b5050505050905090565b6000633b9aca00609e546105519190611f6a565b905090565b336000818152609b602090815260408083206001600160a01b038716808552925280832085905551919290916000805160206122688339815191529061059f9086815260200190565b60405180910390a35060015b92915050565b6000610551611247565b60006001600160a01b0383166105ec5760405162461bcd60e51b81526004016105e390611f8c565b60405180910390fd5b6105f584610afb565b8211156106145760405162461bcd60e51b81526004016105e390611fbe565b6001600160a01b0384166000908152609b60209081526040808320338452909152902054610642908361126c565b6001600160a01b0385166000908152609b6020908152604080832033845290915290205561067184848461127f565b6001600160a01b0384166000908152609d602090815260408083205460a190925291829020549151600080516020612208833981519152926106b7928892909190611ff5565b60405180910390a16001600160a01b0383166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292610705928792909190611ff5565b60405180910390a1826001600160a01b0316846001600160a01b03166000805160206122488339815191528460405161074091815260200190565b60405180910390a35060019392505050565b336000908152609b602090815260408083206001600160a01b038616845290915281205461078090836113ec565b336000818152609b602090815260408083206001600160a01b03891680855290835292819020859055519384529092600080516020612268833981519152910161059f565b609c546001600160a01b031633146107ef5760405162461bcd60e51b81526004016105e390612016565b600080516020612228833981519152805460011981016108215760405162461bcd60e51b81526004016105e390612047565b600282556000609a54116108725760405162461bcd60e51b815260206004820152601860248201527743616e6e6f7420696e637265617365203020737570706c7960401b60448201526064016105e3565b82609a54036108c757609a54609e54609f5460408051938452602084019290925282820152517f41645eb819d3011b13f97696a8109d14bfcddfaca7d063ec0564d62a3e2572359181900360600190a16109bb565b6001600160801b0383116108db57826108e4565b6001600160801b035b609a81905560a054610902916108f99161126c565b609e54906113f8565b609f81905561094e5760405162461bcd60e51b8152602060048201526018602482015277496e76616c6964206368616e676520696e20737570706c7960401b60448201526064016105e3565b61097160a05461096b609f54609e546113f890919063ffffffff16565b906113ec565b609a819055609e54609f5460408051938452602084019290925282820152517f41645eb819d3011b13f97696a8109d14bfcddfaca7d063ec0564d62a3e2572359181900360600190a15b506001905550565b609c546001600160a01b031633146109ed5760405162461bcd60e51b81526004016105e390612016565b6109f78282611421565b5050565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b031614610a965760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016105e3565b610a9f3361160b565b565b610aa9610f03565b610ac55760405162461bcd60e51b81526004016105e39061206f565b609c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000633b9aca00609f546105519190611f6a565b6001600160a01b0381166000908152609d60205260408120548103610b2257506000919050565b6105ab610b2e836116d3565b6001600160a01b0384166000908152609d6020526040902054906113f8565b6060609880546104ba90611f1a565b609c546001600160a01b03163314610b865760405162461bcd60e51b81526004016105e390612016565b6109f7828261171a565b336000908152609b602090815260408083206001600160a01b0386168452909152812054808310610be457336000908152609b602090815260408083206001600160a01b0388168452909152812055610c13565b610bee818461126c565b336000908152609b602090815260408083206001600160a01b03891684529091529020555b336000818152609b602090815260408083206001600160a01b03891680855290835292819020549051908152919291600080516020612268833981519152910160405180910390a35060019392505050565b60006001600160a01b038316610c8d5760405162461bcd60e51b81526004016105e390611f8c565b610c9633610afb565b821115610cb55760405162461bcd60e51b81526004016105e390611fbe565b610cc033848461127f565b336000818152609d602090815260408083205460a19092529182902054915160008051602061220883398151915293610cfb93909291611ff5565b60405180910390a16001600160a01b0383166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292610d49928792909190611ff5565b60405180910390a16040518281526001600160a01b0384169033906000805160206122488339815191529060200161059f565b60008051602061222883398151915280546001198101610dae5760405162461bcd60e51b81526004016105e390612047565b60028255610dba610f03565b610dd65760405162461bcd60e51b81526004016105e39061206f565b6109bb8361196d565b60008051602061222883398151915280546001198101610e115760405162461bcd60e51b81526004016105e390612047565b60028255610e1e33611aa8565b15610e665760405162461bcd60e51b815260206004820152601860248201527720b1b1b7bab73a103430b9903737ba1037b83a32b21034b760411b60448201526064016105e3565b610e7b610e7233610afb565b60a054906113ec565b60a055609f5433600090815260a16020908152604080832093909355609d90522054609e54610ea99161126c565b609e5533600081815260a2602052604090819020805460ff19166001179055517f201ace89ad3f5ab7428b91989f6a50d1998791c7b94a0fa812fd64a57687165e91610ef491611d4b565b60405180910390a15060019055565b6000610f0d611247565b6001600160a01b0316336001600160a01b031614905090565b610f2e610f03565b610f4a5760405162461bcd60e51b81526004016105e39061206f565b610f72817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b0316610f84611247565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b0381166000908152609d602052604081205481908190610fe2856116d3565b6001600160a01b0395909516600090815260a36020526040902054909560019091149350915050565b6000805160206122288339815191528054600119810161103d5760405162461bcd60e51b81526004016105e390612047565b6002825561104a3361196d565b5060019055565b611059610f03565b6110755760405162461bcd60e51b81526004016105e39061206f565b600054610100900460ff168061108e575060005460ff16155b6110f15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e3565b600054610100900460ff16158015611113576000805461ffff19166101011790555b61118987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525060129250611b1c915050565b609f829055609c80546001600160a01b0319166001600160a01b03851617905580156111bb576000805461ff00191690555b50505050505050565b60008060006111d2846116d3565b9050806b033b2e3c9fd0803ce800000003611207576001600160a01b039093166000908152609d602052604090205493915050565b6001600160a01b0384166000908152609d602052604090205461122f90633b9aca0090611f6a565b61123d633b9aca0083611f6a565b9250925050915091565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a5490565b600061127882846120a6565b9392505050565b600061128a83611aa8565b9050600061129785611aa8565b905060006112ae6112a7866116d3565b8590611b4e565b905060006112c56112be886116d3565b8690611b4e565b9050611336816040518060400160405280601f81526020017f5472616e7366657220616d6f756e7420657863656564732062616c616e636500815250609d60008b6001600160a01b03166001600160a01b0316815260200190815260200160002054611b639092919063ffffffff16565b6001600160a01b038089166000908152609d6020526040808220939093559088168152205461136590836113ec565b6001600160a01b0387166000908152609d6020526040902055838015611389575082155b156113b35760a05461139b90866113ec565b60a055609e546113ab908261126c565b609e556111bb565b831580156113be5750825b156111bb5760a0546113d0908661126c565b60a055609e546113e090836113ec565b609e5550505050505050565b600061127882846120b9565b60008061140d84670de0b6b3a7640000611b8f565b90506114198184611b9b565b949350505050565b600080516020612228833981519152805460011981016114535760405162461bcd60e51b81526004016105e390612047565b600282556001600160a01b0384166114a85760405162461bcd60e51b81526020600482015260186024820152774d696e7420746f20746865207a65726f206164647265737360401b60448201526064016105e3565b60006114b385611aa8565b905060006114c36112be876116d3565b6001600160a01b0387166000908152609d60205260409020549091506114e990826113ec565b6001600160a01b0387166000908152609d6020526040902055811561151d5760a05461151590866113ec565b60a05561152e565b609e5461152a90826113ec565b609e555b609a5461153b90866113ec565b609a8190556001600160801b03116115825760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b60448201526064016105e3565b6001600160a01b0386166000908152609d602090815260408083205460a190925291829020549151600080516020612208833981519152926115c8928a92909190611ff5565b60405180910390a16040518581526001600160a01b038716906000906000805160206122488339815191529060200160405180910390a350506001825550505050565b6001600160a01b0381166116615760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016105e3565b806001600160a01b0316611673611247565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a36116d0817f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a55565b50565b6001600160a01b038116600090815260a160205260408120541561170d57506001600160a01b0316600090815260a1602052604090205490565b5050609f5490565b919050565b6000805160206122288339815191528054600119810161174c5760405162461bcd60e51b81526004016105e390612047565b600282556001600160a01b0384166117a65760405162461bcd60e51b815260206004820152601a60248201527f4275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016105e3565b82156119645760006117b785611aa8565b905060006117c76112be876116d3565b6001600160a01b0387166000908152609d6020526040902054909150808214806117fa5750816117f86001836120a6565b145b1561181d576001600160a01b0387166000908152609d60205260408120556118a7565b81811115611866576001600160a01b0387166000908152609d6020526040902054611848908361126c565b6001600160a01b0388166000908152609d60205260409020556118a7565b60405162461bcd60e51b815260206004820152601660248201527552656d6f766520657863656564732062616c616e636560501b60448201526064016105e3565b82156118c25760a0546118ba908761126c565b60a0556118d3565b609e546118cf908361126c565b609e555b609a546118e0908761126c565b609a556001600160a01b0387166000908152609d602090815260408083205460a19092529182902054915160008051602061220883398151915292611929928b92909190611ff5565b60405180910390a16040518681526000906001600160a01b038916906000805160206122488339815191529060200160405180910390a35050505b50600190555050565b61197681611aa8565b6119be5760405162461bcd60e51b81526020600482015260196024820152781058d8dbdd5b9d081a185cc81b9bdd081bdc1d1959081bdd5d603a1b60448201526064016105e3565b60006119f76119cc836116d3565b609f546001600160a01b0385166000908152609d60205260409020546119f191611b8f565b90611b9b565b9050611a0e611a0583610afb565b60a0549061126c565b60a0556001600160a01b0382166000908152609d60205260409020819055609e54611a3990826113ec565b609e556001600160a01b038216600090815260a260209081526040808320805460ff1916600217905560a190915280822091909155517f19a249fa2050bac8314ac10e3ad420bd9825574bf750f58810c3c7adfc7b1c6f90611a9c908490611d4b565b60405180910390a15050565b60006001600160a01b0382163b158015908190611aef57506001600160a01b038316600090815260a2602052604081205460ff166002811115611aed57611aed611dd0565b145b15611afd57611afd83611ba7565b50506001600160a01b0316600090815260a16020526040902054151590565b6097611b288482612131565b506098611b358382612131565b506099805460ff191660ff929092169190911790555050565b60006112788383670de0b6b3a7640000611c9a565b60008184841115611b875760405162461bcd60e51b81526004016105e39190611cbc565b505050900390565b600061127882846121f0565b60006112788284611f6a565b6001600160a01b038116600090815260a1602052604081205490036116d0577f201ace89ad3f5ab7428b91989f6a50d1998791c7b94a0fa812fd64a57687165e81604051611bf59190611d4b565b60405180910390a16001600160a01b0381166000908152609d60205260408120549003611c44576001600160a01b0316600090815260a1602052604090206b033b2e3c9fd0803ce80000009055565b609f546001600160a01b038216600090815260a16020526040902055611c6c610e7282610afb565b60a0556001600160a01b0381166000908152609d6020526040902054609e54611c949161126c565b609e5550565b600080611ca78585611b8f565b9050611cb38184611b9b565b95945050505050565b602081526000825180602084015260005b81811015611cea5760208186018101516040868401015201611ccd565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461171557600080fd5b60008060408385031215611d3457600080fd5b611d3d83611d0a565b946020939093013593505050565b6001600160a01b0391909116815260200190565b600080600060608486031215611d7457600080fd5b611d7d84611d0a565b9250611d8b60208501611d0a565b929592945050506040919091013590565b600060208284031215611dae57600080fd5b5035919050565b600060208284031215611dc757600080fd5b61127882611d0a565b634e487b7160e01b600052602160045260246000fd5b6020810160038310611e0857634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611e2157600080fd5b611e2a83611d0a565b9150611e3860208401611d0a565b90509250929050565b60008083601f840112611e5357600080fd5b50813567ffffffffffffffff811115611e6b57600080fd5b602083019150836020828501011115611e8357600080fd5b9250929050565b60008060008060008060808789031215611ea357600080fd5b863567ffffffffffffffff811115611eba57600080fd5b611ec689828a01611e41565b909750955050602087013567ffffffffffffffff811115611ee657600080fd5b611ef289828a01611e41565b9095509350611f05905060408801611d0a565b95989497509295919493606090920135925050565b600181811c90821680611f2e57607f821691505b602082108103611f4e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082611f8757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601890820152775472616e7366657220746f207a65726f206164647265737360401b604082015260600190565b6020808252601d908201527f5472616e736665722067726561746572207468616e2062616c616e6365000000604082015260600190565b6001600160a01b039390931683526020830191909152604082015260600190565b60208082526017908201527610d85b1b195c881a5cc81b9bdd081d1a194815985d5b1d604a1b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b818103818111156105ab576105ab611f54565b808201808211156105ab576105ab611f54565b634e487b7160e01b600052604160045260246000fd5b601f82111561212c57806000526020600020601f840160051c810160208510156121095750805b601f840160051c820191505b818110156121295760008155600101612115565b50505b505050565b815167ffffffffffffffff81111561214b5761214b6120cc565b61215f816121598454611f1a565b846120e2565b6020601f821160018114612193576000831561217b5750848201515b600019600385901b1c1916600184901b178455612129565b600084815260208120601f198516915b828110156121c357878501518255602094850194600190920191016121a3565b50848210156121e15786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b80820281158282048414176105ab576105ab611f5456fe9f40d0ae2b10a75d189297ef5199ed9e175c6fbae06c171584d6bc77c9a1072c53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212202254e73ca58a6e4b3836748e30aa643f8e73c1a8c051fabaccf78f71ae8031dc64736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.