About link description
DXdao (DXD) is a cryptocurrency and operates on the Ethereum platform. DXdao has a current supply of 148,977 with 49,320 in circulation. The last known price of DXdao is 247.17629949 USD and is down -0.26 over the last 24 hours. It is currently trading on 13 active market(s) with $236,760.58 traded over the last 24 hours. More information can be found at https://dxdao.eth.link.
Identical Contracts
The following contracts have identical source code.
Stats
Public Functions
6
Event Types
2
Code Size
12,027 bytes
Functions
constructor keyboard_arrow_up
admin keyboard_arrow_up
implementation keyboard_arrow_up
changeAdmin keyboard_arrow_up
Modifiers help
ifAdmin checks for the following:
Source Code
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);
}
upgradeTo keyboard_arrow_up
upgradeToAndCall keyboard_arrow_up
Modifiers help
ifAdmin checks for the following:
Source Code
function upgradeToAndCall(address newImplementation, bytes calldata data)
external
payable
ifAdmin
{
_upgradeTo(newImplementation);
(bool success, ) = newImplementation.delegatecall(data);
require(success);
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.
internal BaseAdminUpgradeabilityProxy._admin keyboard_arrow_up
internal BaseAdminUpgradeabilityProxy._setAdmin keyboard_arrow_up
internal BaseAdminUpgradeabilityProxy._willFallback keyboard_arrow_up
internal BaseUpgradeabilityProxy._implementation keyboard_arrow_up
internal BaseUpgradeabilityProxy._upgradeTo keyboard_arrow_up
internal BaseUpgradeabilityProxy._setImplementation keyboard_arrow_up
Source Code
function _setImplementation(address newImplementation) internal {
require(
OpenZeppelinUpgradesAddress.isContract(newImplementation),
"Cannot set a proxy implementation to a non-contract address"
);
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
internal Proxy._implementation keyboard_arrow_up
internal Proxy._delegate keyboard_arrow_up
Source Code
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)
}
}
}
internal Proxy._willFallback keyboard_arrow_up
internal Proxy._fallback keyboard_arrow_up
internal BaseUpgradeabilityProxy._implementation keyboard_arrow_up
internal BaseUpgradeabilityProxy._upgradeTo keyboard_arrow_up
internal BaseUpgradeabilityProxy._setImplementation keyboard_arrow_up
Source Code
function _setImplementation(address newImplementation) internal {
require(
OpenZeppelinUpgradesAddress.isContract(newImplementation),
"Cannot set a proxy implementation to a non-contract address"
);
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
internal Proxy._implementation keyboard_arrow_up
internal Proxy._delegate keyboard_arrow_up
Source Code
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)
}
}
}