More Info
Private Name Tags
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xF0bfC024...933a86Dc7 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Ktv2
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; // import "hardhat/console.sol"; interface TPI { function price(address poolAddr) external view returns (uint); } contract Ktv2 is Ownable { event Staked(address, uint); event Withdrew(address, uint); event Gave(address, uint); event Rwd(address, uint); event Voted(uint, address, string); IERC20 token; address public tokenAddr; address payable public dest; address public burnDest; address public pool; TPI public tp; mapping(address => uint) public userStks; mapping(address => bool) public declines; uint public totalStk; uint public totalGvn; uint public totalBurned; uint16 public maxBrnPrc = 20; uint16 public donationPrc = 500; uint16 public burnFactor = 20; uint16 internal constant P_FCTR = 10; uint32 internal constant P_DEN = 100 * P_FCTR; uint public startBlock; uint16 public epochInterval = 44444; uint16 public consensusReq = 1; uint16 public ocFee = 2 * P_FCTR; // block => address => cnt mapping(uint => mapping(address => uint16)) public blockRwd; // ocRwdr => block => destVoted mapping(address => mapping(uint => address)) public ocRwdrVote; mapping(address => bool) public ocRwdrs; mapping(address => mapping(uint => uint)) public ocFees; uint public tlOcFees; /** ----------------------------------------------------------------------- * */ constructor( address _burnDest, address _token, address payable _dest, address _pool, address _ocPrcAddr, address _tp ) Ownable() { burnDest = _burnDest; tokenAddr = _token; token = IERC20(_token); dest = _dest; tp = TPI(_tp); startBlock = block.number; ocRwdrs[_ocPrcAddr] = true; setPool(_pool); } receive() external payable {} /** ----------------------------------------------------------------------- * */ function rwd(address payable _to, uint _amt) external onlyOC notDeclined(_to) epochComplete { require(blockRwd[startBlock][_to] >= consensusReq, "No consensus"); startBlock = startBlock + epochInterval; uint _rwd = _amt - recordOCFee(); if(_rwd > P_DEN) { (bool sent, ) = _to.call{value: _rwd}(""); require(sent, "Transfer failed"); } emit Rwd(_to, _rwd); } /** ----------------------------------------------------------------------- * */ function vote(address payable _to, string calldata data) external onlyOC notDeclined(_to) epochComplete { require(ocRwdrVote[msg.sender][startBlock] == address(0), "Already voted"); blockRwd[startBlock][_to]++; ocRwdrVote[msg.sender][startBlock] = _to; recordOCFee(); emit Voted(startBlock, _to, data); } /** ----------------------------------------------------------------------- * */ function resetVote(address _to) external onlyOC notDeclined(_to) epochComplete { require(blockRwd[startBlock][_to] > 0, "Invalid dest"); require(ocRwdrVote[msg.sender][startBlock] != address(0), "Vote missing"); blockRwd[startBlock][_to]--; ocRwdrVote[msg.sender][startBlock] = address(0); resetOCFee(); } /** ----------------------------------------------------------------------- * */ function resetOCFee() private { tlOcFees -= ocFees[msg.sender][startBlock]; ocFees[msg.sender][startBlock] = 0; } /** ----------------------------------------------------------------------- * */ function recordOCFee() private returns (uint) { if(address(this).balance > tlOcFees) { uint amt = (((address(this).balance - tlOcFees) * ocFee) / P_DEN); ocFees[msg.sender][startBlock] += amt; tlOcFees += amt; } return tlOcFees; } /** ----------------------------------------------------------------------- * */ function withdrawOCFee(uint32[] calldata blocks) external { uint amt; for(uint i = 0; i < blocks.length; i++) { if(blocks[i] >= startBlock) continue; uint epochFee = ocFees[msg.sender][blocks[i]]; tlOcFees -= epochFee; ocFees[msg.sender][blocks[i]] = 0; amt += epochFee; } if(address(this).balance >= amt) { (bool sent, ) = msg.sender.call{value: amt}(""); require(sent, "Failed"); } } /** ----------------------------------------------------------------------- * */ modifier epochComplete() { require(block.number > startBlock + epochInterval, "Epoch incomplete"); _; } /** ----------------------------------------------------------------------- * */ modifier onlyOC() { require(ocRwdrs[msg.sender], "Not authorized"); _; } /** ----------------------------------------------------------------------- * */ modifier notDeclined(address _to) { require(!declines[_to], "Declined"); _; } /** ----------------------------------------------------------------------- * */ function setEpochInterval(uint16 interval) public onlyOwner { epochInterval = interval; } /** ----------------------------------------------------------------------- * */ function setConsensusReq(uint16 req) public onlyOwner { consensusReq = req; } /** ----------------------------------------------------------------------- * */ function setOCFee(uint16 fee) public onlyOwner { ocFee = fee; } /** ----------------------------------------------------------------------- * */ function addOCRwdr(address addr) public onlyOwner { require(!ocRwdrs[addr], 'Already set'); ocRwdrs[addr] = true; } /** ----------------------------------------------------------------------- * */ function removeOCRwdr(address addr) public onlyOwner { require(ocRwdrs[addr], 'Already removed'); ocRwdrs[addr] = false; } /** ----------------------------------------------------------------------- * */ function setDest(address addr) public onlyOwner { dest = payable(addr); } /** ----------------------------------------------------------------------- * */ function setMaxBurnPrc(uint16 amt) public onlyOwner { require(amt < 50 * P_FCTR); maxBrnPrc = amt; } /** ----------------------------------------------------------------------- * */ function setBurnFactor(uint16 amt) public onlyOwner { require(amt < 50 * P_FCTR); burnFactor = amt; } /** ----------------------------------------------------------------------- * */ function setDonationPrc(uint16 amt) public onlyOwner { require(amt <= 100 * P_FCTR); donationPrc = amt; } /** ----------------------------------------------------------------------- * */ function setPool(address _pool) public onlyOwner { pool = _pool; uint price = tp.price(pool); require(price > 0); } /** ----------------------------------------------------------------------- * */ function decline() public { declines[msg.sender] = true; } /** ----------------------------------------------------------------------- * */ function allow() public { declines[msg.sender] = false; } /** ----------------------------------------------------------------------- * */ function stake(uint256 amt) external { require(amt > 0, "Amount must be greater than 0"); userStks[msg.sender] += amt; totalStk += amt; require(token.transferFrom(msg.sender, address(this), amt), "Transfer failed"); emit Staked(msg.sender, amt); } /** ----------------------------------------------------------------------- * */ function withdraw(uint amt) external { require(amt <= userStks[msg.sender] && amt <= totalStk, "Exceeds balance"); userStks[msg.sender] -= amt; totalStk -= amt; require(token.transfer(msg.sender, amt), "Transfer failed"); emit Withdrew(msg.sender, amt); } /** ----------------------------------------------------------------------- * */ function give() external payable { uint giveAmt = (msg.value * donationPrc) / P_DEN; totalGvn += giveAmt; uint tknPrice = tp.price(pool); uint tknAmtGvn = (msg.value * 10**18) / tknPrice; uint maxBrn = totalStk; if (totalStk > P_DEN * 10) { maxBrn = (totalStk * maxBrnPrc) / P_DEN; } uint burnAmt = maxBrn; // Mulitply by P_FCTR because burnFactor has P_FCTR built in if (tknAmtGvn < (maxBrn * P_FCTR) / (2*burnFactor)) { burnAmt = (tknAmtGvn * burnFactor) / P_FCTR; } else if (tknAmtGvn < (maxBrn * P_FCTR) / burnFactor) { burnAmt = ((tknAmtGvn * burnFactor) / (P_FCTR * 2)) + (maxBrn / 4); } else if (tknAmtGvn < maxBrn) { burnAmt = ((tknAmtGvn * burnFactor) / (P_FCTR * 4)) + (maxBrn / 2); } if (burnAmt > 0 && totalStk >= burnAmt) { totalStk -= burnAmt; totalBurned += burnAmt; require(token.transfer(burnDest, burnAmt), "Burn failed"); } // Donate (bool sent, ) = dest.call{value: giveAmt}(""); require(sent, "Donate failed"); emit Gave(msg.sender, giveAmt); } /** ----------------------------------------------------------------------- * */ function withdrawTkn(address _to, address addr) external onlyOwner { require(addr != tokenAddr, "Forbidden"); IERC20 tkn = IERC20(addr); require( tkn.transfer(_to, tkn.balanceOf(address(this))), "Failed" ); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "./Ktv2.sol"; contract Ktv2Factory { event Created(address created); Ktv2[] public created; function create(address _burnDest, address _token, address payable _dest, address _pool, address _ocPrcAddr, address _tp) external { Ktv2 newKt = new Ktv2(_burnDest, _token, _dest, _pool, _ocPrcAddr, _tp); newKt.transferOwnership(msg.sender); created.push(newKt); emit Created(address(newKt)); } function count() public view returns (uint) { return created.length; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [] }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_burnDest","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address payable","name":"_dest","type":"address"},{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_ocPrcAddr","type":"address"},{"internalType":"address","name":"_tp","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Gave","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Rwd","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"string","name":"","type":"string"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Withdrew","type":"event"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addOCRwdr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"blockRwd","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnDest","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnFactor","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"consensusReq","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"declines","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dest","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"donationPrc","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochInterval","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"give","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"maxBrnPrc","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ocFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ocFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ocRwdrVote","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ocRwdrs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeOCRwdr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"resetVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"rwd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amt","type":"uint16"}],"name":"setBurnFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"req","type":"uint16"}],"name":"setConsensusReq","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setDest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amt","type":"uint16"}],"name":"setDonationPrc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"interval","type":"uint16"}],"name":"setEpochInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amt","type":"uint16"}],"name":"setMaxBurnPrc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"fee","type":"uint16"}],"name":"setOCFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tlOcFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalGvn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tp","outputs":[{"internalType":"contract TPI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userStks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"string","name":"data","type":"string"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"blocks","type":"uint32[]"}],"name":"withdrawOCFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"addr","type":"address"}],"name":"withdrawTkn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106102f65760003560e01c8063944de2461161018f578063b34913eb116100e1578063dc09deaf1161008a578063f14f452911610064578063f14f452914610974578063f2fde38b14610994578063fd52b702146109b457600080fd5b8063dc09deaf1461090e578063de96e6c614610924578063e89d048e1461095457600080fd5b8063cb8cbb6e116100bb578063cb8cbb6e146108ab578063d138321e146108d8578063d89135cd146108f857600080fd5b8063b34913eb1461082e578063c377e65d1461084f578063ca1d1b871461086f57600080fd5b8063ab04010711610143578063b079861e1161011d578063b079861e1461078c578063b1b3d3f6146107c4578063b1b71afa1461080b57600080fd5b8063ab04010714610702578063ab3ad1d41461074c578063adec2f771461076c57600080fd5b8063a42bebbe11610174578063a42bebbe1461069f578063a64d755c146106bf578063a694fc3a146106e257600080fd5b8063944de2461461066a5780639e96a23a1461069757600080fd5b80633b98548f1161024857806348cd4cb1116101fc578063715018a6116101d6578063715018a6146105fd57806384b366dc146106125780638da5cb5b1461063f57600080fd5b806348cd4cb11461057a5780635fbe4d1d146105905780636c6cdea8146105bd57600080fd5b806342935eb31161022d57806342935eb31461051757806342d79e0d1461052d5780634437152a1461055a57600080fd5b80633b98548f146104a95780633fdf4f62146104f757600080fd5b80631b46ba84116102aa5780632e1a7d4d116102845780632e1a7d4d1461044957806330606eaf146104695780633407e1c31461048957600080fd5b80631b46ba84146103e75780631bf533a4146104095780632d4812ed1461042957600080fd5b8063135078ef116102db578063135078ef1461035957806316f0115b1461037a5780631a9f16bb146103cc57600080fd5b8063081a7ad31461030257806309b1ef261461032b57600080fd5b366102fd57005b600080fd5b34801561030e57600080fd5b5061031860095481565b6040519081526020015b60405180910390f35b34801561033757600080fd5b50600e546103469061ffff1681565b60405161ffff9091168152602001610322565b34801561036557600080fd5b50600c546103469062010000900461ffff1681565b34801561038657600080fd5b506005546103a79073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610322565b3480156103d857600080fd5b50600c546103469061ffff1681565b3480156103f357600080fd5b5061040761040236600461288e565b6109d4565b005b34801561041557600080fd5b506104076104243660046128b2565b610a23565b34801561043557600080fd5b5061040761044436600461288e565b610d52565b34801561045557600080fd5b50610407610464366004612937565b6110bd565b34801561047557600080fd5b50610407610484366004612950565b6112bf565b34801561049557600080fd5b506104076104a436600461297c565b61164e565b3480156104b557600080fd5b506103a76104c4366004612950565b601060209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561050357600080fd5b5061040761051236600461297c565b61168b565b34801561052357600080fd5b50610318600a5481565b34801561053957600080fd5b5061031861054836600461288e565b60076020526000908152604090205481565b34801561056657600080fd5b5061040761057536600461288e565b6116ef565b34801561058657600080fd5b50610318600d5481565b34801561059c57600080fd5b506002546103a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105c957600080fd5b506105ed6105d836600461288e565b60116020526000908152604090205460ff1681565b6040519015158152602001610322565b34801561060957600080fd5b506104076117ca565b34801561061e57600080fd5b506003546103a79073ffffffffffffffffffffffffffffffffffffffff1681565b34801561064b57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166103a7565b34801561067657600080fd5b506006546103a79073ffffffffffffffffffffffffffffffffffffffff1681565b6104076117de565b3480156106ab57600080fd5b506104076106ba3660046129a0565b611cd1565b3480156106cb57600080fd5b50600e5461034690640100000000900461ffff1681565b3480156106ee57600080fd5b506104076106fd366004612937565b611ef7565b34801561070e57600080fd5b5061040733600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b34801561075857600080fd5b5061040761076736600461297c565b6120db565b34801561077857600080fd5b5061040761078736600461288e565b61211e565b34801561079857600080fd5b506103186107a7366004612950565b601260209081526000928352604080842090915290825290205481565b3480156107d057600080fd5b5061040733600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b34801561081757600080fd5b50600c5461034690640100000000900461ffff1681565b34801561083a57600080fd5b50600e546103469062010000900461ffff1681565b34801561085b57600080fd5b5061040761086a36600461297c565b612201565b34801561087b57600080fd5b5061034661088a3660046129d9565b600f60209081526000928352604080842090915290825290205461ffff1681565b3480156108b757600080fd5b506004546103a79073ffffffffffffffffffffffffffffffffffffffff1681565b3480156108e457600080fd5b506104076108f336600461288e565b612246565b34801561090457600080fd5b50610318600b5481565b34801561091a57600080fd5b5061031860135481565b34801561093057600080fd5b506105ed61093f36600461288e565b60086020526000908152604090205460ff1681565b34801561096057600080fd5b5061040761096f36600461297c565b61232d565b34801561098057600080fd5b5061040761098f3660046129fe565b612389565b3480156109a057600080fd5b506104076109af36600461288e565b61255e565b3480156109c057600080fd5b506104076109cf36600461297c565b612615565b6109dc612678565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3360009081526011602052604090205460ff16610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420617574686f72697a656400000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260086020526040902054839060ff1615610b33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4465636c696e65640000000000000000000000000000000000000000000000006044820152606401610a98565b600e54600d54610b479161ffff1690612aa2565b4311610baf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f45706f636820696e636f6d706c657465000000000000000000000000000000006044820152606401610a98565b336000908152601060209081526040808320600d54845290915290205473ffffffffffffffffffffffffffffffffffffffff1615610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f416c726561647920766f746564000000000000000000000000000000000000006044820152606401610a98565b600d546000908152600f6020908152604080832073ffffffffffffffffffffffffffffffffffffffff881684529091528120805461ffff1691610c8b83612abb565b82546101009290920a61ffff81810219909316919092169190910217905550336000908152601060209081526040808320600d548452909152902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055610d0c6126f9565b507f909b43dcc56d91024768bbc5c8d56441234580b2fd6176844960cbc7218cc0b5600d54858585604051610d449493929190612adc565b60405180910390a150505050565b3360009081526011602052604090205460ff16610dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420617574686f72697a65640000000000000000000000000000000000006044820152606401610a98565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260086020526040902054819060ff1615610e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4465636c696e65640000000000000000000000000000000000000000000000006044820152606401610a98565b600e54600d54610e719161ffff1690612aa2565b4311610ed9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f45706f636820696e636f6d706c657465000000000000000000000000000000006044820152606401610a98565b600d546000908152600f6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915290205461ffff16610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c6964206465737400000000000000000000000000000000000000006044820152606401610a98565b336000908152601060209081526040808320600d54845290915290205473ffffffffffffffffffffffffffffffffffffffff1661100f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f566f7465206d697373696e6700000000000000000000000000000000000000006044820152606401610a98565b600d546000908152600f6020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684529091528120805461ffff169161105183612b4d565b825461ffff9182166101009390930a928302919092021990911617905550336000908152601060209081526040808320600d548452909152902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556110b96127a3565b5050565b3360009081526007602052604090205481118015906110de57506009548111155b611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f457863656564732062616c616e636500000000000000000000000000000000006044820152606401610a98565b3360009081526007602052604081208054839290611163908490612b89565b92505081905550806009600082825461117c9190612b89565b90915550506001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810183905273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb906044016020604051808303816000875af11580156111f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121c9190612b9c565b611282576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610a98565b60408051338152602081018390527fb244b9a17ad633c6e83b7983ee04320484956a68ddbe96a0b70dfca1cf19d72391015b60405180910390a150565b3360009081526011602052604090205460ff16611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e6f7420617574686f72697a65640000000000000000000000000000000000006044820152606401610a98565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260086020526040902054829060ff16156113ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4465636c696e65640000000000000000000000000000000000000000000000006044820152606401610a98565b600e54600d546113de9161ffff1690612aa2565b4311611446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f45706f636820696e636f6d706c657465000000000000000000000000000000006044820152606401610a98565b600e54600d546000908152600f6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8816845290915290205461ffff620100009092048216911610156114f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f20636f6e73656e73757300000000000000000000000000000000000000006044820152606401610a98565b600e54600d546115069161ffff1690612aa2565b600d5560006115136126f9565b61151d9084612b89565b905061152b600a6064612bbe565b61ffff168111156116025760008473ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611590576040519150601f19603f3d011682016040523d82523d6000602084013e611595565b606091505b5050905080611600576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610a98565b505b6040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018390527f5df9aa58816b17fb728eddad0162659653310b4f9cd8796a7c647612b3d520ba9101610d44565b611656612678565b600e80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055565b611693612678565b61169f600a6032612bbe565b61ffff168161ffff16106116b257600080fd5b600c805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b6116f7612678565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092556006546040517faea910780000000000000000000000000000000000000000000000000000000081526004810192909252600092169063aea9107890602401602060405180830381865afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190612be8565b9050600081116110b957600080fd5b6117d2612678565b6117dc60006127f7565b565b60006117ec600a6064612bbe565b600c5461ffff91821691611807916201000090041634612c01565b6118119190612c3e565b905080600a60008282546118259190612aa2565b90915550506006546005546040517faea9107800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152600092919091169063aea9107890602401602060405180830381865afa1580156118a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c59190612be8565b90506000816118dc34670de0b6b3a7640000612c01565b6118e69190612c3e565b6009549091506118f8600a6064612bbe565b6119079061ffff16600a612c79565b63ffffffff16600954111561194757611922600a6064612bbe565b600c5460095461ffff9283169261193a921690612c01565b6119449190612c3e565b90505b600c54819061196390640100000000900461ffff166002612bbe565b61ffff16611972600a84612c01565b61197c9190612c3e565b8310156119b057600c54600a9061199f90640100000000900461ffff1685612c01565b6119a99190612c3e565b9050611a76565b600c54640100000000900461ffff166119ca600a84612c01565b6119d49190612c3e565b831015611a23576119e6600483612c3e565b6119f2600a6002612bbe565b600c5461ffff91821691611a0f9164010000000090041686612c01565b611a199190612c3e565b6119a99190612aa2565b81831015611a7657611a36600283612c3e565b611a42600a6004612bbe565b600c5461ffff91821691611a5f9164010000000090041686612c01565b611a699190612c3e565b611a739190612aa2565b90505b600081118015611a8857508060095410155b15611bc6578060096000828254611a9f9190612b89565b9250508190555080600b6000828254611ab89190612aa2565b9091555050600154600480546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821692810192909252602482018490529091169063a9059cbb906044016020604051808303816000875af1158015611b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b609190612b9c565b611bc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4275726e206661696c65640000000000000000000000000000000000000000006044820152606401610a98565b60035460405160009173ffffffffffffffffffffffffffffffffffffffff169087908381818185875af1925050503d8060008114611c20576040519150601f19603f3d011682016040523d82523d6000602084013e611c25565b606091505b5050905080611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f446f6e617465206661696c6564000000000000000000000000000000000000006044820152606401610a98565b60408051338152602081018890527fe3ba4a7522b6c3133015e07f410a43323021989ceedd5de9d51c5ec155288974910160405180910390a1505050505050565b611cd9612678565b60025473ffffffffffffffffffffffffffffffffffffffff90811690821603611d5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f466f7262696464656e00000000000000000000000000000000000000000000006044820152606401610a98565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152819073ffffffffffffffffffffffffffffffffffffffff82169063a9059cbb90859083906370a0823190602401602060405180830381865afa158015611dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df89190612be8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8c9190612b9c565b611ef2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4661696c656400000000000000000000000000000000000000000000000000006044820152606401610a98565b505050565b60008111611f61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610a98565b3360009081526007602052604081208054839290611f80908490612aa2565b925050819055508060096000828254611f999190612aa2565b90915550506001546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810183905273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd906064016020604051808303816000875af115801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f9190612b9c565b6120a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610a98565b60408051338152602081018390527f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d91016112b4565b6120e3612678565b600e805461ffff90921662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff909216919091179055565b612126612678565b73ffffffffffffffffffffffffffffffffffffffff811660009081526011602052604090205460ff166121b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c72656164792072656d6f76656400000000000000000000000000000000006044820152606401610a98565b73ffffffffffffffffffffffffffffffffffffffff16600090815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b612209612678565b600e805461ffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff909216919091179055565b61224e612678565b73ffffffffffffffffffffffffffffffffffffffff811660009081526011602052604090205460ff16156122de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f416c7265616479207365740000000000000000000000000000000000000000006044820152606401610a98565b73ffffffffffffffffffffffffffffffffffffffff16600090815260116020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b612335612678565b612341600a6032612bbe565b61ffff168161ffff161061235457600080fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055565b6000805b8281101561249e57600d548484838181106123aa576123aa612c9c565b90506020020160208101906123bf9190612ccb565b63ffffffff16101561248c57336000908152601260205260408120818686858181106123ed576123ed612c9c565b90506020020160208101906124029190612ccb565b63ffffffff168152602001908152602001600020549050806013600082825461242b9190612b89565b90915550503360009081526012602052604081208187878681811061245257612452612c9c565b90506020020160208101906124679190612ccb565b63ffffffff1681526020810191909152604001600020556124888184612aa2565b9250505b8061249681612cf1565b91505061238d565b50804710611ef257604051600090339083908381818185875af1925050503d80600081146124e8576040519150601f19603f3d011682016040523d82523d6000602084013e6124ed565b606091505b5050905080612558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f4661696c656400000000000000000000000000000000000000000000000000006044820152606401610a98565b50505050565b612566612678565b73ffffffffffffffffffffffffffffffffffffffff8116612609576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a98565b612612816127f7565b50565b61261d612678565b612629600a6064612bbe565b61ffff168161ffff16111561263d57600080fd5b600c805461ffff90921662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146117dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a98565b600060135447111561279c576000612713600a6064612bbe565b600e5460135461ffff92831692640100000000909204909116906127379047612b89565b6127419190612c01565b61274b9190612c3e565b336000908152601260209081526040808320600d54845290915281208054929350839290919061277c908490612aa2565b9250508190555080601360008282546127959190612aa2565b9091555050505b5060135490565b336000908152601260209081526040808320600d54845290915281205460138054919290916127d3908490612b89565b9091555050336000908152601260209081526040808320600d548452909152812055565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff8116811461261257600080fd5b6000602082840312156128a057600080fd5b81356128ab8161286c565b9392505050565b6000806000604084860312156128c757600080fd5b83356128d28161286c565b9250602084013567ffffffffffffffff808211156128ef57600080fd5b818601915086601f83011261290357600080fd5b81358181111561291257600080fd5b87602082850101111561292457600080fd5b6020830194508093505050509250925092565b60006020828403121561294957600080fd5b5035919050565b6000806040838503121561296357600080fd5b823561296e8161286c565b946020939093013593505050565b60006020828403121561298e57600080fd5b813561ffff811681146128ab57600080fd5b600080604083850312156129b357600080fd5b82356129be8161286c565b915060208301356129ce8161286c565b809150509250929050565b600080604083850312156129ec57600080fd5b8235915060208301356129ce8161286c565b60008060208385031215612a1157600080fd5b823567ffffffffffffffff80821115612a2957600080fd5b818501915085601f830112612a3d57600080fd5b813581811115612a4c57600080fd5b8660208260051b8501011115612a6157600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115612ab557612ab5612a73565b92915050565b600061ffff808316818103612ad257612ad2612a73565b6001019392505050565b84815273ffffffffffffffffffffffffffffffffffffffff8416602082015260606040820152816060820152818360808301376000818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b600061ffff821680612b6157612b61612a73565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b81810381811115612ab557612ab5612a73565b600060208284031215612bae57600080fd5b815180151581146128ab57600080fd5b600061ffff80831681851681830481118215151615612bdf57612bdf612a73565b02949350505050565b600060208284031215612bfa57600080fd5b5051919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c3957612c39612a73565b500290565b600082612c74577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff80831681851681830481118215151615612bdf57612bdf612a73565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215612cdd57600080fd5b813563ffffffff811681146128ab57600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d2257612d22612a73565b506001019056fea2646970667358221220532567c111cc30c0205dfece90f883acfdccd8d412496fc599c472d22430968564736f6c63430008100033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.