token-icon

USD Coin

Token

Overview[ERC-20]

Max Total Supply
41,428,403,764.28
USDC
Holders
3,394,657+0.12%
Transfers
146,877,755

Profile Summary

Decimals
6

Market

Price
$0.999905 @0.00041461 ETH+0.02%
Volume (24H)
$9,048,837,305
Circulating Market Cap
$61,591,639,514
Contract Source Code Verified
Contract NameFiatTokenProxy
Compiler Versionv0.4.24+commit.e67f0147
Optimization EnabledNo
Other SettingsDefault evmVersion
Contract Source Code (Solidity)
1
 
2
pragma solidity ^0.4.24;
3
 
4
// File: zos-lib/contracts/upgradeability/Proxy.sol
5
 
6
/**
7
* @title Proxy
8
* @dev Implements delegation of calls to other contracts, with proper
9
* forwarding of return values and bubbling of failures.
10
* It defines a fallback function that delegates all calls to the address
11
* returned by the abstract _implementation() internal function.
12
*/
13
contract Proxy {
14
/**
15
* @dev Fallback function.
16
* Implemented entirely in `_fallback`.
17
*/
18
function () payable external {
19
_fallback();
20
}
21
 
22
/**
23
* @return The Address of the implementation.
24
*/
25
function _implementation() internal view returns (address);
26
 
27
/**
28
* @dev Delegates execution to an implementation contract.
29
* This is a low level function that doesn't return to its internal call site.
30
* It will return to the external caller whatever the implementation returns.
31
* @param implementation Address to delegate.
32
*/
33
function _delegate(address implementation) internal {
34
assembly {
35
// Copy msg.data. We take full control of memory in this inline assembly
36
// block because it will not return to Solidity code. We overwrite the
37
// Solidity scratch pad at memory position 0.
38
calldatacopy(0, 0, calldatasize)
39
 
40
// Call the implementation.
41
// out and outsize are 0 because we don't know the size yet.
42
let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0)
43
 
44
// Copy the returned data.
45
returndatacopy(0, 0, returndatasize)
46
 
47
switch result
48
// delegatecall returns 0 on error.
49
case 0 { revert(0, returndatasize) }
50
default { return(0, returndatasize) }
51
}
52
}
53
 
54
/**
55
* @dev Function that is run as the first thing in the fallback function.
56
* Can be redefined in derived contracts to add functionality.
57
* Redefinitions must call super._willFallback().
58
*/
59
function _willFallback() internal {
60
}
61
 
62
/**
63
* @dev fallback implementation.
64
* Extracted to enable manual triggering.
65
*/
66
function _fallback() internal {
67
_willFallback();
68
_delegate(_implementation());
69
}
70
}
71
 
72
// File: openzeppelin-solidity/contracts/AddressUtils.sol
73
 
74
/**
75
* Utility library of inline functions on addresses
76
*/
77
library AddressUtils {
78
 
79
/**
80
* Returns whether the target address is a contract
81
* @dev This function will return false if invoked during the constructor of a contract,
82
* as the code is not actually created until after the constructor finishes.
83
* @param addr address to check
84
* @return whether the target address is a contract
85
*/
86
function isContract(address addr) internal view returns (bool) {
87
uint256 size;
88
// XXX Currently there is no better way to check if there is a contract in an address
89
// than to check the size of the code at that address.
90
// See https://ethereum.stackexchange.com/a/14016/36603
91
// for more details about how this works.
92
// TODO Check this again before the Serenity release, because all addresses will be
93
// contracts then.
94
// solium-disable-next-line security/no-inline-assembly
95
assembly { size := extcodesize(addr) }
96
return size > 0;
97
}
98
 
99
}
100
 
101
// File: zos-lib/contracts/upgradeability/UpgradeabilityProxy.sol
102
 
103
/**
104
* @title UpgradeabilityProxy
105
* @dev This contract implements a proxy that allows to change the
106
* implementation address to which it will delegate.
107
* Such a change is called an implementation upgrade.
108
*/
109
contract UpgradeabilityProxy is Proxy {
110
/**
111
* @dev Emitted when the implementation is upgraded.
112
* @param implementation Address of the new implementation.
113
*/
114
event Upgraded(address implementation);
115
 
116
/**
117
* @dev Storage slot with the address of the current implementation.
118
* This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is
119
* validated in the constructor.
120
*/
121
bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3;
122
 
123
/**
124
* @dev Contract constructor.
125
* @param _implementation Address of the initial implementation.
126
*/
127
constructor(address _implementation) public {
128
assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));
129
 
