Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
MultiCollateralSynth
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at sepolia-optimism.etherscan.io on 2023-12-11 */ /* ⚠⚠⚠ WARNING WARNING WARNING ⚠⚠⚠ This is a TARGET contract - DO NOT CONNECT TO IT DIRECTLY IN YOUR CONTRACTS or DAPPS! This contract has an associated PROXY that MUST be used for all integrations - this TARGET will be REPLACED in an upcoming Synthetix release! The proxy can be found by looking up the PROXY property on this contract. *//* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: MultiCollateralSynth.sol * * Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/MultiCollateralSynth.sol * Docs: https://docs.synthetix.io/contracts/MultiCollateralSynth * * Contract Dependencies: * - ExternStateToken * - IAddressResolver * - IERC20 * - ISynth * - MixinResolver * - Owned * - Proxyable * - State * - Synth * Libraries: * - SafeDecimalMath * - SafeMath * * MIT License * =========== * * Copyright (c) 2023 Synthetix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity ^0.5.16; // https://docs.synthetix.io/contracts/source/contracts/owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/proxy contract Proxy is Owned { Proxyable public target; constructor(address _owner) public Owned(_owner) {} function setTarget(Proxyable _target) external onlyOwner { target = _target; emit TargetUpdated(_target); } function _emit( bytes calldata callData, uint numTopics, bytes32 topic1, bytes32 topic2, bytes32 topic3, bytes32 topic4 ) external onlyTarget { uint size = callData.length; bytes memory _callData = callData; assembly { /* The first 32 bytes of callData contain its length (as specified by the abi). * Length is assumed to be a uint256 and therefore maximum of 32 bytes * in length. It is also leftpadded to be a multiple of 32 bytes. * This means moving call_data across 32 bytes guarantees we correctly access * the data itself. */ switch numTopics case 0 { log0(add(_callData, 32), size) } case 1 { log1(add(_callData, 32), size, topic1) } case 2 { log2(add(_callData, 32), size, topic1, topic2) } case 3 { log3(add(_callData, 32), size, topic1, topic2, topic3) } case 4 { log4(add(_callData, 32), size, topic1, topic2, topic3, topic4) } } } // solhint-disable no-complex-fallback function() external payable { // Mutable call setting Proxyable.messageSender as this is using call not delegatecall target.setMessageSender(msg.sender); assembly { let free_ptr := mload(0x40) calldatacopy(free_ptr, 0, calldatasize) /* We must explicitly forward ether to the underlying contract as well. */ let result := call(gas, sload(target_slot), callvalue, free_ptr, calldatasize, 0, 0) returndatacopy(free_ptr, 0, returndatasize) if iszero(result) { revert(free_ptr, returndatasize) } return(free_ptr, returndatasize) } } modifier onlyTarget { require(Proxyable(msg.sender) == target, "Must be proxy target"); _; } event TargetUpdated(Proxyable newTarget); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/proxyable contract Proxyable is Owned { // This contract should be treated like an abstract contract /* The proxy this contract exists behind. */ Proxy public proxy; /* The caller of the proxy, passed through to this contract. * Note that every function using this member must apply the onlyProxy or * optionalProxy modifiers, otherwise their invocations can use stale values. */ address public messageSender; constructor(address payable _proxy) internal { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setProxy(address payable _proxy) external onlyOwner { proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setMessageSender(address sender) external onlyProxy { messageSender = sender; } modifier onlyProxy { _onlyProxy(); _; } function _onlyProxy() private view { require(Proxy(msg.sender) == proxy, "Only the proxy can call"); } modifier optionalProxy { _optionalProxy(); _; } function _optionalProxy() private { if (Proxy(msg.sender) != proxy && messageSender != msg.sender) { messageSender = msg.sender; } } modifier optionalProxy_onlyOwner { _optionalProxy_onlyOwner(); _; } // solhint-disable-next-line func-name-mixedcase function _optionalProxy_onlyOwner() private { if (Proxy(msg.sender) != proxy && messageSender != msg.sender) { messageSender = msg.sender; } require(messageSender == owner, "Owner only function"); } event ProxyUpdated(address proxyAddress); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @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) { // 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-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } // Libraries // https://docs.synthetix.io/contracts/source/libraries/safedecimalmath library SafeDecimalMath { using SafeMath for uint; /* Number of decimal places in the representations. */ uint8 public constant decimals = 18; uint8 public constant highPrecisionDecimals = 27; /* The number representing 1.0. */ uint public constant UNIT = 10**uint(decimals); /* The number representing 1.0 for higher fidelity numbers. */ uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals); uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals); /** * @return Provides an interface to UNIT. */ function unit() external pure returns (uint) { return UNIT; } /** * @return Provides an interface to PRECISE_UNIT. */ function preciseUnit() external pure returns (uint) { return PRECISE_UNIT; } /** * @return The result of multiplying x and y, interpreting the operands as fixed-point * decimals. * * @dev A unit factor is divided out after the product of x and y is evaluated, * so that product must be less than 2**256. As this is an integer division, * the internal division always rounds down. This helps save on gas. Rounding * is more expensive on gas. */ function multiplyDecimal(uint x, uint y) internal pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y) / UNIT; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of the specified precision unit. * * @dev The operands should be in the form of a the specified unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function _multiplyDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ uint quotientTimesTen = x.mul(y) / (precisionUnit / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a precise unit. * * @dev The operands should be in the precise unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, PRECISE_UNIT); } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a standard unit. * * @dev The operands should be in the standard unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is a high * precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and UNIT must be less than 2**256. As * this is an integer division, the result is always rounded down. * This helps save on gas. Rounding is more expensive on gas. */ function divideDecimal(uint x, uint y) internal pure returns (uint) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(UNIT).div(y); } /** * @return The result of safely dividing x and y. The return value is as a rounded * decimal in the precision unit specified in the parameter. * * @dev y is divided after the product of x and the specified precision unit * is evaluated, so the product of x and the specified precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function _divideDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { uint resultTimesTen = x.mul(precisionUnit * 10).div(y); if (resultTimesTen % 10 >= 5) { resultTimesTen += 10; } return resultTimesTen / 10; } /** * @return The result of safely dividing x and y. The return value is as a rounded * standard precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and the standard precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRound(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is as a rounded * high precision decimal. * * @dev y is divided after the product of x and the high precision unit * is evaluated, so the product of x and the high precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, PRECISE_UNIT); } /** * @dev Convert a standard decimal representation to a high precision one. */ function decimalToPreciseDecimal(uint i) internal pure returns (uint) { return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); } /** * @dev Convert a high precision decimal to a standard decimal representation. */ function preciseDecimalToDecimal(uint i) internal pure returns (uint) { uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } // Computes `a - b`, setting the value to 0 if b > a. function floorsub(uint a, uint b) internal pure returns (uint) { return b >= a ? 0 : a - b; } /* ---------- Utilities ---------- */ /* * Absolute value of the input, returned as a signed number. */ function signedAbs(int x) internal pure returns (int) { return x < 0 ? -x : x; } /* * Absolute value of the input, returned as an unsigned number. */ function abs(int x) internal pure returns (uint) { return uint(signedAbs(x)); } } // Inheritance // https://docs.synthetix.io/contracts/source/contracts/state contract State is Owned { // the address of the contract that can modify variables // this can only be changed by the owner of this contract address public associatedContract; constructor(address _associatedContract) internal { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== SETTERS ========== */ // Change the associated contract to a new address function setAssociatedContract(address _associatedContract) external onlyOwner { associatedContract = _associatedContract; emit AssociatedContractUpdated(_associatedContract); } /* ========== MODIFIERS ========== */ modifier onlyAssociatedContract { require(msg.sender == associatedContract, "Only the associated contract can perform this action"); _; } /* ========== EVENTS ========== */ event AssociatedContractUpdated(address associatedContract); } // Inheritance // https://docs.synthetix.io/contracts/source/contracts/tokenstate contract TokenState is Owned, State { /* ERC20 fields. */ mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; constructor(address _owner, address _associatedContract) public Owned(_owner) State(_associatedContract) {} /* ========== SETTERS ========== */ /** * @notice Set ERC20 allowance. * @dev Only the associated contract may call this. * @param tokenOwner The authorising party. * @param spender The authorised party. * @param value The total value the authorised party may spend on the * authorising party's behalf. */ function setAllowance( address tokenOwner, address spender, uint value ) external onlyAssociatedContract { allowance[tokenOwner][spender] = value; } /** * @notice Set the balance in a given account * @dev Only the associated contract may call this. * @param account The account whose value to set. * @param value The new balance of the given account. */ function setBalanceOf(address account, uint value) external onlyAssociatedContract { balanceOf[account] = value; } } // Inheritance // Libraries // Internal references // https://docs.synthetix.io/contracts/source/contracts/externstatetoken contract ExternStateToken is Owned, Proxyable { using SafeMath for uint; using SafeDecimalMath for uint; /* ========== STATE VARIABLES ========== */ /* Stores balances and allowances. */ TokenState public tokenState; /* Other ERC20 fields. */ string public name; string public symbol; uint public totalSupply; uint8 public decimals; constructor( address payable _proxy, TokenState _tokenState, string memory _name, string memory _symbol, uint _totalSupply, uint8 _decimals, address _owner ) public Owned(_owner) Proxyable(_proxy) { tokenState = _tokenState; name = _name; symbol = _symbol; totalSupply = _totalSupply; decimals = _decimals; } /* ========== VIEWS ========== */ /** * @notice Returns the ERC20 allowance of one party to spend on behalf of another. * @param owner The party authorising spending of their funds. * @param spender The party spending tokenOwner's funds. */ function allowance(address owner, address spender) public view returns (uint) { return tokenState.allowance(owner, spender); } /** * @notice Returns the ERC20 token balance of a given account. */ function balanceOf(address account) external view returns (uint) { return tokenState.balanceOf(account); } /* ========== MUTATIVE FUNCTIONS ========== */ /** * @notice Set the address of the TokenState contract. * @dev This can be used to "pause" transfer functionality, by pointing the tokenState at 0x000.. * as balances would be unreachable. */ function setTokenState(TokenState _tokenState) external optionalProxy_onlyOwner { tokenState = _tokenState; emitTokenStateUpdated(address(_tokenState)); } function _internalTransfer( address from, address to, uint value ) internal returns (bool) { /* Disallow transfers to irretrievable-addresses. */ require(to != address(0) && to != address(this) && to != address(proxy), "Cannot transfer to this address"); // Insufficient balance will be handled by the safe subtraction. tokenState.setBalanceOf(from, tokenState.balanceOf(from).sub(value)); tokenState.setBalanceOf(to, tokenState.balanceOf(to).add(value)); // Emit a standard ERC20 transfer event emitTransfer(from, to, value); return true; } /** * @dev Perform an ERC20 token transfer. Designed to be called by transfer functions possessing * the onlyProxy or optionalProxy modifiers. */ function _transferByProxy( address from, address to, uint value ) internal returns (bool) { return _internalTransfer(from, to, value); } /* * @dev Perform an ERC20 token transferFrom. Designed to be called by transferFrom functions * possessing the optionalProxy or optionalProxy modifiers. */ function _transferFromByProxy( address sender, address from, address to, uint value ) internal returns (bool) { /* Insufficient allowance will be handled by the safe subtraction. */ tokenState.setAllowance(from, sender, tokenState.allowance(from, sender).sub(value)); return _internalTransfer(from, to, value); } /** * @notice Approves spender to transfer on the message sender's behalf. */ function approve(address spender, uint value) public optionalProxy returns (bool) { address sender = messageSender; tokenState.setAllowance(sender, spender, value); emitApproval(sender, spender, value); return true; } /* ========== EVENTS ========== */ function addressToBytes32(address input) internal pure returns (bytes32) { return bytes32(uint256(uint160(input))); } event Transfer(address indexed from, address indexed to, uint value); bytes32 internal constant TRANSFER_SIG = keccak256("Transfer(address,address,uint256)"); function emitTransfer( address from, address to, uint value ) internal { proxy._emit(abi.encode(value), 3, TRANSFER_SIG, addressToBytes32(from), addressToBytes32(to), 0); } event Approval(address indexed owner, address indexed spender, uint value); bytes32 internal constant APPROVAL_SIG = keccak256("Approval(address,address,uint256)"); function emitApproval( address owner, address spender, uint value ) internal { proxy._emit(abi.encode(value), 3, APPROVAL_SIG, addressToBytes32(owner), addressToBytes32(spender), 0); } event TokenStateUpdated(address newTokenState); bytes32 internal constant TOKENSTATEUPDATED_SIG = keccak256("TokenStateUpdated(address)"); function emitTokenStateUpdated(address newTokenState) internal { proxy._emit(abi.encode(newTokenState), 1, TOKENSTATEUPDATED_SIG, 0, 0, 0); } } // https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver interface IAddressResolver { function getAddress(bytes32 name) external view returns (address); function getSynth(bytes32 key) external view returns (address); function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address); } // https://docs.synthetix.io/contracts/source/interfaces/isynth interface ISynth { // Views function currencyKey() external view returns (bytes32); function transferableSynths(address account) external view returns (uint); // Mutative functions function transferAndSettle(address to, uint value) external returns (bool); function transferFromAndSettle( address from, address to, uint value ) external returns (bool); // Restricted: used internally to Synthetix function burn(address account, uint amount) external; function issue(address account, uint amount) external; } // https://docs.synthetix.io/contracts/source/interfaces/iissuer interface IIssuer { // Views function allNetworksDebtInfo() external view returns ( uint256 debt, uint256 sharesSupply, bool isStale ); function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid); function availableCurrencyKeys() external view returns (bytes32[] memory); function availableSynthCount() external view returns (uint); function availableSynths(uint index) external view returns (ISynth); function canBurnSynths(address account) external view returns (bool); function collateral(address account) external view returns (uint); function collateralisationRatio(address issuer) external view returns (uint); function collateralisationRatioAndAnyRatesInvalid(address _issuer) external view returns (uint cratio, bool anyRateIsInvalid); function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance); function issuanceRatio() external view returns (uint); function lastIssueEvent(address account) external view returns (uint); function maxIssuableSynths(address issuer) external view returns (uint maxIssuable); function minimumStakeTime() external view returns (uint); function remainingIssuableSynths(address issuer) external view returns ( uint maxIssuable, uint alreadyIssued, uint totalSystemDebt ); function synths(bytes32 currencyKey) external view returns (ISynth); function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory); function synthsByAddress(address synthAddress) external view returns (bytes32); function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint); function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance) external view returns (uint transferable, bool anyRateIsInvalid); function liquidationAmounts(address account, bool isSelfLiquidation) external view returns ( uint totalRedeemed, uint debtToRemove, uint escrowToLiquidate, uint initialDebtBalance ); // Restricted: used internally to Synthetix function addSynths(ISynth[] calldata synthsToAdd) external; function issueSynths(address from, uint amount) external; function issueSynthsOnBehalf( address issueFor, address from, uint amount ) external; function issueMaxSynths(address from) external; function issueMaxSynthsOnBehalf(address issueFor, address from) external; function burnSynths(address from, uint amount) external; function burnSynthsOnBehalf( address burnForAddress, address from, uint amount ) external; function burnSynthsToTarget(address from) external; function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external; function burnForRedemption( address deprecatedSynthProxy, address account, uint balance ) external; function setCurrentPeriodId(uint128 periodId) external; function liquidateAccount(address account, bool isSelfLiquidation) external returns ( uint totalRedeemed, uint debtRemoved, uint escrowToLiquidate ); function issueSynthsWithoutDebt( bytes32 currencyKey, address to, uint amount ) external returns (bool rateInvalid); function burnSynthsWithoutDebt( bytes32 currencyKey, address to, uint amount ) external returns (bool rateInvalid); function modifyDebtSharesForMigration(address account, uint amount) external; } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/addressresolver contract AddressResolver is Owned, IAddressResolver { mapping(bytes32 => address) public repository; constructor(address _owner) public Owned(_owner) {} /* ========== RESTRICTED FUNCTIONS ========== */ function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner { require(names.length == destinations.length, "Input lengths must match"); for (uint i = 0; i < names.length; i++) { bytes32 name = names[i]; address destination = destinations[i]; repository[name] = destination; emit AddressImported(name, destination); } } /* ========= PUBLIC FUNCTIONS ========== */ function rebuildCaches(MixinResolver[] calldata destinations) external { for (uint i = 0; i < destinations.length; i++) { destinations[i].rebuildCache(); } } /* ========== VIEWS ========== */ function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) { for (uint i = 0; i < names.length; i++) { if (repository[names[i]] != destinations[i]) { return false; } } return true; } function getAddress(bytes32 name) external view returns (address) { return repository[name]; } function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) { address _foundAddress = repository[name]; require(_foundAddress != address(0), reason); return _foundAddress; } function getSynth(bytes32 key) external view returns (address) { IIssuer issuer = IIssuer(repository["Issuer"]); require(address(issuer) != address(0), "Cannot find Issuer address"); return address(issuer.synths(key)); } /* ========== EVENTS ========== */ event AddressImported(bytes32 name, address destination); } // Internal references // https://docs.synthetix.io/contracts/source/contracts/mixinresolver contract MixinResolver { AddressResolver public resolver; mapping(bytes32 => address) private addressCache; constructor(address _resolver) internal { resolver = AddressResolver(_resolver); } /* ========== INTERNAL FUNCTIONS ========== */ function combineArrays(bytes32[] memory first, bytes32[] memory second) internal pure returns (bytes32[] memory combination) { combination = new bytes32[](first.length + second.length); for (uint i = 0; i < first.length; i++) { combination[i] = first[i]; } for (uint j = 0; j < second.length; j++) { combination[first.length + j] = second[j]; } } /* ========== PUBLIC FUNCTIONS ========== */ // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {} function rebuildCache() public { bytes32[] memory requiredAddresses = resolverAddressesRequired(); // The resolver must call this function whenver it updates its state for (uint i = 0; i < requiredAddresses.length; i++) { bytes32 name = requiredAddresses[i]; // Note: can only be invoked once the resolver has all the targets needed added address destination = resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name))); addressCache[name] = destination; emit CacheUpdated(name, destination); } } /* ========== VIEWS ========== */ function isResolverCached() external view returns (bool) { bytes32[] memory requiredAddresses = resolverAddressesRequired(); for (uint i = 0; i < requiredAddresses.length; i++) { bytes32 name = requiredAddresses[i]; // false if our cache is invalid or if the resolver doesn't have the required address if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) { return false; } } return true; } /* ========== INTERNAL FUNCTIONS ========== */ function requireAndGetAddress(bytes32 name) internal view returns (address) { address _foundAddress = addressCache[name]; require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name))); return _foundAddress; } /* ========== EVENTS ========== */ event CacheUpdated(bytes32 name, address destination); } // https://docs.synthetix.io/contracts/source/interfaces/ierc20 interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); // Mutative functions function transfer(address to, uint value) external returns (bool); function approve(address spender, uint value) external returns (bool); function transferFrom( address from, address to, uint value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } // https://docs.synthetix.io/contracts/source/interfaces/isystemstatus interface ISystemStatus { struct Status { bool canSuspend; bool canResume; } struct Suspension { bool suspended; // reason is an integer code, // 0 => no reason, 1 => upgrading, 2+ => defined by system usage uint248 reason; } // Views function accessControl(bytes32 section, address account) external view returns (bool canSuspend, bool canResume); function requireSystemActive() external view; function systemSuspended() external view returns (bool); function requireIssuanceActive() external view; function requireExchangeActive() external view; function requireFuturesActive() external view; function requireFuturesMarketActive(bytes32 marketKey) external view; function requireExchangeBetweenSynthsAllowed(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function requireSynthActive(bytes32 currencyKey) external view; function synthSuspended(bytes32 currencyKey) external view returns (bool); function requireSynthsActive(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function systemSuspension() external view returns (bool suspended, uint248 reason); function issuanceSuspension() external view returns (bool suspended, uint248 reason); function exchangeSuspension() external view returns (bool suspended, uint248 reason); function futuresSuspension() external view returns (bool suspended, uint248 reason); function synthExchangeSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function synthSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function futuresMarketSuspension(bytes32 marketKey) external view returns (bool suspended, uint248 reason); function getSynthExchangeSuspensions(bytes32[] calldata synths) external view returns (bool[] memory exchangeSuspensions, uint256[] memory reasons); function getSynthSuspensions(bytes32[] calldata synths) external view returns (bool[] memory suspensions, uint256[] memory reasons); function getFuturesMarketSuspensions(bytes32[] calldata marketKeys) external view returns (bool[] memory suspensions, uint256[] memory reasons); // Restricted functions function suspendIssuance(uint256 reason) external; function suspendSynth(bytes32 currencyKey, uint256 reason) external; function suspendFuturesMarket(bytes32 marketKey, uint256 reason) external; function updateAccessControl( bytes32 section, address account, bool canSuspend, bool canResume ) external; } // https://docs.synthetix.io/contracts/source/interfaces/ifeepool interface IFeePool { // Views // solhint-disable-next-line func-name-mixedcase function FEE_ADDRESS() external view returns (address); function feesAvailable(address account) external view returns (uint, uint); function feesBurned(address account) external view returns (uint); function feesToBurn(address account) external view returns (uint); function feePeriodDuration() external view returns (uint); function isFeesClaimable(address account) external view returns (bool); function targetThreshold() external view returns (uint); function totalFeesAvailable() external view returns (uint); function totalFeesBurned() external view returns (uint); function totalRewardsAvailable() external view returns (uint); // Mutative Functions function claimFees() external returns (bool); function claimOnBehalf(address claimingForAddress) external returns (bool); function closeCurrentFeePeriod() external; function closeSecondary(uint snxBackedDebt, uint debtShareSupply) external; function recordFeePaid(uint sUSDAmount) external; function setRewardsToDistribute(uint amount) external; } interface IVirtualSynth { // Views function balanceOfUnderlying(address account) external view returns (uint); function rate() external view returns (uint); function readyToSettle() external view returns (bool); function secsLeftInWaitingPeriod() external view returns (uint); function settled() external view returns (bool); function synth() external view returns (ISynth); // Mutative functions function settle(address account) external; } pragma experimental ABIEncoderV2; // https://docs.synthetix.io/contracts/source/interfaces/iexchanger interface IExchanger { struct ExchangeEntrySettlement { bytes32 src; uint amount; bytes32 dest; uint reclaim; uint rebate; uint srcRoundIdAtPeriodEnd; uint destRoundIdAtPeriodEnd; uint timestamp; } struct ExchangeEntry { uint sourceRate; uint destinationRate; uint destinationAmount; uint exchangeFeeRate; uint exchangeDynamicFeeRate; uint roundIdForSrc; uint roundIdForDest; uint sourceAmountAfterSettlement; } // Views function calculateAmountAfterSettlement( address from, bytes32 currencyKey, uint amount, uint refunded ) external view returns (uint amountAfterSettlement); function isSynthRateInvalid(bytes32 currencyKey) external view returns (bool); function maxSecsLeftInWaitingPeriod(address account, bytes32 currencyKey) external view returns (uint); function settlementOwing(address account, bytes32 currencyKey) external view returns ( uint reclaimAmount, uint rebateAmount, uint numEntries ); function hasWaitingPeriodOrSettlementOwing(address account, bytes32 currencyKey) external view returns (bool); function feeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view returns (uint); function dynamicFeeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view returns (uint feeRate, bool tooVolatile); function getAmountsForExchange( uint sourceAmount, bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey ) external view returns ( uint amountReceived, uint fee, uint exchangeFeeRate ); function priceDeviationThresholdFactor() external view returns (uint); function waitingPeriodSecs() external view returns (uint); function lastExchangeRate(bytes32 currencyKey) external view returns (uint); // Mutative functions function exchange( address exchangeForAddress, address from, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bool virtualSynth, address rewardAddress, bytes32 trackingCode ) external returns (uint amountReceived, IVirtualSynth vSynth); function exchangeAtomically( address from, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bytes32 trackingCode, uint minAmount ) external returns (uint amountReceived); function settle(address from, bytes32 currencyKey) external returns ( uint reclaimed, uint refunded, uint numEntries ); } // Used to have strongly-typed access to internal mutative functions in Synthetix interface ISynthetixInternal { function emitExchangeTracking( bytes32 trackingCode, bytes32 toCurrencyKey, uint256 toAmount, uint256 fee ) external; function emitSynthExchange( address account, bytes32 fromCurrencyKey, uint fromAmount, bytes32 toCurrencyKey, uint toAmount, address toAddress ) external; function emitAtomicSynthExchange( address account, bytes32 fromCurrencyKey, uint fromAmount, bytes32 toCurrencyKey, uint toAmount, address toAddress ) external; function emitExchangeReclaim( address account, bytes32 currencyKey, uint amount ) external; function emitExchangeRebate( address account, bytes32 currencyKey, uint amount ) external; } interface IExchangerInternalDebtCache { function updateCachedSynthDebtsWithRates(bytes32[] calldata currencyKeys, uint[] calldata currencyRates) external; function updateCachedSynthDebts(bytes32[] calldata currencyKeys) external; } interface IFuturesMarketManager { function markets(uint index, uint pageSize) external view returns (address[] memory); function markets( uint index, uint pageSize, bool proxiedMarkets ) external view returns (address[] memory); function numMarkets() external view returns (uint); function numMarkets(bool proxiedMarkets) external view returns (uint); function allMarkets() external view returns (address[] memory); function allMarkets(bool proxiedMarkets) external view returns (address[] memory); function marketForKey(bytes32 marketKey) external view returns (address); function marketsForKeys(bytes32[] calldata marketKeys) external view returns (address[] memory); function totalDebt() external view returns (uint debt, bool isInvalid); function isEndorsed(address account) external view returns (bool); function allEndorsedAddresses() external view returns (address[] memory); function addEndorsedAddresses(address[] calldata addresses) external; function removeEndorsedAddresses(address[] calldata addresses) external; } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/synth contract Synth is Owned, IERC20, ExternStateToken, MixinResolver, ISynth { bytes32 public constant CONTRACT_NAME = "Synth"; /* ========== STATE VARIABLES ========== */ // Currency key which identifies this Synth to the Synthetix system bytes32 public currencyKey; uint8 public constant DECIMALS = 18; // Where fees are pooled in sUSD address public constant FEE_ADDRESS = 0xfeEFEEfeefEeFeefEEFEEfEeFeefEEFeeFEEFEeF; /* ========== ADDRESS RESOLVER CONFIGURATION ========== */ bytes32 private constant CONTRACT_SYSTEMSTATUS = "SystemStatus"; bytes32 private constant CONTRACT_EXCHANGER = "Exchanger"; bytes32 private constant CONTRACT_ISSUER = "Issuer"; bytes32 private constant CONTRACT_FEEPOOL = "FeePool"; bytes32 private constant CONTRACT_FUTURESMARKETMANAGER = "FuturesMarketManager"; /* ========== CONSTRUCTOR ========== */ constructor( address payable _proxy, TokenState _tokenState, string memory _tokenName, string memory _tokenSymbol, address _owner, bytes32 _currencyKey, uint _totalSupply, address _resolver ) public ExternStateToken(_proxy, _tokenState, _tokenName, _tokenSymbol, _totalSupply, DECIMALS, _owner) MixinResolver(_resolver) { require(_proxy != address(0), "_proxy cannot be 0"); require(_owner != address(0), "_owner cannot be 0"); currencyKey = _currencyKey; } /* ========== MUTATIVE FUNCTIONS ========== */ function transfer(address to, uint value) public onlyProxyOrInternal returns (bool) { _ensureCanTransfer(messageSender, value); // transfers to FEE_ADDRESS will be exchanged into sUSD and recorded as fee if (to == FEE_ADDRESS) { return _transferToFeeAddress(to, value); } // transfers to 0x address will be burned if (to == address(0)) { return _internalBurn(messageSender, value); } return super._internalTransfer(messageSender, to, value); } function transferAndSettle(address to, uint value) public onlyProxyOrInternal returns (bool) { // Exchanger.settle ensures synth is active (, , uint numEntriesSettled) = exchanger().settle(messageSender, currencyKey); // Save gas instead of calling transferableSynths uint balanceAfter = value; if (numEntriesSettled > 0) { balanceAfter = tokenState.balanceOf(messageSender); } // Reduce the value to transfer if balance is insufficient after reclaimed value = value > balanceAfter ? balanceAfter : value; return super._internalTransfer(messageSender, to, value); } function transferFrom( address from, address to, uint value ) public onlyProxyOrInternal returns (bool) { _ensureCanTransfer(from, value); return _internalTransferFrom(from, to, value); } function transferFromAndSettle( address from, address to, uint value ) public onlyProxyOrInternal returns (bool) { // Exchanger.settle() ensures synth is active (, , uint numEntriesSettled) = exchanger().settle(from, currencyKey); // Save gas instead of calling transferableSynths uint balanceAfter = value; if (numEntriesSettled > 0) { balanceAfter = tokenState.balanceOf(from); } // Reduce the value to transfer if balance is insufficient after reclaimed value = value >= balanceAfter ? balanceAfter : value; return _internalTransferFrom(from, to, value); } /** * @notice _transferToFeeAddress function * non-sUSD synths are exchanged into sUSD via synthInitiatedExchange * notify feePool to record amount as fee paid to feePool */ function _transferToFeeAddress(address to, uint value) internal returns (bool) { uint amountInUSD; // sUSD can be transferred to FEE_ADDRESS directly if (currencyKey == "sUSD") { amountInUSD = value; super._internalTransfer(messageSender, to, value); } else { // else exchange synth into sUSD and send to FEE_ADDRESS (amountInUSD, ) = exchanger().exchange( messageSender, messageSender, currencyKey, value, "sUSD", FEE_ADDRESS, false, address(0), bytes32(0) ); } // Notify feePool to record sUSD to distribute as fees feePool().recordFeePaid(amountInUSD); return true; } function issue(address account, uint amount) external onlyInternalContracts { _internalIssue(account, amount); } function burn(address account, uint amount) external onlyInternalContracts { _internalBurn(account, amount); } function _internalIssue(address account, uint amount) internal { tokenState.setBalanceOf(account, tokenState.balanceOf(account).add(amount)); totalSupply = totalSupply.add(amount); emitTransfer(address(0), account, amount); emitIssued(account, amount); } function _internalBurn(address account, uint amount) internal returns (bool) { tokenState.setBalanceOf(account, tokenState.balanceOf(account).sub(amount)); totalSupply = totalSupply.sub(amount); emitTransfer(account, address(0), amount); emitBurned(account, amount); return true; } // Allow owner to set the total supply on import. function setTotalSupply(uint amount) external optionalProxy_onlyOwner { totalSupply = amount; } /* ========== VIEWS ========== */ // Note: use public visibility so that it can be invoked in a subclass function resolverAddressesRequired() public view returns (bytes32[] memory addresses) { addresses = new bytes32[](5); addresses[0] = CONTRACT_SYSTEMSTATUS; addresses[1] = CONTRACT_EXCHANGER; addresses[2] = CONTRACT_ISSUER; addresses[3] = CONTRACT_FEEPOOL; addresses[4] = CONTRACT_FUTURESMARKETMANAGER; } function systemStatus() internal view returns (ISystemStatus) { return ISystemStatus(requireAndGetAddress(CONTRACT_SYSTEMSTATUS)); } function feePool() internal view returns (IFeePool) { return IFeePool(requireAndGetAddress(CONTRACT_FEEPOOL)); } function exchanger() internal view returns (IExchanger) { return IExchanger(requireAndGetAddress(CONTRACT_EXCHANGER)); } function issuer() internal view returns (IIssuer) { return IIssuer(requireAndGetAddress(CONTRACT_ISSUER)); } function futuresMarketManager() internal view returns (IFuturesMarketManager) { return IFuturesMarketManager(requireAndGetAddress(CONTRACT_FUTURESMARKETMANAGER)); } function _ensureCanTransfer(address from, uint value) internal view { require(exchanger().maxSecsLeftInWaitingPeriod(from, currencyKey) == 0, "Cannot transfer during waiting period"); require(transferableSynths(from) >= value, "Insufficient balance after any settlement owing"); systemStatus().requireSynthActive(currencyKey); } function transferableSynths(address account) public view returns (uint) { (uint reclaimAmount, , ) = exchanger().settlementOwing(account, currencyKey); // Note: ignoring rebate amount here because a settle() is required in order to // allow the transfer to actually work uint balance = tokenState.balanceOf(account); if (reclaimAmount > balance) { return 0; } else { return balance.sub(reclaimAmount); } } /* ========== INTERNAL FUNCTIONS ========== */ function _internalTransferFrom( address from, address to, uint value ) internal returns (bool) { // Skip allowance update in case of infinite allowance if (tokenState.allowance(from, messageSender) != uint(-1)) { // Reduce the allowance by the amount we're transferring. // The safeSub call will handle an insufficient allowance. tokenState.setAllowance(from, messageSender, tokenState.allowance(from, messageSender).sub(value)); } return super._internalTransfer(from, to, value); } /* ========== MODIFIERS ========== */ function _isInternalContract(address account) internal view returns (bool) { return account == address(feePool()) || account == address(exchanger()) || account == address(issuer()) || account == address(futuresMarketManager()); } modifier onlyInternalContracts() { require(_isInternalContract(msg.sender), "Only internal contracts allowed"); _; } modifier onlyProxyOrInternal { _onlyProxyOrInternal(); _; } function _onlyProxyOrInternal() internal { if (msg.sender == address(proxy)) { // allow proxy through, messageSender should be already set correctly return; } else if (_isInternalTransferCaller(msg.sender)) { // optionalProxy behaviour only for the internal legacy contracts messageSender = msg.sender; } else { revert("Only the proxy can call"); } } /// some legacy internal contracts use transfer methods directly on implementation /// which isn't supported due to SIP-238 for other callers function _isInternalTransferCaller(address caller) internal view returns (bool) { // These entries are not required or cached in order to allow them to not exist (==address(0)) // e.g. due to not being available on L2 or at some future point in time. return // ordered to reduce gas for more frequent calls caller == resolver.getAddress("CollateralShort") || // not used frequently caller == resolver.getAddress("SynthRedeemer") || caller == resolver.getAddress("WrapperFactory") || // transfer not used by users // legacy caller == resolver.getAddress("NativeEtherWrapper") || caller == resolver.getAddress("Depot"); } /* ========== EVENTS ========== */ event Issued(address indexed account, uint value); bytes32 private constant ISSUED_SIG = keccak256("Issued(address,uint256)"); function emitIssued(address account, uint value) internal { proxy._emit(abi.encode(value), 2, ISSUED_SIG, addressToBytes32(account), 0, 0); } event Burned(address indexed account, uint value); bytes32 private constant BURNED_SIG = keccak256("Burned(address,uint256)"); function emitBurned(address account, uint value) internal { proxy._emit(abi.encode(value), 2, BURNED_SIG, addressToBytes32(account), 0, 0); } } interface ICollateralManager { // Manager information function hasCollateral(address collateral) external view returns (bool); function isSynthManaged(bytes32 currencyKey) external view returns (bool); // State information function long(bytes32 synth) external view returns (uint amount); function short(bytes32 synth) external view returns (uint amount); function totalLong() external view returns (uint susdValue, bool anyRateIsInvalid); function totalShort() external view returns (uint susdValue, bool anyRateIsInvalid); function getBorrowRate() external view returns (uint borrowRate, bool anyRateIsInvalid); function getShortRate(bytes32 synth) external view returns (uint shortRate, bool rateIsInvalid); function getRatesAndTime(uint index) external view returns ( uint entryRate, uint lastRate, uint lastUpdated, uint newIndex ); function getShortRatesAndTime(bytes32 currency, uint index) external view returns ( uint entryRate, uint lastRate, uint lastUpdated, uint newIndex ); function exceedsDebtLimit(uint amount, bytes32 currency) external view returns (bool canIssue, bool anyRateIsInvalid); function areSynthsAndCurrenciesSet(bytes32[] calldata requiredSynthNamesInResolver, bytes32[] calldata synthKeys) external view returns (bool); function areShortableSynthsSet(bytes32[] calldata requiredSynthNamesInResolver, bytes32[] calldata synthKeys) external view returns (bool); // Loans function getNewLoanId() external returns (uint id); // Manager mutative function addCollaterals(address[] calldata collaterals) external; function removeCollaterals(address[] calldata collaterals) external; function addSynths(bytes32[] calldata synthNamesInResolver, bytes32[] calldata synthKeys) external; function removeSynths(bytes32[] calldata synths, bytes32[] calldata synthKeys) external; function addShortableSynths(bytes32[] calldata requiredSynthNamesInResolver, bytes32[] calldata synthKeys) external; function removeShortableSynths(bytes32[] calldata synths) external; // State mutative function incrementLongs(bytes32 synth, uint amount) external; function decrementLongs(bytes32 synth, uint amount) external; function incrementShorts(bytes32 synth, uint amount) external; function decrementShorts(bytes32 synth, uint amount) external; function accrueInterest( uint interestIndex, bytes32 currency, bool isShort ) external returns (uint difference, uint index); function updateBorrowRatesCollateral(uint rate) external; function updateShortRatesCollateral(bytes32 currency, uint rate) external; } interface IWETH { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); // Mutative functions function transfer(address to, uint value) external returns (bool); function approve(address spender, uint value) external returns (bool); function transferFrom( address from, address to, uint value ) external returns (bool); // WETH-specific functions. function deposit() external payable; function withdraw(uint amount) external; // Events event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); event Deposit(address indexed to, uint amount); event Withdrawal(address indexed to, uint amount); } // https://docs.synthetix.io/contracts/source/interfaces/ietherwrapper contract IEtherWrapper { function mint(uint amount) external; function burn(uint amount) external; function distributeFees() external; function capacity() external view returns (uint); function getReserves() external view returns (uint); function totalIssuedSynths() external view returns (uint); function calculateMintFee(uint amount) public view returns (uint); function calculateBurnFee(uint amount) public view returns (uint); function maxETH() public view returns (uint256); function mintFeeRate() public view returns (uint256); function burnFeeRate() public view returns (uint256); function weth() public view returns (IWETH); } // https://docs.synthetix.io/contracts/source/interfaces/iwrapperfactory interface IWrapperFactory { function isWrapper(address possibleWrapper) external view returns (bool); function createWrapper( IERC20 token, bytes32 currencyKey, bytes32 synthContractName ) external returns (address); function distributeFees() external; } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/multicollateralsynth contract MultiCollateralSynth is Synth { bytes32 public constant CONTRACT_NAME = "MultiCollateralSynth"; /* ========== ADDRESS RESOLVER CONFIGURATION ========== */ bytes32 private constant CONTRACT_COLLATERALMANAGER = "CollateralManager"; bytes32 private constant CONTRACT_ETHER_WRAPPER = "EtherWrapper"; bytes32 private constant CONTRACT_WRAPPER_FACTORY = "WrapperFactory"; /* ========== CONSTRUCTOR ========== */ constructor( address payable _proxy, TokenState _tokenState, string memory _tokenName, string memory _tokenSymbol, address _owner, bytes32 _currencyKey, uint _totalSupply, address _resolver ) public Synth(_proxy, _tokenState, _tokenName, _tokenSymbol, _owner, _currencyKey, _totalSupply, _resolver) {} /* ========== VIEWS ======================= */ function collateralManager() internal view returns (ICollateralManager) { return ICollateralManager(requireAndGetAddress(CONTRACT_COLLATERALMANAGER)); } function etherWrapper() internal view returns (IEtherWrapper) { return IEtherWrapper(requireAndGetAddress(CONTRACT_ETHER_WRAPPER)); } function wrapperFactory() internal view returns (IWrapperFactory) { return IWrapperFactory(requireAndGetAddress(CONTRACT_WRAPPER_FACTORY)); } function resolverAddressesRequired() public view returns (bytes32[] memory addresses) { bytes32[] memory existingAddresses = Synth.resolverAddressesRequired(); bytes32[] memory newAddresses = new bytes32[](3); newAddresses[0] = CONTRACT_COLLATERALMANAGER; newAddresses[1] = CONTRACT_ETHER_WRAPPER; newAddresses[2] = CONTRACT_WRAPPER_FACTORY; addresses = combineArrays(existingAddresses, newAddresses); } /* ========== MUTATIVE FUNCTIONS ========== */ /** * @notice Function that allows multi Collateral to issue a certain number of synths from an account. * @param account Account to issue synths to * @param amount Number of synths */ function issue(address account, uint amount) external onlyInternalContracts { super._internalIssue(account, amount); } /** * @notice Function that allows multi Collateral to burn a certain number of synths from an account. * @param account Account to burn synths from * @param amount Number of synths */ function burn(address account, uint amount) external onlyInternalContracts { super._internalBurn(account, amount); } /* ========== MODIFIERS ========== */ // overriding modifier from super to add more internal contracts and checks function _isInternalContract(address account) internal view returns (bool) { return super._isInternalContract(account) || collateralManager().hasCollateral(account) || wrapperFactory().isWrapper(account) || (account == address(etherWrapper())); } }
[{"inputs":[{"internalType":"address payable","name":"_proxy","type":"address"},{"internalType":"contract TokenState","name":"_tokenState","type":"address"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_currencyKey","type":"bytes32"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Issued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"proxyAddress","type":"address"}],"name":"ProxyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTokenState","type":"address"}],"name":"TokenStateUpdated","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"},{"constant":true,"inputs":[],"name":"CONTRACT_NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currencyKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"messageSender","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxy","outputs":[{"internalType":"contract Proxy","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"setMessageSender","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_proxy","type":"address"}],"name":"setProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract TokenState","name":"_tokenState","type":"address"}],"name":"setTokenState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setTotalSupply","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenState","outputs":[{"internalType":"contract TokenState","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferAndSettle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"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"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFromAndSettle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferableSynths","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620037af380380620037af833981016040819052620000349162000363565b878787878787878780888888888660128a86816001600160a01b038116620000795760405162461bcd60e51b81526004016200007090620005a6565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383161781556040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91620000c69184906200054a565b60405180910390a1506000546001600160a01b0316620000fa5760405162461bcd60e51b8152600401620000709062000594565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e90620001479083906200053a565b60405180910390a150600480546001600160a01b0319166001600160a01b03881617905584516200018090600590602088019062000235565b5083516200019690600690602087019062000235565b50506007919091556008805460ff191660ff90921691909117610100600160a81b0319166101006001600160a01b03978816021790555050509089169050620001f35760405162461bcd60e51b8152600401620000709062000570565b6001600160a01b0384166200021c5760405162461bcd60e51b8152600401620000709062000582565b5050600a5550620006a69b505050505050505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200027857805160ff1916838001178555620002a8565b82800160010185558215620002a8579182015b82811115620002a85782518255916020019190600101906200028b565b50620002b6929150620002ba565b5090565b620002d791905b80821115620002b65760008155600101620002c1565b90565b8051620002e78162000676565b92915050565b8051620002e78162000690565b8051620002e7816200069b565b600082601f8301126200031957600080fd5b8151620003306200032a82620005df565b620005b8565b915080825260208301602083018583830111156200034d57600080fd5b6200035a83828462000643565b50505092915050565b600080600080600080600080610100898b0312156200038157600080fd5b60006200038f8b8b620002da565b9850506020620003a28b828c01620002fa565b97505060408901516001600160401b03811115620003bf57600080fd5b620003cd8b828c0162000307565b96505060608901516001600160401b03811115620003ea57600080fd5b620003f88b828c0162000307565b95505060806200040b8b828c01620002da565b94505060a06200041e8b828c01620002ed565b93505060c0620004318b828c01620002ed565b92505060e0620004448b828c01620002da565b9150509295985092959890939650565b6200045f8162000636565b82525050565b6200045f8162000610565b60006200047f60128362000607565b7105f70726f78792063616e6e6f7420626520360741b815260200192915050565b6000620004af60128362000607565b7105f6f776e65722063616e6e6f7420626520360741b815260200192915050565b6000620004df60118362000607565b7013dddb995c881b5d5cdd081899481cd95d607a1b815260200192915050565b60006200050e60198362000607565b7f4f776e657220616464726573732063616e6e6f74206265203000000000000000815260200192915050565b60208101620002e7828462000454565b604081016200055a828562000454565b62000569602083018462000465565b9392505050565b60208082528101620002e78162000470565b60208082528101620002e781620004a0565b60208082528101620002e781620004d0565b60208082528101620002e781620004ff565b6040518181016001600160401b0381118282101715620005d757600080fd5b604052919050565b60006001600160401b03821115620005f657600080fd5b506020601f91909101601f19160190565b90815260200190565b6000620002e7826200062a565b6000620002e78262000610565b6001600160a01b031690565b6000620002e7826200061d565b60005b838110156200066057818101518382015260200162000646565b8381111562000670576000848401525b50505050565b620006818162000610565b81146200068d57600080fd5b50565b6200068181620002d7565b62000681816200061d565b6130f980620006b66000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063d67bdd25116100ad578063e90dd9e21161007c578063e90dd9e2146103d5578063eb1edd61146103dd578063ec556889146103e5578063f7ea7a3d146103ed578063ffff51d614610400576101fb565b8063d67bdd251461039f578063dbd06c85146103a7578063dd62ed3e146103af578063e73cced3146103c2576101fb565b80639f769807116100e95780639f76980714610353578063a9059cbb14610366578063b014c3a314610379578063bc67f8321461038c576101fb565b80638da5cb5b1461031d57806395d89b411461032557806397107d6d1461032d5780639dc29fac14610340576101fb565b8063313ce56711610192578063741853601161016157806374185360146102e557806379ba5097146102ed578063867904b4146102f5578063899ffef414610308576101fb565b8063313ce567146102ad57806353a47bb7146102b5578063614d08f8146102ca57806370a08231146102d2576101fb565b806318160ddd116101ce57806318160ddd1461026857806323b872dd1461027d5780632af64bd3146102905780632e0f262514610298576101fb565b806304f3bcec1461020057806306fdde031461021e578063095ea7b3146102335780631627540c14610253575b600080fd5b610208610413565b6040516102159190612ee7565b60405180910390f35b610226610427565b6040516102159190612ef5565b610246610241366004612595565b6104b5565b6040516102159190612dbd565b6102666102613660046124ca565b610542565b005b6102706105a0565b6040516102159190612dcb565b61024661028b366004612548565b6105a6565b6102466105cf565b6102a06106ec565b6040516102159190612fe7565b6102a06106f1565b6102bd6106fa565b6040516102159190612cae565b610270610709565b6102706102e03660046124ca565b610724565b6102666107ae565b610266610904565b610266610303366004612595565b6109a9565b6103106109d8565b6040516102159190612dac565b6102bd610a9c565b610226610aab565b61026661033b3660046124ca565b610b06565b61026661034e366004612595565b610b59565b6102666103613660046125e3565b610b8d565b610246610374366004612595565b610bbc565b610246610387366004612595565b610c4d565b61026661039a3660046124ca565b610daa565b6102bd610dd4565b610270610de3565b6102706103bd36600461250e565b610de9565b6102466103d0366004612548565b610e6d565b610208610fb7565b6102bd610fc6565b610208610fde565b6102666103fb366004612601565b610fed565b61027061040e3660046124ca565b610ffa565b60085461010090046001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ad5780601f10610482576101008083540402835291602001916104ad565b820191906000526020600020905b81548152906001019060200180831161049057829003601f168201915b505050505081565b60006104bf611139565b60035460048054604051633691826360e21b81526001600160a01b03938416939091169163da46098c916104f99185918991899101612d69565b600060405180830381600087803b15801561051357600080fd5b505af1158015610527573d6000803e3d6000fd5b50505050610536818585611179565b60019150505b92915050565b61054a611230565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290610595908390612cae565b60405180910390a150565b60075481565b60006105b061125a565b6105ba84836112af565b6105c58484846113e4565b90505b9392505050565b600060606105db6109d8565b905060005b81518110156106e25760008282815181106105f757fe5b602090810291909101810151600081815260099092526040918290205460085492516321f8a72160e01b81529193506001600160a01b0390811692610100900416906321f8a7219061064d908590600401612dcb565b60206040518083038186803b15801561066557600080fd5b505afa158015610679573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061069d91908101906124f0565b6001600160a01b03161415806106c857506000818152600960205260409020546001600160a01b0316155b156106d957600093505050506106e9565b506001016105e0565b5060019150505b90565b601281565b60085460ff1681565b6001546001600160a01b031681565b7309aead8e8d286ded8d8c2e8cae4c2d8a6f2dce8d60631b81565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161075691869101612cae565b60206040518083038186803b15801561076e57600080fd5b505afa158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107a6919081019061261f565b90505b919050565b60606107b86109d8565b905060005b81518110156109005760008282815181106107d457fe5b602002602001015190506000600860019054906101000a90046001600160a01b03166001600160a01b031663dacb2d0183846040516020016108169190612c98565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610842929190612de7565b60206040518083038186803b15801561085a57600080fd5b505afa15801561086e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061089291908101906124f0565b6000838152600960205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68906108ee9084908490612dd9565b60405180910390a150506001016107bd565b5050565b6001546001600160a01b031633146109375760405162461bcd60e51b815260040161092e90612f16565b60405180910390fd5b6000546001546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9261097a926001600160a01b0391821692911690612cca565b60405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6109b233611574565b6109ce5760405162461bcd60e51b815260040161092e90612f83565b61090082826116ba565b6060806109e36117d1565b60408051600380825260808201909252919250606091906020820183803883390190505090507021b7b63630ba32b930b626b0b730b3b2b960791b81600081518110610a2b57fe5b6020026020010181815250506b22ba3432b92bb930b83832b960a11b81600181518110610a5457fe5b6020026020010181815250506d57726170706572466163746f727960901b81600281518110610a7f57fe5b602002602001018181525050610a9582826118be565b9250505090565b6000546001600160a01b031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ad5780601f10610482576101008083540402835291602001916104ad565b610b0e611230565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e90610595908390612cbc565b610b6233611574565b610b7e5760405162461bcd60e51b815260040161092e90612f83565b610b88828261197a565b505050565b610b95611a41565b600480546001600160a01b0319166001600160a01b038316179055610bb981611aaf565b50565b6000610bc661125a565b600354610bdc906001600160a01b0316836112af565b6001600160a01b03831673feefeefeefeefeefeefeefeefeefeefeefeefeef1415610c1257610c0b8383611b56565b905061053c565b6001600160a01b038316610c3657600354610c0b906001600160a01b03168361197a565b6003546105c8906001600160a01b03168484611cac565b6000610c5761125a565b6000610c61611e36565b600354600a546040516306c5a00b60e21b81526001600160a01b0393841693631b16802c93610c9593911691600401612d91565b606060405180830381600087803b158015610caf57600080fd5b505af1158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ce7919081019061266d565b9250849150508115610d7857600480546003546040516370a0823160e01b81526001600160a01b03928316936370a0823193610d2593169101612cae565b60206040518083038186803b158015610d3d57600080fd5b505afa158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d75919081019061261f565b90505b808411610d855783610d87565b805b600354909450610da1906001600160a01b03168686611cac565b95945050505050565b610db2611e52565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b600a5481565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163dd62ed3e91610e1d918791879101612cca565b60206040518083038186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105c8919081019061261f565b6000610e7761125a565b6000610e81611e36565b6001600160a01b0316631b16802c86600a546040518363ffffffff1660e01b8152600401610eb0929190612d91565b606060405180830381600087803b158015610eca57600080fd5b505af1158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f02919081019061266d565b9250849150508115610f9057600480546040516370a0823160e01b81526001600160a01b03909116916370a0823191610f3d918a9101612cae565b60206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f8d919081019061261f565b90505b80841015610f9e5783610fa0565b805b9350610fad8686866113e4565b9695505050505050565b6004546001600160a01b031681565b73feefeefeefeefeefeefeefeefeefeefeefeefeef81565b6002546001600160a01b031681565b610ff5611a41565b600755565b600080611005611e36565b6001600160a01b03166319d5c66584600a546040518363ffffffff1660e01b8152600401611034929190612d91565b60606040518083038186803b15801561104c57600080fd5b505afa158015611060573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611084919081019061266d565b5050600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916110bb91889101612cae565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061110b919081019061261f565b905080821115611120576000925050506107a9565b611130818363ffffffff611e7c16565b925050506107a9565b6002546001600160a01b0316331480159061115f57506003546001600160a01b03163314155b1561117757600380546001600160a01b031916331790555b565b6002546040516001600160a01b039091169063907dff979061119f908490602001612dcb565b60405160208183030381529060405260036040516111bc90612c77565b60405180910390206111cd88611ea4565b6111d688611ea4565b60006040518763ffffffff1660e01b81526004016111f996959493929190612ea0565b600060405180830381600087803b15801561121357600080fd5b505af1158015611227573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146111775760405162461bcd60e51b815260040161092e90612f73565b6002546001600160a01b031633141561127257611177565b61127b33611eb0565b1561129757600380546001600160a01b03191633179055611177565b60405162461bcd60e51b815260040161092e90612fca565b6112b7611e36565b6001600160a01b031663059c29ec83600a546040518363ffffffff1660e01b81526004016112e6929190612d91565b60206040518083038186803b1580156112fe57600080fd5b505afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611336919081019061261f565b156113535760405162461bcd60e51b815260040161092e90612fba565b8061135d83610ffa565b101561137b5760405162461bcd60e51b815260040161092e90612f53565b6113836121a7565b6001600160a01b03166342a28e21600a546040518263ffffffff1660e01b81526004016113b09190612dcb565b60006040518083038186803b1580156113c857600080fd5b505afa1580156113dc573d6000803e3d6000fd5b505050505050565b60048054600354604051636eb1769f60e11b8152600093600019936001600160a01b039081169363dd62ed3e93611421938b939092169101612cca565b60206040518083038186803b15801561143957600080fd5b505afa15801561144d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611471919081019061261f565b146115695760048054600354604051636eb1769f60e11b81526001600160a01b039283169363da46098c9389931691611518918891879163dd62ed3e916114bc918891889101612cca565b60206040518083038186803b1580156114d457600080fd5b505afa1580156114e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061150c919081019061261f565b9063ffffffff611e7c16565b6040518463ffffffff1660e01b815260040161153693929190612d69565b600060405180830381600087803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050505b6105c5848484611cac565b600061157f826121c1565b80611608575061158d612233565b6001600160a01b031663b38988f7836040518263ffffffff1660e01b81526004016115b89190612cae565b60206040518083038186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061160891908101906125c5565b806116915750611616612252565b6001600160a01b031663e0aa2797836040518263ffffffff1660e01b81526004016116419190612cae565b60206040518083038186803b15801561165957600080fd5b505afa15801561166d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061169191908101906125c5565b806107a6575061169f61226e565b6001600160a01b0316826001600160a01b0316149050919050565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f691859161175591869186916370a08231916116f991879101612cae565b60206040518083038186803b15801561171157600080fd5b505afa158015611725573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611749919081019061261f565b9063ffffffff61228816565b6040518363ffffffff1660e01b8152600401611772929190612d91565b600060405180830381600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b50506007546117b8925090508263ffffffff61228816565b6007556117c7600083836122ad565b61090082826122f0565b60408051600580825260c082019092526060916020820160a0803883390190505090506b53797374656d53746174757360a01b8160008151811061181157fe5b6020026020010181815250506822bc31b430b733b2b960b91b8160018151811061183757fe5b6020026020010181815250506524b9b9bab2b960d11b8160028151811061185a57fe5b60200260200101818152505066119959541bdbdb60ca1b8160038151811061187e57fe5b60200260200101818152505073233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b816004815181106118af57fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156118ee578160200160208202803883390190505b50905060005b83518110156119305783818151811061190957fe5b602002602001015182828151811061191d57fe5b60209081029190910101526001016118f4565b5060005b82518110156119735782818151811061194957fe5b602002602001015182828651018151811061196057fe5b6020908102919091010152600101611934565b5092915050565b600480546040516370a0823160e01b81526000926001600160a01b039092169163b46310f69186916119bc91879186916370a08231916114bc91879101612cae565b6040518363ffffffff1660e01b81526004016119d9929190612d91565b600060405180830381600087803b1580156119f357600080fd5b505af1158015611a07573d6000803e3d6000fd5b5050600754611a1f925090508363ffffffff611e7c16565b600755611a2e836000846122ad565b611a388383612396565b50600192915050565b6002546001600160a01b03163314801590611a6757506003546001600160a01b03163314155b15611a7f57600380546001600160a01b031916331790555b6000546003546001600160a01b039081169116146111775760405162461bcd60e51b815260040161092e90612f33565b6002546040516001600160a01b039091169063907dff9790611ad5908490602001612cae565b6040516020818303038152906040526001604051611af290612c82565b6040519081900381206001600160e01b031960e086901b168252611b2193929160009081908190600401612e07565b600060405180830381600087803b158015611b3b57600080fd5b505af1158015611b4f573d6000803e3d6000fd5b5050505050565b600080600a54631cd554d160e21b1415611b8a57506003548290611b84906001600160a01b03168583611cac565b50611c3d565b611b92611e36565b600354600a546040516327c319e960e11b81526001600160a01b0393841693634f8633d293611be893911691829190899073feefeefeefeefeefeefeefeefeefeefeefeefeef9060009081908190600401612ce5565b6040805180830381600087803b158015611c0157600080fd5b505af1158015611c15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c39919081019061263d565b5090505b611c456123d9565b6001600160a01b03166322bf55ef826040518263ffffffff1660e01b8152600401611c709190612dcb565b600060405180830381600087803b158015611c8a57600080fd5b505af1158015611c9e573d6000803e3d6000fd5b506001979650505050505050565b60006001600160a01b03831615801590611ccf57506001600160a01b0383163014155b8015611ce957506002546001600160a01b03848116911614155b611d055760405162461bcd60e51b815260040161092e90612f06565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f6918791611d4491879186916370a08231916114bc91879101612cae565b6040518363ffffffff1660e01b8152600401611d61929190612d91565b600060405180830381600087803b158015611d7b57600080fd5b505af1158015611d8f573d6000803e3d6000fd5b5050600480546040516370a0823160e01b81526001600160a01b03909116935063b46310f692508691611dd291879186916370a08231916116f991879101612cae565b6040518363ffffffff1660e01b8152600401611def929190612d91565b600060405180830381600087803b158015611e0957600080fd5b505af1158015611e1d573d6000803e3d6000fd5b50505050611e2c8484846122ad565b5060019392505050565b6000611e4d6822bc31b430b733b2b960b91b6123ea565b905090565b6002546001600160a01b031633146111775760405162461bcd60e51b815260040161092e90612fca565b600082821115611e9e5760405162461bcd60e51b815260040161092e90612f63565b50900390565b6001600160a01b031690565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a72190611ee490600401612f93565b60206040518083038186803b158015611efc57600080fd5b505afa158015611f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611f3491908101906124f0565b6001600160a01b0316826001600160a01b03161480611fe557506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a72190611f8090600401612f26565b60206040518083038186803b158015611f9857600080fd5b505afa158015611fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611fd091908101906124f0565b6001600160a01b0316826001600160a01b0316145b8061208257506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061201d90600401612fda565b60206040518083038186803b15801561203557600080fd5b505afa158015612049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061206d91908101906124f0565b6001600160a01b0316826001600160a01b0316145b8061211f57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906120ba90600401612fa0565b60206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061210a91908101906124f0565b6001600160a01b0316826001600160a01b0316145b806107a657506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061215790600401612fad565b60206040518083038186803b15801561216f57600080fd5b505afa158015612183573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061169f91908101906124f0565b6000611e4d6b53797374656d53746174757360a01b6123ea565b60006121cb6123d9565b6001600160a01b0316826001600160a01b0316148061220257506121ed611e36565b6001600160a01b0316826001600160a01b0316145b806122255750612210612447565b6001600160a01b0316826001600160a01b0316145b806107a6575061169f61245b565b6000611e4d7021b7b63630ba32b930b626b0b730b3b2b960791b6123ea565b6000611e4d6d57726170706572466163746f727960901b6123ea565b6000611e4d6b22ba3432b92bb930b83832b960a11b6123ea565b6000828201838110156105c85760405162461bcd60e51b815260040161092e90612f43565b6002546040516001600160a01b039091169063907dff97906122d3908490602001612dcb565b60405160208183030381529060405260036040516111bc90612ca3565b6002546040516001600160a01b039091169063907dff9790612316908490602001612dcb565b604051602081830303815290604052600260405161233390612c8d565b604051809103902061234487611ea4565b6000806040518763ffffffff1660e01b815260040161236896959493929190612e66565b600060405180830381600087803b15801561238257600080fd5b505af11580156113dc573d6000803e3d6000fd5b6002546040516001600160a01b039091169063907dff97906123bc908490602001612dcb565b604051602081830303815290604052600260405161233390612c6c565b6000611e4d66119959541bdbdb60ca1b5b60008181526009602090815260408083205490516001600160a01b03909116918215159161241a91869101612c4c565b604051602081830303815290604052906119735760405162461bcd60e51b815260040161092e9190612ef5565b6000611e4d6524b9b9bab2b960d11b6123ea565b6000611e4d73233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b6123ea565b803561053c81613087565b805161053c81613087565b805161053c8161309b565b805161053c816130a4565b803561053c816130a4565b803561053c816130ad565b805161053c816130ad565b6000602082840312156124dc57600080fd5b60006124e8848461247d565b949350505050565b60006020828403121561250257600080fd5b60006124e88484612488565b6000806040838503121561252157600080fd5b600061252d858561247d565b925050602061253e8582860161247d565b9150509250929050565b60008060006060848603121561255d57600080fd5b6000612569868661247d565b935050602061257a8682870161247d565b925050604061258b868287016124b4565b9150509250925092565b600080604083850312156125a857600080fd5b60006125b4858561247d565b925050602061253e858286016124b4565b6000602082840312156125d757600080fd5b60006124e88484612493565b6000602082840312156125f557600080fd5b60006124e884846124a9565b60006020828403121561261357600080fd5b60006124e884846124b4565b60006020828403121561263157600080fd5b60006124e884846124bf565b6000806040838503121561265057600080fd5b600061265c85856124bf565b925050602061253e8582860161249e565b60008060006060848603121561268257600080fd5b600061268e86866124bf565b935050602061269f868287016124bf565b925050604061258b868287016124bf565b60006126bc838361273e565b505060200190565b6126cd81613029565b82525050565b6126cd81613008565b60006126e782612ffb565b6126f18185612fff565b93506126fc83612ff5565b8060005b8381101561272a57815161271488826126b0565b975061271f83612ff5565b925050600101612700565b509495945050505050565b6126cd81613013565b6126cd816106e9565b6126cd612753826106e9565b6106e9565b600061276382612ffb565b61276d8185612fff565b935061277d81856020860161304d565b6127868161307d565b9093019392505050565b6126cd81613018565b6126cd81613034565b6126cd81613042565b60006127b8601f83612fff565b7f43616e6e6f74207472616e7366657220746f2074686973206164647265737300815260200192915050565b60006127f1603583612fff565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b6c29bcb73a342932b232b2b6b2b960991b9052565b600061285d601383612fff565b7227bbb732b91037b7363c90333ab731ba34b7b760691b815260200192915050565b600061288c601b83612fff565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006128c5602f83612fff565b7f496e73756666696369656e742062616c616e636520616674657220616e79207381526e6574746c656d656e74206f77696e6760881b602082015260400192915050565b6000612916601e83612fff565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b600061294f6011836107a9565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b600061297c6017836107a9565b7f4275726e656428616464726573732c75696e7432353629000000000000000000815260170192915050565b60006129b5602f83612fff565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b631cd554d160e21b9052565b6000612a12601f83612fff565b7f4f6e6c7920696e7465726e616c20636f6e74726163747320616c6c6f77656400815260200192915050565b6000612a4b6021836107a9565b7f417070726f76616c28616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b6000612a8e601a836107a9565b7f546f6b656e5374617465557064617465642861646472657373290000000000008152601a0192915050565b6000612ac76017836107a9565b7f49737375656428616464726573732c75696e7432353629000000000000000000815260170192915050565b6e10dbdb1b185d195c985b14da1bdc9d608a1b9052565b712730ba34bb32a2ba3432b92bb930b83832b960711b9052565b6000612b316019836107a9565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b6411195c1bdd60da1b9052565b6000612b77602583612fff565b7f43616e6e6f74207472616e7366657220647572696e672077616974696e672070815264195c9a5bd960da1b602082015260400192915050565b6000612bbe6021836107a9565b7f5472616e7366657228616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b6000612c01601783612fff565b7f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000815260200192915050565b6d57726170706572466163746f727960901b9052565b6126cd81613023565b6000612c5782612942565b9150612c638284612747565b50602001919050565b600061053c8261296f565b600061053c82612a3e565b600061053c82612a81565b600061053c82612aba565b6000612c5782612b24565b600061053c82612bb1565b6020810161053c82846126d3565b6020810161053c82846126c4565b60408101612cd882856126d3565b6105c860208301846126d3565b6101208101612cf4828b6126d3565b612d01602083018a6126d3565b612d0e604083018961273e565b612d1b606083018861273e565b612d27608083016129f9565b612d3460a08301876126d3565b612d4160c0830186612735565b612d4e60e08301856126c4565b612d5c61010083018461273e565b9998505050505050505050565b60608101612d7782866126d3565b612d8460208301856126d3565b6124e8604083018461273e565b60408101612d9f82856126d3565b6105c8602083018461273e565b602080825281016105c881846126dc565b6020810161053c8284612735565b6020810161053c828461273e565b60408101612cd8828561273e565b60408101612df5828561273e565b81810360208301526105c58184612758565b60c08082528101612e188189612758565b9050612e2760208301886127a2565b612e34604083018761273e565b612e416060830186612799565b612e4e6080830185612799565b612e5b60a0830184612799565b979650505050505050565b60c08082528101612e778189612758565b9050612e8660208301886127a2565b612e93604083018761273e565b612e41606083018661273e565b60c08082528101612eb18189612758565b9050612ec060208301886127a2565b612ecd604083018761273e565b612eda606083018661273e565b612e4e608083018561273e565b6020810161053c8284612790565b602080825281016105c88184612758565b602080825281016107a6816127ab565b602080825281016107a6816127e4565b602081016107a98261283b565b602080825281016107a681612850565b602080825281016107a68161287f565b602080825281016107a6816128b8565b602080825281016107a681612909565b602080825281016107a6816129a8565b602080825281016107a681612a05565b602081016107a982612af3565b602081016107a982612b0a565b602081016107a982612b5d565b602080825281016107a681612b6a565b602080825281016107a681612bf4565b602081016107a982612c2d565b6020810161053c8284612c43565b60200190565b5190565b90815260200190565b60006107a682611ea4565b151590565b60006107a682613008565b60ff1690565b60006107a682613018565b60006107a6612753836106e9565b60006107a6826106e9565b60005b83811015613068578181015183820152602001613050565b83811115613077576000848401525b50505050565b601f01601f191690565b61309081613008565b8114610bb957600080fd5b61309081613013565b61309081613018565b613090816106e956fea365627a7a72315820845bdc1a78eaffe4ecadefeaff13fc9da099a4b459aeb9193f61cfd23a8499cc6c6578706572696d656e74616cf564736f6c63430005100040000000000000000000000000d7d674d80e79cf3a3b67d6a510ac1b0493df47cf00000000000000000000000012f907dff4ae0d949fe127646450c040c0dff6f10000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee973555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000529c553ef2d0370279dc8abf19702b98b166d252000000000000000000000000000000000000000000000000000000000000000a53796e746820735553440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047355534400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638da5cb5b1161011a578063d67bdd25116100ad578063e90dd9e21161007c578063e90dd9e2146103d5578063eb1edd61146103dd578063ec556889146103e5578063f7ea7a3d146103ed578063ffff51d614610400576101fb565b8063d67bdd251461039f578063dbd06c85146103a7578063dd62ed3e146103af578063e73cced3146103c2576101fb565b80639f769807116100e95780639f76980714610353578063a9059cbb14610366578063b014c3a314610379578063bc67f8321461038c576101fb565b80638da5cb5b1461031d57806395d89b411461032557806397107d6d1461032d5780639dc29fac14610340576101fb565b8063313ce56711610192578063741853601161016157806374185360146102e557806379ba5097146102ed578063867904b4146102f5578063899ffef414610308576101fb565b8063313ce567146102ad57806353a47bb7146102b5578063614d08f8146102ca57806370a08231146102d2576101fb565b806318160ddd116101ce57806318160ddd1461026857806323b872dd1461027d5780632af64bd3146102905780632e0f262514610298576101fb565b806304f3bcec1461020057806306fdde031461021e578063095ea7b3146102335780631627540c14610253575b600080fd5b610208610413565b6040516102159190612ee7565b60405180910390f35b610226610427565b6040516102159190612ef5565b610246610241366004612595565b6104b5565b6040516102159190612dbd565b6102666102613660046124ca565b610542565b005b6102706105a0565b6040516102159190612dcb565b61024661028b366004612548565b6105a6565b6102466105cf565b6102a06106ec565b6040516102159190612fe7565b6102a06106f1565b6102bd6106fa565b6040516102159190612cae565b610270610709565b6102706102e03660046124ca565b610724565b6102666107ae565b610266610904565b610266610303366004612595565b6109a9565b6103106109d8565b6040516102159190612dac565b6102bd610a9c565b610226610aab565b61026661033b3660046124ca565b610b06565b61026661034e366004612595565b610b59565b6102666103613660046125e3565b610b8d565b610246610374366004612595565b610bbc565b610246610387366004612595565b610c4d565b61026661039a3660046124ca565b610daa565b6102bd610dd4565b610270610de3565b6102706103bd36600461250e565b610de9565b6102466103d0366004612548565b610e6d565b610208610fb7565b6102bd610fc6565b610208610fde565b6102666103fb366004612601565b610fed565b61027061040e3660046124ca565b610ffa565b60085461010090046001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ad5780601f10610482576101008083540402835291602001916104ad565b820191906000526020600020905b81548152906001019060200180831161049057829003601f168201915b505050505081565b60006104bf611139565b60035460048054604051633691826360e21b81526001600160a01b03938416939091169163da46098c916104f99185918991899101612d69565b600060405180830381600087803b15801561051357600080fd5b505af1158015610527573d6000803e3d6000fd5b50505050610536818585611179565b60019150505b92915050565b61054a611230565b600180546001600160a01b0319166001600160a01b0383161790556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290610595908390612cae565b60405180910390a150565b60075481565b60006105b061125a565b6105ba84836112af565b6105c58484846113e4565b90505b9392505050565b600060606105db6109d8565b905060005b81518110156106e25760008282815181106105f757fe5b602090810291909101810151600081815260099092526040918290205460085492516321f8a72160e01b81529193506001600160a01b0390811692610100900416906321f8a7219061064d908590600401612dcb565b60206040518083038186803b15801561066557600080fd5b505afa158015610679573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061069d91908101906124f0565b6001600160a01b03161415806106c857506000818152600960205260409020546001600160a01b0316155b156106d957600093505050506106e9565b506001016105e0565b5060019150505b90565b601281565b60085460ff1681565b6001546001600160a01b031681565b7309aead8e8d286ded8d8c2e8cae4c2d8a6f2dce8d60631b81565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161075691869101612cae565b60206040518083038186803b15801561076e57600080fd5b505afa158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506107a6919081019061261f565b90505b919050565b60606107b86109d8565b905060005b81518110156109005760008282815181106107d457fe5b602002602001015190506000600860019054906101000a90046001600160a01b03166001600160a01b031663dacb2d0183846040516020016108169190612c98565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610842929190612de7565b60206040518083038186803b15801561085a57600080fd5b505afa15801561086e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061089291908101906124f0565b6000838152600960205260409081902080546001600160a01b0319166001600160a01b038416179055519091507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68906108ee9084908490612dd9565b60405180910390a150506001016107bd565b5050565b6001546001600160a01b031633146109375760405162461bcd60e51b815260040161092e90612f16565b60405180910390fd5b6000546001546040517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9261097a926001600160a01b0391821692911690612cca565b60405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6109b233611574565b6109ce5760405162461bcd60e51b815260040161092e90612f83565b61090082826116ba565b6060806109e36117d1565b60408051600380825260808201909252919250606091906020820183803883390190505090507021b7b63630ba32b930b626b0b730b3b2b960791b81600081518110610a2b57fe5b6020026020010181815250506b22ba3432b92bb930b83832b960a11b81600181518110610a5457fe5b6020026020010181815250506d57726170706572466163746f727960901b81600281518110610a7f57fe5b602002602001018181525050610a9582826118be565b9250505090565b6000546001600160a01b031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ad5780601f10610482576101008083540402835291602001916104ad565b610b0e611230565b600280546001600160a01b0319166001600160a01b0383161790556040517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e90610595908390612cbc565b610b6233611574565b610b7e5760405162461bcd60e51b815260040161092e90612f83565b610b88828261197a565b505050565b610b95611a41565b600480546001600160a01b0319166001600160a01b038316179055610bb981611aaf565b50565b6000610bc661125a565b600354610bdc906001600160a01b0316836112af565b6001600160a01b03831673feefeefeefeefeefeefeefeefeefeefeefeefeef1415610c1257610c0b8383611b56565b905061053c565b6001600160a01b038316610c3657600354610c0b906001600160a01b03168361197a565b6003546105c8906001600160a01b03168484611cac565b6000610c5761125a565b6000610c61611e36565b600354600a546040516306c5a00b60e21b81526001600160a01b0393841693631b16802c93610c9593911691600401612d91565b606060405180830381600087803b158015610caf57600080fd5b505af1158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ce7919081019061266d565b9250849150508115610d7857600480546003546040516370a0823160e01b81526001600160a01b03928316936370a0823193610d2593169101612cae565b60206040518083038186803b158015610d3d57600080fd5b505afa158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d75919081019061261f565b90505b808411610d855783610d87565b805b600354909450610da1906001600160a01b03168686611cac565b95945050505050565b610db2611e52565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b600a5481565b60048054604051636eb1769f60e11b81526000926001600160a01b039092169163dd62ed3e91610e1d918791879101612cca565b60206040518083038186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105c8919081019061261f565b6000610e7761125a565b6000610e81611e36565b6001600160a01b0316631b16802c86600a546040518363ffffffff1660e01b8152600401610eb0929190612d91565b606060405180830381600087803b158015610eca57600080fd5b505af1158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f02919081019061266d565b9250849150508115610f9057600480546040516370a0823160e01b81526001600160a01b03909116916370a0823191610f3d918a9101612cae565b60206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f8d919081019061261f565b90505b80841015610f9e5783610fa0565b805b9350610fad8686866113e4565b9695505050505050565b6004546001600160a01b031681565b73feefeefeefeefeefeefeefeefeefeefeefeefeef81565b6002546001600160a01b031681565b610ff5611a41565b600755565b600080611005611e36565b6001600160a01b03166319d5c66584600a546040518363ffffffff1660e01b8152600401611034929190612d91565b60606040518083038186803b15801561104c57600080fd5b505afa158015611060573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611084919081019061266d565b5050600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916110bb91889101612cae565b60206040518083038186803b1580156110d357600080fd5b505afa1580156110e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061110b919081019061261f565b905080821115611120576000925050506107a9565b611130818363ffffffff611e7c16565b925050506107a9565b6002546001600160a01b0316331480159061115f57506003546001600160a01b03163314155b1561117757600380546001600160a01b031916331790555b565b6002546040516001600160a01b039091169063907dff979061119f908490602001612dcb565b60405160208183030381529060405260036040516111bc90612c77565b60405180910390206111cd88611ea4565b6111d688611ea4565b60006040518763ffffffff1660e01b81526004016111f996959493929190612ea0565b600060405180830381600087803b15801561121357600080fd5b505af1158015611227573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146111775760405162461bcd60e51b815260040161092e90612f73565b6002546001600160a01b031633141561127257611177565b61127b33611eb0565b1561129757600380546001600160a01b03191633179055611177565b60405162461bcd60e51b815260040161092e90612fca565b6112b7611e36565b6001600160a01b031663059c29ec83600a546040518363ffffffff1660e01b81526004016112e6929190612d91565b60206040518083038186803b1580156112fe57600080fd5b505afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611336919081019061261f565b156113535760405162461bcd60e51b815260040161092e90612fba565b8061135d83610ffa565b101561137b5760405162461bcd60e51b815260040161092e90612f53565b6113836121a7565b6001600160a01b03166342a28e21600a546040518263ffffffff1660e01b81526004016113b09190612dcb565b60006040518083038186803b1580156113c857600080fd5b505afa1580156113dc573d6000803e3d6000fd5b505050505050565b60048054600354604051636eb1769f60e11b8152600093600019936001600160a01b039081169363dd62ed3e93611421938b939092169101612cca565b60206040518083038186803b15801561143957600080fd5b505afa15801561144d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611471919081019061261f565b146115695760048054600354604051636eb1769f60e11b81526001600160a01b039283169363da46098c9389931691611518918891879163dd62ed3e916114bc918891889101612cca565b60206040518083038186803b1580156114d457600080fd5b505afa1580156114e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061150c919081019061261f565b9063ffffffff611e7c16565b6040518463ffffffff1660e01b815260040161153693929190612d69565b600060405180830381600087803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050505b6105c5848484611cac565b600061157f826121c1565b80611608575061158d612233565b6001600160a01b031663b38988f7836040518263ffffffff1660e01b81526004016115b89190612cae565b60206040518083038186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061160891908101906125c5565b806116915750611616612252565b6001600160a01b031663e0aa2797836040518263ffffffff1660e01b81526004016116419190612cae565b60206040518083038186803b15801561165957600080fd5b505afa15801561166d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061169191908101906125c5565b806107a6575061169f61226e565b6001600160a01b0316826001600160a01b0316149050919050565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f691859161175591869186916370a08231916116f991879101612cae565b60206040518083038186803b15801561171157600080fd5b505afa158015611725573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611749919081019061261f565b9063ffffffff61228816565b6040518363ffffffff1660e01b8152600401611772929190612d91565b600060405180830381600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b50506007546117b8925090508263ffffffff61228816565b6007556117c7600083836122ad565b61090082826122f0565b60408051600580825260c082019092526060916020820160a0803883390190505090506b53797374656d53746174757360a01b8160008151811061181157fe5b6020026020010181815250506822bc31b430b733b2b960b91b8160018151811061183757fe5b6020026020010181815250506524b9b9bab2b960d11b8160028151811061185a57fe5b60200260200101818152505066119959541bdbdb60ca1b8160038151811061187e57fe5b60200260200101818152505073233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b816004815181106118af57fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156118ee578160200160208202803883390190505b50905060005b83518110156119305783818151811061190957fe5b602002602001015182828151811061191d57fe5b60209081029190910101526001016118f4565b5060005b82518110156119735782818151811061194957fe5b602002602001015182828651018151811061196057fe5b6020908102919091010152600101611934565b5092915050565b600480546040516370a0823160e01b81526000926001600160a01b039092169163b46310f69186916119bc91879186916370a08231916114bc91879101612cae565b6040518363ffffffff1660e01b81526004016119d9929190612d91565b600060405180830381600087803b1580156119f357600080fd5b505af1158015611a07573d6000803e3d6000fd5b5050600754611a1f925090508363ffffffff611e7c16565b600755611a2e836000846122ad565b611a388383612396565b50600192915050565b6002546001600160a01b03163314801590611a6757506003546001600160a01b03163314155b15611a7f57600380546001600160a01b031916331790555b6000546003546001600160a01b039081169116146111775760405162461bcd60e51b815260040161092e90612f33565b6002546040516001600160a01b039091169063907dff9790611ad5908490602001612cae565b6040516020818303038152906040526001604051611af290612c82565b6040519081900381206001600160e01b031960e086901b168252611b2193929160009081908190600401612e07565b600060405180830381600087803b158015611b3b57600080fd5b505af1158015611b4f573d6000803e3d6000fd5b5050505050565b600080600a54631cd554d160e21b1415611b8a57506003548290611b84906001600160a01b03168583611cac565b50611c3d565b611b92611e36565b600354600a546040516327c319e960e11b81526001600160a01b0393841693634f8633d293611be893911691829190899073feefeefeefeefeefeefeefeefeefeefeefeefeef9060009081908190600401612ce5565b6040805180830381600087803b158015611c0157600080fd5b505af1158015611c15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c39919081019061263d565b5090505b611c456123d9565b6001600160a01b03166322bf55ef826040518263ffffffff1660e01b8152600401611c709190612dcb565b600060405180830381600087803b158015611c8a57600080fd5b505af1158015611c9e573d6000803e3d6000fd5b506001979650505050505050565b60006001600160a01b03831615801590611ccf57506001600160a01b0383163014155b8015611ce957506002546001600160a01b03848116911614155b611d055760405162461bcd60e51b815260040161092e90612f06565b600480546040516370a0823160e01b81526001600160a01b039091169163b46310f6918791611d4491879186916370a08231916114bc91879101612cae565b6040518363ffffffff1660e01b8152600401611d61929190612d91565b600060405180830381600087803b158015611d7b57600080fd5b505af1158015611d8f573d6000803e3d6000fd5b5050600480546040516370a0823160e01b81526001600160a01b03909116935063b46310f692508691611dd291879186916370a08231916116f991879101612cae565b6040518363ffffffff1660e01b8152600401611def929190612d91565b600060405180830381600087803b158015611e0957600080fd5b505af1158015611e1d573d6000803e3d6000fd5b50505050611e2c8484846122ad565b5060019392505050565b6000611e4d6822bc31b430b733b2b960b91b6123ea565b905090565b6002546001600160a01b031633146111775760405162461bcd60e51b815260040161092e90612fca565b600082821115611e9e5760405162461bcd60e51b815260040161092e90612f63565b50900390565b6001600160a01b031690565b6008546040516321f8a72160e01b815260009161010090046001600160a01b0316906321f8a72190611ee490600401612f93565b60206040518083038186803b158015611efc57600080fd5b505afa158015611f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611f3491908101906124f0565b6001600160a01b0316826001600160a01b03161480611fe557506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a72190611f8090600401612f26565b60206040518083038186803b158015611f9857600080fd5b505afa158015611fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611fd091908101906124f0565b6001600160a01b0316826001600160a01b0316145b8061208257506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061201d90600401612fda565b60206040518083038186803b15801561203557600080fd5b505afa158015612049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061206d91908101906124f0565b6001600160a01b0316826001600160a01b0316145b8061211f57506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a721906120ba90600401612fa0565b60206040518083038186803b1580156120d257600080fd5b505afa1580156120e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061210a91908101906124f0565b6001600160a01b0316826001600160a01b0316145b806107a657506008546040516321f8a72160e01b81526101009091046001600160a01b0316906321f8a7219061215790600401612fad565b60206040518083038186803b15801561216f57600080fd5b505afa158015612183573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061169f91908101906124f0565b6000611e4d6b53797374656d53746174757360a01b6123ea565b60006121cb6123d9565b6001600160a01b0316826001600160a01b0316148061220257506121ed611e36565b6001600160a01b0316826001600160a01b0316145b806122255750612210612447565b6001600160a01b0316826001600160a01b0316145b806107a6575061169f61245b565b6000611e4d7021b7b63630ba32b930b626b0b730b3b2b960791b6123ea565b6000611e4d6d57726170706572466163746f727960901b6123ea565b6000611e4d6b22ba3432b92bb930b83832b960a11b6123ea565b6000828201838110156105c85760405162461bcd60e51b815260040161092e90612f43565b6002546040516001600160a01b039091169063907dff97906122d3908490602001612dcb565b60405160208183030381529060405260036040516111bc90612ca3565b6002546040516001600160a01b039091169063907dff9790612316908490602001612dcb565b604051602081830303815290604052600260405161233390612c8d565b604051809103902061234487611ea4565b6000806040518763ffffffff1660e01b815260040161236896959493929190612e66565b600060405180830381600087803b15801561238257600080fd5b505af11580156113dc573d6000803e3d6000fd5b6002546040516001600160a01b039091169063907dff97906123bc908490602001612dcb565b604051602081830303815290604052600260405161233390612c6c565b6000611e4d66119959541bdbdb60ca1b5b60008181526009602090815260408083205490516001600160a01b03909116918215159161241a91869101612c4c565b604051602081830303815290604052906119735760405162461bcd60e51b815260040161092e9190612ef5565b6000611e4d6524b9b9bab2b960d11b6123ea565b6000611e4d73233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b6123ea565b803561053c81613087565b805161053c81613087565b805161053c8161309b565b805161053c816130a4565b803561053c816130a4565b803561053c816130ad565b805161053c816130ad565b6000602082840312156124dc57600080fd5b60006124e8848461247d565b949350505050565b60006020828403121561250257600080fd5b60006124e88484612488565b6000806040838503121561252157600080fd5b600061252d858561247d565b925050602061253e8582860161247d565b9150509250929050565b60008060006060848603121561255d57600080fd5b6000612569868661247d565b935050602061257a8682870161247d565b925050604061258b868287016124b4565b9150509250925092565b600080604083850312156125a857600080fd5b60006125b4858561247d565b925050602061253e858286016124b4565b6000602082840312156125d757600080fd5b60006124e88484612493565b6000602082840312156125f557600080fd5b60006124e884846124a9565b60006020828403121561261357600080fd5b60006124e884846124b4565b60006020828403121561263157600080fd5b60006124e884846124bf565b6000806040838503121561265057600080fd5b600061265c85856124bf565b925050602061253e8582860161249e565b60008060006060848603121561268257600080fd5b600061268e86866124bf565b935050602061269f868287016124bf565b925050604061258b868287016124bf565b60006126bc838361273e565b505060200190565b6126cd81613029565b82525050565b6126cd81613008565b60006126e782612ffb565b6126f18185612fff565b93506126fc83612ff5565b8060005b8381101561272a57815161271488826126b0565b975061271f83612ff5565b925050600101612700565b509495945050505050565b6126cd81613013565b6126cd816106e9565b6126cd612753826106e9565b6106e9565b600061276382612ffb565b61276d8185612fff565b935061277d81856020860161304d565b6127868161307d565b9093019392505050565b6126cd81613018565b6126cd81613034565b6126cd81613042565b60006127b8601f83612fff565b7f43616e6e6f74207472616e7366657220746f2074686973206164647265737300815260200192915050565b60006127f1603583612fff565b7f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7581527402063616e20616363657074206f776e65727368697605c1b602082015260400192915050565b6c29bcb73a342932b232b2b6b2b960991b9052565b600061285d601383612fff565b7227bbb732b91037b7363c90333ab731ba34b7b760691b815260200192915050565b600061288c601b83612fff565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006128c5602f83612fff565b7f496e73756666696369656e742062616c616e636520616674657220616e79207381526e6574746c656d656e74206f77696e6760881b602082015260400192915050565b6000612916601e83612fff565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b600061294f6011836107a9565b70026b4b9b9b4b7339030b2323932b9b99d1607d1b815260110192915050565b600061297c6017836107a9565b7f4275726e656428616464726573732c75696e7432353629000000000000000000815260170192915050565b60006129b5602f83612fff565b7f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726681526e37b936903a3434b99030b1ba34b7b760891b602082015260400192915050565b631cd554d160e21b9052565b6000612a12601f83612fff565b7f4f6e6c7920696e7465726e616c20636f6e74726163747320616c6c6f77656400815260200192915050565b6000612a4b6021836107a9565b7f417070726f76616c28616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b6000612a8e601a836107a9565b7f546f6b656e5374617465557064617465642861646472657373290000000000008152601a0192915050565b6000612ac76017836107a9565b7f49737375656428616464726573732c75696e7432353629000000000000000000815260170192915050565b6e10dbdb1b185d195c985b14da1bdc9d608a1b9052565b712730ba34bb32a2ba3432b92bb930b83832b960711b9052565b6000612b316019836107a9565b7f5265736f6c766572206d697373696e67207461726765743a2000000000000000815260190192915050565b6411195c1bdd60da1b9052565b6000612b77602583612fff565b7f43616e6e6f74207472616e7366657220647572696e672077616974696e672070815264195c9a5bd960da1b602082015260400192915050565b6000612bbe6021836107a9565b7f5472616e7366657228616464726573732c616464726573732c75696e743235368152602960f81b602082015260210192915050565b6000612c01601783612fff565b7f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000815260200192915050565b6d57726170706572466163746f727960901b9052565b6126cd81613023565b6000612c5782612942565b9150612c638284612747565b50602001919050565b600061053c8261296f565b600061053c82612a3e565b600061053c82612a81565b600061053c82612aba565b6000612c5782612b24565b600061053c82612bb1565b6020810161053c82846126d3565b6020810161053c82846126c4565b60408101612cd882856126d3565b6105c860208301846126d3565b6101208101612cf4828b6126d3565b612d01602083018a6126d3565b612d0e604083018961273e565b612d1b606083018861273e565b612d27608083016129f9565b612d3460a08301876126d3565b612d4160c0830186612735565b612d4e60e08301856126c4565b612d5c61010083018461273e565b9998505050505050505050565b60608101612d7782866126d3565b612d8460208301856126d3565b6124e8604083018461273e565b60408101612d9f82856126d3565b6105c8602083018461273e565b602080825281016105c881846126dc565b6020810161053c8284612735565b6020810161053c828461273e565b60408101612cd8828561273e565b60408101612df5828561273e565b81810360208301526105c58184612758565b60c08082528101612e188189612758565b9050612e2760208301886127a2565b612e34604083018761273e565b612e416060830186612799565b612e4e6080830185612799565b612e5b60a0830184612799565b979650505050505050565b60c08082528101612e778189612758565b9050612e8660208301886127a2565b612e93604083018761273e565b612e41606083018661273e565b60c08082528101612eb18189612758565b9050612ec060208301886127a2565b612ecd604083018761273e565b612eda606083018661273e565b612e4e608083018561273e565b6020810161053c8284612790565b602080825281016105c88184612758565b602080825281016107a6816127ab565b602080825281016107a6816127e4565b602081016107a98261283b565b602080825281016107a681612850565b602080825281016107a68161287f565b602080825281016107a6816128b8565b602080825281016107a681612909565b602080825281016107a6816129a8565b602080825281016107a681612a05565b602081016107a982612af3565b602081016107a982612b0a565b602081016107a982612b5d565b602080825281016107a681612b6a565b602080825281016107a681612bf4565b602081016107a982612c2d565b6020810161053c8284612c43565b60200190565b5190565b90815260200190565b60006107a682611ea4565b151590565b60006107a682613008565b60ff1690565b60006107a682613018565b60006107a6612753836106e9565b60006107a6826106e9565b60005b83811015613068578181015183820152602001613050565b83811115613077576000848401525b50505050565b601f01601f191690565b61309081613008565b8114610bb957600080fd5b61309081613013565b61309081613018565b613090816106e956fea365627a7a72315820845bdc1a78eaffe4ecadefeaff13fc9da099a4b459aeb9193f61cfd23a8499cc6c6578706572696d656e74616cf564736f6c63430005100040
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d7d674d80e79cf3a3b67d6a510ac1b0493df47cf00000000000000000000000012f907dff4ae0d949fe127646450c040c0dff6f10000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee973555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000529c553ef2d0370279dc8abf19702b98b166d252000000000000000000000000000000000000000000000000000000000000000a53796e746820735553440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047355534400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _proxy (address): 0xD7D674d80e79CF3A3b67D6a510AC1B0493dF47cF
Arg [1] : _tokenState (address): 0x12F907Dff4AE0D949fE127646450C040C0DFF6F1
Arg [2] : _tokenName (string): Synth sUSD
Arg [3] : _tokenSymbol (string): sUSD
Arg [4] : _owner (address): 0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9
Arg [5] : _currencyKey (bytes32): 0x7355534400000000000000000000000000000000000000000000000000000000
Arg [6] : _totalSupply (uint256): 0
Arg [7] : _resolver (address): 0x529C553eF2d0370279DC8AbF19702B98b166D252
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000d7d674d80e79cf3a3b67d6a510ac1b0493df47cf
Arg [1] : 00000000000000000000000012f907dff4ae0d949fe127646450c040c0dff6f1
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [4] : 00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9
Arg [5] : 7355534400000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000529c553ef2d0370279dc8abf19702b98b166d252
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [9] : 53796e7468207355534400000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 7355534400000000000000000000000000000000000000000000000000000000
Library Used
SafeDecimalMath : 0x2ad7ccaac0eeb396c3a5fc2b73a885435688c0d5SystemSettingsLib : 0x343b5efcbf331957d3f4236eb16c338d7256f62dSignedSafeDecimalMath : 0xc7dcc0929881530d3386de51d9ffdd35b8009c6eExchangeSettlementLib : 0x3f60ffaef1ebd84e3c2d0c9c0e12388365d5df12
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.