Contract 0x11cae3710c13d7883460a4cd7213590988172f35

PSA: API Key will be required starting from  April 15th, 2021.  Learn More. 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0x93bd21b9a917cf0800161fa7e18e2fe292ebe026faf66db6a530f9429f977cb959596112021-03-24 11:52:4522 days 4 hrs ago0x9a66e0e2d572cc212a760230d5a1700dd025cd9c IN  Contract Creation0 BNB0.00645904
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultKiwigo

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at BscScan.com on 2021-03-24
*/

pragma solidity ^0.6.12;

// SPDX-License-Identifier: MIT

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);



  constructor() public {
    owner = msg.sender;
  }


  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}


interface KGO {
    function balanceOf(address) external returns (uint);
    function transferFrom(address, address, uint) external returns (bool);
    function transfer(address, uint) external returns (bool);
}

contract VaultKiwigo is Ownable {
    using SafeMath for uint;
    
    address public constant tokenAddress = 0x5d3AfBA1924aD748776E4Ca62213BF7acf39d773;
    
    uint public constant tokensLocked = 950000000e5;          // 950 Millions KGO
    uint public constant unlockRate   = 50000000;             // 50 Millions unlock once in 6 month
    uint public constant lockDuration = 180 days;             // Before 180 Days, Its impossible to unlock...
    uint public lastClaimedTime;
    uint public deployTime;

    
    constructor() public {
        deployTime = now;
        lastClaimedTime = now;
    }
    
    function claim() public onlyOwner {
        uint pendingUnlocked = getPendingUnlocked();
        uint contractBalance = KGO(tokenAddress).balanceOf(address(this));
        uint amountToSend = pendingUnlocked;
        if (contractBalance < pendingUnlocked) {
            amountToSend = contractBalance;
        }
        require(KGO(tokenAddress).transfer(owner, amountToSend), "Could not transfer Tokens.");
        lastClaimedTime = now;
    }
    
    function getPendingUnlocked() public view returns (uint) {
        uint timeDiff = now.sub(lastClaimedTime);
        uint pendingUnlocked = tokensLocked
                                    .mul(unlockRate)
                                    .mul(timeDiff)
                                    .div(lockDuration)
                                    .div(1e4);
        return pendingUnlocked;
    }

   function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
        require(_tokenAddr != tokenAddress, "Cannot transfer out reward tokens");
        KGO(_tokenAddr).transfer(_to, _amount);
    }

}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPendingUnlocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastClaimedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferAnyERC20Tokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426002819055504260018190555061099c8061006e6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80637a40624b116100715780637a40624b146101805780638da5cb5b1461019e57806392ae1e5b146101d25780639d76ea58146101f0578063a1feba4214610224578063f2fde38b14610242576100a9565b806304554443146100ae57806325ba4c47146100cc57806334b9558e146100ea5780634e71d92d146101085780636a395ccb14610112575b600080fd5b6100b6610286565b6040518082815260200191505060405180910390f35b6100d461028d565b6040518082815260200191505060405180910390f35b6100f2610295565b6040518082815260200191505060405180910390f35b61011061029b565b005b61017e6004803603606081101561012857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061052a565b005b6101886106cd565b6040518082815260200191505060405180910390f35b6101a66106d3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101da6106f7565b6040518082815260200191505060405180910390f35b6101f8610775565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61022c61078d565b6040518082815260200191505060405180910390f35b6102846004803603602081101561025857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610797565b005b62ed4e0081565b6302faf08081565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102f357600080fd5b60006102fd6106f7565b90506000735d3afba1924ad748776e4ca62213bf7acf39d77373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561037e57600080fd5b505af1158015610392573d6000803e3d6000fd5b505050506040513d60208110156103a857600080fd5b810190808051906020019092919050505090506000829050828210156103cc578190505b735d3afba1924ad748776e4ca62213bf7acf39d77373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561047157600080fd5b505af1158015610485573d6000803e3d6000fd5b505050506040513d602081101561049b57600080fd5b810190808051906020019092919050505061051e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220546f6b656e732e00000000000081525060200191505060405180910390fd5b42600181905550505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461058257600080fd5b735d3afba1924ad748776e4ca62213bf7acf39d77373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561061b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806109466021913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561068c57600080fd5b505af11580156106a0573d6000803e3d6000fd5b505050506040513d60208110156106b657600080fd5b810190808051906020019092919050505050505050565b60025481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061070f600154426108e690919063ffffffff16565b9050600061076b61271061075d62ed4e0061074f866107416302faf080655666e940f0006108fd90919063ffffffff16565b6108fd90919063ffffffff16565b61092c90919063ffffffff16565b61092c90919063ffffffff16565b9050809250505090565b735d3afba1924ad748776e4ca62213bf7acf39d77381565b655666e940f00081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ef57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561082957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156108f257fe5b818303905092915050565b6000808284029050600084148061091c57508284828161091957fe5b04145b61092257fe5b8091505092915050565b60008082848161093857fe5b049050809150509291505056fe43616e6e6f74207472616e73666572206f75742072657761726420746f6b656e73a2646970667358221220792d1eec75f51437a2db9a6fba84fc66dab32da168b9cc8a365c2f3274cb793664736f6c634300060c0033

