Address Contract Partially Verified
Address
0xDF18880A02C7F3EB4f40FdF515fce31C1CB7EF66
Balance
0.231129 ETH ($477.27)
Nonce
1
Code Size
11142 bytes
Creator
0x0501F71c...6666 at tx 0x878b130f...0000c8
Indexed Transactions
0 (1 on-chain, 0.9% indexed)
Contract Bytecode
11142 bytes
0x6080604052600436106101a1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063152826e9146101a65780631ac9180e146101d55780631e1e2dbf146101f55780632a6f7c391461024c5780633865bf3a146102a35780633ccfd60b146102f55780635c16e15e1461030c5780635d3ca4ab146103635780637c4338af146103c957806382c97b8d1461042057806384054d3d1461047757806386f8950a1461048e578063928aeca0146104e5578063949cfc641461053c578063956d113b14610593578063a230c52414610600578063a3a826781461065b578063aedd18dc146106b2578063b29c662a1461070d578063be3f34a114610764578063c255fb17146107bb578063c93ceec814610812578063cac4977214610869578063cc47f054146108c0578063ce90998014610917578063cf0e80fe1461095a578063d5a849e9146109b1578063e3d670d714610a08578063e9288d7214610a5f578063f8b2cb4f14610a95578063f8e217c414610aec578063fb46834014610b43578063ff14ea2414610b6e575b600080fd5b3480156101b257600080fd5b506101bb610b99565b604051808215151515815260200191505060405180910390f35b6101f360048036038101908080359060200190929190505050610c98565b005b34801561020157600080fd5b5061020a610f86565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561025857600080fd5b50610261610fac565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102af57600080fd5b506102f36004803603810190808060c00190600680602002604051908101604052809291908260066020028082843782019150505050509192919290505050610fd2565b005b34801561030157600080fd5b5061030a611181565b005b34801561031857600080fd5b5061034d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061119b565b6040518082815260200191505060405180910390f35b6103c7600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001909291905050506111b3565b005b3480156103d557600080fd5b5061040a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061150f565b6040518082815260200191505060405180910390f35b34801561042c57600080fd5b50610461600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611615565b6040518082815260200191505060405180910390f35b34801561048357600080fd5b5061048c61182e565b005b34801561049a57600080fd5b506104cf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a32565b6040518082815260200191505060405180910390f35b3480156104f157600080fd5b50610526600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a67565b6040518082815260200191505060405180910390f35b34801561054857600080fd5b5061057d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a7f565b6040518082815260200191505060405180910390f35b34801561059f57600080fd5b506105be60048036038101908080359060200190929190505050611ae8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561060c57600080fd5b50610641600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b26565b604051808215151515815260200191505060405180910390f35b34801561066757600080fd5b5061069c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b46565b6040518082815260200191505060405180910390f35b3480156106be57600080fd5b506106f3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d5f565b604051808215151515815260200191505060405180910390f35b34801561071957600080fd5b50610722611dbe565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561077057600080fd5b506107a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611de4565b6040518082815260200191505060405180910390f35b3480156107c757600080fd5b506107fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ed5565b6040518082815260200191505060405180910390f35b34801561081e57600080fd5b50610853600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fdb565b6040518082815260200191505060405180910390f35b34801561087557600080fd5b5061087e6121f4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108cc57600080fd5b50610901600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061221a565b6040518082815260200191505060405180910390f35b34801561092357600080fd5b50610958600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612232565b005b34801561096657600080fd5b5061099b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612600565b6040518082815260200191505060405180910390f35b3480156109bd57600080fd5b506109f2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612648565b6040518082815260200191505060405180910390f35b348015610a1457600080fd5b50610a49600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061274e565b6040518082815260200191505060405180910390f35b610a93600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612766565b005b348015610aa157600080fd5b50610ad6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612846565b6040518082815260200191505060405180910390f35b348015610af857600080fd5b50610b2d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061289d565b6040518082815260200191505060405180910390f35b348015610b4f57600080fd5b50610b586129a3565b6040518082815260200191505060405180910390f35b348015610b7a57600080fd5b50610b836129b0565b6040518082815260200191505060405180910390f35b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166352620c79336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610c5857600080fd5b505af1158015610c6c573d6000803e3d6000fd5b505050506040513d6020811015610c8257600080fd5b8101908080519060200190929190505050905090565b60008060008060003394503493506000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549250600090506000841415610dc8576000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054861115610d4657610d4385611de4565b90505b8083018611151515610dc0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f62616c616e6365206e6f7420656e6f756768000000000000000000000000000081525060200191505060405180910390fd5b859150610dfb565b610dd185611de4565b9050610df881610dea85876129b690919063ffffffff16565b6129b690919063ffffffff16565b91505b610e2282610e14868401866129b690919063ffffffff16565b6129d790919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636f0b518083876040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b158015610f6557600080fd5b505af1158015610f79573d6000803e3d6000fd5b5050505050505050505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611082576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f616c72656164792073657475700000000000000000000000000000000000000081525060200191505060405180910390fd5b80600060068110151561109157fe5b6020020151600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060026006811015156110e557fe5b6020020151600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360068110151561113957fe5b6020020151600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905061118f81611de4565b5061119861182e565b50565b60066020528060005260406000206000915090505481565b60008060008060003394503493506000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506000905060008414156112e3576000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548611156112615761125e85611de4565b90505b80830186111515156112db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f62616c616e6365206e6f7420656e6f756768000000000000000000000000000081525060200191505060405180910390fd5b859150611316565b6112ec85611de4565b90506113138161130585876129b690919063ffffffff16565b6129b690919063ffffffff16565b91505b61133d8261132f868401866129b690919063ffffffff16565b6129d790919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637495a1e48389886040518463ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b838110156114a1578082015181840152602081019050611486565b50505050905090810190601f1680156114ce5780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156114ed57600080fd5b505af1158015611501573d6000803e3d6000fd5b505050505050505050505050565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a5603f02846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156115cf57600080fd5b505af11580156115e3573d6000803e3d6000fd5b505050506040513d60208110156115f957600080fd5b8101908080519060200190929190505050905080915050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f6e6f20726967687400000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639eca672c846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b505050506040513d60208110156117c557600080fd5b8101908080519060200190929190505050905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080915050919050565b6000803391506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811115156118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6e6f7468696e6720746f20636173686f7574000000000000000000000000000081525060200191505060405180910390fd5b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119396129f8565b611941610b99565b801561194d5750600081115b15156119e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f6e6565642031207469636b6574206f72207761697420746f206e657720726f7581526020017f6e6400000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611a2d573d6000803e3d6000fd5b505050565b600080611a3e8361150f565b611a4784612648565b611a5085611ed5565b611a598661289d565b010101905080915050919050565b60016020528060005260406000206000915090505481565b600080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544203905060055481101515611ada5760009150611ae2565b806005540391505b50919050565b600481815481101515611af757fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036020528060005260406000206000915054906101000a900460ff1681565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611c0f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f6e6f20726967687400000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639eca672c846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050506040513d6020811015611cf657600080fd5b8101908080519060200190929190505050905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080915050919050565b600080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015611db757506000611db583611a7f565b145b9050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611ead576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f6e6f20726967687400000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611eb683611615565b611ebf84611b46565b611ec885611fdb565b0101905080915050919050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c49ec27846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611f9557600080fd5b505af1158015611fa9573d6000803e3d6000fd5b505050506040513d6020811015611fbf57600080fd5b8101908080519060200190929190505050905080915050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156120a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f6e6f20726967687400000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639eca672c846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561216157600080fd5b505af1158015612175573d6000803e3d6000fd5b505050506040513d602081101561218b57600080fd5b8101908080519060200190929190505050905080600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080915050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b60008060008061224185611d5f565b15156122db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f6d656d626572207374696c6c20676f742074696d6520746f207769746864726181526020017f770000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141515156123a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f6e6f20726967687400000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205493506123eb85611b46565b92506123f685611fdb565b915061240185611615565b90508082840101600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdb662368284016040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15801561251f57600080fd5b505af1158015612533573d6000803e3d6000fd5b5050505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e947962b8460006040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b1580156125e057600080fd5b505af11580156125f4573d6000803e3d6000fd5b50505050505050505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d5a849e9846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561270857600080fd5b505af115801561271c573d6000803e3d6000fd5b505050506040513d602081101561273257600080fd5b8101908080519060200190929190505050905080915050919050565b60006020528060005260406000206000915090505481565b600034905042600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128006000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826129b690919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008061285283611a32565b90506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548101915050919050565b600080600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d8f3790f846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561295d57600080fd5b505af1158015612971573d6000803e3d6000fd5b505050506040513d602081101561298757600080fd5b8101908080519060200190929190505050905080915050919050565b6000600480549050905090565b60055481565b60008082840190508381101515156129cd57600080fd5b8091505092915050565b6000808383111515156129e957600080fd5b82840390508091505092915050565b600033905042600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612a9857612b57565b60048190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b505600a165627a7a723058201c4e75e2a7091d329840746beb1d489442a08110a18186678d3ceda713cd8b2f0029
Verified Source Code Partial Match
Compiler: v0.4.25+commit.59dbf8f1
EVM: byzantium
Optimization: No
Bank.sol 494 lines
pragma solidity ^0.4.24; /* * gibmireinbier * 0xA4a799086aE18D7db6C4b57f496B081b44888888 * [email protected] */ /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { int256 constant private INT256_MIN = -2**255; /** * @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); return c; } /** * @dev Multiplies two signed integers, reverts on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { // 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; } require(!(a == -1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below int256 c = a * b; require(c / a == b); 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); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. */ function div(int256 a, int256 b) internal pure returns (int256) { require(b != 0); // Solidity only automatically asserts when dividing by 0 require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow int256 c = a / b; 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); uint256 c = a - b; return c; } /** * @dev Subtracts two signed integers, reverts on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); 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); return c; } /** * @dev Adds two signed integers, reverts on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); 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); return a % b; } } interface F2mInterface { function joinNetwork(address[6] _contract) public; // one time called function disableRound0() public; function activeBuy() public; // Dividends from all sources (DApps, Donate ...) function pushDividends() public payable; /** * Converts all of caller's dividends to tokens. */ //function reinvest() public; //function buy() public payable; function buyFor(address _buyer) public payable; function sell(uint256 _tokenAmount) public; function exit() public; function devTeamWithdraw() public returns(uint256); function withdrawFor(address sender) public returns(uint256); function transfer(address _to, uint256 _tokenAmount) public returns(bool); /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ function setAutoBuy() public; /*========================================== = public FUNCTIONS = ==========================================*/ // function totalEthBalance() public view returns(uint256); function ethBalance(address _address) public view returns(uint256); function myBalance() public view returns(uint256); function myEthBalance() public view returns(uint256); function swapToken() public; function setNewToken(address _newTokenAddress) public; } interface CitizenInterface { function joinNetwork(address[6] _contract) public; /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ function devTeamWithdraw() public; /*---------- WRITE FUNCTIONS ----------*/ function updateUsername(string _sNewUsername) public; //Sources: Token contract, DApps function pushRefIncome(address _sender) public payable; function withdrawFor(address _sender) public payable returns(uint256); function devTeamReinvest() public returns(uint256); /*---------- READ FUNCTIONS ----------*/ function getRefWallet(address _address) public view returns(uint256); } interface LotteryInterface { function joinNetwork(address[6] _contract) public; // call one time function activeFirstRound() public; // Core Functions function pushToPot() public payable; function finalizeable() public view returns(bool); // bounty function finalize() public; function buy(string _sSalt) public payable; function buyFor(string _sSalt, address _sender) public payable; //function withdraw() public; function withdrawFor(address _sender) public returns(uint256); function getRewardBalance(address _buyer) public view returns(uint256); function getTotalPot() public view returns(uint256); // EarlyIncome function getEarlyIncomeByAddress(address _buyer) public view returns(uint256); // included claimed amount // function getEarlyIncomeByAddressRound(address _buyer, uint256 _rId) public view returns(uint256); function getCurEarlyIncomeByAddress(address _buyer) public view returns(uint256); // function getCurEarlyIncomeByAddressRound(address _buyer, uint256 _rId) public view returns(uint256); function getCurRoundId() public view returns(uint256); // set endRound, prepare to upgrade new version function setLastRound(uint256 _lastRoundId) public; function getPInvestedSumByRound(uint256 _rId, address _buyer) public view returns(uint256); function cashoutable(address _address) public view returns(bool); function isLastRound() public view returns(bool); } interface DevTeamInterface { function setF2mAddress(address _address) public; function setLotteryAddress(address _address) public; function setCitizenAddress(address _address) public; function setBankAddress(address _address) public; function setRewardAddress(address _address) public; function setWhitelistAddress(address _address) public; function setupNetwork() public; } contract Bank { using SafeMath for uint256; mapping(address => uint256) public balance; mapping(address => uint256) public claimedSum; mapping(address => uint256) public donateSum; mapping(address => bool) public isMember; address[] public member; uint256 public TIME_OUT = 7 * 24 * 60 * 60; mapping(address => uint256) public lastClaim; CitizenInterface public citizenContract; LotteryInterface public lotteryContract; F2mInterface public f2mContract; DevTeamInterface public devTeamContract; constructor (address _devTeam) public { // add administrators here devTeamContract = DevTeamInterface(_devTeam); devTeamContract.setBankAddress(address(this)); } // _contract = [f2mAddress, bankAddress, citizenAddress, lotteryAddress, rewardAddress, whitelistAddress]; function joinNetwork(address[6] _contract) public { require(address(citizenContract) == 0x0,"already setup"); f2mContract = F2mInterface(_contract[0]); //bankContract = BankInterface(bankAddress); citizenContract = CitizenInterface(_contract[2]); lotteryContract = LotteryInterface(_contract[3]); } // Core functions function pushToBank(address _player) public payable { uint256 _amount = msg.value; lastClaim[_player] = block.timestamp; balance[_player] = _amount.add(balance[_player]); } function collectDividends(address _member) public returns(uint256) { require(_member != address(devTeamContract), "no right"); uint256 collected = f2mContract.withdrawFor(_member); claimedSum[_member] += collected; return collected; } function collectRef(address _member) public returns(uint256) { require(_member != address(devTeamContract), "no right"); uint256 collected = citizenContract.withdrawFor(_member); claimedSum[_member] += collected; return collected; } function collectReward(address _member) public returns(uint256) { require(_member != address(devTeamContract), "no right"); uint256 collected = lotteryContract.withdrawFor(_member); claimedSum[_member] += collected; return collected; } function collectIncome(address _member) public returns(uint256) { require(_member != address(devTeamContract), "no right"); //lastClaim[_member] = block.timestamp; uint256 collected = collectDividends(_member) + collectRef(_member) + collectReward(_member); return collected; } function restTime(address _member) public view returns(uint256) { uint256 timeDist = block.timestamp - lastClaim[_member]; if (timeDist >= TIME_OUT) return 0; return TIME_OUT - timeDist; } function timeout(address _member) public view returns(bool) { return lastClaim[_member] > 0 && restTime(_member) == 0; } function memberLog() private { address _member = msg.sender; lastClaim[_member] = block.timestamp; if (isMember[_member]) return; member.push(_member); isMember[_member] = true; } function cashoutable() public view returns(bool) { return lotteryContract.cashoutable(msg.sender); } function cashout() public { address _sender = msg.sender; uint256 _amount = balance[_sender]; require(_amount > 0, "nothing to cashout"); balance[_sender] = 0; memberLog(); require(cashoutable() && _amount > 0, "need 1 ticket or wait to new round"); _sender.transfer(_amount); } // ref => devTeam // div => div // lottery => div function checkTimeout(address _member) public { require(timeout(_member), "member still got time to withdraw"); require(_member != address(devTeamContract), "no right"); uint256 _curBalance = balance[_member]; uint256 _refIncome = collectRef(_member); uint256 _divIncome = collectDividends(_member); uint256 _rewardIncome = collectReward(_member); donateSum[_member] += _refIncome + _divIncome + _rewardIncome; balance[_member] = _curBalance; f2mContract.pushDividends.value(_divIncome + _rewardIncome)(); citizenContract.pushRefIncome.value(_refIncome)(0x0); } function withdraw() public { address _member = msg.sender; collectIncome(_member); cashout(); //lastClaim[_member] = block.timestamp; } function lotteryReinvest(string _sSalt, uint256 _amount) public payable { address _sender = msg.sender; uint256 _deposit = msg.value; uint256 _curBalance = balance[_sender]; uint256 investAmount; uint256 collected = 0; if (_deposit == 0) { if (_amount > balance[_sender]) collected = collectIncome(_sender); require(_amount <= _curBalance + collected, "balance not enough"); investAmount = _amount;//_curBalance + collected; } else { collected = collectIncome(_sender); investAmount = _deposit.add(_curBalance).add(collected); } balance[_sender] = _curBalance.add(collected + _deposit).sub(investAmount); lastClaim [_sender] = block.timestamp; lotteryContract.buyFor.value(investAmount)(_sSalt, _sender); } function tokenReinvest(uint256 _amount) public payable { address _sender = msg.sender; uint256 _deposit = msg.value; uint256 _curBalance = balance[_sender]; uint256 investAmount; uint256 collected = 0; if (_deposit == 0) { if (_amount > balance[_sender]) collected = collectIncome(_sender); require(_amount <= _curBalance + collected, "balance not enough"); investAmount = _amount;//_curBalance + collected; } else { collected = collectIncome(_sender); investAmount = _deposit.add(_curBalance).add(collected); } balance[_sender] = _curBalance.add(collected + _deposit).sub(investAmount); lastClaim [_sender] = block.timestamp; f2mContract.buyFor.value(investAmount)(_sender); } // Read function getDivBalance(address _sender) public view returns(uint256) { uint256 _amount = f2mContract.ethBalance(_sender); return _amount; } function getEarlyIncomeBalance(address _sender) public view returns(uint256) { uint256 _amount = lotteryContract.getCurEarlyIncomeByAddress(_sender); return _amount; } function getRewardBalance(address _sender) public view returns(uint256) { uint256 _amount = lotteryContract.getRewardBalance(_sender); return _amount; } function getRefBalance(address _sender) public view returns(uint256) { uint256 _amount = citizenContract.getRefWallet(_sender); return _amount; } function getBalance(address _sender) public view returns(uint256) { uint256 _sum = getUnclaimedBalance(_sender); return _sum + balance[_sender]; } function getUnclaimedBalance(address _sender) public view returns(uint256) { uint256 _sum = getDivBalance(_sender) + getRefBalance(_sender) + getRewardBalance(_sender) + getEarlyIncomeBalance(_sender); return _sum; } function getClaimedBalance(address _sender) public view returns(uint256) { return balance[_sender]; } function getTotalMember() public view returns(uint256) { return member.length; } }
Read Contract
TIME_OUT 0xff14ea24 → uint256
balance 0xe3d670d7 → uint256
cashoutable 0x152826e9 → bool
citizenContract 0xcac49772 → address
claimedSum 0x928aeca0 → uint256
devTeamContract 0x1e1e2dbf → address
donateSum 0xcc47f054 → uint256
f2mContract 0x2a6f7c39 → address
getBalance 0xf8b2cb4f → uint256
getClaimedBalance 0xcf0e80fe → uint256
getDivBalance 0xf8e217c4 → uint256
getEarlyIncomeBalance 0x7c4338af → uint256
getRefBalance 0xc255fb17 → uint256
getRewardBalance 0xd5a849e9 → uint256
getTotalMember 0xfb468340 → uint256
getUnclaimedBalance 0x86f8950a → uint256
isMember 0xa230c524 → bool
lastClaim 0x5c16e15e → uint256
lotteryContract 0xb29c662a → address
member 0x956d113b → address
restTime 0x949cfc64 → uint256
timeout 0xaedd18dc → bool
Write Contract 11 functions
These functions modify contract state and require a wallet transaction to execute.
cashout 0x84054d3d
No parameters
checkTimeout 0xce909980
address _member
collectDividends 0xc93ceec8
address _member
returns: uint256
collectIncome 0xbe3f34a1
address _member
returns: uint256
collectRef 0xa3a82678
address _member
returns: uint256
collectReward 0x82c97b8d
address _member
returns: uint256
joinNetwork 0x3865bf3a
address[6] _contract
lotteryReinvest 0x5d3ca4ab
string _sSalt
uint256 _amount
pushToBank 0xe9288d72
address _player
tokenReinvest 0x1ac9180e
uint256 _amount
withdraw 0x3ccfd60b
No parameters
Recent Transactions
This address has 1 on-chain transactions, but only 0.9% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →