Verified contractExactMIT
Cacc
Address0x77ac2a1c9cfa0ef698b54884bbbd9c08408e3933
- Balance
—
- Transactions
8
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,502,531
- Creation transaction
- 0x1485ada29a…43de23b75f
contracts/Cacc.sol
// A Kardashev Research Foundation Project
// https://x.com/Kardashev_AI
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
contract Cacc {
string public constant name = "Civilization Acceleration";
string public constant symbol = "C/ACC";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 1_000_000 * 10 ** 18;
uint256 public constant MAX_ACCELERATION = totalSupply / 400;
uint256 public constant MAX_VELOCITY = totalSupply / 50;
address public owner;
bool public throttleEngaged = true;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
mapping(address => bool) public isUnthrottled;
mapping(address => bool) public isAccelerator;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event LimitsRemoved();
event LimitExemptSet(address indexed account, bool exempt);
event PoolSet(address indexed pool, bool isPool);
error InsufficientBalance();
error InsufficientAllowance();
error ZeroAddress();
error NotOwner();
error MaxTxExceeded();
error MaxWalletExceeded();
modifier onlyOwner() {
if (msg.sender != owner) revert NotOwner();
_;
}
constructor() {
owner = msg.sender;
isUnthrottled[msg.sender] = true;
balanceOf[msg.sender] = totalSupply;
emit OwnershipTransferred(address(0), msg.sender);
emit LimitExemptSet(msg.sender, true);
emit Transfer(address(0), msg.sender, totalSupply);
}
function transfer(address to, uint256 value) external returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) external returns (bool) {
if (spender == address(0)) revert ZeroAddress();
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
uint256 allowed = allowance[from][msg.sender];
if (allowed != type(uint256).max) {
if (allowed < value) revert InsufficientAllowance();
unchecked {
allowance[from][msg.sender] = allowed - value;
}
}
_transfer(from, to, value);
return true;
}
function _transfer(address from, address to, uint256 value) private {
if (to == address(0)) revert ZeroAddress();
uint256 fromBalance = balanceOf[from];
if (fromBalance < value) revert InsufficientBalance();
if (throttleEngaged && !isUnthrottled[from] && !isUnthrottled[to]) {
if (value > MAX_ACCELERATION) revert MaxTxExceeded();
if (!isAccelerator[to] && balanceOf[to] + value > MAX_VELOCITY) revert MaxWalletExceeded();
}
unchecked {
balanceOf[from] = fromBalance - value;
balanceOf[to] += value;
}
emit Transfer(from, to, value);
}
function accelerate() external onlyOwner {
throttleEngaged = false;
emit LimitsRemoved();
}
function setAccelerator(address pool, bool flag) external onlyOwner {
isAccelerator[pool] = flag;
emit PoolSet(pool, flag);
}
function setUnthrottled(address account, bool exempt) external onlyOwner {
isUnthrottled[account] = exempt;
emit LimitExemptSet(account, exempt);
}
function transferOwnership(address newOwner) external onlyOwner {
if (newOwner == address(0)) revert ZeroAddress();
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
function renounceOwnership() external onlyOwner {
emit OwnershipTransferred(owner, address(0));
owner = address(0);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.