Deployed ByteCode Sourcemap

1460:1752:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1813:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1712;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1924:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2095:453;;;:::i;:::-;;2971:236;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1958:22;;;:::i;:::-;;;;;;;;;;;;;;;;;;;795:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2560:404;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1535:81;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1629:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1054:178;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1813:44;1849:8;1813:44;:::o;1712:::-;1748:8;1712:44;:::o;1924:27::-;;;;:::o;2095:453::-;1028:5;;;;;;;;;;1014:19;;:10;:19;;;1006:28;;;;;;2140:20:::1;2163;:18;:20::i;:::-;2140:43;;2194:20;1574:42;2217:27;;;2253:4;2217:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;2194:65;;2270:17;2290:15;2270:35;;2338:15;2320;:33;2316:96;;;2385:15;2370:30;;2316:96;1574:42;2430:26;;;2457:5;::::0;::::1;;;;;;;;2464:12;2430:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;2422:86;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;2537:3;2519:15;:21;;;;1041:1;;;2095:453::o:0;2971:236::-;1028:5;;;;;;;;;;1014:19;;:10;:19;;;1006:28;;;;;;1574:42:::1;3086:26;;:10;:26;;;;3078:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3165:10;3161:24;;;3186:3;3191:7;3161:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;2971:236:::0;;;:::o;1958:22::-;;;;:::o;795:20::-;;;;;;;;;;;;:::o;2560:404::-;2611:4;2628:13;2644:24;2652:15;;2644:3;:7;;:24;;;;:::i;:::-;2628:40;;2679:20;2702:221;2919:3;2702:174;1849:8;2702:118;2811:8;2702:66;1748:8;1665:11;2702:54;;:66;;;;:::i;:::-;:108;;:118;;;;:::i;:::-;:160;;:174;;;;:::i;:::-;:216;;:221;;;;:::i;:::-;2679:244;;2941:15;2934:22;;;;2560:404;:::o;1535:81::-;1574:42;1535:81;:::o;1629:47::-;1665:11;1629:47;:::o;1054:178::-;1028:5;;;;;;;;;;1014:19;;:10;:19;;;1006:28;;;;;;1151:1:::1;1131:22;;:8;:22;;;;1123:31;;;::::0;::::1;;1194:8;1166:37;;1187:5;::::0;::::1;;;;;;;;1166:37;;;;;;;;;;;;1218:8;1210:5;::::0;:16:::1;;;;;;;;;;;;;;;;;;1054:178:::0;:::o;514:113::-;572:7;600:1;595;:6;;588:14;;;;620:1;616;:5;609:12;;514:113;;;;:::o;85:147::-;143:7;159:9;175:1;171;:5;159:17;;195:1;190;:6;:20;;;;209:1;204;200;:5;;;;;;:10;190:20;183:28;;;;225:1;218:8;;;85:147;;;;:::o;238:270::-;296:7;387:9;403:1;399;:5;;;;;;387:17;;501:1;494:8;;;238:270;;;;:::o

Swarm Source

ipfs://792d1eec75f51437a2db9a6fba84fc66dab32da168b9cc8a365c2f3274cb7936
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.