Synthetix: Synth sUSD contract has migrated to a new address.
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x6025f88A...Bac8E444b The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Synth
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-09-26 */ /* =============================================== * Flattened with Solidifier by Coinage * * https://solidifier.coina.ge * =============================================== */ pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SafeDecimalMath.sol version: 2.0 author: Kevin Brown Gavin Conway date: 2018-10-18 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A library providing safe mathematical operations for division and multiplication with the capability to round or truncate the results to the nearest increment. Operations can return a standard precision or high precision decimal. High precision decimals are useful for example when attempting to calculate percentages or fractions accurately. ----------------------------------------------------------------- */ /** * @title Safely manipulate unsigned fixed-point decimals at a given precision level. * @dev Functions accepting uints in this contract and derived contracts * are taken to be such fixed point decimals of a specified precision (either standard * or high). */ 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; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Owned.sol version: 1.1 author: Anton Jurisevic Dominic Romanowski date: 2018-2-26 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- An Owned contract, to be inherited by other contracts. Requires its owner to be explicitly set in the constructor. Provides an onlyOwner access modifier. To change owner, the current owner must nominate the next owner, who then has to accept the nomination. The nomination can be cancelled before it is accepted by the new owner by having the previous owner change the nomination (setting it to 0). ----------------------------------------------------------------- */ /** * @title A contract with an owner. * @notice Contract ownership can be transferred by first nominating the new owner, * who must then accept the ownership, which prevents accidental incorrect ownership transfers. */ contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } /** * @notice Nominate a new owner of this contract. * @dev Only the current owner may nominate a new owner. */ function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } /** * @notice Accept the nomination to be 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 { require(msg.sender == owner, "Only the contract owner may perform this action"); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SelfDestructible.sol version: 1.2 author: Anton Jurisevic date: 2018-05-29 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract allows an inheriting contract to be destroyed after its owner indicates an intention and then waits for a period without changing their mind. All ether contained in the contract is forwarded to a nominated beneficiary upon destruction. ----------------------------------------------------------------- */ /** * @title A contract that can be destroyed by its owner after a delay elapses. */ contract SelfDestructible is Owned { uint public initiationTime; bool public selfDestructInitiated; address public selfDestructBeneficiary; uint public constant SELFDESTRUCT_DELAY = 4 weeks; /** * @dev Constructor * @param _owner The account which controls this contract. */ constructor(address _owner) Owned(_owner) public { require(_owner != address(0), "Owner must not be zero"); selfDestructBeneficiary = _owner; emit SelfDestructBeneficiaryUpdated(_owner); } /** * @notice Set the beneficiary address of this contract. * @dev Only the contract owner may call this. The provided beneficiary must be non-null. * @param _beneficiary The address to pay any eth contained in this contract to upon self-destruction. */ function setSelfDestructBeneficiary(address _beneficiary) external onlyOwner { require(_beneficiary != address(0), "Beneficiary must not be zero"); selfDestructBeneficiary = _beneficiary; emit SelfDestructBeneficiaryUpdated(_beneficiary); } /** * @notice Begin the self-destruction counter of this contract. * Once the delay has elapsed, the contract may be self-destructed. * @dev Only the contract owner may call this. */ function initiateSelfDestruct() external onlyOwner { initiationTime = now; selfDestructInitiated = true; emit SelfDestructInitiated(SELFDESTRUCT_DELAY); } /** * @notice Terminate and reset the self-destruction timer. * @dev Only the contract owner may call this. */ function terminateSelfDestruct() external onlyOwner { initiationTime = 0; selfDestructInitiated = false; emit SelfDestructTerminated(); } /** * @notice If the self-destruction delay has elapsed, destroy this contract and * remit any ether it owns to the beneficiary address. * @dev Only the contract owner may call this. */ function selfDestruct() external onlyOwner { require(selfDestructInitiated, "Self Destruct not yet initiated"); require(initiationTime + SELFDESTRUCT_DELAY < now, "Self destruct delay not met"); address beneficiary = selfDestructBeneficiary; emit SelfDestructed(beneficiary); selfdestruct(beneficiary); } event SelfDestructTerminated(); event SelfDestructed(address beneficiary); event SelfDestructInitiated(uint selfDestructDelay); event SelfDestructBeneficiaryUpdated(address newBeneficiary); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: State.sol version: 1.1 author: Dominic Romanowski Anton Jurisevic date: 2018-05-15 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract is used side by side with external state token contracts, such as Synthetix and Synth. It provides an easy way to upgrade contract logic while maintaining all user balances and allowances. This is designed to make the changeover as easy as possible, since mappings are not so cheap or straightforward to migrate. The first deployed contract would create this state contract, using it as its store of balances. When a new contract is deployed, it links to the existing state contract, whose owner would then change its associated contract to the new one. ----------------------------------------------------------------- */ 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 _owner, address _associatedContract) Owned(_owner) public { 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); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: TokenState.sol version: 1.1 author: Dominic Romanowski Anton Jurisevic date: 2018-05-15 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A contract that holds the state of an ERC20 compliant token. This contract is used side by side with external state token contracts, such as Synthetix and Synth. It provides an easy way to upgrade contract logic while maintaining all user balances and allowances. This is designed to make the changeover as easy as possible, since mappings are not so cheap or straightforward to migrate. The first deployed contract would create this state contract, using it as its store of balances. When a new contract is deployed, it links to the existing state contract, whose owner would then change its associated contract to the new one. ----------------------------------------------------------------- */ /** * @title ERC20 Token State * @notice Stores balance information of an ERC20 token contract. */ contract TokenState is State { /* ERC20 fields. */ mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; /** * @dev Constructor * @param _owner The address which controls this contract. * @param _associatedContract The ERC20 contract whose state this composes. */ constructor(address _owner, address _associatedContract) State(_owner, _associatedContract) public {} /* ========== 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; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Proxy.sol version: 1.3 author: Anton Jurisevic date: 2018-05-29 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A proxy contract that, if it does not recognise the function being called on it, passes all value and call data to an underlying target contract. This proxy has the capacity to toggle between DELEGATECALL and CALL style proxy functionality. The former executes in the proxy's context, and so will preserve msg.sender and store data at the proxy address. The latter will not. Therefore, any contract the proxy wraps in the CALL style must implement the Proxyable interface, in order that it can pass msg.sender into the underlying contract as the state parameter, messageSender. ----------------------------------------------------------------- */ contract Proxy is Owned { Proxyable public target; bool public useDELEGATECALL; constructor(address _owner) Owned(_owner) public {} function setTarget(Proxyable _target) external onlyOwner { target = _target; emit TargetUpdated(_target); } function setUseDELEGATECALL(bool value) external onlyOwner { useDELEGATECALL = value; } function _emit(bytes 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) } } } function() external payable { if (useDELEGATECALL) { assembly { /* Copy call data into free memory region. */ let free_ptr := mload(0x40) calldatacopy(free_ptr, 0, calldatasize) /* Forward all gas and call data to the target contract. */ let result := delegatecall(gas, sload(target_slot), free_ptr, calldatasize, 0, 0) returndatacopy(free_ptr, 0, returndatasize) /* Revert if the call failed, otherwise return the result. */ if iszero(result) { revert(free_ptr, returndatasize) } return(free_ptr, returndatasize) } } else { /* Here we are as above, but must send the messageSender explicitly * since we are using CALL rather than 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); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Proxyable.sol version: 1.1 author: Anton Jurisevic date: 2018-05-15 checked: Mike Spain approved: Samuel Brooks ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A proxyable contract that works hand in hand with the Proxy contract to allow for anyone to interact with the underlying contract both directly and through the proxy. ----------------------------------------------------------------- */ // This contract should be treated like an abstract contract contract Proxyable is Owned { /* The proxy this contract exists behind. */ Proxy public proxy; Proxy public integrationProxy; /* 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 messageSender; constructor(address _proxy, address _owner) Owned(_owner) public { proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setProxy(address _proxy) external onlyOwner { proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setIntegrationProxy(address _integrationProxy) external onlyOwner { integrationProxy = Proxy(_integrationProxy); } function setMessageSender(address sender) external onlyProxy { messageSender = sender; } modifier onlyProxy { require(Proxy(msg.sender) == proxy || Proxy(msg.sender) == integrationProxy, "Only the proxy can call"); _; } modifier optionalProxy { if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy) { messageSender = msg.sender; } _; } modifier optionalProxy_onlyOwner { if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy) { messageSender = msg.sender; } require(messageSender == owner, "Owner only function"); _; } event ProxyUpdated(address proxyAddress); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: ExternStateToken.sol version: 1.0 author: Kevin Brown date: 2018-08-06 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract offers a modifer that can prevent reentrancy on particular actions. It will not work if you put it on multiple functions that can be called from each other. Specifically guard external entry points to the contract with the modifier only. ----------------------------------------------------------------- */ contract ReentrancyPreventer { /* ========== MODIFIERS ========== */ bool isInFunctionBody = false; modifier preventReentrancy { require(!isInFunctionBody, "Reverted to prevent reentrancy"); isInFunctionBody = true; _; isInFunctionBody = false; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: TokenFallback.sol version: 1.0 author: Kevin Brown date: 2018-08-10 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract provides the logic that's used to call tokenFallback() when transfers happen. It's pulled out into its own module because it's needed in two places, so instead of copy/pasting this logic and maininting it both in Fee Token and Extern State Token, it's here and depended on by both contracts. ----------------------------------------------------------------- */ contract TokenFallbackCaller is ReentrancyPreventer { function callTokenFallbackIfNeeded(address sender, address recipient, uint amount, bytes data) internal preventReentrancy { /* If we're transferring to a contract and it implements the tokenFallback function, call it. This isn't ERC223 compliant because we don't revert if the contract doesn't implement tokenFallback. This is because many DEXes and other contracts that expect to work with the standard approve / transferFrom workflow don't implement tokenFallback but can still process our tokens as usual, so it feels very harsh and likely to cause trouble if we add this restriction after having previously gone live with a vanilla ERC20. */ // Is the to address a contract? We can check the code size on that address and know. uint length; // solium-disable-next-line security/no-inline-assembly assembly { // Retrieve the size of the code on the recipient address length := extcodesize(recipient) } // If there's code there, it's a contract if (length > 0) { // Now we need to optionally call tokenFallback(address from, uint value). // We can't call it the normal way because that reverts when the recipient doesn't implement the function. // solium-disable-next-line security/no-low-level-calls recipient.call(abi.encodeWithSignature("tokenFallback(address,uint256,bytes)", sender, amount, data)); // And yes, we specifically don't care if this call fails, so we're not checking the return value. } } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: ExternStateToken.sol version: 1.3 author: Anton Jurisevic Dominic Romanowski Kevin Brown date: 2018-05-29 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A partial ERC20 token contract, designed to operate with a proxy. To produce a complete ERC20 token, transfer and transferFrom tokens must be implemented, using the provided _byProxy internal functions. This contract utilises an external state for upgradeability. ----------------------------------------------------------------- */ /** * @title ERC20 Token contract, with detached state and designed to operate behind a proxy. */ contract ExternStateToken is SelfDestructible, Proxyable, TokenFallbackCaller { 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; /** * @dev Constructor. * @param _proxy The proxy associated with this contract. * @param _name Token's ERC20 name. * @param _symbol Token's ERC20 symbol. * @param _totalSupply The total supply of the token. * @param _tokenState The TokenState contract address. * @param _owner The owner of this contract. */ constructor(address _proxy, TokenState _tokenState, string _name, string _symbol, uint _totalSupply, uint8 _decimals, address _owner) SelfDestructible(_owner) Proxyable(_proxy, _owner) public { 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) public 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(_tokenState); } function _internalTransfer(address from, address to, uint value, bytes data) internal returns (bool) { /* Disallow transfers to irretrievable-addresses. */ require(to != address(0), "Cannot transfer to the 0 address"); require(to != address(this), "Cannot transfer to the contract"); require(to != address(proxy), "Cannot transfer to the proxy"); // 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)); // If the recipient is a contract, we need to call tokenFallback on it so they can do ERC223 // actions when receiving our tokens. Unlike the standard, however, we don't revert if the // recipient contract doesn't implement tokenFallback. callTokenFallbackIfNeeded(from, to, value, data); // 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 _transfer_byProxy(address from, address to, uint value, bytes data) internal returns (bool) { return _internalTransfer(from, to, value, data); } /** * @dev Perform an ERC20 token transferFrom. Designed to be called by transferFrom functions * possessing the optionalProxy or optionalProxy modifiers. */ function _transferFrom_byProxy(address sender, address from, address to, uint value, bytes data) 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, data); } /** * @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 ========== */ event Transfer(address indexed from, address indexed to, uint value); bytes32 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, bytes32(from), bytes32(to), 0); } event Approval(address indexed owner, address indexed spender, uint value); bytes32 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, bytes32(owner), bytes32(spender), 0); } event TokenStateUpdated(address newTokenState); bytes32 constant TOKENSTATEUPDATED_SIG = keccak256("TokenStateUpdated(address)"); function emitTokenStateUpdated(address newTokenState) internal { proxy._emit(abi.encode(newTokenState), 1, TOKENSTATEUPDATED_SIG, 0, 0, 0); } } /** * @title FeePool Interface * @notice Abstract contract to hold public getters */ contract IFeePool { address public FEE_ADDRESS; uint public exchangeFeeRate; function amountReceivedFromExchange(uint value) external view returns (uint); function amountReceivedFromTransfer(uint value) external view returns (uint); function feePaid(bytes32 currencyKey, uint amount) external; function appendAccountIssuanceRecord(address account, uint lockedAmount, uint debtEntryIndex) external; function setRewardsToDistribute(uint amount) external; } /** * @title SynthetixState interface contract * @notice Abstract contract to hold public getters */ contract ISynthetixState { // A struct for handing values associated with an individual user's debt position struct IssuanceData { // Percentage of the total debt owned at the time // of issuance. This number is modified by the global debt // delta array. You can figure out a user's exit price and // collateralisation ratio using a combination of their initial // debt and the slice of global debt delta which applies to them. uint initialDebtOwnership; // This lets us know when (in relative terms) the user entered // the debt pool so we can calculate their exit price and // collateralistion ratio uint debtEntryIndex; } uint[] public debtLedger; uint public issuanceRatio; mapping(address => IssuanceData) public issuanceData; function debtLedgerLength() external view returns (uint); function hasIssued(address account) external view returns (bool); function incrementTotalIssuerCount() external; function decrementTotalIssuerCount() external; function setCurrentIssuanceData(address account, uint initialDebtOwnership) external; function lastDebtLedgerEntry() external view returns (uint); function appendDebtLedgerValue(uint value) external; function clearIssuanceData(address account) external; } interface ISynth { function burn(address account, uint amount) external; function issue(address account, uint amount) external; function transfer(address to, uint value) public returns (bool); function triggerTokenFallbackIfNeeded(address sender, address recipient, uint amount) external; function transferFrom(address from, address to, uint value) public returns (bool); } /** * @title SynthetixEscrow interface */ interface ISynthetixEscrow { function balanceOf(address account) public view returns (uint); function appendVestingEntry(address account, uint quantity) public; } /** * @title ExchangeRates interface */ interface IExchangeRates { function effectiveValue(bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey) public view returns (uint); function rateForCurrency(bytes32 currencyKey) public view returns (uint); function anyRateIsStale(bytes32[] currencyKeys) external view returns (bool); function rateIsStale(bytes32 currencyKey) external view returns (bool); } /** * @title Synthetix interface contract * @notice Abstract contract to hold public getters * @dev pseudo interface, actually declared as contract to hold the public getters */ contract ISynthetix { // ========== PUBLIC STATE VARIABLES ========== IFeePool public feePool; ISynthetixEscrow public escrow; ISynthetixEscrow public rewardEscrow; ISynthetixState public synthetixState; IExchangeRates public exchangeRates; mapping(bytes32 => Synth) public synths; // ========== PUBLIC FUNCTIONS ========== function balanceOf(address account) public view returns (uint); function transfer(address to, uint value) public returns (bool); function effectiveValue(bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey) public view returns (uint); function synthInitiatedExchange( address from, bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress) external returns (bool); function exchange( bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress) external returns (bool); function collateralisationRatio(address issuer) public view returns (uint); function totalIssuedSynths(bytes32 currencyKey) public view returns (uint); function getSynth(bytes32 currencyKey) public view returns (ISynth); function debtBalanceOf(address issuer, bytes32 currencyKey) public view returns (uint); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Synth.sol version: 2.0 author: Kevin Brown date: 2018-09-13 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- Synthetix-backed stablecoin contract. This contract issues synths, which are tokens that mirror various flavours of fiat currency. Synths are issuable by Synthetix Network Token (SNX) holders who have to lock up some value of their SNX to issue S * Cmax synths. Where Cmax issome value less than 1. A configurable fee is charged on synth transfers and deposited into a common pot, which Synthetix holders may withdraw from once per fee period. ----------------------------------------------------------------- */ contract Synth is ExternStateToken { /* ========== STATE VARIABLES ========== */ // Address of the FeePoolProxy address public feePoolProxy; // Address of the SynthetixProxy address public synthetixProxy; // Currency key which identifies this Synth to the Synthetix system bytes32 public currencyKey; uint8 constant DECIMALS = 18; /* ========== CONSTRUCTOR ========== */ constructor(address _proxy, TokenState _tokenState, address _synthetixProxy, address _feePoolProxy, string _tokenName, string _tokenSymbol, address _owner, bytes32 _currencyKey, uint _totalSupply ) ExternStateToken(_proxy, _tokenState, _tokenName, _tokenSymbol, _totalSupply, DECIMALS, _owner) public { require(_proxy != address(0), "_proxy cannot be 0"); require(_synthetixProxy != address(0), "_synthetixProxy cannot be 0"); require(_feePoolProxy != address(0), "_feePoolProxy cannot be 0"); require(_owner != 0, "_owner cannot be 0"); require(ISynthetix(_synthetixProxy).synths(_currencyKey) == Synth(0), "Currency key is already in use"); feePoolProxy = _feePoolProxy; synthetixProxy = _synthetixProxy; currencyKey = _currencyKey; } /* ========== SETTERS ========== */ /** * @notice Set the SynthetixProxy should it ever change. * The Synth requires Synthetix address as it has the authority * to mint and burn synths * */ function setSynthetixProxy(ISynthetix _synthetixProxy) external optionalProxy_onlyOwner { synthetixProxy = _synthetixProxy; emitSynthetixUpdated(_synthetixProxy); } /** * @notice Set the FeePoolProxy should it ever change. * The Synth requires FeePool address as it has the authority * to mint and burn for FeePool.claimFees() * */ function setFeePoolProxy(address _feePoolProxy) external optionalProxy_onlyOwner { feePoolProxy = _feePoolProxy; emitFeePoolUpdated(_feePoolProxy); } /* ========== MUTATIVE FUNCTIONS ========== */ /** * @notice ERC20 transfer function * forward call on to _internalTransfer */ function transfer(address to, uint value) public optionalProxy returns (bool) { _notFeeAddress(messageSender); bytes memory empty; return super._internalTransfer(messageSender, to, value, empty); } /** * @notice ERC223 transfer function */ function transfer(address to, uint value, bytes data) public optionalProxy returns (bool) { _notFeeAddress(messageSender); // And send their result off to the destination address return super._internalTransfer(messageSender, to, value, data); } /** * @notice ERC20 transferFrom function */ function transferFrom(address from, address to, uint value) public optionalProxy returns (bool) { _notFeeAddress(from); // 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)); bytes memory empty; return super._internalTransfer(from, to, value, empty); } /** * @notice ERC223 transferFrom function */ function transferFrom(address from, address to, uint value, bytes data) public optionalProxy returns (bool) { _notFeeAddress(from); // 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, data); } // Allow synthetix to issue a certain number of synths from an account. function issue(address account, uint amount) external onlySynthetixOrFeePool { tokenState.setBalanceOf(account, tokenState.balanceOf(account).add(amount)); totalSupply = totalSupply.add(amount); emitTransfer(address(0), account, amount); emitIssued(account, amount); } // Allow synthetix or another synth contract to burn a certain number of synths from an account. function burn(address account, uint amount) external onlySynthetixOrFeePool { tokenState.setBalanceOf(account, tokenState.balanceOf(account).sub(amount)); totalSupply = totalSupply.sub(amount); emitTransfer(account, address(0), amount); emitBurned(account, amount); } // Allow owner to set the total supply on import. function setTotalSupply(uint amount) external optionalProxy_onlyOwner { totalSupply = amount; } // Allow synthetix to trigger a token fallback call from our synths so users get notified on // exchange as well as transfer function triggerTokenFallbackIfNeeded(address sender, address recipient, uint amount) external onlySynthetixOrFeePool { bytes memory empty; callTokenFallbackIfNeeded(sender, recipient, amount, empty); } function _notFeeAddress(address account) internal view { require(account != IFeePool(feePoolProxy).FEE_ADDRESS(), "The fee address is not allowed"); } /* ========== MODIFIERS ========== */ modifier onlySynthetixOrFeePool() { bool isSynthetix = msg.sender == address(Proxy(synthetixProxy).target()); bool isFeePool = msg.sender == address(Proxy(feePoolProxy).target()); require(isSynthetix || isFeePool, "Only Synthetix, FeePool allowed"); _; } /* ========== EVENTS ========== */ event SynthetixUpdated(address newSynthetix); bytes32 constant SYNTHETIXUPDATED_SIG = keccak256("SynthetixUpdated(address)"); function emitSynthetixUpdated(address newSynthetix) internal { proxy._emit(abi.encode(newSynthetix), 1, SYNTHETIXUPDATED_SIG, 0, 0, 0); } event FeePoolUpdated(address newFeePool); bytes32 constant FEEPOOLUPDATED_SIG = keccak256("FeePoolUpdated(address)"); function emitFeePoolUpdated(address newFeePool) internal { proxy._emit(abi.encode(newFeePool), 1, FEEPOOLUPDATED_SIG, 0, 0, 0); } event Issued(address indexed account, uint value); bytes32 constant ISSUED_SIG = keccak256("Issued(address,uint256)"); function emitIssued(address account, uint value) internal { proxy._emit(abi.encode(value), 2, ISSUED_SIG, bytes32(account), 0, 0); } event Burned(address indexed account, uint value); bytes32 constant BURNED_SIG = keccak256("Burned(address,uint256)"); function emitBurned(address account, uint value) internal { proxy._emit(abi.encode(value), 2, BURNED_SIG, bytes32(account), 0, 0); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_integrationProxy","type":"address"}],"name":"setIntegrationProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initiationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"setSelfDestructBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"terminateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_synthetixProxy","type":"address"}],"name":"setSynthetixProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proxy","type":"address"}],"name":"setProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"selfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"integrationProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenState","type":"address"}],"name":"setTokenState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"SELFDESTRUCT_DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructInitiated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"}],"name":"setMessageSender","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initiateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"synthetixProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructBeneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feePoolProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_feePoolProxy","type":"address"}],"name":"setFeePoolProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currencyKey","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenState","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"triggerTokenFallbackIfNeeded","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"proxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"setTotalSupply","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_proxy","type":"address"},{"name":"_tokenState","type":"address"},{"name":"_synthetixProxy","type":"address"},{"name":"_feePoolProxy","type":"address"},{"name":"_tokenName","type":"string"},{"name":"_tokenSymbol","type":"string"},{"name":"_owner","type":"address"},{"name":"_currencyKey","type":"bytes32"},{"name":"_totalSupply","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newSynthetix","type":"address"}],"name":"SynthetixUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newFeePool","type":"address"}],"name":"FeePoolUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Issued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newTokenState","type":"address"}],"name":"TokenStateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"proxyAddress","type":"address"}],"name":"ProxyUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"SelfDestructTerminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"beneficiary","type":"address"}],"name":"SelfDestructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"selfDestructDelay","type":"uint256"}],"name":"SelfDestructInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newBeneficiary","type":"address"}],"name":"SelfDestructBeneficiaryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]
Deployed Bytecode
0x6080604052600436106101c95763ffffffff60e060020a60003504166306fdde0381146101ce578063095ea7b314610258578063131b0ae7146102905780631627540c146102b357806317c70de4146102d457806318160ddd146102fb57806320714f881461031057806323b872dd14610331578063313ce5671461035b5780633278c9601461038657806353a47bb71461039b57806370a08231146103cc57806379ba5097146103ed578063867904b4146104025780638da5cb5b1461042657806395896b761461043b57806395d89b411461045c57806397107d6d146104715780639cb8a26a146104925780639cbdaeb6146104a75780639dc29fac146104bc5780639f769807146104e0578063a461fc8214610501578063a9059cbb14610516578063ab67aa581461053a578063b8225dec146105a9578063bc67f832146105be578063bd32aa44146105df578063bdd12482146105f4578063be45fd6214610609578063c58aaae614610672578063c9e9cc4d14610687578063d8297e441461069c578063dbd06c85146106bd578063dd62ed3e146106d2578063e90dd9e2146106f9578063eb6ecc031461070e578063ec55688914610738578063f7ea7a3d1461074d575b600080fd5b3480156101da57600080fd5b506101e3610765565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561021d578181015183820152602001610205565b50505050905090810190601f16801561024a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561026457600080fd5b5061027c600160a060020a03600435166024356107f3565b604080519115158252519081900360200190f35b34801561029c57600080fd5b506102b1600160a060020a03600435166108e0565b005b3480156102bf57600080fd5b506102b1600160a060020a0360043516610966565b3480156102e057600080fd5b506102e9610a1e565b60408051918252519081900360200190f35b34801561030757600080fd5b506102e9610a24565b34801561031c57600080fd5b506102b1600160a060020a0360043516610a2a565b34801561033d57600080fd5b5061027c600160a060020a0360043581169060243516604435610b57565b34801561036757600080fd5b50610370610ce3565b6040805160ff9092168252519081900360200190f35b34801561039257600080fd5b506102b1610cec565b3480156103a757600080fd5b506103b0610d8a565b60408051600160a060020a039092168252519081900360200190f35b3480156103d857600080fd5b506102e9600160a060020a0360043516610d99565b3480156103f957600080fd5b506102b1610e20565b34801561040e57600080fd5b506102b1600160a060020a0360043516602435610f1b565b34801561043257600080fd5b506103b06111d9565b34801561044757600080fd5b506102b1600160a060020a03600435166111e8565b34801561046857600080fd5b506101e36112a3565b34801561047d57600080fd5b506102b1600160a060020a03600435166112fe565b34801561049e57600080fd5b506102b16113b6565b3480156104b357600080fd5b506103b061152f565b3480156104c857600080fd5b506102b1600160a060020a036004351660243561153e565b3480156104ec57600080fd5b506102b1600160a060020a03600435166117be565b34801561050d57600080fd5b506102e9611876565b34801561052257600080fd5b5061027c600160a060020a036004351660243561187d565b34801561054657600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261027c94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506118f69650505050505050565b3480156105b557600080fd5b5061027c611a3e565b3480156105ca57600080fd5b506102b1600160a060020a0360043516611a47565b3480156105eb57600080fd5b506102b1611ae2565b34801561060057600080fd5b506103b0611b8f565b34801561061557600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261027c948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750611b9e9650505050505050565b34801561067e57600080fd5b506103b0611c0c565b34801561069357600080fd5b506103b0611c20565b3480156106a857600080fd5b506102b1600160a060020a0360043516611c34565b3480156106c957600080fd5b506102e9611cfe565b3480156106de57600080fd5b506102e9600160a060020a0360043581169060243516611d04565b34801561070557600080fd5b506103b0611daa565b34801561071a57600080fd5b506102b1600160a060020a0360043581169060243516604435611db9565b34801561074457600080fd5b506103b0611f55565b34801561075957600080fd5b506102b1600435611f64565b6008805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107eb5780601f106107c0576101008083540402835291602001916107eb565b820191906000526020600020905b8154815290600101906020018083116107ce57829003601f168201915b505050505081565b6004546000908190600160a060020a0316331480159061081e5750600554600160a060020a03163314155b156108365760068054600160a060020a031916331790555b50600654600754604080517fda46098c000000000000000000000000000000000000000000000000000000008152600160a060020a0393841660048201819052878516602483015260448201879052915191939092169163da46098c91606480830192600092919082900301818387803b1580156108b357600080fd5b505af11580156108c7573d6000803e3d6000fd5b505050506108d6818585611ffd565b5060019392505050565b600054600160a060020a03163314610944576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b60058054600160a060020a031916600160a060020a0392909216919091179055565b600054600160a060020a031633146109ca576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b60018054600160a060020a038316600160a060020a0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b60025481565b600a5481565b600054600160a060020a03163314610a8e576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b600160a060020a0381161515610aee576040805160e560020a62461bcd02815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b60038054600160a060020a038316610100810274ffffffffffffffffffffffffffffffffffffffff00199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b600454600090606090600160a060020a03163314801590610b835750600554600160a060020a03163314155b15610b9b5760068054600160a060020a031916331790555b610ba48561216e565b600754600654604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a038981166004830152928316602482018190529151929093169263da46098c92899291610c63918991879163dd62ed3e916044808201926020929091908290030181600087803b158015610c2b57600080fd5b505af1158015610c3f573d6000803e3d6000fd5b505050506040513d6020811015610c5557600080fd5b50519063ffffffff61225016565b6040805160e060020a63ffffffff8716028152600160a060020a03948516600482015292909316602483015260448201529051606480830192600092919082900301818387803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b50505050610cda85858584612267565b95945050505050565b600b5460ff1681565b600054600160a060020a03163314610d50576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b600060028190556003805460ff191690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b600154600160a060020a031681565b6007546040805160e060020a6370a08231028152600160a060020a038481166004830152915160009392909216916370a082319160248082019260209290919082900301818787803b158015610dee57600080fd5b505af1158015610e02573d6000803e3d6000fd5b505050506040513d6020811015610e1857600080fd5b505192915050565b600154600160a060020a03163314610ea8576040805160e560020a62461bcd02815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a16001805460008054600160a060020a0319908116600160a060020a03841617909155169055565b600080600c60009054906101000a9004600160a060020a0316600160a060020a031663d4b839926040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610f7157600080fd5b505af1158015610f85573d6000803e3d6000fd5b505050506040513d6020811015610f9b57600080fd5b5051600b54604080517fd4b83992000000000000000000000000000000000000000000000000000000008152905133600160a060020a039485161495506101009092049092169163d4b839929160048083019260209291908290030181600087803b15801561100957600080fd5b505af115801561101d573d6000803e3d6000fd5b505050506040513d602081101561103357600080fd5b5051600160a060020a031633149050818061104b5750805b15156110a1576040805160e560020a62461bcd02815260206004820152601f60248201527f4f6e6c792053796e7468657469782c20466565506f6f6c20616c6c6f77656400604482015290519081900360640190fd5b6007546040805160e060020a6370a08231028152600160a060020a0387811660048301529151919092169163b46310f691879161113c91889186916370a08231916024808201926020929091908290030181600087803b15801561110457600080fd5b505af1158015611118573d6000803e3d6000fd5b505050506040513d602081101561112e57600080fd5b50519063ffffffff61254c16565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b5050600a546111ba925090508463ffffffff61254c16565b600a556111c960008585612565565b6111d38484612667565b50505050565b600054600160a060020a031681565b600454600160a060020a0316331480159061120e5750600554600160a060020a03163314155b156112265760068054600160a060020a031916331790555b600054600654600160a060020a0390811691161461127c576040805160e560020a62461bcd0281526020600482015260136024820152600080516020612dfb833981519152604482015290519081900360640190fd5b600c8054600160a060020a031916600160a060020a0383161790556112a0816127a7565b50565b6009805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107eb5780601f106107c0576101008083540402835291602001916107eb565b600054600160a060020a03163314611362576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b60048054600160a060020a038316600160a060020a0319909116811790915560408051918252517ffc80377ca9c49cc11ae6982f390a42db976d5530af7c43889264b13fbbd7c57e9181900360200190a150565b60008054600160a060020a0316331461141b576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b60035460ff161515611477576040805160e560020a62461bcd02815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea00600254011015156114d7576040805160e560020a62461bcd02815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b5060035460408051600160a060020a0361010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a180600160a060020a0316ff5b600554600160a060020a031681565b600080600c60009054906101000a9004600160a060020a0316600160a060020a031663d4b839926040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561159457600080fd5b505af11580156115a8573d6000803e3d6000fd5b505050506040513d60208110156115be57600080fd5b5051600b54604080517fd4b83992000000000000000000000000000000000000000000000000000000008152905133600160a060020a039485161495506101009092049092169163d4b839929160048083019260209291908290030181600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b505050506040513d602081101561165657600080fd5b5051600160a060020a031633149050818061166e5750805b15156116c4576040805160e560020a62461bcd02815260206004820152601f60248201527f4f6e6c792053796e7468657469782c20466565506f6f6c20616c6c6f77656400604482015290519081900360640190fd5b6007546040805160e060020a6370a08231028152600160a060020a0387811660048301529151919092169163b46310f691879161172791889186916370a08231916024808201926020929091908290030181600087803b158015610c2b57600080fd5b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561177957600080fd5b505af115801561178d573d6000803e3d6000fd5b5050600a546117a5925090508463ffffffff61225016565b600a556117b484600085612565565b6111d384846128ee565b600454600160a060020a031633148015906117e45750600554600160a060020a03163314155b156117fc5760068054600160a060020a031916331790555b600054600654600160a060020a03908116911614611852576040805160e560020a62461bcd0281526020600482015260136024820152600080516020612dfb833981519152604482015290519081900360640190fd5b60078054600160a060020a031916600160a060020a0383161790556112a0816129c8565b6224ea0081565b600454600090606090600160a060020a031633148015906118a95750600554600160a060020a03163314155b156118c15760068054600160a060020a031916331790555b6006546118d690600160a060020a031661216e565b6006546118ee90600160a060020a0316858584612267565b949350505050565b600454600090600160a060020a0316331480159061191f5750600554600160a060020a03163314155b156119375760068054600160a060020a031916331790555b6119408561216e565b600754600654604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a038981166004830152928316602482018190529151929093169263da46098c928992916119c7918991879163dd62ed3e916044808201926020929091908290030181600087803b158015610c2b57600080fd5b6040805160e060020a63ffffffff8716028152600160a060020a03948516600482015292909316602483015260448201529051606480830192600092919082900301818387803b158015611a1a57600080fd5b505af1158015611a2e573d6000803e3d6000fd5b50505050610cda85858585612267565b60035460ff1681565b600454600160a060020a0316331480611a6a5750600554600160a060020a031633145b1515611ac0576040805160e560020a62461bcd02815260206004820152601760248201527f4f6e6c79207468652070726f78792063616e2063616c6c000000000000000000604482015290519081900360640190fd5b60068054600160a060020a031916600160a060020a0392909216919091179055565b600054600160a060020a03163314611b46576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020612dbb8339815191526044820152600080516020612ddb833981519152606482015290519081900360840190fd5b426002556003805460ff19166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b600c54600160a060020a031681565b600454600090600160a060020a03163314801590611bc75750600554600160a060020a03163314155b15611bdf5760068054600160a060020a031916331790555b600654611bf490600160a060020a031661216e565b6006546118ee90600160a060020a0316858585612267565b6003546101009004600160a060020a031681565b600b546101009004600160a060020a031681565b600454600160a060020a03163314801590611c5a5750600554600160a060020a03163314155b15611c725760068054600160a060020a031916331790555b600054600654600160a060020a03908116911614611cc8576040805160e560020a62461bcd0281526020600482015260136024820152600080516020612dfb833981519152604482015290519081900360640190fd5b600b805474ffffffffffffffffffffffffffffffffffffffff001916610100600160a060020a038416021790556112a081612aa2565b600d5481565b600754604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015284811660248301529151600093929092169163dd62ed3e9160448082019260209290919082900301818787803b158015611d7757600080fd5b505af1158015611d8b573d6000803e3d6000fd5b505050506040513d6020811015611da157600080fd5b50519392505050565b600754600160a060020a031681565b6060600080600c60009054906101000a9004600160a060020a0316600160a060020a031663d4b839926040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611e1157600080fd5b505af1158015611e25573d6000803e3d6000fd5b505050506040513d6020811015611e3b57600080fd5b5051600b54604080517fd4b83992000000000000000000000000000000000000000000000000000000008152905133600160a060020a039485161495506101009092049092169163d4b839929160048083019260209291908290030181600087803b158015611ea957600080fd5b505af1158015611ebd573d6000803e3d6000fd5b505050506040513d6020811015611ed357600080fd5b5051600160a060020a0316331490508180611eeb5750805b1515611f41576040805160e560020a62461bcd02815260206004820152601f60248201527f4f6e6c792053796e7468657469782c20466565506f6f6c20616c6c6f77656400604482015290519081900360640190fd5b611f4d86868686612b7c565b505050505050565b600454600160a060020a031681565b600454600160a060020a03163314801590611f8a5750600554600160a060020a03163314155b15611fa25760068054600160a060020a031916331790555b600054600654600160a060020a03908116911614611ff8576040805160e560020a62461bcd0281526020600482015260136024820152600080516020612dfb833981519152604482015290519081900360640190fd5b600a55565b600480546040805160208082018690528251808303820181528284018085527f417070726f76616c28616464726573732c616464726573732c75696e7432353690527f29000000000000000000000000000000000000000000000000000000000000006060840152925191829003606101822060e060020a63907dff9702835260036024840181905260448401829052600160a060020a038a8116606486018190528a821660848701819052600060a4880181905260c09a88019a8b52885160c48901528851939099169963907dff97999497959692959194939092839260e40191908a0190808383885b838110156121005781810151838201526020016120e8565b50505050905090810190601f16801561212d5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561215157600080fd5b505af1158015612165573d6000803e3d6000fd5b50505050505050565b600b60019054906101000a9004600160a060020a0316600160a060020a031663eb1edd616040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156121c157600080fd5b505af11580156121d5573d6000803e3d6000fd5b505050506040513d60208110156121eb57600080fd5b5051600160a060020a03828116911614156112a0576040805160e560020a62461bcd02815260206004820152601e60248201527f546865206665652061646472657373206973206e6f7420616c6c6f7765640000604482015290519081900360640190fd5b6000808383111561226057600080fd5b5050900390565b6000600160a060020a03841615156122c9576040805160e560020a62461bcd02815260206004820181905260248201527f43616e6e6f74207472616e7366657220746f2074686520302061646472657373604482015290519081900360640190fd5b600160a060020a03841630141561232a576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e6e6f74207472616e7366657220746f2074686520636f6e747261637400604482015290519081900360640190fd5b600454600160a060020a0385811691161415612390576040805160e560020a62461bcd02815260206004820152601c60248201527f43616e6e6f74207472616e7366657220746f207468652070726f787900000000604482015290519081900360640190fd5b6007546040805160e060020a6370a08231028152600160a060020a0388811660048301529151919092169163b46310f69188916123f391889186916370a08231916024808201926020929091908290030181600087803b158015610c2b57600080fd5b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561244557600080fd5b505af1158015612459573d6000803e3d6000fd5b50506007546040805160e060020a6370a08231028152600160a060020a038981166004830152915191909216935063b46310f6925087916124c091889186916370a08231916024808201926020929091908290030181600087803b15801561110457600080fd5b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050600060405180830381600087803b15801561251257600080fd5b505af1158015612526573d6000803e3d6000fd5b5050505061253685858585612b7c565b612541858585612565565b506001949350505050565b60008282018381101561255e57600080fd5b9392505050565b600480546040805160208082018690528251808303820181528284018085527f5472616e7366657228616464726573732c616464726573732c75696e7432353690527f29000000000000000000000000000000000000000000000000000000000000006060840152925191829003606101822060e060020a63907dff9702835260036024840181905260448401829052600160a060020a038a8116606486018190528a821660848701819052600060a4880181905260c09a88019a8b52885160c48901528851939099169963907dff97999497959692959194939092839260e40191908a019080838388838110156121005781810151838201526020016120e8565b600480546040805160208082018690528251808303820181528284018085527f49737375656428616464726573732c75696e74323536290000000000000000009052925191829003605701822060e060020a63907dff9702835260026024840181905260448401829052600160a060020a038981166064860181905260006084870181905260a4870181905260c0998701998a52875160c48801528751929098169863907dff979893969495919484939192839260e490920191908a0190808383885b8381101561274257818101518382015260200161272a565b50505050905090810190601f16801561276f5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561279357600080fd5b505af1158015611f4d573d6000803e3d6000fd5b6004805460408051600160a060020a038581166020808401919091528351808403820181528385018086527f53796e74686574697855706461746564286164647265737329000000000000009052935192839003605901832060e060020a63907dff97028452600160248501819052604485018290526000606486018190526084860181905260a4860181905260c0988601988952865160c48701528651949097169763907dff979791959294919384938493839260e4909201918a0190808383885b8381101561288257818101518382015260200161286a565b50505050905090810190601f1680156128af5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b1580156128d357600080fd5b505af11580156128e7573d6000803e3d6000fd5b5050505050565b600480546040805160208082018690528251808303820181528284018085527f4275726e656428616464726573732c75696e74323536290000000000000000009052925191829003605701822060e060020a63907dff9702835260026024840181905260448401829052600160a060020a038981166064860181905260006084870181905260a4870181905260c0998701998a52875160c48801528751929098169863907dff979893969495919484939192839260e490920191908a0190808383888381101561274257818101518382015260200161272a565b6004805460408051600160a060020a038581166020808401919091528351808403820181528385018086527f546f6b656e5374617465557064617465642861646472657373290000000000009052935192839003605a01832060e060020a63907dff97028452600160248501819052604485018290526000606486018190526084860181905260a4860181905260c0988601988952865160c48701528651949097169763907dff979791959294919384938493839260e4909201918a0190808383888381101561288257818101518382015260200161286a565b6004805460408051600160a060020a038581166020808401919091528351808403820181528385018086527f466565506f6f6c557064617465642861646472657373290000000000000000009052935192839003605701832060e060020a63907dff97028452600160248501819052604485018290526000606486018190526084860181905260a4860181905260c0988601988952865160c48701528651949097169763907dff979791959294919384938493839260e4909201918a0190808383888381101561288257818101518382015260200161286a565b60065460009074010000000000000000000000000000000000000000900460ff1615612bf2576040805160e560020a62461bcd02815260206004820152601e60248201527f526576657274656420746f2070726576656e74207265656e7472616e63790000604482015290519081900360640190fd5b506006805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055823b6000811115612d955783600160a060020a03168584846040516024018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c9e578181015183820152602001612c86565b50505050905090810190601f168015612ccb5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc0ee0b8a000000000000000000000000000000000000000000000000000000001781529051825192975095508594509250905080838360005b83811015612d52578181015183820152602001612d3a565b50505050905090810190601f168015612d7f5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af15050505b50506006805474ff00000000000000000000000000000000000000001916905550505056004f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e00000000000000000000000000000000004f776e6572206f6e6c792066756e6374696f6e00000000000000000000000000a165627a7a723058207d48d5251819b5176a0d3372a7619372ee12420a2b31d0ebdf4a767f521fcd010029
Swarm Source
bzzr://7d48d5251819b5176a0d3372a7619372ee12420a2b31d0ebdf4a767f521fcd01
Loading...
Loading
Loading...
Loading
OVERVIEW
The legacy contract address for Synthetix: Synth sUSD.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.