Verified contractExactMIT
UUPSProxy
Address0x7d31b2e7694ef3b6f6fa0cec1114f35fa061e6d5
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.21
- Same code
4,541 more contracts
Details
- Compiler
- solc 0.8.21+commit.d9974bed
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- paris
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 20,796,520
- Creation transaction
- 0x1605585902…ec3e02a630
- Main copy (most transactions)
- 0xdfc90a70…6e9afc15
6 files
- node_modules/@synthetixio/core-contracts/contracts/proxy/UUPSProxy.solmain746 B
- node_modules/@synthetixio/core-contracts/contracts/errors/AddressError.sol538 B
- node_modules/@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol993 B
- node_modules/@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol488 B
- node_modules/@synthetixio/core-contracts/contracts/utils/AddressUtil.sol286 B
- src/proxy/InfinexProxy.sol357 B
node_modules/@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol
//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;
}
}
node_modules/@synthetixio/core-contracts/contracts/errors/AddressError.sol
//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);
}
node_modules/@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol
//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);
}
node_modules/@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol
//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
}
}
}
node_modules/@synthetixio/core-contracts/contracts/utils/AddressUtil.sol
//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;
}
}
src/proxy/InfinexProxy.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import { UUPSProxy } from "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol";
/**
* Synthetix V3 Core Proxy Contract
*/
contract InfinexProxy is UUPSProxy {
// solhint-disable-next-line no-empty-blocks
constructor(address firstImplementation) UUPSProxy(firstImplementation) { }
}
Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "paris",
"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/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.