Token USDC
Note: This token's displayed name does not match its contract's Name function.
Overview [ERC-20]
Price
$1.00 @ 0.000326 Eth (+0.30%)
Fully Diluted Market Cap
Max Total Supply:
1,835,695,436.460242 USDC
Holders:
404,895 ( 0.428%)
Contract:
Decimals:
6
Official Site:
Balance
1.13383 USDCValue
$1.14 ( ~0.000370795135877261 Eth) [0.0000%]
[ Download CSV Export ]
[ Download CSV Export ]
Market
Volume (24H) | : | $10,610,970,847.00 |
Market Capitalization | : | $32,641,571,252.00 |
Circulating Supply | : | 32,533,130,579.00 USDC |
Market Data Source: Coinmarketcap |
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|---|---|---|---|---|
1 | Binance | USDC-USDT | $0.9994 0.0003248 Eth | $1,220,764,785.0000 1,221,836,496.000 USDC | 61.0098% |
2 | Bybit | BTC-USDC | $1.0010 0.0003252 Eth | $699,616,441.0000 10,987.640 BTC | 0.0005% |
3 | Bybit | ETH-USDC | $1.0010 0.0003252 Eth | $533,010,975.0000 171,669.811 ETH | 0.0086% |
4 | Uniswap V3 (Ethereum) | 0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48 | $1.0000 0.0003245 Eth | $437,863,887.0000 141,190.893 0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2 | 0.0071% |
5 | LBank | ETH-USDC | $0.9996 0.0003245 Eth | $270,591,970.0000 87,940.330 ETH | 0.0044% |
6 | LBank | BTC-USDC | $0.9996 0.0003245 Eth | $256,261,477.0000 4,072.393 BTC | 0.0002% |
7 | Bybit | USDC-USDT | $0.9995 0.0003249 Eth | $169,001,325.0000 169,137,217.290 USDC | 8.4455% |
8 | OKX | ETH-USDC | $1.0010 0.0003252 Eth | $157,433,586.0000 50,616.602 ETH | 0.0025% |
9 | Bitrue | BTC-USDC | $1.0000 0.0003245 Eth | $124,831,318.0000 1,982.725 BTC | 0.0001% |
10 | Tapbit | BTC-USDC | $1.0000 0.0003248 Eth | $119,223,288.0000 1,877.468 BTC | 0.0001% |
11 | Tapbit | ETH-USDC | $1.0000 0.0003248 Eth | $117,310,558.0000 37,833.680 ETH | 0.0019% |
12 | DigiFinex | USDC-USDT | $0.9995 0.0003249 Eth | $104,359,676.0000 104,412,871.000 USDC | 5.2136% |
13 | Bitrue | ETH-USDC | $1.0000 0.0003245 Eth | $86,756,258.0000 28,156.219 ETH | 0.0014% |
14 | Binance | BTC-USDC | $1.0000 0.0003248 Eth | $71,440,228.0000 1,124.095 BTC | 0.0001% |
15 | LATOKEN | USDC-USDT | $0.9998 0.0003248 Eth | $65,832,622.0000 65,844,339.987 USDC | 3.2878% |
16 | BingX | USDC-USDT | $1.0000 0.0003250 Eth | $52,810,517.0000 52,811,529.313 USDC | 2.6370% |
17 | Deepcoin | USDC-USDT | $0.9998 0.0003245 Eth | $47,373,681.0000 47,840,174.339 USDC | 2.3888% |
18 | Hotcoin Global | ETH-USDC | $1.0000 0.0003245 Eth | $46,686,769.0000 15,158.206 ETH | 0.0008% |
19 | BingX | BTC-USDC | $1.0010 0.0003252 Eth | $46,385,406.0000 728.552 BTC | 0.0000% |
20 | BingX | ETH-USDC | $1.0010 0.0003252 Eth | $32,490,399.0000 10,462.505 ETH | 0.0005% |
21 | Kraken | USDC-EUR | $0.9998 0.0003250 Eth | $30,291,224.0000 30,295,939.503 USDC | 1.5128% |
22 | OKX | USDC-USDT | $0.9994 0.0003248 Eth | $30,107,321.0000 30,134,555.781 USDC | 1.5047% |
23 | Bitunix | USDC-USDT | $0.9996 0.0003245 Eth | $27,740,000.0000 27,751,863.630 USDC | 1.3857% |
24 | Kraken | USDC-USD | $1.0000 0.0003248 Eth | $27,097,704.0000 27,097,704.013 USDC | 1.3531% |
25 | Backpack Exchange | SOL-USDC | $1.0000 0.0003248 Eth | $26,056,479.0000 186,422.450 SOL | 0.0093% |
26 | Biconomy | ETH-USDC | $1.0000 0.0003248 Eth | $25,561,135.0000 8,230.923 ETH | 0.0004% |
27 | Bitget | USDC-USDT | $0.9995 0.0003249 Eth | $25,364,158.0000 25,385,164.135 USDC | 1.2676% |
28 | OKX | SOL-USDC | $1.0010 0.0003252 Eth | $25,106,038.0000 180,104.677 SOL | 0.0090% |
29 | Aerodrome (Base) | 0X833589FCD6EDB6E08F4C7C32D4F71B54BDA02913-0X4200000000000000000000000000000000000006 | $0.9992 0.0003242 Eth | $21,825,674.0000 21,822,376.118 0X833589FCD6EDB6E08F4C7C32D4F71B54BDA02913 | 1.0897% |
30 | Bybit | SOL-USDC | $1.0010 0.0003252 Eth | $21,622,163.0000 155,020.855 SOL | 0.0077% |
31 | DigiFinex | ETH-USDC | $0.9995 0.0003249 Eth | $20,186,019.0000 6,567.754 ETH | 0.0003% |
32 | Binance | SOL-USDC | $0.9997 0.0003260 Eth | $18,912,101.0000 136,316.310 SOL | 0.0068% |
33 | Binance | AVAX-USDC | $0.9996 0.0003245 Eth | $18,560,565.0000 520,468.290 AVAX | 0.0260% |
34 | WhiteBIT | BTC-USDC | $1.0000 0.0003245 Eth | $17,681,928.0000 281.041 BTC | 0.0000% |
35 | Kraken | USDC-USDT | $0.9994 0.0003248 Eth | $15,616,705.0000 15,626,228.436 USDC | 0.7803% |
36 | MEXC | USDC-USDT | $1.0000 0.0003246 Eth | $12,330,874.0000 12,326,106.950 USDC | 0.6155% |
37 | FameEX | USDC-USDT | $0.9998 0.0003245 Eth | $12,108,017.0000 12,113,928.165 USDC | 0.6049% |
38 | Bitrue | USDC-USDT | $1.0000 0.0003245 Eth | $10,732,339.0000 10,731,300.920 USDC | 0.5358% |
39 | XT.COM | BTC-USDC | $1.0010 0.0003252 Eth | $10,700,242.0000 168.239 BTC | 0.0000% |
40 | Vertex (Spot) | WETH-USDC | $1.0000 0.0003246 Eth | $9,960,658.0000 3,196.200 WETH | 0.0002% |
41 | KuCoin | BTC-USDC | $1.0000 0.0003248 Eth | $9,954,650.0000 158.351 BTC | 0.0000% |
42 | WhiteBIT | ETH-USDC | $0.9996 0.0003245 Eth | $8,892,045.0000 2,886.939 ETH | 0.0001% |
43 | XT.COM | ETH-USDC | $1.0010 0.0003252 Eth | $8,199,137.0000 2,648.196 ETH | 0.0001% |
44 | Vertex (Spot) | WBTC-USDC | $1.0000 0.0003246 Eth | $7,646,117.0000 119.649 WBTC | 0.0000% |
45 | Kraken | ETH-USDC | $0.9995 0.0003249 Eth | $7,556,464.0000 2,453.388 ETH | 0.0001% |
46 | Gate.io | USDC-USDT | $0.9997 0.0003247 Eth | $7,166,043.0000 7,170,831.510 USDC | 0.3581% |
47 | Coinbase Exchange | USDC-EUR | $1.0010 0.0003250 Eth | $7,092,015.0000 7,087,113.620 USDC | 0.3539% |
48 | Phemex | USDC-USDT | $0.9996 0.0003245 Eth | $6,149,174.0000 6,151,803.400 USDC | 0.3072% |
49 | OKX | USDT-USDC | $1.0010 0.0003252 Eth | $5,794,716.0000 5,788,948.268 USDT | 0.2891% |
50 | KuCoin | USDC-USDT | $0.9996 0.0003247 Eth | $5,778,048.0000 5,780,406.710 USDC | 0.2886% |
51 | PointPay | USDC-USDT | $0.9999 0.0003245 Eth | $5,769,699.0000 5,772,082.803 USDC | 0.2882% |
52 | Bitget | BTC-USDC | $1.0010 0.0003252 Eth | $5,746,588.0000 90.369 BTC | 0.0000% |
53 | Kraken | USDC-GBP | $1.0000 0.0003250 Eth | $5,723,950.0000 5,723,676.884 USDC | 0.2858% |
54 | Bitget | ETH-USDC | $1.0010 0.0003252 Eth | $4,785,450.0000 1,539.103 ETH | 0.0001% |
55 | PointPay | DOGE-USDC | $1.0000 0.0003246 Eth | $4,425,367.0000 28,293,852.724 DOGE | 1.4128% |
56 | Bitstamp | USDC-USD | $1.0000 0.0003248 Eth | $4,396,621.0000 4,396,576.976 USDC | 0.2195% |
57 | Biconomy | BTC-USDC | $1.0000 0.0003248 Eth | $4,363,273.0000 68.652 BTC | 0.0000% |
58 | Kraken | BTC-USDC | $1.0000 0.0003248 Eth | $4,308,923.0000 68.493 BTC | 0.0000% |
59 | Cryptology | BTC-USDC | $0.9996 0.0003245 Eth | $4,237,664.0000 67.412 BTC | 0.0000% |
60 | KuCoin | ETH-USDC | $1.0000 0.0003248 Eth | $3,751,903.0000 1,219.199 ETH | 0.0001% |
61 | Coinbase Exchange | USDC-GBP | $1.0010 0.0003250 Eth | $3,444,074.0000 3,442,097.330 USDC | 0.1719% |
62 | Vindax | USDC-USDT | $0.9991 0.0003269 Eth | $3,218,381.0000 3,221,364.000 USDC | 0.1609% |
63 | Dex-Trade | USDC-USDT | $0.9998 0.0003246 Eth | $3,003,199.0000 3,003,820.003 USDC | 0.1500% |
64 | Coinbase Exchange | USDT-USDC | $1.0000 0.0003248 Eth | $2,974,455.0000 2,974,292.890 USDT | 0.1485% |
65 | Bitstamp | USDC-EUR | $1.0000 0.0003250 Eth | $2,911,414.0000 2,911,433.405 USDC | 0.1454% |
66 | Gemini | USDC-USD | $0.9994 0.0003248 Eth | $2,789,767.0000 2,791,501.507 USDC | 0.1394% |
67 | BitMart | USDC-USDT | $0.9996 0.0003244 Eth | $2,146,490.0000 2,147,301.900 USDC | 0.1072% |
68 | PointPay | SOL-USDC | $1.0000 0.0003246 Eth | $1,847,527.0000 13,323.786 SOL | 0.0007% |
69 | VALR | USDT-USDC | $1.0000 0.0003246 Eth | $1,716,743.0000 1,715,469.130 USDT | 0.0857% |
70 | KuCoin | USDT-USDC | $1.0000 0.0003248 Eth | $1,673,505.0000 1,672,945.554 USDT | 0.0835% |
71 | Kraken | USDC-CAD | $0.9992 0.0003248 Eth | $1,604,415.0000 1,605,642.615 USDC | 0.0802% |
72 | PointPay | LTC-USDC | $1.0000 0.0003246 Eth | $1,512,484.0000 19,368.265 LTC | 0.0010% |
73 | MEXC | ETH-USDC | $1.0000 0.0003246 Eth | $1,492,353.0000 484.137 ETH | 0.0000% |
74 | Dexalot | USDT-USDC | $0.9996 0.0003245 Eth | $1,475,087.0000 1,474,679.930 USDT | 0.0736% |
75 | C-Patex | USDC-USDT | $0.9997 0.0003245 Eth | $1,468,434.0000 1,468,828.041 USDC | 0.0733% |
76 | MEXC | BTC-USDC | $1.0000 0.0003246 Eth | $1,456,675.0000 23.131 BTC | 0.0000% |
77 | PointPay | BCH-USDC | $1.0000 0.0003246 Eth | $1,387,710.0000 2,780.864 BCH | 0.0001% |
78 | PointPay | NEAR-USDC | $1.0000 0.0003246 Eth | $1,374,071.0000 264,024.386 NEAR | 0.0132% |
79 | PointPay | TRX-USDC | $1.0000 0.0003246 Eth | $1,364,440.0000 12,249,059.819 TRX | 0.6116% |
80 | BYDFi | ETH-USDC | $1.0000 0.0003246 Eth | $1,355,702.0000 440.186 ETH | 0.0000% |
81 | PointPay | AVAX-USDC | $1.0000 0.0003246 Eth | $1,353,385.0000 38,004.740 AVAX | 0.0019% |
82 | Bitfinex | UDC-USD | $1.0010 0.0003254 Eth | $1,339,972.0000 1,338,231.873 UDC | 0.0668% |
83 | PointPay | FTM-USDC | $1.0000 0.0003246 Eth | $1,018,870.0000 1,540,727.836 FTM | 0.0769% |
84 | WOO X | USDC-USDT | $1.0000 0.0003245 Eth | $996,832.0000 996,835.160 USDC | 0.0498% |
85 | BYDFi | USDC-USDT | $1.0000 0.0003233 Eth | $973,653.0000 973,205.540 USDC | 0.0486% |
86 | PointPay | ETH-USDC | $1.0000 0.0003246 Eth | $964,551.0000 311.875 ETH | 0.0000% |
87 | Toobit | USDC-USDT | $0.9998 0.0003245 Eth | $872,970.0000 873,299.000 USDC | 0.0436% |
88 | Dexalot | EUROC-USDC | $0.9996 0.0003245 Eth | $590,243.0000 555,860.249 EUROC | 0.0278% |
89 | PointPay | ATOM-USDC | $1.0000 0.0003246 Eth | $543,173.0000 66,622.250 ATOM | 0.0033% |
90 | Slex | BTC-USDC | $1.0000 0.0003248 Eth | $502,010.0000 7.899 BTC | 0.0000% |
91 | PointPay | UNI-USDC | $1.0000 0.0003246 Eth | $453,438.0000 62,403.381 UNI | 0.0031% |
92 | PointPay | BNB-USDC | $1.0000 0.0003246 Eth | $441,800.0000 796.119 BNB | 0.0000% |
93 | Slex | USDC-USDT | $1.0000 0.0003248 Eth | $348,598.0000 348,755.000 USDC | 0.0174% |
94 | Maverick Protocol | 0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48-0XDAC17F958D2EE523A2206206994597C13D831EC7 | $1.0000 0.0003251 Eth | $295,812.0000 295,756.604 0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48 | 0.0148% |
95 | Deribit Spot | USDC-USDT | $0.9997 0.0003245 Eth | $231,283.0000 231,369.000 USDC | 0.0116% |
96 | CoinEx | USDC-USDT | $0.9984 0.0003241 Eth | $134,250.0000 134,453.488 USDC | 0.0067% |
97 | BitMart | TRX-USDC | $1.0000 0.0003248 Eth | $112,111.0000 1,011,852.000 TRX | 0.0505% |
98 | HashKey Exchange | ETH-USDC | $1.0000 0.0003246 Eth | $103,225.0000 33.589 ETH | 0.0000% |
99 | Backpack Exchange | USDT-USDC | $1.0000 0.0003248 Eth | $68,318.0000 68,212.000 USDT | 0.0034% |
100 | OKX | USDC-EUR | $1.0010 0.0003253 Eth | $68,145.0000 68,047.134 USDC | 0.0034% |
Contract Name:
FiatTokenProxy
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 10000000 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2018-2020 CENTRE SECZ * * 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 * 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 * SOFTWARE. */ pragma solidity 0.6.12; import { AdminUpgradeabilityProxy } from "../upgradeability/AdminUpgradeabilityProxy.sol"; /** * @title FiatTokenProxy * @dev This contract proxies FiatToken calls and enables FiatToken upgrades */ contract FiatTokenProxy is AdminUpgradeabilityProxy { constructor(address implementationContract) public AdminUpgradeabilityProxy(implementationContract) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2018 zOS Global Limited. * * 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 * 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 * SOFTWARE. */ pragma solidity 0.6.12; import { Proxy } from "./Proxy.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; /** * @notice This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/UpgradeabilityProxy.sol * Modifications: * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20) * 2. Use Address utility library from the latest OpenZeppelin (5/13/20) */ contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is * validated in the constructor. */ bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3; /** * @dev Contract constructor. * @param implementationContract Address of the initial implementation. */ constructor(address implementationContract) public { assert( IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation") ); _setImplementation(implementationContract); } /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) private { require( Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2018 zOS Global Limited. * * 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 * 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 * SOFTWARE. */ pragma solidity 0.6.12; /** * @notice Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Proxy.sol * Modifications: * 1. Reformat and conform to Solidity 0.6 syntax (5/13/20) */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2018 zOS Global Limited. * * 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 * 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 * SOFTWARE. */ pragma solidity 0.6.12; import { UpgradeabilityProxy } from "./UpgradeabilityProxy.sol"; /** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20) * 2. Remove ifAdmin modifier from admin() and implementation() (5/13/20) */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is * validated in the constructor. */ bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @dev Contract constructor. * It sets the `msg.sender` as the proxy administrator. * @param implementationContract address of the initial implementation. */ constructor(address implementationContract) public UpgradeabilityProxy(implementationContract) { assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin")); _setAdmin(msg.sender); } /** * @return The address of the proxy admin. */ function admin() external view returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external view returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require( newAdmin != address(0), "Cannot change the admin of a proxy to the zero address" ); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be * called, as described in * https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); // prettier-ignore // solhint-disable-next-line avoid-low-level-calls (bool success,) = address(this).call{value: msg.value}(data); // solhint-disable-next-line reason-string require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override { require( msg.sender != _admin(), "Cannot call fallback function from the proxy admin" ); super._willFallback(); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10000000 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementationContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108a93803806108a98339818101604052602081101561003357600080fd5b5051808061004081610051565b5061004a336100c3565b5050610123565b610064816100e760201b61042a1760201c565b61009f5760405162461bcd60e51b815260040180806020018281038252603b81526020018061086e603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c355565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061011b57508115155b949350505050565b61073c806101326000396000f3fe60806040526004361061005a5760003560e01c80635c60da1b116100435780635c60da1b146101315780638f2839701461016f578063f851a440146101af5761005a565b80633659cfe6146100645780634f1ef286146100a4575b6100626101c4565b005b34801561007057600080fd5b506100626004803603602081101561008757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101de565b610062600480360360408110156100ba57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b509092509050610232565b34801561013d57600080fd5b50610146610309565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017b57600080fd5b506100626004803603602081101561019257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610318565b3480156101bb57600080fd5b50610146610420565b6101cc610466565b6101dc6101d76104fa565b61051f565b565b6101e6610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275761022281610568565b61022f565b61022f6101c4565b50565b61023a610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fc5761027683610568565b60003073ffffffffffffffffffffffffffffffffffffffff16348484604051808383808284376040519201945060009350909150508083038185875af1925050503d80600081146102e3576040519150601f19603f3d011682016040523d82523d6000602084013e6102e8565b606091505b50509050806102f657600080fd5b50610304565b6103046101c4565b505050565b60006103136104fa565b905090565b610320610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275773ffffffffffffffffffffffffffffffffffffffff81166103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106966036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e8610543565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a1610222816105bd565b6000610313610543565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061045e57508115155b949350505050565b61046e610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106646032913960400191505060405180910390fd5b6101dc6101dc565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b3660008037600080366000845af43d6000803e80801561053e573d6000f35b3d6000fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b610571816105e1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6105ea8161042a565b61063f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806106cc603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220f8ecaa1d13c903d8bb42760a94deb06f3320608fc17355d346a1fc7f35badcd364736f6c634300060c003343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e747261637420616464726573730000000000000000000000006d0c9a70d85e42ba8b76dc06620d4e988ec8d0c1
Deployed Bytecode
0x60806040526004361061005a5760003560e01c80635c60da1b116100435780635c60da1b146101315780638f2839701461016f578063f851a440146101af5761005a565b80633659cfe6146100645780634f1ef286146100a4575b6100626101c4565b005b34801561007057600080fd5b506100626004803603602081101561008757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101de565b610062600480360360408110156100ba57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b509092509050610232565b34801561013d57600080fd5b50610146610309565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017b57600080fd5b506100626004803603602081101561019257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610318565b3480156101bb57600080fd5b50610146610420565b6101cc610466565b6101dc6101d76104fa565b61051f565b565b6101e6610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275761022281610568565b61022f565b61022f6101c4565b50565b61023a610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fc5761027683610568565b60003073ffffffffffffffffffffffffffffffffffffffff16348484604051808383808284376040519201945060009350909150508083038185875af1925050503d80600081146102e3576040519150601f19603f3d011682016040523d82523d6000602084013e6102e8565b606091505b50509050806102f657600080fd5b50610304565b6103046101c4565b505050565b60006103136104fa565b905090565b610320610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275773ffffffffffffffffffffffffffffffffffffffff81166103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106966036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e8610543565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a1610222816105bd565b6000610313610543565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061045e57508115155b949350505050565b61046e610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106646032913960400191505060405180910390fd5b6101dc6101dc565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b3660008037600080366000845af43d6000803e80801561053e573d6000f35b3d6000fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b610571816105e1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6105ea8161042a565b61063f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806106cc603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220f8ecaa1d13c903d8bb42760a94deb06f3320608fc17355d346a1fc7f35badcd364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006d0c9a70d85e42ba8b76dc06620d4e988ec8d0c1
-----Decoded View---------------
Arg [0] : implementationContract (address): 0x6D0c9A70D85E42Ba8B76dc06620d4E988ec8D0C1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006d0c9a70d85e42ba8b76dc06620d4e988ec8d0c1