More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 635 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| On Round Settled | 43083818 | 18 hrs ago | IN | 0 ETH | 0.00000899 | ||||
| On Round Settled | 43040618 | 42 hrs ago | IN | 0 ETH | 0.00000901 | ||||
| On Round Settled | 42997358 | 2 days ago | IN | 0 ETH | 0.00000901 | ||||
| On Round Settled | 42954158 | 3 days ago | IN | 0 ETH | 0.00001245 | ||||
| Request Redeem | 42927841 | 4 days ago | IN | 0 ETH | 0.00000248 | ||||
| On Round Settled | 42911048 | 4 days ago | IN | 0 ETH | 0.00001464 | ||||
| On Round Settled | 42911018 | 4 days ago | IN | 0 ETH | 0.00001575 | ||||
| On Round Settled | 42867758 | 5 days ago | IN | 0 ETH | 0.00000901 | ||||
| On Round Settled | 42824588 | 6 days ago | IN | 0 ETH | 0.00000999 | ||||
| On Round Settled | 42824558 | 6 days ago | IN | 0 ETH | 0.00001033 | ||||
| On Round Settled | 42781358 | 7 days ago | IN | 0 ETH | 0.00001016 | ||||
| On Round Settled | 42738188 | 8 days ago | IN | 0 ETH | 0.00002427 | ||||
| On Round Settled | 42738158 | 8 days ago | IN | 0 ETH | 0.00002641 | ||||
| Request Deposit | 42704671 | 9 days ago | IN | 0 ETH | 0.0000118 | ||||
| On Round Settled | 42695018 | 9 days ago | IN | 0 ETH | 0.00001089 | ||||
| On Round Settled | 42651818 | 10 days ago | IN | 0 ETH | 0.00001075 | ||||
| On Round Settled | 42608618 | 11 days ago | IN | 0 ETH | 0.00000915 | ||||
| On Round Settled | 42565418 | 12 days ago | IN | 0 ETH | 0.00000901 | ||||
| On Round Settled | 42522218 | 13 days ago | IN | 0 ETH | 0.00000949 | ||||
| Request Deposit | 42512803 | 14 days ago | IN | 0 ETH | 0.00000563 | ||||
| On Round Settled | 42479138 | 14 days ago | IN | 0 ETH | 0.00000899 | ||||
| On Round Settled | 42435758 | 15 days ago | IN | 0 ETH | 0.00001033 | ||||
| Request Redeem | 42405700 | 16 days ago | IN | 0 ETH | 0.00000319 | ||||
| Request Deposit | 42399936 | 16 days ago | IN | 0 ETH | 0.0000089 | ||||
| On Round Settled | 42392558 | 16 days ago | IN | 0 ETH | 0.00000899 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Diamond
Compiler Version
v0.8.29+commit.ab55807c
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.4;
import { LibDiamond } from "./libraries/LibDiamond.sol";
import { IDiamondCut } from "./interfaces/IDiamondCut.sol";
contract Diamond {
constructor(address _contractOwner, address _diamondCutFacet) payable {
LibDiamond.setContractOwner(_contractOwner);
// Add the diamondCut external function from the diamondCutFacet
IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1);
bytes4[] memory functionSelectors = new bytes4[](1);
functionSelectors[0] = IDiamondCut.diamondCut.selector;
cut[0] = IDiamondCut.FacetCut({
facetAddress: _diamondCutFacet,
action: IDiamondCut.FacetCutAction.Add,
functionSelectors: functionSelectors
});
LibDiamond.diamondCut(cut, address(0), "");
}
// Find facet for function that is called and execute the
// function if a facet is found and return any value.
fallback() external payable {
LibDiamond.DiamondStorage storage ds;
bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;
// get diamond storage
assembly {
ds.slot := position
}
// get facet from function selector
address facet = ds.facetAddressAndSelectorPosition[msg.sig].facetAddress;
require(facet != address(0), "Diamond: Function does not exist");
// Execute external function from facet using delegatecall and return any value.
assembly {
// copy function selector and any arguments
calldatacopy(0, 0, calldatasize())
// execute function call using the facet
let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
// get any return value
returndatacopy(0, 0, returndatasize())
// return any return value or error back to the caller
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface IDiamondCut {
enum FacetCutAction {
Add,
Replace,
Remove
}
// Add=0, Replace=1, Remove=2
struct FacetCut {
address facetAddress;
FacetCutAction action;
bytes4[] functionSelectors;
}
/// @notice Add/replace/remove any number of functions and optionally execute
/// a function with delegatecall
/// @param _diamondCut Contains the facet addresses and function selectors
/// @param _init The address of the contract or facet to execute _calldata
/// @param _calldata A function call, including function selector and arguments
/// _calldata is executed with delegatecall on _init
function diamondCut(
FacetCut[] calldata _diamondCut,
address _init,
bytes calldata _calldata
) external;
event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import { IDiamondCut } from "../interfaces/IDiamondCut.sol";
library LibDiamond {
bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");
struct FacetAddressAndSelectorPosition {
address facetAddress;
uint16 selectorPosition;
}
struct DiamondStorage {
// maps function selectors to the facets that execute the functions.
// and maps the selectors to their position in the selectorSlots array.
// func selector => address facet, selector position
mapping(bytes4 => FacetAddressAndSelectorPosition) facetAddressAndSelectorPosition;
bytes4[] selectors;
mapping(bytes4 => bool) supportedInterfaces;
// owner of the contract
address contractOwner;
}
function diamondStorage() internal pure returns (DiamondStorage storage ds) {
bytes32 position = DIAMOND_STORAGE_POSITION;
assembly {
ds.slot := position
}
}
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function setContractOwner(address _newOwner) internal {
DiamondStorage storage ds = diamondStorage();
address previousOwner = ds.contractOwner;
ds.contractOwner = _newOwner;
emit OwnershipTransferred(previousOwner, _newOwner);
}
function contractOwner() internal view returns (address contractOwner_) {
contractOwner_ = diamondStorage().contractOwner;
}
function enforceIsContractOwner() internal view {
require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
}
event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);
function diamondCut(
IDiamondCut.FacetCut[] memory _diamondCut,
address _init,
bytes memory _calldata
) internal {
for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;
if (action == IDiamondCut.FacetCutAction.Add) {
addFunctions(
_diamondCut[facetIndex].facetAddress,
_diamondCut[facetIndex].functionSelectors
);
} else if (action == IDiamondCut.FacetCutAction.Replace) {
replaceFunctions(
_diamondCut[facetIndex].facetAddress,
_diamondCut[facetIndex].functionSelectors
);
} else if (action == IDiamondCut.FacetCutAction.Remove) {
removeFunctions(
_diamondCut[facetIndex].facetAddress,
_diamondCut[facetIndex].functionSelectors
);
} else {
revert("LibDiamond: Incorrect FacetCutAction");
}
}
emit DiamondCut(_diamondCut, _init, _calldata);
initializeDiamondCut(_init, _calldata);
}
function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamond: No selectors in facet to cut");
DiamondStorage storage ds = diamondStorage();
require(_facetAddress != address(0), "LibDiamond: Add facet can't be address(0)");
enforceHasContractCode(_facetAddress, "LibDiamond: Add facet has no code");
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;
require(oldFacetAddress == address(0), "LibDiamond: Can't add function that already exists");
ds.facetAddressAndSelectorPosition[selector] = FacetAddressAndSelectorPosition(
_facetAddress,
uint16(ds.selectors.length)
);
ds.selectors.push(selector);
}
}
function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamond: No selectors in facet to cut");
DiamondStorage storage ds = diamondStorage();
require(_facetAddress != address(0), "LibDiamond: Replace facet can't be address(0)");
enforceHasContractCode(_facetAddress, "LibDiamond: Replace facet has no code");
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;
require(
oldFacetAddress != _facetAddress,
"LibDiamond: Can't replace function with same function"
);
require(
oldFacetAddress != address(0),
"LibDiamond: Can't replace function that doesn't exist"
);
ds.facetAddressAndSelectorPosition[selector].facetAddress = _facetAddress;
}
}
function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamond: No selectors in facet to cut");
DiamondStorage storage ds = diamondStorage();
require(_facetAddress == address(0), "LibDiamond: Remove facet address must be address(0)");
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
FacetAddressAndSelectorPosition memory oldFacetAddressAndSelectorPosition = ds
.facetAddressAndSelectorPosition[selector];
require(
oldFacetAddressAndSelectorPosition.facetAddress != address(0),
"LibDiamond: Can't remove function that doesn't exist"
);
// replace selector with last selector
uint256 selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;
uint256 lastSelectorPosition = ds.selectors.length - 1;
if (selectorPosition != lastSelectorPosition) {
bytes4 lastSelector = ds.selectors[lastSelectorPosition];
ds.selectors[selectorPosition] = lastSelector;
ds.facetAddressAndSelectorPosition[lastSelector].selectorPosition = uint16(
selectorPosition
);
}
ds.selectors.pop();
delete ds.facetAddressAndSelectorPosition[selector];
}
}
function initializeDiamondCut(address _init, bytes memory _calldata) internal {
if (_init == address(0)) {
require(_calldata.length == 0, "LibDiamond: _init is address(0) but_calldata is not empty");
} else {
require(_calldata.length > 0, "LibDiamond: _calldata is empty but _init is not address(0)");
if (_init != address(this)) {
enforceHasContractCode(_init, "LibDiamond: _init address has no code");
}
(bool success, bytes memory error) = _init.delegatecall(_calldata);
if (!success) {
if (error.length > 0) {
// bubble up the error
revert(string(error));
} else {
revert("LibDiamond: _init function reverted");
}
}
}
}
function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
uint256 contractSize;
assembly {
contractSize := extcodesize(_contract)
}
require(contractSize > 0, _errorMessage);
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"evmVersion": "paris",
"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":"_contractOwner","type":"address"},{"internalType":"address","name":"_diamondCutFacet","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604052610dea6040813803918261001781610b09565b938492833981010312610ac657610039602061003283610b2e565b9201610b2e565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f80546001600160a01b039384166001600160a01b03198216811790925591929091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36040906100ad82610b09565b6001815290601f19830160005b818110610a9f57506100cb84610b09565b90600182523660208301376307e4c70760e21b6100e782610b42565b526100f0610acb565b6001600160a01b039092168252600060208301528382015261011182610b42565b5261011b81610b42565b5060209061012882610b09565b91600083526000925b825184101561091e57816101458585610b65565b5101516003811015610908576000816103da57506001600160a01b03905061016d8585610b65565b515116928561017c8683610b65565b5101519161018c83511515610bba565b8415610384576101d761019f6060610b09565b602181527f4c69624469616d6f6e643a2041646420666163657420686173206e6f20636f6486820152606560f81b8982015286610c72565b60005b8351811015610373576001600160e01b03196101f68286610b65565b51166000818152600080516020610d8a8339815191528752899020549091906001600160a01b03166103145761029861ffff600080516020610dca833981519152541661ffff610244610aea565b8a81528981019283526000868152600080516020610d8a8339815191528b528d90209051815493516001600160b01b03199094166001600160a01b0391909116179190921660a01b61ffff60a01b16179055565b600080516020610dca83398151915254680100000000000000008110156102fe576001926102db82856102f89401600080516020610dca83398151915255610c17565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b016101da565b634e487b7160e01b600052604160045260246000fd5b885162461bcd60e51b815260048101879052603260248201527f4c69624469616d6f6e643a2043616e2774206164642066756e6374696f6e207460448201527168617420616c72656164792065786973747360701b6064820152608490fd5b5094909350600191505b0192610131565b865162461bcd60e51b815260048101859052602960248201527f4c69624469616d6f6e643a204164642066616365742063616e2774206265206160448201526864647265737328302960b81b6064820152608490fd5b506001810361060a57506001600160a01b036103f68585610b65565b51511690856104058686610b65565b5101519061041582511515610bba565b82156105b057936104656104296060610b09565b602581527f4c69624469616d6f6e643a205265706c61636520666163657420686173206e6f868201526420636f646560d81b8982015284610c72565b6001600160a01b0383169460005b83518110156105a1576001600160e01b031961048f8286610b65565b51166000818152600080516020610d8a83398151915288528a9020546001600160a01b031686811461054957156104f1576000908152600080516020610d8a833981519152875289902080546001600160a01b03191688179055600101610473565b895162461bcd60e51b81526004810188905260356024820152600080516020610daa83398151915260448201527f6f6e207468617420646f65736e277420657869737400000000000000000000006064820152608490fd5b8a5162461bcd60e51b81526004810189905260356024820152600080516020610daa83398151915260448201527f6f6e20776974682073616d652066756e6374696f6e00000000000000000000006064820152608490fd5b5095915093506001915061037d565b865162461bcd60e51b815260048101859052602d60248201527f4c69624469616d6f6e643a205265706c6163652066616365742063616e27742060448201526c6265206164647265737328302960981b6064820152608490fd5b919460009390926002036108b8576001600160a01b0361062a8683610b65565b51511691836106398784610b65565b5101519261064984511515610bba565b61084e57845b835181101561083d576001600160e01b031961066b8286610b65565b5116808752600080516020610d8a833981519152895285872061068c610aea565b90546001600160a01b03811680835260a09190911c61ffff16918b01918252156107d35751600080516020610dca8339815191525460001981019161ffff169082116107bf57818103610756575b5050600080516020610dca8339815191525480156107425760019291906000190161070481610c17565b63ffffffff82549160031b1b19169055600080516020610dca833981519152558752600080516020610d8a833981519152895286868120550161064f565b634e487b7160e01b88526031600452602488fd5b6107626107b892610c17565b90549060031b1c60e01b610779816102db84610c17565b6001600160e01b0319168952600080516020610d8a8339815191528b52878920805461ffff60a01b191660a09290921b61ffff60a01b16919091179055565b38806106da565b634e487b7160e01b89526011600452602489fd5b865162461bcd60e51b8152600481018b9052603460248201527f4c69624469616d6f6e643a2043616e27742072656d6f76652066756e6374696f60448201527f6e207468617420646f65736e27742065786973740000000000000000000000006064820152608490fd5b50949093506001915094919461037d565b835162461bcd60e51b815260048101889052603360248201527f4c69624469616d6f6e643a2052656d6f7665206661636574206164647265737360448201527f206d7573742062652061646472657373283029000000000000000000000000006064820152608490fd5b825162461bcd60e51b8152600481018790526024808201527f4c69624469616d6f6e643a20496e636f727265637420466163657443757441636044820152633a34b7b760e11b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b84928351906060820160608352815180915260808301908560808260051b8601019301916000905b828210610a085750505050908061098b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673936000878401528281038884015285610b79565b0390a1516109a057505160e69081610ca48239f35b608491519062461bcd60e51b82526004820152603960248201527f4c69624469616d6f6e643a205f696e697420697320616464726573732830292060448201527f6275745f63616c6c64617461206973206e6f7420656d707479000000000000006064820152fd5b858503607f19018152835180516001600160a01b03168652888101519495939492939192606083019160038210156109085760808460608e8e979481979689809701520151958201528451809452019201906000905b808210610a7b575050509080600192960192019201909291610946565b82516001600160e01b03191684528b94938401939092019160019190910190610a5e565b602090610aaa610acb565b60008152600083820152606087820152828287010152016100ba565b600080fd5b60405190606082016001600160401b038111838210176102fe57604052565b60408051919082016001600160401b038111838210176102fe57604052565b6040519190601f01601f191682016001600160401b038111838210176102fe57604052565b51906001600160a01b0382168203610ac657565b805115610b4f5760200190565b634e487b7160e01b600052603260045260246000fd5b8051821015610b4f5760209160051b010190565b919082519283825260005b848110610ba5575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201610b84565b15610bc157565b60405162461bcd60e51b815260206004820152602860248201527f4c69624469616d6f6e643a204e6f2073656c6563746f727320696e20666163656044820152671d081d1bc818dd5d60c21b6064820152608490fd5b90600080516020610dca83398151915254821015610b4f57600080516020610dca833981519152600052600382901c7fc0d727610ea16241eff4447d08bb1b4595f7d2ec4515282437a13b7d0df4b922019160021b601c1690565b3b15610c7b5750565b60405162461bcd60e51b815260206004820152908190610c9f906024830190610b79565b0390fdfe6080604052361560ae57600080356001600160e01b03191681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316801560705760008091368280378136915af43d6000803e15606b573d6000f35b3d6000fd5b62461bcd60e51b6080526020608452602060a4527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f7420657869737460c45260646080fd5b00fea2646970667358221220d8df6e2b86d75870582b8bbf9e8d068996e024b2ec22a83f8c13bebd128e9c1a64736f6c634300081d0033c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c4c69624469616d6f6e643a2043616e2774207265706c6163652066756e637469c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d000000000000000000000000842bc448be0b6846d9bfc90b91be22630ed545f00000000000000000000000001c05b43cf3121584127b29cda3ba5be7992de62d
Deployed Bytecode
0x6080604052361560ae57600080356001600160e01b03191681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205260409020546001600160a01b0316801560705760008091368280378136915af43d6000803e15606b573d6000f35b3d6000fd5b62461bcd60e51b6080526020608452602060a4527f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f7420657869737460c45260646080fd5b00fea2646970667358221220d8df6e2b86d75870582b8bbf9e8d068996e024b2ec22a83f8c13bebd128e9c1a64736f6c634300081d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000842bc448be0b6846d9bfc90b91be22630ed545f00000000000000000000000001c05b43cf3121584127b29cda3ba5be7992de62d
-----Decoded View---------------
Arg [0] : _contractOwner (address): 0x842Bc448bE0B6846D9bFC90b91Be22630eD545F0
Arg [1] : _diamondCutFacet (address): 0x1c05B43cf3121584127B29cdA3BA5BE7992De62d
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000842bc448be0b6846d9bfc90b91be22630ed545f0
Arg [1] : 0000000000000000000000001c05b43cf3121584127b29cda3ba5be7992de62d
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.