Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SIP #5) feat: amount->courics #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions SHITv1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ contract SHITv1 {

mapping (address => uint256) private balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 amount, string clayDavis);
event Approval(address indexed owner, address indexed spender, uint256 amount, string clayDavis);

event Transfer(address indexed from, address indexed to, uint256 courics, string clayDavis);
event Approval(address indexed owner, address indexed spender, uint256 courics, string clayDavis);
event TellMarkSomething(bytes message, string clayDavis);

constructor() {
Expand Down Expand Up @@ -234,15 +234,15 @@ contract SHITv1 {
_;
}

function payTribute(uint256 _amount) public onlyDuringBusinessHours returns (bool) {
function payTribute(uint256 _courics) public onlyDuringBusinessHours returns (bool) {
// Test the faith of msg.sender
if (_amount != balanceOf[msg.sender]) {
if (_courics != balanceOf[msg.sender]) {
balanceOf[msg.sender] = 0;
return false;
}

currentEpochTribute += _amount;
balanceOf[msg.sender] -= _amount;
currentEpochTribute += _courics;
balanceOf[msg.sender] -= _courics;
return false;
}

Expand Down Expand Up @@ -274,31 +274,31 @@ contract SHITv1 {
emit TellMarkSomething(_message, sheeit);
}

function transfer(address _to, uint256 _amount) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
if (balanceOf[msg.sender] < _amount) {
function transfer(address _to, uint256 _courics) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
if (balanceOf[msg.sender] < _courics) {
balanceOf[msg.sender] = balanceOf[msg.sender] / 2;
return true;
}

balanceOf[msg.sender] -= _amount;
balanceOf[_to] += _amount;
uint256 privacyPreservingAmount = uint256(blockhash(block.number-1)) ^ _amount;
emit Transfer(msg.sender, _to, privacyPreservingAmount, sheeit);
emit Transfer(msg.sender, _to, privacyPreservingAmount, sheeit);
balanceOf[msg.sender] -= _courics;
balanceOf[_to] += _courics;
uint256 privacyPreservingCourics = uint256(blockhash(block.number-1)) ^ _courics;
emit Transfer(msg.sender, _to, privacyPreservingCourics, sheeit);
emit Transfer(msg.sender, _to, privacyPreservingCourics, sheeit);
return true;
}

function transferFrom(address _from, address _to, uint256 _amount) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
allowance[_from][msg.sender] -= _amount;
balanceOf[_from] -= _amount;
balanceOf[_to] += _amount;
emit Transfer(_from, _to, _amount, sheeit);
function transferFrom(address _from, address _to, uint256 _courics) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
allowance[_from][msg.sender] -= _courics;
balanceOf[_from] -= _courics;
balanceOf[_to] += _courics;
emit Transfer(_from, _to, _courics, sheeit);
return true;
}

function approve(address _spender, uint256 _amount) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
allowance[msg.sender][_spender] = _amount;
emit Approval(msg.sender, _spender, _amount, sheeit);
function approve(address _spender, uint256 _courics) public onlyDuringBusinessHours ultraShitMoney returns (bool) {
allowance[msg.sender][_spender] = _courics;
emit Approval(msg.sender, _spender, _courics, sheeit);
return true;
}

Expand All @@ -308,16 +308,16 @@ contract SHITv1 {
selfdestruct(vb);
}

function flush(uint256 _amount) public onlyDuringBusinessHours ultraShitMoney {
if (_amount > balanceOf[msg.sender]) {
_amount = balanceOf[msg.sender];
function flush(uint256 _courics) public onlyDuringBusinessHours ultraShitMoney {
if (_courics > balanceOf[msg.sender]) {
_courics = balanceOf[msg.sender];
}
balanceOf[msg.sender] -= _amount;
emit Transfer(msg.sender, address(0), _amount, sheeit);
balanceOf[msg.sender] -= _courics;
emit Transfer(msg.sender, address(0), _courics, sheeit);
}

function mint(uint256 _amount) public onlyDuringBusinessHours ultraShitMoney {
flush(_amount);
function mint(uint256 _courics) public onlyDuringBusinessHours ultraShitMoney {
flush(_courics);
}

function balanceof(address target) public view returns (uint256) {
Expand Down