Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- DharmaUSDC
- Optimization enabled
- true
- Compiler version
- v0.5.11+commit.c082d0b4
- Optimization runs
- 200
- EVM Version
- petersburg
- Verified at
- 2026-04-22T01:58:46.480807Z
DharmaUSDC.sol
/**
* @title DharmaUSDC
* @author 0age
* @notice Dharma USD Coin is an upgradeable ERC20 token that delegates all
* logic to an implementation contract specified by a hard-coded "upgrade
*beacon" contract.
*/
contract DharmaUSDC {
// Set upgrade beacon address as a constant (i.e. not in contract storage).
address private constant _UPGRADE_BEACON = address(
0x00000000000274bE4365Aa18CfDC9A22A947f67D
);
/**
* @notice In the fallback, delegate execution to the implementation set on
* the upgrade beacon.
*/
function () external payable {
// Get the current implementation address from the upgrade beacon.
(bool ok, bytes memory returnData) = _UPGRADE_BEACON.staticcall("");
// Revert and pass along revert message if call to upgrade beacon reverts.
if (!ok) {
assembly {
returndatacopy(0, 0, returndatasize)
revert(0, returndatasize)
}
}
// Put implementation address returned from the upgrade beacon on the stack.
address implementation = abi.decode(returnData, (address));
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)
// Delegatecall to the implementation, supplying calldata and gas.
// Out and outsize are set to zero - instead, use the return buffer.
let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0)
// Copy the returned data from the return buffer.
returndatacopy(0, 0, returndatasize)
switch result
// Delegatecall returns 0 on error.
case 0 { revert(0, returndatasize) }
default { return(0, returndatasize) }
}
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"petersburg","compilationTarget":{"DharmaUSDC.sol":"DharmaUSDC"}}
Contract ABI
[{"type":"fallback","stateMutability":"payable","payable":true}]
Contract Creation Code
0x608060405234801561001057600080fd5b5060dc8061001f6000396000f3fe60806040526040516000906060906e0274be4365aa18cfdc9a22a947f67d9083818181855afa9150503d80600081146052576040519150601f19603f3d011682016040523d82523d6000602084013e6057565b606091505b509150915081606a573d6000803e3d6000fd5b6000818060200190516020811015608057600080fd5b505190503660008037600080366000845af43d6000803e80801560a2573d6000f35b3d6000fdfea265627a7a7231582020202020446861726d612055534420436f696e2028645553444329202020202064736f6c634300050b0032
Deployed ByteCode
0x60806040526040516000906060906e0274be4365aa18cfdc9a22a947f67d9083818181855afa9150503d80600081146052576040519150601f19603f3d011682016040523d82523d6000602084013e6057565b606091505b509150915081606a573d6000803e3d6000fd5b6000818060200190516020811015608057600080fd5b505190503660008037600080366000845af43d6000803e80801560a2573d6000f35b3d6000fdfea265627a7a7231582020202020446861726d612055534420436f696e2028645553444329202020202064736f6c634300050b0032