Address Contract Partially Verified
Address
0xEC8e8Fa10DA9a48881A9E7A4848E2B5f56b00F3c
Balance
0 ETH
Nonce
1
Code Size
10560 bytes
Creator
0x1c3fb971...828b at tx 0x29b0da0e...e7872f
Indexed Transactions
0
Contract Bytecode
10560 bytes
0x60806040526004361061016a5760003560e01c80636f33d9ed116100d1578063b6b55f251161008a578063d578ceab11610064578063d578ceab146104fd578063dc3496dd14610528578063f2fde38b14610553578063f3f91fa01461057c57610171565b8063b6b55f251461046c578063bec4de3f14610495578063c326bf4f146104c057610171565b80636f33d9ed1461036e578063715018a6146103995780637b0a47ee146103b05780638da5cb5b146103db57806398896d10146104065780639e447fc61461044357610171565b8063308feec311610123578063308feec31461025e5780633ad10ef61461028957806353f417a3146102b4578063583d42fd146102cb5780636270cd18146103085780636a395ccb1461034557610171565b80630735a0a8146101765780630edd2ffc146101a157806315eb7ccb146101cc57806319aa70e7146101f55780632913e5aa1461020c5780632e1a7d4d1461023557610171565b3661017157005b600080fd5b34801561018257600080fd5b5061018b6105b9565b6040516101989190611f2e565b60405180910390f35b3480156101ad57600080fd5b506101b66105bf565b6040516101c39190611f2e565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190611fac565b6105c5565b005b34801561020157600080fd5b5061020a61069e565b005b34801561021857600080fd5b50610233600480360381019061022e9190612005565b6106a9565b005b34801561024157600080fd5b5061025c60048036038101906102579190612045565b6107e8565b005b34801561026a57600080fd5b50610273610d3d565b6040516102809190611f2e565b60405180910390f35b34801561029557600080fd5b5061029e610d4e565b6040516102ab9190612081565b60405180910390f35b3480156102c057600080fd5b506102c9610d74565b005b3480156102d757600080fd5b506102f260048036038101906102ed9190611fac565b610e81565b6040516102ff9190611f2e565b60405180910390f35b34801561031457600080fd5b5061032f600480360381019061032a9190611fac565b610e99565b60405161033c9190611f2e565b60405180910390f35b34801561035157600080fd5b5061036c6004803603810190610367919061209c565b610eb1565b005b34801561037a57600080fd5b5061038361106a565b6040516103909190611f2e565b60405180910390f35b3480156103a557600080fd5b506103ae611070565b005b3480156103bc57600080fd5b506103c56111c3565b6040516103d29190611f2e565b60405180910390f35b3480156103e757600080fd5b506103f06111c9565b6040516103fd9190612081565b60405180910390f35b34801561041257600080fd5b5061042d60048036038101906104289190611fac565b6111f2565b60405161043a9190611f2e565b60405180910390f35b34801561044f57600080fd5b5061046a60048036038101906104659190612045565b611376565b005b34801561047857600080fd5b50610493600480360381019061048e9190612045565b611459565b005b3480156104a157600080fd5b506104aa611639565b6040516104b79190611f2e565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190611fac565b61163f565b6040516104f49190611f2e565b60405180910390f35b34801561050957600080fd5b50610512611657565b60405161051f9190611f2e565b60405180910390f35b34801561053457600080fd5b5061053d61165d565b60405161054a9190612081565b60405180910390f35b34801561055f57600080fd5b5061057a60048036038101906105759190611fac565b611683565b005b34801561058857600080fd5b506105a3600480360381019061059e9190611fac565b611845565b6040516105b09190611f2e565b60405180910390f35b60075481565b60065481565b6105cd61185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461065a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106519061214c565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106a733611865565b565b6106b161185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461073e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107359061214c565b60405180910390fd5b600654821115610783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077a906121b8565b60405180910390fd5b6007548111156107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bf90612224565b60405180910390fd5b8160068190555062015180816107de9190612273565b6007819055505050565b80600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561086a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086190612319565b60405180910390fd5b61087333611865565b6108c581600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8090919063ffffffff16565b600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061091d81600154611a8090919063ffffffff16565b600181905550610937336009611aca90919063ffffffff16565b801561098257506000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b1561099d5761099b336009611afa90919063ffffffff16565b505b60006109f1600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611a8090919063ffffffff16565b90506007548110610aeb57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401610a59929190612339565b602060405180830381600087803b158015610a7357600080fd5b505af1158015610a87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aab919061239a565b610aea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae190612413565b60405180910390fd5b5b600754811015610d39576000610b1f600654610b11606486611b2a90919063ffffffff16565b611b7490919063ffffffff16565b90506000610b368285611a8090919063ffffffff16565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610b95929190612339565b602060405180830381600087803b158015610baf57600080fd5b505af1158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be7919061239a565b610c26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1d90612413565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401610ca5929190612339565b602060405180830381600087803b158015610cbf57600080fd5b505af1158015610cd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf7919061239a565b610d36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2d90612413565b60405180910390fd5b50505b5050565b6000610d496009611bef565b905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d7c61185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e009061214c565b60405180910390fd5b6000610e136111c9565b73ffffffffffffffffffffffffffffffffffffffff1647604051610e3690612464565b60006040518083038185875af1925050503d8060008114610e73576040519150601f19603f3d011682016040523d82523d6000602084013e610e78565b606091505b50508091505050565b600c6020528060005260406000206000915090505481565b600e6020528060005260406000206000915090505481565b610eb961185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3d9061214c565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fce906124c5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401611012929190612339565b602060405180830381600087803b15801561102c57600080fd5b505af1158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061239a565b50505050565b60015481565b61107861185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611105576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fc9061214c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611208826009611aca90919063ffffffff16565b6112155760009050611371565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156112665760009050611371565b60006112ba600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611a8090919063ffffffff16565b9050600060045482116112cd57816112d1565b6004545b90506000600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611367606461135960045461134b8761133d60055489611b7490919063ffffffff16565b611b7490919063ffffffff16565b611b2a90919063ffffffff16565b611b2a90919063ffffffff16565b9050809450505050505b919050565b61137e61185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461140b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114029061214c565b60405180910390fd5b600181101561144f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144690612531565b60405180910390fd5b8060058190555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b81526004016114b893929190612551565b602060405180830381600087803b1580156114d257600080fd5b505af11580156114e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150a919061239a565b5061151433611865565b42600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115aa81600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0490919063ffffffff16565b600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061160281600154611c0490919063ffffffff16565b60018190555061161c336009611aca90919063ffffffff16565b61163657611634336009611c6290919063ffffffff16565b505b50565b60045481565b600b6020528060005260406000206000915090505481565b60085481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61168b61185d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611718576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170f9061214c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611788576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177f906125fa565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600d6020528060005260406000206000915090505481565b600033905090565b6000611870826111f2565b905042600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008114611a7c5761191081600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c0490919063ffffffff16565b600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061196881600854611c0490919063ffffffff16565b600881905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846040518463ffffffff1660e01b81526004016119ef93929190612551565b602060405180830381600087803b158015611a0957600080fd5b505af1158015611a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a41919061239a565b507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051611a73929190612339565b60405180910390a15b5050565b6000611ac283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c92565b905092915050565b6000611af2836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611cf6565b905092915050565b6000611b22836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611d19565b905092915050565b6000611b6c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e31565b905092915050565b600080831415611b875760009050611be9565b60008284611b959190612273565b9050828482611ba49190612649565b14611be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdb906126ec565b60405180910390fd5b809150505b92915050565b6000611bfd82600001611e94565b9050919050565b6000808284611c13919061270c565b905083811015611c58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4f906127ae565b60405180910390fd5b8091505092915050565b6000611c8a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611ea5565b905092915050565b6000838311158290611cda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd19190612856565b60405180910390fd5b5060008385611ce99190612878565b9050809150509392505050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083600101600084815260200190815260200160002054905060008114611e25576000600182611d4b9190612878565b9050600060018660000180549050611d639190612878565b90506000866000018281548110611d7d57611d7c6128ac565b5b9060005260206000200154905080876000018481548110611da157611da06128ac565b5b9060005260206000200181905550600183611dbc919061270c565b8760010160008381526020019081526020016000208190555086600001805480611de957611de86128db565b5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611e2b565b60009150505b92915050565b60008083118290611e78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6f9190612856565b60405180910390fd5b5060008385611e879190612649565b9050809150509392505050565b600081600001805490509050919050565b6000611eb18383611cf6565b611f0a578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611f0f565b600090505b92915050565b6000819050919050565b611f2881611f15565b82525050565b6000602082019050611f436000830184611f1f565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611f7982611f4e565b9050919050565b611f8981611f6e565b8114611f9457600080fd5b50565b600081359050611fa681611f80565b92915050565b600060208284031215611fc257611fc1611f49565b5b6000611fd084828501611f97565b91505092915050565b611fe281611f15565b8114611fed57600080fd5b50565b600081359050611fff81611fd9565b92915050565b6000806040838503121561201c5761201b611f49565b5b600061202a85828601611ff0565b925050602061203b85828601611ff0565b9150509250929050565b60006020828403121561205b5761205a611f49565b5b600061206984828501611ff0565b91505092915050565b61207b81611f6e565b82525050565b60006020820190506120966000830184612072565b92915050565b6000806000606084860312156120b5576120b4611f49565b5b60006120c386828701611f97565b93505060206120d486828701611f97565b92505060406120e586828701611ff0565b9150509250925092565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006121366020836120ef565b915061214182612100565b602082019050919050565b6000602082019050818103600083015261216581612129565b9050919050565b7f50656e616c74792063616e6e6f7420696e637265617365640000000000000000600082015250565b60006121a26018836120ef565b91506121ad8261216c565b602082019050919050565b600060208201905081810360008301526121d181612195565b9050919050565b7f4c6f636b20506572696f642063616e6e6f7420696e6372656173656400000000600082015250565b600061220e601c836120ef565b9150612219826121d8565b602082019050919050565b6000602082019050818103600083015261223d81612201565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061227e82611f15565b915061228983611f15565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156122c2576122c1612244565b5b828202905092915050565b7f496e76616c696420616d6f756e7420746f207769746864726177000000000000600082015250565b6000612303601a836120ef565b915061230e826122cd565b602082019050919050565b60006020820190508181036000830152612332816122f6565b9050919050565b600060408201905061234e6000830185612072565b61235b6020830184611f1f565b9392505050565b60008115159050919050565b61237781612362565b811461238257600080fd5b50565b6000815190506123948161236e565b92915050565b6000602082840312156123b0576123af611f49565b5b60006123be84828501612385565b91505092915050565b7f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000600082015250565b60006123fd601a836120ef565b9150612408826123c7565b602082019050919050565b6000602082019050818103600083015261242c816123f0565b9050919050565b600081905092915050565b50565b600061244e600083612433565b91506124598261243e565b600082019050919050565b600061246f82612441565b9150819050919050565b7f43616e6e6f74207769746864726177206e617469766520746f6b656e00000000600082015250565b60006124af601c836120ef565b91506124ba82612479565b602082019050919050565b600060208201905081810360008301526124de816124a2565b9050919050565b7f5265776172642073686f756c646e2774206265207a65726f0000000000000000600082015250565b600061251b6018836120ef565b9150612526826124e5565b602082019050919050565b6000602082019050818103600083015261254a8161250e565b9050919050565b60006060820190506125666000830186612072565b6125736020830185612072565b6125806040830184611f1f565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006125e46026836120ef565b91506125ef82612588565b604082019050919050565b60006020820190508181036000830152612613816125d7565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061265482611f15565b915061265f83611f15565b92508261266f5761266e61261a565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006126d66021836120ef565b91506126e18261267a565b604082019050919050565b60006020820190508181036000830152612705816126c9565b9050919050565b600061271782611f15565b915061272283611f15565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561275757612756612244565b5b828201905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000612798601b836120ef565b91506127a382612762565b602082019050919050565b600060208201905081810360008301526127c78161278b565b9050919050565b600081519050919050565b60005b838110156127f75780820151818401526020810190506127dc565b83811115612806576000848401525b50505050565b6000601f19601f8301169050919050565b6000612828826127ce565b61283281856120ef565b93506128428185602086016127d9565b61284b8161280c565b840191505092915050565b60006020820190508181036000830152612870818461281d565b905092915050565b600061288382611f15565b915061288e83611f15565b9250828210156128a1576128a0612244565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220eb1002da9a29c60e32f4742ca6407461907ad0a3b831ceafdf10dc1e01af703564736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: No
CIPHERStakingPool.sol 367 lines
pragma solidity 0.8.9;
// SPDX-License-Identifier: MIT
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 EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
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;
}
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
function _length(Set storage set) private view returns (uint256) {
return set._values.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];
}
struct Bytes32Set {
Set _inner;
}
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
return payable(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;
}
}
abstract contract Ownable is Context {
address private _owner;
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;
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
function balanceOf(address tokenOwner) external returns (uint);
}
contract CIPHERStakingPool is Ownable {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint256 amount);
//total tokens staked
uint256 public totalstaked = 0;
// Fees address...
address public devAddress = 0x1c3fb971f084AEa1ff3ebe207Bbd7e8EA026828b;
// CIPHER token contract...
address public CIPHER = 0xF453579d18a6F8CA07db9250e0E0100EB8CCb206;
// reward interval 30 days
uint256 public rewardInterval = 30 days;
// reward rate 8% per month
uint256 public rewardRate = 8;
//early unstaking fees
uint256 public penalty = 7;
uint256 public MinimumWithdrawTime = 15 days;
uint256 public totalClaimedRewards;
EnumerableSet.AddressSet private holders;
mapping (address => uint256) public depositedTokens;
mapping (address => uint256) public stakingTime;
mapping (address => uint256) public lastClaimedTime;
mapping (address => uint256) public totalEarnedTokens;
function updateAccount(address account) private {
uint256 pendingDivs = getPendingDivs(account);
lastClaimedTime[account] = block.timestamp;
if (pendingDivs != 0) {
totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs);
totalClaimedRewards = totalClaimedRewards.add(pendingDivs);
Token(CIPHER).transferFrom(devAddress ,account, pendingDivs);
emit RewardsTransferred(account, pendingDivs);
}
}
function getPendingDivs(address _holder) public view returns (uint256 _pendingDivs) {
if (!holders.contains(_holder)) return 0;
if (depositedTokens[_holder] == 0) return 0;
uint256 tDiff = block.timestamp.sub(lastClaimedTime[_holder]);
uint256 timeDiff = (tDiff > rewardInterval) ? rewardInterval : tDiff;
uint256 stakedAmount = depositedTokens[_holder];
uint256 pendingDivs = stakedAmount.mul(rewardRate).mul(timeDiff).div(rewardInterval).div(1e2);
return pendingDivs;
}
function getNumberOfHolders() public view returns (uint256) {
return holders.length();
}
function deposit(uint256 amountToStake) public {
Token(CIPHER).transferFrom(msg.sender, address(this), amountToStake);
updateAccount(msg.sender);
stakingTime[msg.sender] = block.timestamp;
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountToStake);
totalstaked = totalstaked.add(amountToStake);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
}
}
function withdraw(uint256 amountToWithdraw) public {
require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw");
updateAccount(msg.sender);
depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw);
totalstaked = totalstaked.sub(amountToWithdraw);
if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) {
holders.remove(msg.sender);
}
uint256 _lastClaimedTime = block.timestamp.sub(stakingTime[msg.sender]);
if (_lastClaimedTime >= MinimumWithdrawTime) {
require(Token(CIPHER).transfer(msg.sender, amountToWithdraw), "Could not transfer tokens.");
}
if (_lastClaimedTime < MinimumWithdrawTime) {
uint256 WithdrawFee = amountToWithdraw.div(100).mul(penalty);
uint256 amountAfterFee = amountToWithdraw.sub(WithdrawFee);
require(Token(CIPHER).transfer(msg.sender, amountAfterFee), "Could not transfer tokens.");
require(Token(CIPHER).transfer(devAddress, WithdrawFee), "Could not transfer tokens.");
}
}
function setWDFees(uint256 _fees, uint256 _days) public onlyOwner {
require(_fees <= penalty, "Penalty cannot increased");
require(_days <= MinimumWithdrawTime, "Lock Period cannot increased");
penalty = _fees;
MinimumWithdrawTime = _days* 1 days;
}
function setRewardRate(uint256 _rate) public onlyOwner {
require(_rate >= 1, "Reward shouldn't be zero");
rewardRate = _rate;
}
function claimDivs() public {
updateAccount(msg.sender);
}
function setDevaddress(address _devAadd) public onlyOwner {
devAddress = _devAadd;
}
function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner {
require(CIPHER != _tokenAddress, "Cannot withdraw native token");
Token(_tokenAddress).transfer(_to, _amount);
}
function TakeOutTheEthers() external onlyOwner {
bool success;
(success, ) = owner().call{value: address(this).balance}("");
}
receive() external payable {}
}
Read Contract
CIPHER 0xdc3496dd → address
MinimumWithdrawTime 0x0735a0a8 → uint256
depositedTokens 0xc326bf4f → uint256
devAddress 0x3ad10ef6 → address
getNumberOfHolders 0x308feec3 → uint256
getPendingDivs 0x98896d10 → uint256
lastClaimedTime 0xf3f91fa0 → uint256
owner 0x8da5cb5b → address
penalty 0x0edd2ffc → uint256
rewardInterval 0xbec4de3f → uint256
rewardRate 0x7b0a47ee → uint256
stakingTime 0x583d42fd → uint256
totalClaimedRewards 0xd578ceab → uint256
totalEarnedTokens 0x6270cd18 → uint256
totalstaked 0x6f33d9ed → uint256
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
TakeOutTheEthers 0x53f417a3
No parameters
claimDivs 0x19aa70e7
No parameters
deposit 0xb6b55f25
uint256 amountToStake
renounceOwnership 0x715018a6
No parameters
setDevaddress 0x15eb7ccb
address _devAadd
setRewardRate 0x9e447fc6
uint256 _rate
setWDFees 0x2913e5aa
uint256 _fees
uint256 _days
transferAnyERC20Tokens 0x6a395ccb
address _tokenAddress
address _to
uint256 _amount
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x2e1a7d4d
uint256 amountToWithdraw
Recent Transactions
No transactions found for this address