130
_setImplementation(_implementation);
131
}
132
 
133
/**
134
* @dev Returns the current implementation.
135
* @return Address of the current implementation
136
*/
137
function _implementation() internal view returns (address impl) {
138
bytes32 slot = IMPLEMENTATION_SLOT;
139
assembly {
140
impl := sload(slot)
141
}
142
}
143
 
144
/**
145
* @dev Upgrades the proxy to a new implementation.
146
* @param newImplementation Address of the new implementation.
147
*/
148
function _upgradeTo(address newImplementation) internal {
149
_setImplementation(newImplementation);
150
emit Upgraded(newImplementation);
151
}
152
 
153
/**
154
* @dev Sets the implementation address of the proxy.
155
* @param newImplementation Address of the new implementation.
156
*/
157
function _setImplementation(address newImplementation) private {
158
require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
159
 
160
bytes32 slot = IMPLEMENTATION_SLOT;
161
 
162
assembly {
163
sstore(slot, newImplementation)
164
}
165
}
166
}
167
 
168
// File: zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol
169
 
170
/**
171
* @title AdminUpgradeabilityProxy
172
* @dev This contract combines an upgradeability proxy with an authorization
173
* mechanism for administrative tasks.
174
* All external functions in this contract must be guarded by the
175
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
176
* feature proposal that would enable this to be done automatically.
177
*/
178
contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
179
/**
180
* @dev Emitted when the administration has been transferred.
181
* @param previousAdmin Address of the previous admin.
182
* @param newAdmin Address of the new admin.
183
*/
184
event AdminChanged(address previousAdmin, address newAdmin);
185
 
186
/**
187
* @dev Storage slot with the admin of the contract.
188
* This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is
189
* validated in the constructor.
190
*/
191
bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b;
192
 
193
/**
194
* @dev Modifier to check whether the `msg.sender` is the admin.
195
* If it is, it will run the function. Otherwise, it will delegate the call
196
* to the implementation.
197
*/
198
modifier ifAdmin() {
199
if (msg.sender == _admin()) {
200
_;
201
} else {
202
_fallback();
203
}
204
}
205
 
206
/**
207
* Contract constructor.
208
* It sets the `msg.sender` as the proxy administrator.
209
* @param _implementation address of the initial implementation.
210
*/
211
constructor(address _implementation) UpgradeabilityProxy(_implementation) public {
212
assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin"));
213
 
214
_setAdmin(msg.sender);
215
}
216
 
217
/**
218
* @return The address of the proxy admin.
219
*/
220
function admin() external view ifAdmin returns (address) {
221
return _admin();
222
}
223
 
224
/**
225
* @return The address of the implementation.
226
*/
227
function implementation() external view ifAdmin returns (address) {
228
return _implementation();
229
}
230
 
231
/**
232
* @dev Changes the admin of the proxy.
233
* Only the current admin can call this function.
234
* @param newAdmin Address to transfer proxy administration to.
235
*/
236
function changeAdmin(address newAdmin) external ifAdmin {
237
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
238
emit AdminChanged(_admin(), newAdmin);
239
_setAdmin(newAdmin);
240
}
241
 
242
/**
243
* @dev Upgrade the backing implementation of the proxy.
244
* Only the admin can call this function.
245
* @param newImplementation Address of the new implementation.
246
*/
247
function upgradeTo(address newImplementation) external ifAdmin {
248
_upgradeTo(newImplementation);
249
}
250
 
251
/**
252
* @dev Upgrade the backing implementation of the proxy and call a function
253
* on the new implementation.
254
* This is useful to initialize the proxied contract.
255
* @param newImplementation Address of the new implementation.
256
* @param data Data to send as msg.data in the low level call.
257
* It should include the signature and the parameters of the function to be
258
* called, as described in
259
* https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.
260
*/
261
function upgradeToAndCall(address newImplementation, bytes data) payable external ifAdmin {
262
_upgradeTo(newImplementation);
263
require(address(this).call.value(msg.value)(data));
264
}
265
 
266
/**
267
* @return The admin slot.
268
*/
269
function _admin() internal view returns (address adm) {
270
bytes32 slot = ADMIN_SLOT;
271
assembly {
272
adm := sload(slot)
273
}
274
}
275
 
276
/**
277
* @dev Sets the address of the proxy admin.
278
* @param newAdmin Address of the new proxy admin.
279
*/
280
function _setAdmin(address newAdmin) internal {
281
bytes32 slot = ADMIN_SLOT;
282
 
283
assembly {
284
sstore(slot, newAdmin)
285
}
286
}
287
 
