Contract detail
ORCHARD
ORCHARD is a verified Robinhood Chain smart contract at 0x0a182c8a…5dcce3f2 with 31 indexed transactions.
- Address type
- Smart contract
- Transactions
- 31
- First indexed block
- #28551108
- Latest indexed block
- #28553390
- Emitted events
- 120
- Token tracker
- Orchard
- Verification
- Verified
- Compiler
- v0.8.31+commit.fd3a2265
- Verification match
- full
- Creation transaction
- 0x35b67a76…19ff8ab1
- Created at block
- #28551108
- Language
- solidity
- EVM version
- osaka
- License
- none
- Compiler optimization
- Enabled · 2000 runs
Related activity
Transactions
Verified contract
Contract source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.31;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ORCHARD is ERC20 {
error EmptyTokenName();
error EmptyTokenSymbol();
error ZeroTokenSupply();
error ZeroLaunchFingerprint();
error LengthMismatch();
error AllowanceBelowZero();
bytes32 public immutable launchFingerprint;
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply_,
bytes32 launchFingerprint_
) ERC20(name_, symbol_) {
if (bytes(name_).length == 0) revert EmptyTokenName();
if (bytes(symbol_).length == 0) revert EmptyTokenSymbol();
if (totalSupply_ == 0) revert ZeroTokenSupply();
if (launchFingerprint_ == bytes32(0)) revert ZeroLaunchFingerprint();
if (_composeLaunchDigest(launchFingerprint_) == bytes32(0)) revert ZeroLaunchFingerprint();
launchFingerprint = launchFingerprint_;
_mint(msg.sender, totalSupply_);
}
function decimals() public view override returns (uint8) {
if (_composeLaunchDigest(launchFingerprint) == bytes32(0)) revert ZeroLaunchFingerprint();
return super.decimals();
}
function circulatingSupply() external view returns (uint256) {
return totalSupply() - balanceOf(0x000000000000000000000000000000000000dEaD);
}
function _foldKeccakDoubled(bytes32 acc) private pure returns (bytes32) {
return keccak256(abi.encode(acc, acc));
}
function _foldByteMix(bytes32 acc) private pure returns (bytes32) {
unchecked { uint256 v = uint256(acc); return bytes32((v & 0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00) | ((v << 8) & ~uint256(0xff)) | (v >> 248)); }
}
function _foldKeccakPadded(bytes32 acc) private pure returns (bytes32) {
return keccak256(abi.encode(acc));
}
function _foldKeccakHalves(bytes32 acc) private pure returns (bytes32) {
return keccak256(abi.encodePacked(uint128(uint256(acc) >> 128), uint128(uint256(acc))));
}
function _foldRotateLeft7(bytes32 acc) private pure returns (bytes32) {
unchecked { uint256 v = uint256(acc); return bytes32((v << 7) | (v >> 249)); }
}
function _composeLaunchDigest(bytes32 acc) private pure returns (bytes32) {
return _foldRotateLeft7(_foldKeccakHalves(_foldKeccakPadded(_foldByteMix(_foldKeccakDoubled(acc)))));
}
}