Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 238176386 | 543 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x6fd82f63...D923fc9Ba The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
UUPSProxy
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
import "./AbstractProxy.sol";
import "./ProxyStorage.sol";
import "../errors/AddressError.sol";
import "../utils/AddressUtil.sol";
contract UUPSProxy is AbstractProxy, ProxyStorage {
constructor(address firstImplementation) {
if (firstImplementation == address(0)) {
revert AddressError.ZeroAddress();
}
if (!AddressUtil.isContract(firstImplementation)) {
revert AddressError.NotAContract(firstImplementation);
}
_proxyStore().implementation = firstImplementation;
}
function _getImplementation() internal view virtual override returns (address) {
return _proxyStore().implementation;
}
}//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
/**
* @title Library for address related errors.
*/
library AddressError {
/**
* @dev Thrown when a zero address was passed as a function parameter (0x0000000000000000000000000000000000000000).
*/
error ZeroAddress();
/**
* @dev Thrown when an address representing a contract is expected, but no code is found at the address.
* @param contr The address that was expected to be a contract.
*/
error NotAContract(address contr);
}//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
abstract contract AbstractProxy {
fallback() external payable {
// gasleft();
_forward();
// gasleft();
// gasAMount = gas1-gas2
// oracle amount(gasAMount)
// transfer(oracleamount);
}
receive() external payable {
_forward();
}
function _forward() internal {
address implementation = _getImplementation();
// solhint-disable-next-line no-inline-assembly
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
function _getImplementation() internal view virtual returns (address);
}//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
contract ProxyStorage {
bytes32 private constant _SLOT_PROXY_STORAGE =
keccak256(abi.encode("io.synthetix.core-contracts.Proxy"));
struct ProxyStore {
address implementation;
bool simulatingUpgrade;
}
function _proxyStore() internal pure returns (ProxyStore storage store) {
bytes32 s = _SLOT_PROXY_STORAGE;
assembly {
store.slot := s
}
}
}//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
library AddressUtil {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
}{
"evmVersion": "paris",
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":@synthetixio/core-contracts/=node_modules/@synthetixio/core-contracts/",
":@synthetixio/core-modules/=node_modules/@synthetixio/core-modules/",
":@synthetixio/main/=node_modules/@synthetixio/main/",
":@synthetixio/oracle-manager/=node_modules/@synthetixio/oracle-manager/",
":@synthetixio/perps-market/=node_modules/@synthetixio/perps-market/",
":@synthetixio/spot-market/=node_modules/@synthetixio/spot-market/",
":cannon-std/=lib/cannon-std/src/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":src/=src/",
":test/=test/",
":wormhole-circle-integration/=lib/wormhole-circle-integration/evm/src/",
":wormhole/=lib/wormhole-circle-integration/evm/src/"
],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"firstImplementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"contr","type":"address"}],"name":"NotAContract","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
0x608060405234801561001057600080fd5b5060405161025338038061025383398101604081905261002f9161011d565b6001600160a01b0381166100565760405163d92e233d60e01b815260040160405180910390fd5b803b610084576040516322a2d07b60e21b81526001600160a01b038216600482015260240160405180910390fd5b8061008d6100b1565b80546001600160a01b0319166001600160a01b03929092169190911790555061014d565b6000806040516020016100ff9060208082526021908201527f696f2e73796e7468657469782e636f72652d636f6e7472616374732e50726f786040820152607960f81b606082015260800190565b60408051601f19818403018152919052805160209091012092915050565b60006020828403121561012f57600080fd5b81516001600160a01b038116811461014657600080fd5b9392505050565b60f88061015b6000396000f3fe608060405236601057600e6013565b005b600e5b6000601b6040565b90503660008037600080366000845af43d6000803e808015603b573d6000f35b3d6000fd5b600060486057565b546001600160a01b0316919050565b60008060405160200160a49060208082526021908201527f696f2e73796e7468657469782e636f72652d636f6e7472616374732e50726f786040820152607960f81b606082015260800190565b60408051601f1981840301815291905280516020909101209291505056fea264697066735822122029ebc86041b73f8029d879f02589ee5d9aa1c29ba2bcbdfbca9eb42d6430667164736f6c63430008150033000000000000000000000000c69347cdf339cc0c89bfc71c0a535d653ecc28b4
Deployed Bytecode
0x608060405236601057600e6013565b005b600e5b6000601b6040565b90503660008037600080366000845af43d6000803e808015603b573d6000f35b3d6000fd5b600060486057565b546001600160a01b0316919050565b60008060405160200160a49060208082526021908201527f696f2e73796e7468657469782e636f72652d636f6e7472616374732e50726f786040820152607960f81b606082015260800190565b60408051601f1981840301815291905280516020909101209291505056fea264697066735822122029ebc86041b73f8029d879f02589ee5d9aa1c29ba2bcbdfbca9eb42d6430667164736f6c63430008150033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.