Contract
0xbd674127d5c06d2814f599c31a1e36902d9ca2c9
2
Contract Overview
Balance:
1,115.432303975251501898 CRO
CRO Value:
$92.48 (@ $0.08/CRO)
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
MoneyTreeWallet
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at cronoscan.com on 2022-04-18 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.9; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } contract MoneyTreeWallet { using SafeMath for uint256; uint256 public fundsReceived = 0; uint256 public fundsWithdrawn = 0; address payable private t1; //sks71093 address payable private t2; //bagmonster constructor(address p1, address p2){ t1 = payable(p1); t2 = payable(p2); } modifier onlyOwner() { require(msg.sender == t1 || msg.sender == t2, "Wallet: caller is not the owner"); _; } receive() external payable { } function withdraw(uint256 amount) public onlyOwner{ require(amount <= address(this).balance); uint256 t1Amount = amount.div(2); uint256 t2Amount = amount.sub(t1Amount); t1.transfer(t1Amount); t2.transfer(t2Amount); fundsWithdrawn += amount; } function withdrawAll() public onlyOwner { uint256 amount = payable(address(this)).balance; t1.transfer(amount.div(2)); t2.transfer(payable(address(this)).balance); fundsWithdrawn += amount; } }
[{"inputs":[{"internalType":"address","name":"p1","type":"address"},{"internalType":"address","name":"p2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"fundsReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundsWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260008055600060015534801561001957600080fd5b50604051610921380380610921833981810160405281019061003b9190610127565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610167565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100f4826100c9565b9050919050565b610104816100e9565b811461010f57600080fd5b50565b600081519050610121816100fb565b92915050565b6000806040838503121561013e5761013d6100c4565b5b600061014c85828601610112565b925050602061015d85828601610112565b9150509250929050565b6107ab806101766000396000f3fe6080604052600436106100435760003560e01c806311318b331461004f5780632e1a7d4d1461007a578063853828b6146100a3578063ac307fcf146100ba5761004a565b3661004a57005b600080fd5b34801561005b57600080fd5b506100646100e5565b6040516100719190610566565b60405180910390f35b34801561008657600080fd5b506100a1600480360381019061009c91906105b2565b6100eb565b005b3480156100af57600080fd5b506100b86102ff565b005b3480156100c657600080fd5b506100cf61051b565b6040516100dc9190610566565b60405180910390f35b60005481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806101945750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6101d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ca9061063c565b60405180910390fd5b478111156101e057600080fd5b60006101f660028361052190919063ffffffff16565b9050600061020d828461053790919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610277573d6000803e3d6000fd5b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156102e0573d6000803e3d6000fd5b5082600160008282546102f3919061068b565b92505081905550505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103a85750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6103e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103de9061063c565b60405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff16319050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61045360028461052190919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561047e573d6000803e3d6000fd5b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501580156104fe573d6000803e3d6000fd5b508060016000828254610511919061068b565b9250508190555050565b60015481565b6000818361052f9190610710565b905092915050565b600081836105459190610741565b905092915050565b6000819050919050565b6105608161054d565b82525050565b600060208201905061057b6000830184610557565b92915050565b600080fd5b61058f8161054d565b811461059a57600080fd5b50565b6000813590506105ac81610586565b92915050565b6000602082840312156105c8576105c7610581565b5b60006105d68482850161059d565b91505092915050565b600082825260208201905092915050565b7f57616c6c65743a2063616c6c6572206973206e6f7420746865206f776e657200600082015250565b6000610626601f836105df565b9150610631826105f0565b602082019050919050565b6000602082019050818103600083015261065581610619565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106968261054d565b91506106a18361054d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106d6576106d561065c565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061071b8261054d565b91506107268361054d565b925082610736576107356106e1565b5b828204905092915050565b600061074c8261054d565b91506107578361054d565b92508282101561076a5761076961065c565b5b82820390509291505056fea26469706673582212209a7441062857ba56e6420febc0c44fecf4434301fc3c5ac9fc8edf90f8d8f79e64736f6c634300080900330000000000000000000000006400e517d8b26808413cec27b600a0a82126923e0000000000000000000000003aa3b36ad3ff4024988e37d683f4468f5761da5e
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006400e517d8b26808413cec27b600a0a82126923e0000000000000000000000003aa3b36ad3ff4024988e37d683f4468f5761da5e
-----Decoded View---------------
Arg [0] : p1 (address): 0x6400e517d8b26808413cec27b600a0a82126923e
Arg [1] : p2 (address): 0x3aa3b36ad3ff4024988e37d683f4468f5761da5e
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006400e517d8b26808413cec27b600a0a82126923e
Arg [1] : 0000000000000000000000003aa3b36ad3ff4024988e37d683f4468f5761da5e
Deployed ByteCode Sourcemap
6927:1077:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6992:32;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;7460:301;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;7769:232;;;;;;;;;;;;;:::i;:::-;;7031:33;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6992:32;;;;:::o;7460:301::-;7323:2;;;;;;;;;;;7309:16;;:10;:16;;;:36;;;;7343:2;;;;;;;;;;;7329:16;;:10;:16;;;7309:36;7301:80;;;;;;;;;;;;:::i;:::-;;;;;;;;;7539:21:::1;7529:6;:31;;7521:40;;;::::0;::::1;;7572:16;7591:13;7602:1;7591:6;:10;;:13;;;;:::i;:::-;7572:32;;7615:16;7634:20;7645:8;7634:6;:10;;:20;;;;:::i;:::-;7615:39;;7665:2;;;;;;;;;;;:11;;:21;7677:8;7665:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;7697:2;;;;;;;;;;;:11;;:21;7709:8;7697:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;7747:6;7729:14;;:24;;;;;;;:::i;:::-;;;;;;;;7510:251;;7460:301:::0;:::o;7769:232::-;7323:2;;;;;;;;;;;7309:16;;:10;:16;;;:36;;;;7343:2;;;;;;;;;;;7329:16;;:10;:16;;;7309:36;7301:80;;;;;;;;;;;;:::i;:::-;;;;;;;;;7820:14:::1;7853:4;7837:30;;;7820:47;;7878:2;;;;;;;;;;;:11;;:26;7890:13;7901:1;7890:6;:10;;:13;;;;:::i;:::-;7878:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;7915:2;;;;;;;;;;;:11;;:43;7943:4;7927:30;;;7915:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;7987:6;7969:14;;:24;;;;;;;:::i;:::-;;;;;;;;7809:192;7769:232::o:0;7031:33::-;;;;:::o;3899:98::-;3957:7;3988:1;3984;:5;;;;:::i;:::-;3977:12;;3899:98;;;;:::o;3143:::-;3201:7;3232:1;3228;:5;;;;:::i;:::-;3221:12;;3143:98;;;;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o;523:117::-;632:1;629;622:12;769:122;842:24;860:5;842:24;:::i;:::-;835:5;832:35;822:63;;881:1;878;871:12;822:63;769:122;:::o;897:139::-;943:5;981:6;968:20;959:29;;997:33;1024:5;997:33;:::i;:::-;897:139;;;;:::o;1042:329::-;1101:6;1150:2;1138:9;1129:7;1125:23;1121:32;1118:119;;;1156:79;;:::i;:::-;1118:119;1276:1;1301:53;1346:7;1337:6;1326:9;1322:22;1301:53;:::i;:::-;1291:63;;1247:117;1042:329;;;;:::o;1377:169::-;1461:11;1495:6;1490:3;1483:19;1535:4;1530:3;1526:14;1511:29;;1377:169;;;;:::o;1552:181::-;1692:33;1688:1;1680:6;1676:14;1669:57;1552:181;:::o;1739:366::-;1881:3;1902:67;1966:2;1961:3;1902:67;:::i;:::-;1895:74;;1978:93;2067:3;1978:93;:::i;:::-;2096:2;2091:3;2087:12;2080:19;;1739:366;;;:::o;2111:419::-;2277:4;2315:2;2304:9;2300:18;2292:26;;2364:9;2358:4;2354:20;2350:1;2339:9;2335:17;2328:47;2392:131;2518:4;2392:131;:::i;:::-;2384:139;;2111:419;;;:::o;2536:180::-;2584:77;2581:1;2574:88;2681:4;2678:1;2671:15;2705:4;2702:1;2695:15;2722:305;2762:3;2781:20;2799:1;2781:20;:::i;:::-;2776:25;;2815:20;2833:1;2815:20;:::i;:::-;2810:25;;2969:1;2901:66;2897:74;2894:1;2891:81;2888:107;;;2975:18;;:::i;:::-;2888:107;3019:1;3016;3012:9;3005:16;;2722:305;;;;:::o;3033:180::-;3081:77;3078:1;3071:88;3178:4;3175:1;3168:15;3202:4;3199:1;3192:15;3219:185;3259:1;3276:20;3294:1;3276:20;:::i;:::-;3271:25;;3310:20;3328:1;3310:20;:::i;:::-;3305:25;;3349:1;3339:35;;3354:18;;:::i;:::-;3339:35;3396:1;3393;3389:9;3384:14;;3219:185;;;;:::o;3410:191::-;3450:4;3470:20;3488:1;3470:20;:::i;:::-;3465:25;;3504:20;3522:1;3504:20;:::i;:::-;3499:25;;3543:1;3540;3537:8;3534:34;;;3548:18;;:::i;:::-;3534:34;3593:1;3590;3586:9;3578:17;;3410:191;;;;:::o
Swarm Source
ipfs://9a7441062857ba56e6420febc0c44fecf4434301fc3c5ac9fc8edf90f8d8f79e
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.