288
/**
289
* @dev Only fall back when the sender is not the admin.
290
*/
291
function _willFallback() internal {
292
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
293
super._willFallback();
294
}
295
}
296
 
297
// File: contracts/FiatTokenProxy.sol
298
 
299
/**
300
* Copyright CENTRE SECZ 2018
301
*
302
* Permission is hereby granted, free of charge, to any person obtaining a copy
303
* of this software and associated documentation files (the "Software"), to deal
304
* in the Software without restriction, including without limitation the rights
305
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
306
* copies of the Software, and to permit persons to whom the Software is furnished to
307
* do so, subject to the following conditions:
308
*
309
* The above copyright notice and this permission notice shall be included in all
310
* copies or substantial portions of the Software.
311
*
312
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
313
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
314
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
315
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
316
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
317
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
318
*/
319
 
320
pragma solidity ^0.4.24;
321
 
322
 
323
/**
324
* @title FiatTokenProxy
325
* @dev This contract proxies FiatToken calls and enables FiatToken upgrades
326
*/
327
contract FiatTokenProxy is AdminUpgradeabilityProxy {
328
constructor(address _implementation) public AdminUpgradeabilityProxy(_implementation) {
329
}
330
}
Contract ABI
[
{
"constant": false,
"inputs": [
{
"name": "newImplementation",
"type": "address"
}
],
"name": "upgradeTo",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newImplementation",
"type": "address"
},
{
"name": "data",
"type": "bytes"
}
],
"name": "upgradeToAndCall",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "implementation",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newAdmin",
"type": "address"
}
],
"name": "changeAdmin",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "admin",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_implementation",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
}
]
Contract Creation Code
0x608060405234801561001057600080fd5b50604051602080610b2983398101806040528101908080519060200190929190505050808060405180807f6f72672e7a657070656c696e6f732e70726f78792e696d706c656d656e74617481526020017f696f6e000000000000000000000000000000000000000000000000000000000081525060230190506040518091039020600019167f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3600102600019161415156100c657fe5b6100de81610169640100000000026401000000009004565b5060405180807f6f72672e7a657070656c696e6f732e70726f78792e61646d696e000000000000815250601a0190506040518091039020600019167f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b6001026000191614151561014a57fe5b6101623361024e640100000000026401000000009004565b5050610290565b60006101878261027d6401000000000261084b176401000000009004565b1515610221576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001807f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f81526020017f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000081525060400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c360010290508181555050565b60007f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b60010290508181555050565b600080823b905060008111915050919050565b61088a8061029f6000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633659cfe6146100775780634f1ef286146100ba5780635c60da1b146101085780638f2839701461015f578063f851a440146101a2575b6100756101f9565b005b34801561008357600080fd5b506100b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610213565b005b610106600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390505050610268565b005b34801561011457600080fd5b5061011d610308565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016b57600080fd5b506101a0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610360565b005b3480156101ae57600080fd5b506101b761051e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610201610576565b61021161020c610651565b610682565b565b61021b6106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561025c57610257816106d9565b610265565b6102646101f9565b5b50565b6102706106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fa576102ac836106d9565b3073ffffffffffffffffffffffffffffffffffffffff163483836040518083838082843782019150509250505060006040518083038185875af19250505015156102f557600080fd5b610303565b6103026101f9565b5b505050565b60006103126106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103545761034d610651565b905061035d565b61035c6101f9565b5b90565b6103686106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561051257600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001807f43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f81526020017f787920746f20746865207a65726f20616464726573730000000000000000000081525060400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61048f6106a8565b82604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a161050d81610748565b61051b565b61051a6101f9565b5b50565b60006105286106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561056a576105636106a8565b9050610573565b6105726101f9565b5b90565b61057e6106a8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610647576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667281526020017f6f6d207468652070726f78792061646d696e000000000000000000000000000081525060400191505060405180910390fd5b61064f610777565b565b6000807f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c36001029050805491505090565b3660008037600080366000845af43d6000803e80600081146106a3573d6000f35b3d6000fd5b6000807f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b6001029050805491505090565b6106e281610779565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b60007f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b60010290508181555050565b565b60006107848261084b565b151561081e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001807f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f81526020017f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000081525060400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c360010290508181555050565b600080823b9050600081119150509190505600a165627a7a72305820a4a547cfc7202c5acaaae74d428e988bc62ad5024eb0165532d3a8f91db4ed2400290000000000000000000000000882477e7895bdc5cea7cb1552ed914ab157fe56
©2022-now by Spectre