Source Code
Latest 25 from a total of 101 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Unstake | 16105424 | 1205 days ago | IN | 0 ETH | 0.00083512 | ||||
| Unstake | 16102107 | 1205 days ago | IN | 0 ETH | 0.00066016 | ||||
| Unstake | 16102104 | 1205 days ago | IN | 0 ETH | 0.00099873 | ||||
| Stake | 15883486 | 1236 days ago | IN | 0 ETH | 0.00854064 | ||||
| Stake | 15877865 | 1237 days ago | IN | 0 ETH | 0.00126254 | ||||
| Stake | 15868977 | 1238 days ago | IN | 0 ETH | 0.00273429 | ||||
| Unstake | 15865805 | 1238 days ago | IN | 0 ETH | 0.0005529 | ||||
| Stake | 15650243 | 1269 days ago | IN | 0 ETH | 0.00152874 | ||||
| Stake | 14716714 | 1417 days ago | IN | 0 ETH | 0.00427794 | ||||
| Stake | 14234068 | 1492 days ago | IN | 0 ETH | 0.01187695 | ||||
| Unstake | 14070697 | 1518 days ago | IN | 0 ETH | 0.01669036 | ||||
| Unstake | 13987075 | 1531 days ago | IN | 0 ETH | 0.01508274 | ||||
| Unstake | 13975048 | 1533 days ago | IN | 0 ETH | 0.00569842 | ||||
| Unstake | 13975040 | 1533 days ago | IN | 0 ETH | 0.00798782 | ||||
| Unstake | 13945151 | 1537 days ago | IN | 0 ETH | 0.00705541 | ||||
| Stake | 13875993 | 1548 days ago | IN | 0 ETH | 0.01326609 | ||||
| Unstake | 13815181 | 1557 days ago | IN | 0 ETH | 0.00499257 | ||||
| Unstake | 13810456 | 1558 days ago | IN | 0 ETH | 0.00531318 | ||||
| Stake | 13784491 | 1562 days ago | IN | 0 ETH | 0.00686215 | ||||
| Stake | 13772889 | 1564 days ago | IN | 0 ETH | 0.00824123 | ||||
| Stake | 13772218 | 1564 days ago | IN | 0 ETH | 0.01392566 | ||||
| Stake | 13749616 | 1567 days ago | IN | 0 ETH | 0.01696227 | ||||
| Unstake | 13722031 | 1572 days ago | IN | 0 ETH | 0.01255236 | ||||
| Stake | 13720358 | 1572 days ago | IN | 0 ETH | 0.02291598 | ||||
| Stake | 13719854 | 1572 days ago | IN | 0 ETH | 0.02307254 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BasicStakingContract
Compiler Version
v0.4.26+commit.4563c3fc
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2021-02-26
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-24
*/
/**
*Submitted for verification at Etherscan.io on 2021-02-17
*/
pragma solidity ^0.4.24;
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
);
}
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;
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;
}
}
contract ERC900 {
event Staked(address indexed user, uint256 amount, uint256 total, bytes data);
event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data);
function stake(uint256 amount, bytes data) public;
function stakeFor(address user, uint256 amount, bytes data) public;
function unstake(uint256 amount, bytes data) public;
function totalStakedFor(address addr) public view returns (uint256);
function totalStaked() public view returns (uint256);
function token() public view returns (address);
function supportsHistory() public pure returns (bool);
// NOTE: Not implementing the optional functions
// function lastStakedFor(address addr) public view returns (uint256);
// function totalStakedForAt(address addr, uint256 blockNumber) public view returns (uint256);
// function totalStakedAt(uint256 blockNumber) public view returns (uint256);
}
contract ERC900BasicStakeContract is ERC900 {
// @TODO: deploy this separately so we don't have to deploy it multiple times for each contract
using SafeMath for uint256;
// Token used for staking
ERC20 stakingToken;
// The default duration of stake lock-in (in seconds)
uint256 public defaultLockInDuration;
// To save on gas, rather than create a separate mapping for totalStakedFor & personalStakes,
// both data structures are stored in a single mapping for a given addresses.
//
// It's possible to have a non-existing personalStakes, but have tokens in totalStakedFor
// if other users are staking on behalf of a given address.
mapping (address => StakeContract) public stakeHolders;
// Struct for personal stakes (i.e., stakes made by this address)
// unlockedTimestamp - when the stake unlocks (in seconds since Unix epoch)
// actualAmount - the amount of tokens in the stake
// stakedFor - the address the stake was staked for
struct Stake {
uint256 unlockedTimestamp;
uint256 actualAmount;
address stakedFor;
}
// Struct for all stake metadata at a particular address
// totalStakedFor - the number of tokens staked for this address
// personalStakeIndex - the index in the personalStakes array.
// personalStakes - append only array of stakes made by this address
// exists - whether or not there are stakes that involve this address
struct StakeContract {
uint256 totalStakedFor;
uint256 personalStakeIndex;
Stake[] personalStakes;
bool exists;
}
/**
* @dev Modifier that checks that this contract can transfer tokens from the
* balance in the stakingToken contract for the given address.
* @dev This modifier also transfers the tokens.
* @param _address address to transfer tokens from
* @param _amount uint256 the number of tokens
*/
modifier canStake(address _address, uint256 _amount) {
require(
stakingToken.transferFrom(_address, this, _amount),
"Stake required");
_;
}
/**
* @dev Constructor function
* @param _stakingToken ERC20 The address of the token contract used for staking
*/
constructor(ERC20 _stakingToken) public {
stakingToken = _stakingToken;
}
/**
* @dev Returns the timestamps for when active personal stakes for an address will unlock
* @dev These accessors functions are needed until https://github.com/ethereum/web3.js/issues/1241 is solved
* @param _address address that created the stakes
* @return uint256[] array of timestamps
*/
function getPersonalStakeUnlockedTimestamps(address _address) external view returns (uint256[]) {
uint256[] memory timestamps;
(timestamps,,) = getPersonalStakes(_address);
return timestamps;
}
/**
* @dev Returns the stake actualAmount for active personal stakes for an address
* @dev These accessors functions are needed until https://github.com/ethereum/web3.js/issues/1241 is solved
* @param _address address that created the stakes
* @return uint256[] array of actualAmounts
*/
function getPersonalStakeActualAmounts(address _address) external view returns (uint256[]) {
uint256[] memory actualAmounts;
(,actualAmounts,) = getPersonalStakes(_address);
return actualAmounts;
}
/**
* @dev Returns the addresses that each personal stake was created for by an address
* @dev These accessors functions are needed until https://github.com/ethereum/web3.js/issues/1241 is solved
* @param _address address that created the stakes
* @return address[] array of amounts
*/
function getPersonalStakeForAddresses(address _address) external view returns (address[]) {
address[] memory stakedFor;
(,,stakedFor) = getPersonalStakes(_address);
return stakedFor;
}
/**
* @notice Stakes a certain amount of tokens, this MUST transfer the given amount from the user
* @notice MUST trigger Staked event
* @param _amount uint256 the amount of tokens to stake
* @param _data bytes optional data to include in the Stake event
*/
function stake(uint256 _amount, bytes _data) public {
createStake(
msg.sender,
_amount,
defaultLockInDuration,
_data);
}
/**
* @notice Stakes a certain amount of tokens, this MUST transfer the given amount from the caller
* @notice MUST trigger Staked event
* @param _user address the address the tokens are staked for
* @param _amount uint256 the amount of tokens to stake
* @param _data bytes optional data to include in the Stake event
*/
function stakeFor(address _user, uint256 _amount, bytes _data) public {
createStake(
_user,
_amount,
defaultLockInDuration,
_data);
}
/**
* @notice Unstakes a certain amount of tokens, this SHOULD return the given amount of tokens to the user, if unstaking is currently not possible the function MUST revert
* @notice MUST trigger Unstaked event
* @dev Unstaking tokens is an atomic operation—either all of the tokens in a stake, or none of the tokens.
* @dev Users can only unstake a single stake at a time, it is must be their oldest active stake. Upon releasing that stake, the tokens will be
* transferred back to their account, and their personalStakeIndex will increment to the next active stake.
* @param _amount uint256 the amount of tokens to unstake
* @param _data bytes optional data to include in the Unstake event
*/
function unstake(uint256 _amount, bytes _data) public {
withdrawStake(
_amount,
_data);
}
/**
* @notice Returns the current total of tokens staked for an address
* @param _address address The address to query
* @return uint256 The number of tokens staked for the given address
*/
function totalStakedFor(address _address) public view returns (uint256) {
return stakeHolders[_address].totalStakedFor;
}
/**
* @notice Returns the current total of tokens staked
* @return uint256 The number of tokens staked in the contract
*/
function totalStaked() public view returns (uint256) {
return stakingToken.balanceOf(this);
}
/**
* @notice Address of the token being used by the staking interface
* @return address The address of the ERC20 token used for staking
*/
function token() public view returns (address) {
return stakingToken;
}
/**
* @notice MUST return true if the optional history functions are implemented, otherwise false
* @dev Since we don't implement the optional interface, this always returns false
* @return bool Whether or not the optional history functions are implemented
*/
function supportsHistory() public pure returns (bool) {
return false;
}
/**
* @dev Helper function to get specific properties of all of the personal stakes created by an address
* @param _address address The address to query
* @return (uint256[], uint256[], address[])
* timestamps array, actualAmounts array, stakedFor array
*/
function getPersonalStakes(
address _address
)
public
view
returns(uint256[], uint256[], address[])
{
StakeContract storage stakeContract = stakeHolders[_address];
uint256 arraySize = stakeContract.personalStakes.length - stakeContract.personalStakeIndex;
uint256[] memory unlockedTimestamps = new uint256[](arraySize);
uint256[] memory actualAmounts = new uint256[](arraySize);
address[] memory stakedFor = new address[](arraySize);
for (uint256 i = stakeContract.personalStakeIndex; i < stakeContract.personalStakes.length; i++) {
uint256 index = i - stakeContract.personalStakeIndex;
unlockedTimestamps[index] = stakeContract.personalStakes[i].unlockedTimestamp;
actualAmounts[index] = stakeContract.personalStakes[i].actualAmount;
stakedFor[index] = stakeContract.personalStakes[i].stakedFor;
}
return (
unlockedTimestamps,
actualAmounts,
stakedFor
);
}
/**
* @dev Helper function to create stakes for a given address
* @param _address address The address the stake is being created for
* @param _amount uint256 The number of tokens being staked
* @param _lockInDuration uint256 The duration to lock the tokens for
* @param _data bytes optional data to include in the Stake event
*/
function createStake(
address _address,
uint256 _amount,
uint256 _lockInDuration,
bytes _data
)
internal
canStake(msg.sender, _amount)
{
require(
_amount > 0,
"Stake amount has to be greater than 0!");
if (!stakeHolders[msg.sender].exists) {
stakeHolders[msg.sender].exists = true;
}
stakeHolders[_address].totalStakedFor = stakeHolders[_address].totalStakedFor.add(_amount);
stakeHolders[msg.sender].personalStakes.push(
Stake(
block.timestamp.add(_lockInDuration),
_amount,
_address)
);
emit Staked(
_address,
_amount,
totalStakedFor(_address),
_data);
}
/**
* @dev Helper function to withdraw stakes for the msg.sender
* @param _amount uint256 The amount to withdraw. MUST match the stake amount for the
* stake at personalStakeIndex.
* @param _data bytes optional data to include in the Unstake event
*/
function withdrawStake(
uint256 _amount,
bytes _data
)
internal
{
Stake storage personalStake = stakeHolders[msg.sender].personalStakes[stakeHolders[msg.sender].personalStakeIndex];
// Check that the current stake has unlocked & matches the unstake amount
require(
personalStake.unlockedTimestamp <= block.timestamp,
"The current stake hasn't unlocked yet");
require(
personalStake.actualAmount == _amount,
"The unstake amount does not match the current stake");
// Transfer the staked tokens from this contract back to the sender
// Notice that we are using transfer instead of transferFrom here, so
// no approval is needed beforehand.
require(
stakingToken.transfer(msg.sender, _amount),
"Unable to withdraw stake");
stakeHolders[personalStake.stakedFor].totalStakedFor = stakeHolders[personalStake.stakedFor]
.totalStakedFor.sub(personalStake.actualAmount);
personalStake.actualAmount = 0;
stakeHolders[msg.sender].personalStakeIndex++;
emit Unstaked(
personalStake.stakedFor,
_amount,
totalStakedFor(personalStake.stakedFor),
_data);
}
}
contract BasicStakingContract is ERC900BasicStakeContract {
/**
* @dev Constructor function
* @param _stakingToken ERC20 The address of the token used for staking
* @param _lockInDuration uint256 The duration (in seconds) that stakes are required to be locked for
*/
constructor(
ERC20 _stakingToken,
uint256 _lockInDuration
)
public
ERC900BasicStakeContract(_stakingToken)
{
defaultLockInDuration = _lockInDuration;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_user","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"stakeFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"getPersonalStakeUnlockedTimestamps","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"getPersonalStakes","outputs":[{"name":"","type":"uint256[]"},{"name":"","type":"uint256[]"},{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"totalStakedFor","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"getPersonalStakeActualAmounts","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"supportsHistory","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_address","type":"address"}],"name":"getPersonalStakeForAddresses","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStaked","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"unstake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"stakeHolders","outputs":[{"name":"totalStakedFor","type":"uint256"},{"name":"personalStakeIndex","type":"uint256"},{"name":"exists","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"defaultLockInDuration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_stakingToken","type":"address"},{"name":"_lockInDuration","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"total","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"total","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Unstaked","type":"event"}]Contract Creation Code
608060405234801561001057600080fd5b50604051604080610efc83398101604052805160209091015160008054600160a060020a031916600160a060020a03909316929092178255600155610ea190819061005b90396000f3006080604052600436106100c45763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e89439b81146100c95780630ef9635614610129578063201d3be71461019257806320bf9620146102035780634b341aed1461030257806366e6360d146103355780637033e4a6146103565780638033f6bc1461037f578063817b1cd2146103a0578063c8fd6ed0146103b5578063e26ff10a14610413578063e8297da214610454578063fc0c546a14610469575b600080fd5b3480156100d557600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261012795833595369560449491939091019190819084018382808284375094975061049a9650505050505050565b005b34801561013557600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610127948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506104ac9650505050505050565b34801561019e57600080fd5b506101b3600160a060020a03600435166104bf565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101ef5781810151838201526020016101d7565b505050509050019250505060405180910390f35b34801561020f57600080fd5b50610224600160a060020a03600435166104d5565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561026c578181015183820152602001610254565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156102ab578181015183820152602001610293565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156102ea5781810151838201526020016102d2565b50505050905001965050505050505060405180910390f35b34801561030e57600080fd5b50610323600160a060020a0360043516610692565b60408051918252519081900360200190f35b34801561034157600080fd5b506101b3600160a060020a03600435166106ad565b34801561036257600080fd5b5061036b6106c2565b604080519115158252519081900360200190f35b34801561038b57600080fd5b506101b3600160a060020a03600435166106c7565b3480156103ac57600080fd5b506103236106dc565b3480156103c157600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101279583359536956044949193909101919081908401838280828437509497506107739650505050505050565b34801561041f57600080fd5b50610434600160a060020a036004351661077d565b604080519384526020840192909252151582820152519081900360600190f35b34801561046057600080fd5b506103236107a1565b34801561047557600080fd5b5061047e6107a7565b60408051600160a060020a039092168252519081900360200190f35b6104a83383600154846107b6565b5050565b6104ba8383600154846107b6565b505050565b6060806104cb836104d5565b5090949350505050565b600160a060020a03811660009081526002602081815260408084206001810154938101548251949003808552808402850190930190915260609384938493918491829182918190868015610533578160200160208202803883390190505b50945085604051908082528060200260200182016040528015610560578160200160208202803883390190505b5093508560405190808252806020026020018201604052801561058d578160200160208202803883390190505b509250866001015491505b60028701548210156106825786600101548203905086600201828154811015156105be57fe5b90600052602060002090600302016000015485828151811015156105de57fe5b60209081029091010152600287018054839081106105f857fe5b906000526020600020906003020160010154848281518110151561061857fe5b602090810290910101526002870180548390811061063257fe5b60009182526020909120600260039092020101548351600160a060020a039091169084908390811061066057fe5b600160a060020a03909216602092830290910190910152600190910190610598565b5092999198509650945050505050565b600160a060020a031660009081526002602052604090205490565b6060806106b9836104d5565b50949350505050565b600090565b6060806106d3836104d5565b95945050505050565b60008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b15801561074257600080fd5b505af1158015610756573d6000803e3d6000fd5b505050506040513d602081101561076c57600080fd5b5051905090565b6104a88282610afb565b60026020526000908152604090208054600182015460039092015490919060ff1683565b60015481565b600054600160a060020a031690565b60008054604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820181905230602483015260448201889052915191938793600160a060020a0316926323b872dd926064808201936020939283900390910190829087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b505050506040513d602081101561085857600080fd5b505115156108b0576040805160e560020a62461bcd02815260206004820152600e60248201527f5374616b65207265717569726564000000000000000000000000000000000000604482015290519081900360640190fd5b6000851161092e576040805160e560020a62461bcd02815260206004820152602660248201527f5374616b6520616d6f756e742068617320746f2062652067726561746572207460448201527f68616e2030210000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b3360009081526002602052604090206003015460ff16151561096857336000908152600260205260409020600301805460ff191660011790555b600160a060020a038616600090815260026020526040902054610991908663ffffffff610e5016565b600160a060020a038716600090815260026020819052604080832093909355338252908290208251606081019093520190806109d3428863ffffffff610e5016565b81526020808201899052600160a060020a038a811660409384018190528554600180820188556000978852968490208651600390920201908155928501519583019590955592909101516002909101805473ffffffffffffffffffffffffffffffffffffffff1916919092161790557fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f16093514286610a6d89610692565b866040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ab7578181015183820152602001610a9f565b50505050905090810190601f168015610ae45780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050505050565b33600090815260026020819052604082206001810154910180549091908110610b2057fe5b9060005260206000209060030201905042816000015411151515610bb4576040805160e560020a62461bcd02815260206004820152602560248201527f5468652063757272656e74207374616b65206861736e277420756e6c6f636b6560448201527f6420796574000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60018101548314610c35576040805160e560020a62461bcd02815260206004820152603360248201527f54686520756e7374616b6520616d6f756e7420646f6573206e6f74206d61746360448201527f68207468652063757272656e74207374616b6500000000000000000000000000606482015290519081900360840190fd5b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018790529051600160a060020a039092169263a9059cbb926044808401936020939083900390910190829087803b158015610ca357600080fd5b505af1158015610cb7573d6000803e3d6000fd5b505050506040513d6020811015610ccd57600080fd5b50511515610d25576040805160e560020a62461bcd02815260206004820152601860248201527f556e61626c6520746f207769746864726177207374616b650000000000000000604482015290519081900360640190fd5b6001810154600280830154600160a060020a031660009081526020919091526040902054610d589163ffffffff610e6316565b60028281018054600160a060020a039081166000908152602093909352604080842094909455600180860184905533845293909220830180549093019092559054167faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c875484610dc583610692565b856040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e0f578181015183820152602001610df7565b50505050905090810190601f168015610e3c5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050565b81810182811015610e5d57fe5b92915050565b600082821115610e6f57fe5b509003905600a165627a7a723058204b303eb18851047dc1d29ae82f12547c01d9658bb358f1143c0be5c6bdd9f246002900000000000000000000000080c8c3dcfb854f9542567c8dac3f44d709ebc1de0000000000000000000000000000000000000000000000000000000000278d00
Deployed Bytecode
0x6080604052600436106100c45763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630e89439b81146100c95780630ef9635614610129578063201d3be71461019257806320bf9620146102035780634b341aed1461030257806366e6360d146103355780637033e4a6146103565780638033f6bc1461037f578063817b1cd2146103a0578063c8fd6ed0146103b5578063e26ff10a14610413578063e8297da214610454578063fc0c546a14610469575b600080fd5b3480156100d557600080fd5b5060408051602060046024803582810135601f810185900485028601850190965285855261012795833595369560449491939091019190819084018382808284375094975061049a9650505050505050565b005b34801561013557600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610127948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506104ac9650505050505050565b34801561019e57600080fd5b506101b3600160a060020a03600435166104bf565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101ef5781810151838201526020016101d7565b505050509050019250505060405180910390f35b34801561020f57600080fd5b50610224600160a060020a03600435166104d5565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561026c578181015183820152602001610254565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156102ab578181015183820152602001610293565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156102ea5781810151838201526020016102d2565b50505050905001965050505050505060405180910390f35b34801561030e57600080fd5b50610323600160a060020a0360043516610692565b60408051918252519081900360200190f35b34801561034157600080fd5b506101b3600160a060020a03600435166106ad565b34801561036257600080fd5b5061036b6106c2565b604080519115158252519081900360200190f35b34801561038b57600080fd5b506101b3600160a060020a03600435166106c7565b3480156103ac57600080fd5b506103236106dc565b3480156103c157600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101279583359536956044949193909101919081908401838280828437509497506107739650505050505050565b34801561041f57600080fd5b50610434600160a060020a036004351661077d565b604080519384526020840192909252151582820152519081900360600190f35b34801561046057600080fd5b506103236107a1565b34801561047557600080fd5b5061047e6107a7565b60408051600160a060020a039092168252519081900360200190f35b6104a83383600154846107b6565b5050565b6104ba8383600154846107b6565b505050565b6060806104cb836104d5565b5090949350505050565b600160a060020a03811660009081526002602081815260408084206001810154938101548251949003808552808402850190930190915260609384938493918491829182918190868015610533578160200160208202803883390190505b50945085604051908082528060200260200182016040528015610560578160200160208202803883390190505b5093508560405190808252806020026020018201604052801561058d578160200160208202803883390190505b509250866001015491505b60028701548210156106825786600101548203905086600201828154811015156105be57fe5b90600052602060002090600302016000015485828151811015156105de57fe5b60209081029091010152600287018054839081106105f857fe5b906000526020600020906003020160010154848281518110151561061857fe5b602090810290910101526002870180548390811061063257fe5b60009182526020909120600260039092020101548351600160a060020a039091169084908390811061066057fe5b600160a060020a03909216602092830290910190910152600190910190610598565b5092999198509650945050505050565b600160a060020a031660009081526002602052604090205490565b6060806106b9836104d5565b50949350505050565b600090565b6060806106d3836104d5565b95945050505050565b60008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b15801561074257600080fd5b505af1158015610756573d6000803e3d6000fd5b505050506040513d602081101561076c57600080fd5b5051905090565b6104a88282610afb565b60026020526000908152604090208054600182015460039092015490919060ff1683565b60015481565b600054600160a060020a031690565b60008054604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820181905230602483015260448201889052915191938793600160a060020a0316926323b872dd926064808201936020939283900390910190829087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b505050506040513d602081101561085857600080fd5b505115156108b0576040805160e560020a62461bcd02815260206004820152600e60248201527f5374616b65207265717569726564000000000000000000000000000000000000604482015290519081900360640190fd5b6000851161092e576040805160e560020a62461bcd02815260206004820152602660248201527f5374616b6520616d6f756e742068617320746f2062652067726561746572207460448201527f68616e2030210000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b3360009081526002602052604090206003015460ff16151561096857336000908152600260205260409020600301805460ff191660011790555b600160a060020a038616600090815260026020526040902054610991908663ffffffff610e5016565b600160a060020a038716600090815260026020819052604080832093909355338252908290208251606081019093520190806109d3428863ffffffff610e5016565b81526020808201899052600160a060020a038a811660409384018190528554600180820188556000978852968490208651600390920201908155928501519583019590955592909101516002909101805473ffffffffffffffffffffffffffffffffffffffff1916919092161790557fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f16093514286610a6d89610692565b866040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ab7578181015183820152602001610a9f565b50505050905090810190601f168015610ae45780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050505050565b33600090815260026020819052604082206001810154910180549091908110610b2057fe5b9060005260206000209060030201905042816000015411151515610bb4576040805160e560020a62461bcd02815260206004820152602560248201527f5468652063757272656e74207374616b65206861736e277420756e6c6f636b6560448201527f6420796574000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60018101548314610c35576040805160e560020a62461bcd02815260206004820152603360248201527f54686520756e7374616b6520616d6f756e7420646f6573206e6f74206d61746360448201527f68207468652063757272656e74207374616b6500000000000000000000000000606482015290519081900360840190fd5b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018790529051600160a060020a039092169263a9059cbb926044808401936020939083900390910190829087803b158015610ca357600080fd5b505af1158015610cb7573d6000803e3d6000fd5b505050506040513d6020811015610ccd57600080fd5b50511515610d25576040805160e560020a62461bcd02815260206004820152601860248201527f556e61626c6520746f207769746864726177207374616b650000000000000000604482015290519081900360640190fd5b6001810154600280830154600160a060020a031660009081526020919091526040902054610d589163ffffffff610e6316565b60028281018054600160a060020a039081166000908152602093909352604080842094909455600180860184905533845293909220830180549093019092559054167faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c875484610dc583610692565b856040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e0f578181015183820152602001610df7565b50505050905090810190601f168015610e3c5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050565b81810182811015610e5d57fe5b92915050565b600082821115610e6f57fe5b509003905600a165627a7a723058204b303eb18851047dc1d29ae82f12547c01d9658bb358f1143c0be5c6bdd9f2460029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000080c8c3dcfb854f9542567c8dac3f44d709ebc1de0000000000000000000000000000000000000000000000000000000000278d00
-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x80c8C3dCfB854f9542567c8Dac3f44D709eBc1de
Arg [1] : _lockInDuration (uint256): 2592000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000080c8c3dcfb854f9542567c8dac3f44d709ebc1de
Arg [1] : 0000000000000000000000000000000000000000000000000000000000278d00
Deployed Bytecode Sourcemap
13805:477:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7227:156;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7227:156:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7227:156:0;;-1:-1:-1;7227:156:0;;-1:-1:-1;;;;;;;7227:156:0;;;7737:169;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7737:169:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7737:169:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7737:169:0;;-1:-1:-1;7737:169:0;;-1:-1:-1;;;;;;;7737:169:0;5674:213;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5674:213:0;-1:-1:-1;;;;;5674:213:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5674:213:0;;;;;;;;;;;;;;;;;10236:986;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10236:986:0;-1:-1:-1;;;;;10236:986:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10236:986:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10236:986:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;10236:986:0;;;;;;;;;;;;;;;;;;;;;8972:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8972:129:0;-1:-1:-1;;;;;8972:129:0;;;;;;;;;;;;;;;;;;;;;6204:217;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6204:217:0;-1:-1:-1;;;;;6204:217:0;;;;;9870:79;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9870:79:0;;;;;;;;;;;;;;;;;;;;;;6736:204;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6736:204:0;-1:-1:-1;;;;;6736:204:0;;;;;9244:101;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9244:101:0;;;;8646:111;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8646:111:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8646:111:0;;-1:-1:-1;8646:111:0;;-1:-1:-1;;;;;;;8646:111:0;3735:54;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3735:54:0;-1:-1:-1;;;;;3735:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3350:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3350:36:0;;;;9506:79;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9506:79:0;;;;;;;;-1:-1:-1;;;;;9506:79:0;;;;;;;;;;;;;;7227:156;7286:91;7306:10;7325:7;7341:21;;7371:5;7286:11;:91::i;:::-;7227:156;;:::o;7737:169::-;7814:86;7834:5;7848:7;7864:21;;7894:5;7814:11;:86::i;:::-;7737:169;;;:::o;5674:213::-;5759:9;5777:27;5828;5846:8;5828:17;:27::i;:::-;-1:-1:-1;5811:44:0;;5674:213;-1:-1:-1;;;;5674:213:0:o;10236:986::-;-1:-1:-1;;;;;10407:22:0;;10369:35;10407:22;;;:12;:22;;;;;;;;10496:32;;;;10458:28;;;:35;10573:24;;10458:70;;;10573:24;;;;;;;;;;;;;;10326:9;;;;;;10458:70;10326:9;;;;;;10369:35;;10458:70;10573:24;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10573:24:0;;10535:62;;10651:9;10637:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10637:24:0;;10604:57;;10711:9;10697:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10697:24:0;;10668:53;;10747:13;:32;;;10735:44;;10730:397;10785:28;;;:35;10781:39;;10730:397;;;10856:13;:32;;;10852:1;:36;10836:52;;10925:13;:28;;10954:1;10925:31;;;;;;;;;;;;;;;;;;;;:49;;;10897:18;10916:5;10897:25;;;;;;;;;;;;;;;;;;:77;11006:28;;;:31;;11035:1;;11006:31;;;;;;;;;;;;;;;;:44;;;10983:13;10997:5;10983:20;;;;;;;;;;;;;;;;;;:67;11078:28;;;:31;;11107:1;;11078:31;;;;;;;;;;;;;;:41;:31;;;;;:41;;11059:16;;-1:-1:-1;;;;;11078:41:0;;;;11059:9;;11069:5;;11059:16;;;;;;-1:-1:-1;;;;;11059:60:0;;;:16;;;;;;;;;;:60;10822:3;;;;;10730:397;;;-1:-1:-1;11151:18:0;;11178:13;;-1:-1:-1;11200:9:0;-1:-1:-1;10236:986:0;-1:-1:-1;;;;;10236:986:0:o;8972:129::-;-1:-1:-1;;;;;9058:22:0;9035:7;9058:22;;;:12;:22;;;;;:37;;8972:129::o;6204:217::-;6284:9;6302:30;6359:27;6377:8;6359:17;:27::i;:::-;-1:-1:-1;6339:47:0;6204:217;-1:-1:-1;;;;6204:217:0:o;9870:79::-;9918:4;9870:79;:::o;6736:204::-;6815:9;6833:26;6882:27;6900:8;6882:17;:27::i;:::-;6866:43;6736:204;-1:-1:-1;;;;;6736:204:0:o;9244:101::-;9288:7;9311:12;;:28;;;;;;9334:4;9311:28;;;;;;-1:-1:-1;;;;;9311:12:0;;;;:22;;:28;;;;;;;;;;;;;;;9288:7;9311:12;:28;;;5:2:-1;;;;30:1;27;20:12;5:2;9311:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9311:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9311:28:0;;-1:-1:-1;9244:101:0;:::o;8646:111::-;8707:44;8729:7;8745:5;8707:13;:44::i;3735:54::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3350:36::-;;;;:::o;9506:79::-;9544:7;9567:12;-1:-1:-1;;;;;9567:12:0;9506:79;:::o;11584:719::-;5042:12;;;:50;;;;;;11731:10;5042:50;;;;;;5078:4;5042:50;;;;;;;;;;;;11731:10;;11743:7;;-1:-1:-1;;;;;5042:12:0;;:25;;:50;;;;;;;;;;;;;;;;;:12;:50;;;5:2:-1;;;;30:1;27;20:12;5:2;5042:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5042:50:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5042:50:0;5026:92;;;;;;;-1:-1:-1;;;;;5026:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11788:1;11778:11;;11762:77;;;;;-1:-1:-1;;;;;11762:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11864:10;11851:24;;;;:12;:24;;;;;:31;;;;;11850:32;11846:93;;;11906:10;11893:24;;;;:12;:24;;;;;:31;;:38;;-1:-1:-1;;11893:38:0;11927:4;11893:38;;;11846:93;-1:-1:-1;;;;;11987:22:0;;;;;;:12;:22;;;;;:37;:50;;12029:7;11987:50;:41;:50;:::i;:::-;-1:-1:-1;;;;;11947:22:0;;;;;;:12;:22;;;;;;;;:90;;;;12057:10;12044:24;;;;;;12097:90;;;;;;;;12044:39;;12097:90;12113:36;:15;12133;12113:36;:19;:36;:::i;:::-;12097:90;;;;;;;;;-1:-1:-1;;;;;12097:90:0;;;;;;;;;;27:10:-1;;39:1;23:18;;;45:23;;-1:-1;12044:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;12044:152:0;;;;;;;;12210:87;12097:90;12258:24;12097:90;12258:14;:24::i;:::-;12291:5;12210:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;12210:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11584:719;;;;;;:::o;12584:1214::-;12719:10;12676:27;12706:24;;;:12;:24;;;;;;;12746:43;;;;12706:39;;:84;;:39;;12746:43;12706:84;;;;;;;;;;;;;;;;12676:114;;12929:15;12894:13;:31;;;:50;;12878:115;;;;;;;-1:-1:-1;;;;;12878:115:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13018:26;;;;:37;;13002:116;;;;;-1:-1:-1;;;;;13002:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13334:12;;;:42;;;;;;13356:10;13334:42;;;;;;;;;;;;-1:-1:-1;;;;;13334:12:0;;;;:21;;:42;;;;;;;;;;;;;;;;;:12;:42;;;5:2:-1;;;;30:1;27;20:12;5:2;13334:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13334:42:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13334:42:0;13318:94;;;;;;;-1:-1:-1;;;;;13318:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13541:26;;;;13476:12;13489:23;;;;-1:-1:-1;;;;;13489:23:0;13476:37;;;;;;;;;;;;:60;:92;;;:64;:92;:::i;:::-;13421:12;13434:23;;;;;-1:-1:-1;;;;;13434:23:0;;;13421:37;;;;;;;;;;;;;:147;;;;13434:23;13577:26;;;:30;;;13627:10;13614:24;;;;;;:43;;:45;;;;;;;;13690:23;;;13673:119;13722:7;13738:39;13690:23;13738:14;:39::i;:::-;13786:5;13673:119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;13673:119:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12584:1214;;;:::o;2006:127::-;2086:5;;;2105:6;;;;2098:14;;;;2006:127;;;;:::o;1826:113::-;1884:7;1907:6;;;;1900:14;;;;-1:-1:-1;1928:5:0;;;1826:113::o
Swarm Source
bzzr://4b303eb18851047dc1d29ae82f12547c01d9658bb358f1143c0be5c6bdd9f246
Loading...
Loading
Loading...
Loading
Net Worth in USD
$57.48
Net Worth in ETH
0.028065
Token Allocations
MILK2
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.000699 | 82,220.2139 | $57.48 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.