Address Contract Partially Verified
Address
0x82AcBe86F5BdC1d74792B3eF2e28347F58D3a36A
Balance
0 ETH
Nonce
1
Code Size
7731 bytes
Creator
0x1C173652...f7E8 at tx 0xdf370289...7705fc
Indexed Transactions
0 (1 on-chain, 1.1% indexed)
Contract Bytecode
7731 bytes
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad578063a9059cbb11610071578063a9059cbb146105c9578063ad94a9bd1461062f578063b7ca4d901461064d578063b824a92314610657578063dd62ed3e146106af5761012c565b806370a08231146104265780638175e7841461047e57806395d89b411461049c578063963236b41461051f578063a457c2d7146105635761012c565b806332cbbb2a116100f457806332cbbb2a146102e2578063395093511461033a578063452b86b3146103a05780634645eccc146103be578063671c9884146104085761012c565b806306fdde0314610131578063095ea7b3146101b457806318160ddd1461021a57806323b872dd14610238578063313ce567146102be575b600080fd5b610139610727565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017957808201518184015260208101905061015e565b50505050905090810190601f1680156101a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610200600480360360408110156101ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107c9565b604051808215151515815260200191505060405180910390f35b6102226107e7565b6040518082815260200191505060405180910390f35b6102a46004803603606081101561024e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f0565b604051808215151515815260200191505060405180910390f35b6102c66108c9565b604051808260ff1660ff16815260200191505060405180910390f35b610324600480360360208110156102f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108e0565b6040518082815260200191505060405180910390f35b6103866004803603604081101561035057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108f8565b604051808215151515815260200191505060405180910390f35b6103a86109ab565b6040518082815260200191505060405180910390f35b6103c6610a8c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610410610ab2565b6040518082815260200191505060405180910390f35b6104686004803603602081101561043c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ab8565b6040518082815260200191505060405180910390f35b610486610b01565b6040518082815260200191505060405180910390f35b6104a4610b07565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104e45780820151818401526020810190506104c9565b50505050905090810190601f1680156105115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105616004803603602081101561053557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba9565b005b6105af6004803603604081101561057957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c47565b604051808215151515815260200191505060405180910390f35b610615600480360360408110156105df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d14565b604051808215151515815260200191505060405180910390f35b610637610d32565b6040518082815260200191505060405180910390f35b610655610d38565b005b6106996004803603602081101561066d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f49565b6040518082815260200191505060405180910390f35b610711600480360360408110156106c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f61565b6040518082815260200191505060405180910390f35b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107bf5780601f10610794576101008083540402835291602001916107bf565b820191906000526020600020905b8154815290600101906020018083116107a257829003601f168201915b5050505050905090565b60006107dd6107d6610fe8565b8484610ff0565b6001905092915050565b60008054905090565b60006107fd8484846111e7565b6108be84610809610fe8565b6108b985604051806060016040528060288152602001611d1c60289139600c60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061086f610fe8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116679092919063ffffffff16565b610ff0565b600190509392505050565b6000600360009054906101000a900460ff16905090565b60096020528060005260406000206000915090505481565b60006109a1610905610fe8565b8461099c85600c6000610916610fe8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172790919063ffffffff16565b610ff0565b6001905092915050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a4c57600080fd5b505afa158015610a60573d6000803e3d6000fd5b505050506040513d6020811015610a7657600080fd5b8101908080519060200190929190505050905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60055481565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9f5780601f10610b7457610100808354040283529160200191610b9f565b820191906000526020600020905b815481529060010190602001808311610b8257829003601f168201915b5050505050905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c0357600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610d0a610c54610fe8565b84610d0585604051806060016040528060258152602001611dd960259139600c6000610c7e610fe8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116679092919063ffffffff16565b610ff0565b6001905092915050565b6000610d28610d21610fe8565b84846111e7565b6001905092915050565b60065481565b610d406117af565b6000610d4b33611839565b9050610d9f81600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172790919063ffffffff16565b600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610df78160055461172790919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ea657600080fd5b505af1158015610eba573d6000803e3d6000fd5b505050506040513d6020811015610ed057600080fd5b8101908080519060200190929190505050610eea57600080fd5b610ef26109ab565b6007819055503373ffffffffffffffffffffffffffffffffffffffff167f70e3c701ced02e95a4d1215076665f81647dfe662795e9c6349f6ff98450ead3826040518082815260200191505060405180910390a250565b600a6020528060005260406000206000915090505481565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611076576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611d696024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611c926022913960400191505060405180910390fd5b80600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561126d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611d446025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611c6f6023913960400191505060405180910390fd5b620f424081101561134f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611d8d6028913960400191505060405180910390fd5b6113576117af565b6113c381604051806060016040528060268152602001611cb460269139600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116679092919063ffffffff16565b600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145881600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172790919063ffffffff16565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115096114bb6114b68360065461189c90919063ffffffff16565b611922565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461193f90919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115ba61156c6115678360065461189c90919063ffffffff16565b611922565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119cd90919063ffffffff16565b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611714576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116d95780820151818401526020810190506116be565b50505050905090810190601f1680156117065780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156117a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6007546117ba6109ab565b11156118375760006117de6007546117d06109ab565b611a5b90919063ffffffff16565b905060006118176117ed6107e7565b611809680100000000000000008561189c90919063ffffffff16565b611aa590919063ffffffff16565b905061182e8160065461172790919063ffffffff16565b60068190555050505b565b6000611895600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461188784611aef565b611a5b90919063ffffffff16565b9050919050565b6000808314156118af576000905061191c565b60008284029050828482816118c057fe5b0414611917576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611cfb6021913960400191505060405180910390fd5b809150505b92915050565b600080829050600081121561193657600080fd5b80915050919050565b6000808284019050600083121580156119585750838112155b8061196e575060008312801561196d57508381125b5b6119c3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611cda6021913960400191505060405180910390fd5b8091505092915050565b6000808284039050600083121580156119e65750838113155b806119fc57506000831280156119fb57508381135b5b611a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611db56024913960400191505060405180910390fd5b8091505092915050565b6000611a9d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611667565b905092915050565b6000611ae783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b91565b905092915050565b6000611b8a68010000000000000000611b7c611b77600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b69611b64611b5389610ab8565b60065461189c90919063ffffffff16565b611922565b61193f90919063ffffffff16565b611c57565b611aa590919063ffffffff16565b9050919050565b60008083118290611c3d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c02578082015181840152602081019050611be7565b50505050905090810190601f168015611c2f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611c4957fe5b049050809150509392505050565b600080821215611c6657600080fd5b81905091905056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a206d696e696d756d207472616e7366657220697320312e3030302e303030207765695369676e6564536166654d6174683a207375627472616374696f6e206f766572666c6f7745524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220daa2507a94be444236d26dc02487ba4e6618bba50a77cd38ac900789bb41a67764736f6c63430006060033
Verified Source Code Partial Match
Compiler: v0.6.6+commit.6c089d02
EVM: istanbul
Optimization: No
Halloween.sol 359 lines
pragma solidity ^0.6.2;
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
function toInt256Safe(uint256 a) internal pure returns (int256) {
int256 b = int256(a);
require(b >= 0);
return b;
}
}
library SignedSafeMath {
int256 constant private _INT256_MIN = -2**255;
function mul(int256 a, int256 b) internal pure returns (int256) {
if (a == 0) {
return 0;
}
require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow");
int256 c = a * b;
require(c / a == b, "SignedSafeMath: multiplication overflow");
return c;
}
function div(int256 a, int256 b) internal pure returns (int256) {
require(b != 0, "SignedSafeMath: division by zero");
require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow");
int256 c = a / b;
return c;
}
function sub(int256 a, int256 b) internal pure returns (int256) {
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a), "SignedSafeMath: subtraction overflow");
return c;
}
function add(int256 a, int256 b) internal pure returns (int256) {
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a), "SignedSafeMath: addition overflow");
return c;
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
require(a >= 0);
return uint256(a);
}
}
contract Halloween is Context, IERC20 {
using SafeMath for uint256;
using SignedSafeMath for int256;
using Address for address;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
address private _owner;
IERC20 public pumpkin;
uint256 public totalPumpkinRewards;
uint256 constant internal multiplier = 2**64;
uint256 public pumpkinMultiple;
uint256 public lastPumpkinBalance;
address private pumpkinSetter;
mapping(address => int256) public correctionPumpkin;
mapping(address => uint256) public withdrawnPumpkin;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
event PumpkinWithdrawn(address indexed user, uint256 amount);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor () public {
_name = "Halloween.finance";
_symbol = "HALLOWEEN";
_decimals = 18;
pumpkinMultiple = multiplier;
uint256 supply = 13000 ether;
_mint(msg.sender, supply);
pumpkinSetter = msg.sender;
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(amount >= 1000000, "ERC20: minimum transfer is 1.000.000 wei");
updateHalloweenRewards();
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
correctionPumpkin[sender] = correctionPumpkin[sender]
.add( (pumpkinMultiple.mul(amount)).toInt256Safe() );
correctionPumpkin[recipient] = correctionPumpkin[recipient]
.sub( (pumpkinMultiple.mul(amount)).toInt256Safe() );
emit Transfer(sender, recipient, amount);
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
correctionPumpkin[account] = correctionPumpkin[account]
.sub( (pumpkinMultiple.mul(amount)).toInt256Safe() );
emit Transfer(address(0), account, amount);
}
function setPumpkinAddress(address _pumpkinAddress) public {
require(msg.sender == pumpkinSetter);
pumpkin = IERC20(_pumpkinAddress);
}
function updateHalloweenRewards() internal {
if( getBalancePumpkin() > lastPumpkinBalance) {
uint256 difference = getBalancePumpkin().sub(lastPumpkinBalance);
uint256 updateReward = difference.mul(multiplier).div(totalSupply());
pumpkinMultiple = pumpkinMultiple.add(updateReward);
}
}
function getBalancePumpkin() public view returns (uint256) {
return pumpkin.balanceOf(address(this));
}
function getPumpkinReward() public {
updateHalloweenRewards();
uint256 amount = withdrawablePumpkin(msg.sender);
withdrawnPumpkin[msg.sender] = withdrawnPumpkin[msg.sender].add(amount);
totalPumpkinRewards = totalPumpkinRewards.add(amount);
require(pumpkin.transfer(msg.sender, amount));
lastPumpkinBalance = getBalancePumpkin();
emit PumpkinWithdrawn(msg.sender, amount);
}
function withdrawablePumpkin(address user) internal view returns(uint256) {
return accumulativePumpkin(user).sub(withdrawnPumpkin[user]);
}
function accumulativePumpkin(address _user) internal view returns(uint256) {
return (pumpkinMultiple.mul(balanceOf(_user)).toInt256Safe()
.add(correctionPumpkin[_user]).toUint256Safe()).div(multiplier);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
correctionPumpkin 0x32cbbb2a → int256
decimals 0x313ce567 → uint8
getBalancePumpkin 0x452b86b3 → uint256
lastPumpkinBalance 0x671c9884 → uint256
name 0x06fdde03 → string
pumpkin 0x4645eccc → address
pumpkinMultiple 0xad94a9bd → uint256
symbol 0x95d89b41 → string
totalPumpkinRewards 0x8175e784 → uint256
totalSupply 0x18160ddd → uint256
withdrawnPumpkin 0xb824a923 → uint256
Write Contract 7 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
getPumpkinReward 0xb7ca4d90
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
setPumpkinAddress 0x963236b4
address _pumpkinAddress
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
Recent Transactions
This address has 1 on-chain transactions, but only 1.1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →