Address Contract Partially Verified
Address
0x40d1F63B5D2048e67E9bEdB1B4c2F1A9fb4b6817
Balance
0 ETH
Nonce
1
Code Size
11277 bytes
Creator
0x6DdcEBc8...B8cb at tx 0xc0d64d70...a9db86
Indexed Transactions
0
Contract Bytecode
11277 bytes
0x608060405234801561001057600080fd5b50600436106101c6576000357c01000000000000000000000000000000000000000000000000000000009004806394a6b71211610116578063cb9bd15a116100b4578063defcf51f1161008e578063defcf51f1461099d578063f2fde38b14610b01578063f797a06a14610b5d578063fe0174bd14610bb5576101c6565b8063cb9bd15a146108ab578063cddade7914610907578063dd62ed3e14610925576101c6565b8063a02619e4116100f0578063a02619e414610737578063a457c2d714610759578063a9059cbb146107bf578063c2fb97f814610825576101c6565b806394a6b7121461062c57806395d89b41146106925780639b9843df14610715576101c6565b806339509351116101835780636b180d691161015d5780636b180d69146104ce57806370a08231146105165780637338e39d1461056e578063894f879e146105d4576101c6565b806339509351146103ec57806340c10f191461045257806342966c68146104a0576101c6565b806306fdde03146101cb578063095ea7b31461024e57806318160ddd146102b4578063224a1775146102d257806323b872dd14610342578063313ce567146103c8575b600080fd5b6101d3610bff565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102135780820151818401526020810190506101f8565b50505050905090810190601f1680156102405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61029a6004803603604081101561026457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ca1565b604051808215151515815260200191505060405180910390f35b6102bc610cb8565b6040518082815260200191505060405180910390f35b610328600480360360608110156102e857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610cc2565b604051808215151515815260200191505060405180910390f35b6103ae6004803603606081101561035857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db2565b604051808215151515815260200191505060405180910390f35b6103d0611025565b604051808260ff1660ff16815260200191505060405180910390f35b6104386004803603604081101561040257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061103c565b604051808215151515815260200191505060405180910390f35b61049e6004803603604081101561046857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e1565b005b6104cc600480360360208110156104b657600080fd5b8101908080359060200190929190505050611296565b005b6104fc600480360360208110156104e457600080fd5b81019080803515159060200190929190505050611457565b604051808215151515815260200191505060405180910390f35b6105586004803603602081101561052c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114db565b6040518082815260200191505060405180910390f35b6105ba6004803603604081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611524565b604051808215151515815260200191505060405180910390f35b610616600480360360208110156105ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116be565b6040518082815260200191505060405180910390f35b6106786004803603604081101561064257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611707565b604051808215151515815260200191505060405180910390f35b61069a6118a1565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106da5780820151818401526020810190506106bf565b50505050905090810190601f1680156107075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61071d611943565b604051808215151515815260200191505060405180910390f35b61073f61195a565b604051808215151515815260200191505060405180910390f35b6107a56004803603604081101561076f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061196d565b604051808215151515815260200191505060405180910390f35b61080b600480360360408110156107d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a12565b604051808215151515815260200191505060405180910390f35b6108916004803603606081101561083b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611beb565b604051808215151515815260200191505060405180910390f35b6108ed600480360360208110156108c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ec2565b604051808215151515815260200191505060405180910390f35b61090f611f1e565b6040518082815260200191505060405180910390f35b6109876004803603604081101561093b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f24565b6040518082815260200191505060405180910390f35b610ae7600480360360408110156109b357600080fd5b81019080803590602001906401000000008111156109d057600080fd5b8201836020820111156109e257600080fd5b80359060200191846020830284011164010000000083111715610a0457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a6457600080fd5b820183602082011115610a7657600080fd5b80359060200191846020830284011164010000000083111715610a9857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611fab565b604051808215151515815260200191505060405180910390f35b610b4360048036036020811015610b1757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612164565b604051808215151515815260200191505060405180910390f35b610b9f60048036036020811015610b7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061220e565b6040518082815260200191505060405180910390f35b610bbd6122a8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c975780601f10610c6c57610100808354040283529160200191610c97565b820191906000526020600020905b815481529060010190602001808311610c7a57829003601f168201915b5050505050905090565b6000610cae3384846122d1565b6001905092915050565b6000600454905090565b6000801515600560009054906101000a900460ff161515141515610d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612bb5602d913960400191505060405180910390fd5b610d39612506565b1515610d90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b610d9b84838561255d565b50610da733858561264a565b600190509392505050565b6000801515600560009054906101000a900460ff161515141515610e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612bb5602d913960400191505060405180910390fd5b8382600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442111515610f745780610efd600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b10151515610f73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f496e73756666696369656e7420756e6c6f636b65642062616c616e636500000081525060200191505060405180910390fd5b5b610f7f86868661264a565b611018863361101387600860008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b6122d1565b6001925050509392505050565b6000600360009054906101000a900460ff16905090565b60006110d733846110d285600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461290e90919063ffffffff16565b6122d1565b6001905092915050565b6110e9612506565b1515611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561117c57600080fd5b6111918160045461290e90919063ffffffff16565b6004819055506111e981600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461290e90919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61129e612506565b15156112f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b3381600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211151561144857806113d1600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b10151515611447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f496e73756666696369656e7420756e6c6f636b65642062616c616e636500000081525060200191505060405180910390fd5b5b6114523384612998565b505050565b6000611461612506565b15156114b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b81600560006101000a81548160ff02191690831515021790555060019050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600061152e612506565b1515611585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b6000821180156115d3575042600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b151561162a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b87602e913960400191505060405180910390fd5b620151808202600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000611711612506565b1515611768576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b6000821180156117b6575042600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b151561180d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612b87602e913960400191505060405180910390fd5b620151808202600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119395780601f1061190e57610100808354040283529160200191611939565b820191906000526020600020905b81548152906001019060200180831161191c57829003601f168201915b5050505050905090565b6000600560009054906101000a900460ff16905090565b600560009054906101000a900460ff1681565b6000611a083384611a0385600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b6122d1565b6001905092915050565b6000801515600560009054906101000a900460ff161515141515611a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612bb5602d913960400191505060405180910390fd5b3382600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442111515611bd45780611b5d600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b10151515611bd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f496e73756666696369656e7420756e6c6f636b65642062616c616e636500000081525060200191505060405180910390fd5b5b611bdf33868661264a565b60019250505092915050565b6000611bf5612506565b1515611c4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b81600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015611cd95750600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442105b1515611d4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f496e73756666696369656e7420756e6c6f636b65642062616c616e636500000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611db75750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1515611e2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e76616c69642061646472657373000000000000000000000000000000000081525060200191505060405180910390fd5b81600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ebb84848461264a565b9392505050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054421015611f145760019050611f19565b600090505b919050565b60065481565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000801515600560009054906101000a900460ff16151514151561201a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612bb5602d913960400191505060405180910390fd5b612022612506565b1515612079576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b815183511415156120f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f496e76616c69642041727261790000000000000000000000000000000000000081525060200191505060405180910390fd5b60008351905060008090505b818110156121585761213f33868381518110151561211857fe5b90602001906020020151868481518110151561213057fe5b9060200190602002015161264a565b60016006540160068190555080806001019150506120fe565b50600191505092915050565b600061216e612506565b15156121c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180612b58602f913960400191505060405180910390fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442101561229e57600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506122a3565b600090505b919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612376576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e76616c69642061646472657373000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561241b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e76616c69642061646472657373000000000000000000000000000000000081525060200191505060405180910390fd5b80600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60006201518083024201600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125fc82600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461290e90919063ffffffff16565b600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156126ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f496e76616c696420746f2061646472657373000000000000000000000000000081525060200191505060405180910390fd5b61274181600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127d681600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461290e90919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008282111515156128fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f496e76616c69642076616c75657300000000000000000000000000000000000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080828401905083811015151561298e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f496e76616c69642076616c75657300000000000000000000000000000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e76616c6964206163636f756e74000000000000000000000000000000000081525060200191505060405180910390fd5b612a528160045461288390919063ffffffff16565b600481905550612aaa81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461288390919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505056fe596f7520617265206e6f742061757468656e7469636174656420746f206d616b652074686973207472616e73666572506c6561736520636865636b206164647265737320737461747573206f7220496e636f727265637420696e707574416c6c207472616e73616374696f6e7320617265206c6f636b656420666f72207468697320636f6e7472616374a165627a7a723058205ec95a595e1b876b53ed88a2b8a9f7dcdd0dd3a36361f13e51445ee9b8f343e90029
Verified Source Code Partial Match
Compiler: v0.5.3+commit.10d17f24
EVM: byzantium
Optimization: No
GoldenGoose.sol 494 lines
pragma solidity ^0.5.2;
//***********************************************************************
//* **GoldenGoose Tokens** *
//* Name: Golden Goose *
//* Symbol : GOLD *
//* Total supply : 500,000,000 GOLD *
//***********************************************************************
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b,"Invalid values");
return c;
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0,"Invalid values");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a,"Invalid values");
uint256 c = a - b;
return c;
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a,"Invalid values");
return c;
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0,"Invalid values");
return a % b;
}
}
contract GoldenGoose is IERC20 {
using SafeMath for uint256;
address private _owner;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
bool public _lockStatus = false;
uint256 public airdropcount = 0;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
mapping (address => uint256) private time;
mapping (address => uint256) private _lockedAmount;
constructor (string memory name, string memory symbol, uint8 decimals, uint256 totalSupply, address owner) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
_totalSupply = totalSupply*(10**uint256(decimals));
_balances[owner] = _totalSupply;
_owner = owner;
}
/*----------------------------------------------------------------------------
* Functions for owner
*----------------------------------------------------------------------------
*/
/**
* @dev get address of smart contract owner
* @return address of owner
*/
function getowner() public view returns (address) {
return _owner;
}
/**
* @dev modifier to check if the message sender is owner
*/
modifier onlyOwner() {
require(isOwner(),"You are not authenticated to make this transfer");
_;
}
/**
* @dev Internal function for modifier
*/
function isOwner() internal view returns (bool) {
return msg.sender == _owner;
}
/**
* @dev Transfer ownership of the smart contract. For owner only
* @param newOwner new contract owner address
* @return request status
*/
function transferOwnership(address newOwner) external onlyOwner returns (bool){
_owner = newOwner;
return true;
}
/* ----------------------------------------------------------------------------
* Locking functions
* ----------------------------------------------------------------------------
*/
/**
* @dev Lock all transfer functions of the contract
* @param RunningStatusLock lock status for transfer functions
* @return request status
*/
function setAllTransfersLockStatus(bool RunningStatusLock) external onlyOwner returns (bool)
{
_lockStatus = RunningStatusLock;
return true;
}
/**
* @dev check lock status of all transfers
* @return lock status
*/
function getAllTransfersLockStatus() external view returns (bool)
{
return _lockStatus;
}
/**
* @dev time calculator for locked tokens
*/
function addLockingTime(address lockingAddress,uint256 lockingTime, uint256 amount) internal returns (bool){
time[lockingAddress] = now + (lockingTime * 1 days);
_lockedAmount[lockingAddress] = _lockedAmount[lockingAddress].add(amount);
return true;
}
/**
* @dev check for time based lock
* @param _address address to check for locking time
* @return time in block format
*/
function checkLockingTimeByAddress(address _address) external view returns(uint256){
return time[_address];
}
/**
* @dev get amount of locked tokens by address
* @param _address address to check for locking amount
* @return amount in uint
*/
function checkLockingAmountByAddress(address _address) external view returns(uint256){
if (now < time[_address]){
return _lockedAmount[_address];
}
else{
return 0;
}
}
/**
* @dev return locking status
* @param userAddress address of to check
* @return locking status in true or false
*/
function getLockingStatus(address userAddress) external view returns(bool){
if (now < time[userAddress]){
return true;
}
else{
return false;
}
}
/**
* @dev Decreaese locking time
* @param _affectiveAddress Address of the locked address
* @param _decreasedTime Time in days to be affected
*/
function decreaseLockingTimeByAddress(address _affectiveAddress, uint _decreasedTime) external onlyOwner returns(bool){
require(_decreasedTime > 0 && time[_affectiveAddress] > now, "Please check address status or Incorrect input");
time[_affectiveAddress] = time[_affectiveAddress] - (_decreasedTime * 1 days);
return true;
}
/**
* @dev Increase locking time
* @param _affectiveAddress Address of the locked address
* @param _increasedTime Time in days to be affected
*/
function increaseLockingTimeByAddress(address _affectiveAddress, uint _increasedTime) external onlyOwner returns(bool){
require(_increasedTime > 0 && time[_affectiveAddress] > now, "Please check address status or Incorrect input");
time[_affectiveAddress] = time[_affectiveAddress] + (_increasedTime * 1 days);
return true;
}
/**
* @dev modifier to check validation of lock status of smart contract
*/
modifier AllTransfersLockStatus()
{
require(_lockStatus == false,"All transactions are locked for this contract");
_;
}
/**
* @dev modifier to check locking amount
* @param _address address to check
* @param requestedAmount Amount to check
* @return status
*/
modifier checkLocking(address _address,uint256 requestedAmount){
if(now <= time[_address]){
require(!( _balances[_address].sub(_lockedAmount[_address]) < requestedAmount), "Insufficient unlocked balance");
}
_;
}
/* ----------------------------------------------------------------------------
* View only functions
* ----------------------------------------------------------------------------
*/
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
/* ----------------------------------------------------------------------------
* Transfer, allow, mint and burn functions
* ----------------------------------------------------------------------------
*/
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public AllTransfersLockStatus checkLocking(msg.sender,value) returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public AllTransfersLockStatus checkLocking(from,value) returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
/**
* @dev Transfer tokens to a specified address (For Only Owner)
* @param to The address to transfer to.
* @param value The amount to be transferred.
* @return Transfer status in true or false
*/
function transferByOwner(address to, uint256 value, uint256 lockingTime) public AllTransfersLockStatus onlyOwner returns (bool) {
addLockingTime(to,lockingTime,value);
_transfer(msg.sender, to, value);
return true;
}
/**
* @dev withdraw locked tokens only (For Only Owner)
* @param from locked address
* @param to address to transfer tokens
* @param value amount of tokens to unlock and transfer
* @return transfer status
*/
function transferLockedTokens(address from, address to, uint256 value) external onlyOwner returns (bool){
require((_lockedAmount[from] >= value) && (now < time[from]), "Insufficient unlocked balance");
require(from != address(0) && to != address(0), "Invalid address");
_lockedAmount[from] = _lockedAmount[from] - value;
_transfer(from,to,value);
}
/**
* @dev Airdrop function to airdrop tokens. Best works upto 50 addresses in one time. Maximum limit is 200 addresses in one time.
* @param _addresses array of address in serial order
* @param _amount amount in serial order with respect to address array
*/
function airdropByOwner(address[] memory _addresses, uint256[] memory _amount) public AllTransfersLockStatus onlyOwner returns (bool){
require(_addresses.length == _amount.length,"Invalid Array");
uint256 count = _addresses.length;
for (uint256 i = 0; i < count; i++){
_transfer(msg.sender, _addresses[i], _amount[i]);
airdropcount = airdropcount + 1;
}
return true;
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0),"Invalid to address");
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* 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
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0),"Invalid address");
require(owner != address(0),"Invalid address");
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
return true;
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
require(account != address(0),"Invalid account");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public onlyOwner checkLocking(msg.sender,value){
_burn(msg.sender, value);
}
/**
* @dev Function that mints an amount of the token and assigns it to
* a given address. This modify the the balance such that the
* proper events are emitted. This function is restricted to only owner of the contract
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function mint(address account, uint256 value) external onlyOwner {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
}
Read Contract
_lockStatus 0xa02619e4 → bool
airdropcount 0xcddade79 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
checkLockingAmountByAddress 0xf797a06a → uint256
checkLockingTimeByAddress 0x894f879e → uint256
decimals 0x313ce567 → uint8
getAllTransfersLockStatus 0x9b9843df → bool
getLockingStatus 0xcb9bd15a → bool
getowner 0xfe0174bd → address
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
airdropByOwner 0xdefcf51f
address[] _addresses
uint256[] _amount
returns: bool
approve 0x095ea7b3
address spender
uint256 value
returns: bool
burn 0x42966c68
uint256 value
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
decreaseLockingTimeByAddress 0x7338e39d
address _affectiveAddress
uint256 _decreasedTime
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
increaseLockingTimeByAddress 0x94a6b712
address _affectiveAddress
uint256 _increasedTime
returns: bool
mint 0x40c10f19
address account
uint256 value
setAllTransfersLockStatus 0x6b180d69
bool RunningStatusLock
returns: bool
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferByOwner 0x224a1775
address to
uint256 value
uint256 lockingTime
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferLockedTokens 0xc2fb97f8
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
returns: bool
Recent Transactions
No transactions found for this address